Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!elroy!gryphon!vector!rpp386!jfh From: jfh@rpp386.UUCP (The Beach Bum) Newsgroups: comp.lang.c Subject: Re: Echoing chars and input functions Message-ID: <5758@rpp386.UUCP> Date: 24 Aug 88 12:36:14 GMT References: <8808160751.aa03016@SMOKE.BRL.MIL> <8349@smoke.ARPA> <1342@ficc.UUCP> Reply-To: jfh@rpp386.UUCP (The Beach Bum) Organization: HASA, "S" Division Lines: 24 In article <1342@ficc.UUCP> peter@ficc.UUCP (Peter da Silva) writes: >What lightspeed 'C' should have done is: > > (1) Make getchar() echo by default, using the same routines > that fread() and gets() use, and... > > (2) Provide an emulation of ioctl() or sgtty(). this is the best way to handle messy-dos that i've seen yet. if it could be limited to the console it might even work ;-). it still does not address the issue of i/o redirection from a file or a pipe, or freopen calls or anything. in the presence of a suitable emulation for isatty(), filbuf() [ or whatever routine the macro calls ] could test for the console being the input device. problems abound. the issue of line buffering and editing aren't even addressed. adding the entire unix line discipline to the c runtime is not a pretty thought. -- John F. Haugh II (jfh@rpp386.UUCP) HASA, "S" Division "If the code and the comments disagree, then both are probably wrong." -- Norm Schryer