Date: Wed, 14 Mar 2001 20:22:01 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp-workers AT delorie DOT com Message-Id: <2110-Wed14Mar2001202201+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 In-reply-to: <200103141429.JAA14360@envy.delorie.com> (message from DJ Delorie on Wed, 14 Mar 2001 09:29:40 -0500) Subject: Re: zero fill the eof gap (complete patch) References: <200103141429 DOT JAA14360 AT envy DOT delorie DOT com> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Wed, 14 Mar 2001 09:29:40 -0500 > From: DJ Delorie > > > > I think you should simply return zero here: it doesn't make sense to > > zero-fill gaps in writes to terminal devices. > > The flag is only set if a non-beginning lseek *succeeds*. Can that > happen for non-real-files? IIRC, an lseek on a terminal always succeeds (but does nothing). (That's why fseeking stdin is one way of getting the effect of emptying the buffered data, like Borland's fflush(stdin) does.)