🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #2990

Discrepancy in behaviour between Lattice and UNIX C gets()

#2990
From: Fred Walter
Date: Mon, 19 Mar 1990 02:16
19 lines
1355 bytes
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)
Technical Details
Message-ID: <22174@watdragon.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watdragon!watfun!grwalter

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watdragon!watfun!grwalter
From: grwalter@watfun.waterloo.edu (Fred Walter)
Newsgroups: comp.sys.amiga.tech
Subject: Discrepancy in behaviour between Lattice and UNIX C gets()
Message-ID: <22174@watdragon.waterloo.edu>
Date: 19 Mar 90 02:16:40 GMT
Sender: daemon@watdragon.waterloo.edu
Distribution: comp
Lines: 19