Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Making chars disappear Message-ID: <4785@goanna.cs.rmit.oz.au> Date: 19 Feb 91 02:52:32 GMT References: <8531@castle.ed.ac.uk> <22233@hydra.gatech.EDU> Distribution: comp Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 21 In article <22233@hydra.gatech.EDU>, ccastdf@prism.gatech.EDU (Dave) writes: > In article <8531@castle.ed.ac.uk> james@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