Path: utzoo!attcan!uunet!wuarchive!texbell!uhnix1!splut!jay
From: jay@splut.conmicro.com (Jay "you ignorant splut!" Maynard)
Newsgroups: comp.std.c
Subject: Re: ReadKey like Function in C
Message-ID: <2823@splut.conmicro.com>
Date: 13 Aug 89 13:50:29 GMT
References: <148@trigon.UUCP> <207600029@s.cs.uiuc.edu> <941@lakesys.UUCP> <21175@cup.portal.com> <3705@buengc.BU.EDU> <10712@smoke.BRL.MIL> <3727@buengc.BU.EDU>
Reply-To: jay@splut.conmicro.com (Jay "you ignorant splut!" Maynard)
Organization: Confederate Microsystems, League City, TX
Lines: 24

In article <3727@buengc.BU.EDU> bph@buengc.bu.edu (Blair P. Houghton) writes:
>All it's gotta say is something to the effect that there should
>be a function, call it "readkey()", that returns the value of
>the next char from stdin as soon after it's typed as it's needed.
>You could even qualify it to apply only when tty input can be
>used as stdin.

Let's look at an environment where this is not possible: IBM 370-class
mainframe, with stdin (and /dev/tty??) pointed at a 3270 terminal.
Characters are not sent to the host until ENTER (or a PF key) is
pressed. There's no way to give a character to a program as soon as it's
typed because the CPU doesn't know that it has. Your readkey() cannot be
implemented in this environment, yet it is a valid one for ANSI C.

(Flames about how 3270s are horribly broken sent to /dev/null; there are
millions of them out there, doing real work every day.)

(Anyone at Amdahl wanna comment on UTS's 3270 handling?)

-- 
Jay Maynard, EMT-P, K5ZC, PP-ASEL   | Never ascribe to malice that which can
jay@splut.conmicro.com       (eieio)| adequately be explained by stupidity.
{attctc,bellcore}!texbell!splut!jay +----------------------------------------
"Rabid rerouters *love* to route mail to devnull@hell.org" - Brandon Allbery