Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3E60B397.394804C1@phekda.freeserve.co.uk> Date: Sat, 01 Mar 2003 13:20:23 +0000 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp-workers AT delorie DOT com Subject: Re: Use _get_dev_info & constants in isatty;add test [PATCH] References: <5567-Sat01Mar2003141929+0200-eliz AT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Eli Zaretskii wrote: > > > Date: Thu, 27 Feb 2003 14:40:28 +0000 > > From: "Richard Dawe" > > > > I noticed the other day that isatty uses values rather than using > > the constants from . So I fixed that. I also made > > it use a _get_dev_info call, rather than duplicating that code. > > Using _get_dev_info means that it will detect bad file descriptors > > and return errno == EBADF and -1 (as required by POSIX). > > I also added a test program. See the patch below. > > > > OK to commit? > > Yes, thanks. Committed. > Please add something to wc204.txi about isatty testing invalid > handles and returning EBADF, unlike in previous versions. Yes, of course. Thanks for catching that! I added this text to src/docs/kb/wc204.txi. "The function @code{isatty} now checks whether the file descriptor passed to it is a valid. If not, it will fail and set @code{errno} to @code{EBADF}." Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]