Getchar w/wout echo
Dan Mercer
mercer at ncrcce.StPaul.NCR.COM
Tue Aug 30 07:44:42 AEST 1988
Another one of those fine confused wish list discussions. Unfortunately,
like the other discussions of this type, it is fatally flawed.
The problem is, evreyone seems to be confusing language functionality
with os functionality. Terminal echo is a function provided by the
operating system (in this case, UNIX(tm)). Whether or not echoing
is going on is invisible to getchar(), and read. The tty device driver
is controlling this operation, and only an ioctl can change its
behaviour. In many cases, the echoing function is not even taking
place on the same processor. In the NCR TOWER(tm) series, the
echoing is being done on the HPSIO (a separate 68010 based processor)
and is thereby not burdening the CPU.
In Amdahl hosts running UTS in a network, the echoing may be
done by and Amdahl 4705(tm) channel attached to the host.
Ioctl calls will generate commnds to the front end processor to
change its character reading behaviour.
In fact, in many cases, the echo may already have occurred
before the echoing can be turned off.
Before you go mucking with the language, I suggest you learn
a bit more about your hardware, your operating system, and
how they interrelate. Then I suggest you do what I did when I
wrote a menuing system - read everything available about the
tty device drivers, stty, and termio, experiment like
crazy, then write your own raw character input routines.
No flame intended.
Dan Mercer - NCR COMTEN
More information about the Comp.lang.c
mailing list