Date: Tue, 6 Apr 1999 21:22:50 -0400 Message-Id: <199904070122.VAA03572@envy.delorie.com> From: DJ Delorie To: djgpp-workers AT delorie DOT com In-reply-to: <7aa6585.243c053e@aol.com> (Kbwms@aol.com) Subject: Re: v2.03 release: what else has to be done? References: <7aa6585 DOT 243c053e AT aol DOT com> Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Suppose we define fflush(FILE *stream) as > > flush the buffer associated with the stream If stdin is the keyboard, the "buffer" will be the remainder of the line (or maybe it won't), but if stdin is a file (i.e. redirected input), then the "buffer" will be 512 bytes or more, depending on where in the file you are (djgpp's slow-start buffering, remember?), up to the size of the transfer buffer. It would be bad if fflush(stdin) threw away your entire input file, yes? I think that this problem alone is enough to choose to not actually try to flush the input buffer. Portable programs will use scanf("%*[^\n]\n"); anyway.