home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sun-barr!cs.utexas.edu!sdd.hp.com!wupost!darwin.sura.net!sgiblab!munnari.oz.au!cs.mu.OZ.AU!montebello.ecom.unimelb.EDU.AU!carl
- From: carl@montebello.ecom.unimelb.EDU.AU (Carl Brewer)
- Subject: Re: strange things with gcc
- Message-ID: <9232210.1910@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU
- Organization: Dept. Engineering Computer Resources, Melbourne Uni.
- References: <9232201.24197@mulga.cs.mu.OZ.AU>
- Date: Mon, 16 Nov 1992 23:26:24 GMT
- Lines: 29
-
- In article <9232201.24197@mulga.cs.mu.OZ.AU> carl@montebello.ecom.unimelb.EDU.AU (Carl Brewer) writes:
- >I've ahd some funny problems with gcc on SunOS 4.1.2 of late, it doesn't
- >seem to handle fflush(stdin) very well (ie not at all).
-
- which has been explained, I'm burning the book today !!!
-
-
- wonder if anyone can offer a suggestion as to how to get this little
- routine to work.
-
- because, if I *don't* do the undefined fflush(stdin) before I try to grab
- any input, then the thing doesn't work at all, it just skips itself, somewhere
- it is reading in a <cr> from, and the only way I can get it to avoid that,
- is to use the evil (non-ansi?) fflush(stdin). All I want is a simple
- pause and wait for <cr>, it *should* be so easy as to be rediculous ...
-
- (btw, acc (the Sun ANSI C compiler) does work when fflush(stdin) is used,
- but barfs if I don't use it ...
-
- maybe there is some other way to clear the buffer from stdin (preferable
- without using ioctl) ????
-
-
-
- --
- Annal Natrach, Usthvah Spethed, carl@ecr.mu.oz.au (IRC: Bleve)
- Dochoel Dienve carl@munagin.ee.mu.oz.au
- carl@montebello.ecom.unimelb.EDU.AU
- Merlin, where are you? Call your dragon, to weave a mist...
-