Date: Mon, 12 Apr 1999 17:49:16 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: DJ Delorie cc: djgpp-workers AT delorie DOT com Subject: Re: v2.03 release: what else has to be done? In-Reply-To: <199904121436.KAA18419@envy.delorie.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Mon, 12 Apr 1999, DJ Delorie wrote: > I think what they're trying to do is discard the remainder of the > input line, ala scanf("%*[^\n]\n"). The problem with fflush is that > it discards more than that when stdin is redirected. Then maybe fflush(stdin) needs just to set a flag that discards the newline *iff* the newline is the first character in the buffer, and if some specific functions, like scanf, are called after that, and if stdin is the console device?