X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: 08 Sep 2003 08:19:49 +0200 Message-Id: From: Eli Zaretskii To: Ethan Rosenberg CC: djgpp AT delorie DOT com In-reply-to: <3.0.1.16.20030907233739.385fbbf6@earthlink.net> (message from Ethan Rosenberg on Sun, 07 Sep 2003 23:37:39 -0400) Subject: Re: multiple fgets() References: <3 DOT 0 DOT 1 DOT 16 DOT 20030907233739 DOT 385fbbf6 AT earthlink DOT net> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Sun, 07 Sep 2003 23:37:39 -0400 > From: Ethan Rosenberg > > If the user types more than 8 characters, the remaining characters are left > in the keyboard(?) buffer, and are picked up by the next fgets. How do I > get rid of the remaining characters, before the following fgets. One way is to continue calling fgets until it returns a buffer that ends with a \n character.