www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/13/10:56:33

Date: Thu, 13 Feb 1997 17:31:06 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Logan Bowers <LegoB AT juno DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: TCP/IP Library, Svasync Library, and a Stdout that won't flush
In-Reply-To: <33013F95.5F30@juno.com>
Message-ID: <Pine.SUN.3.91.970213172745.10250A-100000@is>
MIME-Version: 1.0

On Tue, 11 Feb 1997, Logan Bowers wrote:

> The coputer doesn't wait, but continues on even though I flushed the
> stdin.  Is there any other function I need call, or some little detail
> I'm missing?

ANSI C standard says `fflush' effect on stdin is undefined.  In DJGPP, it 
does nothing.  So if stdin has some characters pending, `getchar' will 
pick them.

The best way to handle screen I/O is to use screen-oriented functions 
(cputs and cprintf for output, cgets and getch for input).  Look them up 
in the library reference.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019