grwalter@watfun.waterloo.edu (Fred Walter) (03/19/90)
UNIX C has gets() (and presumably getchar() as well) flush stdout before waiting for input. I'm not sure if this is part of the definition, but this is what happens. Lattice C 5.04 doesn't do this. Is there someway of telling Lattice to do this ? I'm asking in the context of p2c (pascal-to-c convertor) which automatically produces c code (which, with the examples I've tried it on, produces code that, when compiled with Lattice, actually works ! - so I'll put it up on xanth soon). I know, I can have p2c automatically put a fflush(stdout); before every gets() and getchar() (and anywhere else that I find out that such flushing is done) but this solution seems inelegant to me. Advance thanx, fred grwalter@watmath.uwaterloo.ca (Canadian domain) grwalter@watmath.waterloo.edu (US Internet, including CSNET) grwalter@watmath.waterloo.cdn (CDNnet and some European nets) watmath!grwalter (UUCP)