delorie.com/archives/browse.cgi | search |
From: | "John M. Aldrich" <fighteer AT cs DOT com> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: flushing buffers |
Date: | Wed, 27 Nov 1996 20:02:06 -0800 |
Organization: | Three pounds of chaos and a pinch of salt |
Lines: | 18 |
Message-ID: | <329D0EBE.4F52@cs.com> |
References: | <A967083001E72A00 AT iris DOT ernet DOT in> |
Reply-To: | fighteer AT cs DOT com |
NNTP-Posting-Host: | ppp105.cs.com |
Mime-Version: | 1.0 |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Apparently-To: | djgpp AT delorie DOT com |
tehmul%NIITPUN AT iris DOT ernet DOT in wrote: > > I had the same problem. ANSI doesn't define fflush on input streams which is > why the fflush didn't work. Use rewind( stdin ) instead of fflush( stdin ). > That ought to cure your woes. I didn't know that rewind() was defined on stdin... but the libc docs show rewind( stdin ) as its example! Is this ANSI-compliant behavior? -- John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com> -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>+ W++ N++ o+ K? w(---) O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+ tv+() b+++ DI++ D++ G e(*)>++++ h!() !r !y+() ------END GEEK CODE BLOCK------
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |