getting a key from stdin in UNIX

Chris Torek chris at mimsy.umd.edu
Thu Feb 8 09:02:55 AEST 1990


In article <7184 at arcturus> evil at arcturus.UUCP (Wade Guthrie) writes:
>... what about those of us that can answer the question in a non-machine
>specific way?

Your way is not specific to one particular machine, or even one particular
version of (UNIX | VMS | MS-DOS | ...), but it is not C.  It merely happens
to be *coded* *in* C.

>Try using curses ....

Oddly enough, curses does not exist on Univac 1100 systems running EXEC-8
even when those systems have C compilers (some do).  Then again, perhaps
it is not so odd, since the system is not in general capable of character-
at-a-time input.  Similarly, there are a number of IBM systems that can
support ANSI X3.159 C, but cannot read invididual keystrokes.  The
hardware is not cooperative: it sends only complete lines (or screens).

There is a perfectly good newsgroup for `read character at a time from
stdin under unix', and it is not comp.lang.c.  (comp.lang.c is, however,
marginally appropriate for discussions about how character-at-a-time
input interfaces ought to appear in future standard C libraries.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.lang.c mailing list