Getchar w/wout echo
steve emmerson
steve at umigw.MIAMI.EDU
Fri Aug 26 23:11:25 AEST 1988
In article <6589 at haddock.ima.isc.com> karl at haddock.isc.com (Karl Heuer) writes:
>Rawenable() and rawdisable() change the state from cooked to raw or
>from raw to cooked, respectively; if called from the "wrong" state,
>the behavior is undefined.
I would prefer that rawenable() and rawdisable() be idempotent* rather
than undefined, unless, of course, this means that they can't be
implemented on some systems.
I believe this would enable slightly cleaner programs as the relevant
state information would be contained (at least conceptually) in the
raw{en,dis}able()/getrawchar() module -- discharging the programer from
responsibility over the matter.
------------
* "idempotent" means that the effect of calling it twice is the same as
calling it once, i.e. the second call is a functional no-op.)
--
Steve Emmerson Inet: steve at umigw.miami.edu [128.116.10.1]
SPAN: miami::emmerson (host 3074::) emmerson%miami.span at star.stanford.edu
UUCP: ...!ncar!umigw!steve emmerson%miami.span at vlsi.jpl.nasa.gov
"Computers are like God in the Old Testament: lots of rules and no mercy"
More information about the Comp.lang.c
mailing list