Path: utzoo!utgpu!watmath!iuvax!purdue!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: ReadKey like Function in C Message-ID: <18965@mimsy.UUCP> Date: 10 Aug 89 00:23:24 GMT References: <148@trigon.UUCP> <207600029@s.cs.uiuc.edu> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 28 In article <207600029@s.cs.uiuc.edu> mccaugh@s.cs.uiuc.edu writes: >Wait a minute -- am I missing something here? Isn't conventional (Kernighan- >Ritchie) C supoosed to be capable of system-calls to the operating-system, >say, to switch I/O-mode from cooked to raw, thereby obviating theon >char-input, then switching back when done? Assuming you have an operating system, and assuming it provides such a capability, yes. (As I mentioned, some Univac and IBM systems [on which C compilers do sometimes exist] think they are talking to card reader/punches and line printers, even if there is a graphics display terminal at the end of the virtual card punch. One winds up inventing horrible and baroque protocols so as to be able to interact with such machines.) At any rate, if the system exists and is capable, the question has changed. No longer is it `how do I read a single key in C': It has become `how do I make a system call from C to enable single key operation, or obtain a single keystroke, using FooBletchOS Version 91523.158.1.6.23.9.4-and-a-half'. And that question does not belong in a C newsgroup (or mailing list, for those without netnoise). (Incidentally, this is one of those things that seems to change with every variation of the system. Pick any two Unix machines; they probably do it differently. Even different releases of VMS do it differently.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris