www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/14/06:30:59

From: nikki AT gameboutique DOT co (nikki)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: TCP/IP Library, Svasync Library, and a Stdout that won't flush
Date: 14 Feb 1997 10:12:13 GMT
Organization: GameBoutique Ltd.
Lines: 22
Message-ID: <5e1dpt$jq2@flex.uunet.pipex.com>
References: <32FE32DF DOT 0 AT cyberspace DOT com> <5dr5ki$8qs AT flex DOT uunet DOT pipex DOT com>
<33013F95 DOT 5F30 AT juno DOT com>
NNTP-Posting-Host: www.gameboutique.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> fflush(stdout);fflush(stdin);
> printf("Analyze (C)ompressed or (U)ncompressed file? ");
> fflush(stdout);
> option = getchar();
> 
> 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?  Thanks.  

well you can't flush stdin as far as i know. if you want to ensure the
keyboard buffer is empty you can either a) set both the keyboard pointers
to point to the same location (messy but fast) of b) use the equiv. dos or
bios command which i can't remember offhand cos i always do it the fast way ;)
should be in any reasonable reference book though.

regards,
nik


-- 
Graham Tootell           
nikki AT gameboutique DOT com  

- Raw text -


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