delorie.com/archives/browse.cgi | search |
From: | DavMac AT iname DOT com (Davin McCall) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Flushing input stream? |
Date: | Thu, 08 Jul 1999 04:20:41 GMT |
Organization: | Monash Uni |
Lines: | 23 |
Distribution: | world |
Message-ID: | <3784268a.526045@newsserver.cc.monash.edu.au> |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 990707155822 DOT 2851c-100000 AT is> |
NNTP-Posting-Host: | damcc5.halls.monash.edu.au |
X-Trace: | towncrier.cc.monash.edu.au 931407623 14957 130.194.198.138 (8 Jul 1999 04:20:23 GMT) |
X-Complaints-To: | abuse AT monash DOT edu DOT au |
NNTP-Posting-Date: | 8 Jul 1999 04:20:23 GMT |
X-Newsreader: | Forte Free Agent 1.1/32.230 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
On Wed, 7 Jul 1999 15:59:09 +0300 (IDT), Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote: >It depends on what level do you want to empty the input. Borland's >fflush(stdin) only empties the characters buffered in the stdin FILE >object. This effect can be achieved by calling fseek, like this: > > fseek (stdin, -66000, SEEK_CUR); > >(The magic number 66000 is meant to be larger than any possible size >of the so-called transfer buffer used by a DJGPP program to pass data >to and from real-mode services.) Shouldn't it be positive? That would give the impression of seeking "beyond" the end of buffered data, although I suppose a negative number would achieve similar results. Is there any reason why you made it negative? Davin. __________________________________________________________ *** davmac - sharkin'!! davmac AT iname DOT com *** my programming page: http://yoyo.cc.monash.edu.au/~davmac/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |