Getchar w/wout echo

Karl Heuer karl at haddock.ima.isc.com
Fri Aug 26 07:03:33 AEST 1988


In article <65474 at sun.uucp> swilson%thetone at Sun.COM (Scott Wilson) writes:
>[ok at quintus (Richard O'Keefe) writes:]
>>Who _cares_ how much baggage comes with Curses?
>
>[On a small machine, it makes a difference.]
>And curses is not universally available.

And if all I want is to read a raw character (no echo and no line editing),
then curses is not only overkill, but may not work.  What if I don't have a
termcap/terminfo entry?  The ioctl doesn't need it, but at least one version
of curses will silently exit(1) if it can't find one.  Also, I believe that
curses insists on having complete control over the terminal; you can't
reliably use stdio while curses is active.  Finally, endwin() always attempts
to move the cursor to the bottom of the screen, which is inappropriate.

(A background voice is heard: "Why don't you suggest something better, then?")

See my next article.

Karl W. Z. Heuer (ima!haddock!karl or karl at haddock.isc.com), The Walking Lint



More information about the Comp.lang.c mailing list