Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!ig!agate!labrea!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Getchar w/wout echo Message-ID: <319@quintus.UUCP> Date: 26 Aug 88 10:38:10 GMT References: <371@marob.MASA.COM> <225800052@uxe.cso.uiuc.edu> <65197@sun.uucp> <302@quintus.UUCP> <1988Aug23.164855.26679@utzoo.uucp> <309@ <6589@haddock.ima.isc.com> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 30 In article <6589@haddock.ima.isc.com> karl@haddock.isc.com (Karl Heuer) proposes a rawenable(), getrawchar(), rawdisable() interface. >Let's begin by ignoring the issue of exactly what "raw" means. Let's not. The original topic was reading without _echoing_, which is not the same thing as reading without line-editing. For example, when entering a password, I do *not* want it echoed (not even as "#"s, which is what login does on our Sun 386i, naughty naughty) but I *do* want to be able to correct it as I enter it. Then there's the question of what interrupt characters are heeded (which should be done per-character, but that's another story). Then again, there's the distinction between function keys sending escape sequence -vs- "keycodes". If I expect to read function keys as raw codes of some sort, how do I do that so that it will work on IBM PCs and Apollos? (Curses *does* map function keys to keycodes for you...) A program which is connected to a "terminal" might be connected directly to a keyboard, or it might be connected through a network. "raw" might well mean different things in those two cases. When you are using STREAMS, which modules are absent when you're in raw mode? >If getrawchar() is called from cooked mode, or any stdio function from raw >mode, the behavior is undefined. Does this mean ANY sort of stdio, or only stdio to streams which are not known not to be terminals? Why shouldn't I be allowed to write to a disc file while the terminal is in raw mode?