Sender: nate AT cartsys DOT com Message-ID: <35CA4428.27B48B43@cartsys.com> Date: Thu, 06 Aug 1998 17:02:48 -0700 From: Nate Eldredge MIME-Version: 1.0 To: Carlos Eduardo Dantas de Menezes CC: dj AT delorie DOT com, djgpp-workers AT delorie DOT com, Vik DOT Heyndrickx AT rug DOT ac DOT be Subject: Re: References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Precedence: bulk Carlos Eduardo Dantas de Menezes wrote: > > Dear colleagues, > > I am having some problems with an earlier version (about 1 year > old) of DJGPP and I would like to know if this bug was corrected > in latest version. > It is related with input/output stream: when I mix a function > like getc (conio.h) with scanf, the behavior of input stream is > uncommon - sometimes, one scanf command is ignored - and > fflush(stdin) doesn't works! > Similar things occur with output stream when I use gotoxy function: > sometimes, characteres doesn't appear when printf is used! It is not a bug. stdio functions use line buffering when connected to the terminal, so the text will not appear until you print a newline or `fflush(stdout)'. This is documented in several places, notably FAQ section 9.4. In general, mixing stdio and conio is to be avoided; use one or the other. fflush(stdin) is not supposed to work; ANSI says that the effect of fflush'ing an input stream is undefined. The fact that some compilers (like Borland) do something useful in that case is their own extension and is not portable. -- Nate Eldredge nate AT cartsys DOT com