Keyboard support in C (was Re: making charact

Gregg Townsend gmt at cs.arizona.edu
Sun Mar 3 15:48:50 AEST 1991


In article <1213 at airs.UUCP> airs!ian at uunet.uu.net (Ian Lance Taylor) writes:
>
> In the set of ANSI C libraries I wrote for the Alpha Micro, opening a
> terminal in unbuffered mode returns single characters without waiting
> for a carriage return.  I don't know whether UNIX libraries work this
> way or not, but is there any reason they couldn't or shouldn't?

Good for you.  That is a valid and very useful interpretation of the
language in the ANSI specification, though I don't know if the ANSI
committee thought of it.  The ANSI spec, of necessity, is loose enough
to allow other interpretations including doing nothing, and as far as
I know that's the easy path that's been chosen by all Unix vendors.
(It's tricky to do "right", by which I mean ensuring that the tty modes
aren't changed permanently.)

    Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621 4325     gmt at cs.arizona.edu     110 57 16 W / 32 13 45 N / +758m



More information about the Comp.lang.c mailing list