Making chars disappear
Richard A. O'Keefe
ok at goanna.cs.rmit.oz.au
Tue Feb 19 13:52:32 AEST 1991
In article <22233 at hydra.gatech.EDU>, ccastdf at prism.gatech.EDU (Dave) writes:
> In article <8531 at castle.ed.ac.uk> james at castle.ed.ac.uk (J Gillespie) writes:
> >Does anyone know of a way to prevent characters being echoed as they
> >are typed in?
> In unix, you need to set the mode to raw. This can be done by invoking
> an ioctl command, or by isuing an stty system call.
(a) This is a system-specific question, and should be asked in an
appropriate system-specific newsgroup.
(b) Check "getpass" in section 3 of the UNIX manual
(c) The claim that you have to go into "raw" mode in UNIX is *BOGUS*.
It simply is not true. It's ever so simple:
system("stty -echo"); /* disables echoing */
system("stty echo"); /* enables it again */
other aspects, such as editing characters, are NOT affected by this.
The *only* thing that is switched off is echoing. (Do be careful
to switch it back on even if you get a "drop dead" signal.)
--
Professional programming is paranoid programming
More information about the Comp.lang.c
mailing list