Getchar w/wout echo

Richard A. O'Keefe ok at quintus.uucp
Fri Aug 26 20:38:10 AEST 1988


In article <6589 at haddock.ima.isc.com> karl at 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?



More information about the Comp.lang.c mailing list