delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/27/14:26:01

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Flusing keyboard buffer
Date: Sat, 27 Feb 1999 15:12:07 -0400
Organization: BrunNet
Lines: 31
Message-ID: <36D84387.90D723E2@unb.ca>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990117122657 DOT 278d-100000 AT is> <36A20566 DOT 3251 AT magicsoftware DOT freeserve DOT co DOT uk>
NNTP-Posting-Host: ftnts4c61.brunnet.net
Mime-Version: 1.0
X-Mailer: Mozilla 4.04 [en] (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Simon wrote:

> Eli Zaretskii wrote:
> >
> > On Sat, 16 Jan 1999, Simon wrote:
> >
> > > Can anyone tell me a function that will remove all unfetched
> > > key strokes from the keyboard buffer !
> >
> > Here's one possible way:
> >
> >        while (kbhit ())
> >          getkey ();
>
> Sorry It does do what I want, I just though there may have been a
> specific function to do it
> Thanks for your help!
> Simon

     You can use:
rewind(stdin);
    That should kill the pending keystrokes in one function call.

--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlisnis AT BrunNet DOT Net
          Endlisnis AT HotMail DOT com


- Raw text -


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