Echoing chars and input functions

The Beach Bum jfh at rpp386.UUCP
Wed Aug 24 22:36:14 AEST 1988


In article <1342 at ficc.UUCP> peter at 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 at rpp386.UUCP)                           HASA, "S" Division

    "If the code and the comments disagree, then both are probably wrong."
                -- Norm Schryer



More information about the Comp.lang.c mailing list