Keyboard support in C (was Re: making charact

Chris Torek torek at elf.ee.lbl.gov
Sun Mar 3 16:54:45 AEST 1991


In article <568 at coatimundi.cs.arizona.edu> gmt at cs.arizona.edu
(Gregg Townsend) writes, in regard to a C library implementation
in which `unbuffered' stdio streams that talk to `terminals'
>>returns single characters without waiting for a carriage return
writes:

>Good ...  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.)

I agree that it is valid, but not that it is necessarily good.  I
contend that it is *impossible* to do `right', at least on some systems
(such as the ones I tend to use), simply because the definition of
`right' changes dramatically from application to application.  No
matter which definition you (or even I) choose as `right', it will
turn out to be wrong for something else.

(This is why the tty interfaces on Unix boxes are so complicated.  Perhaps
not all of the complexity is needed, but as yet, no one has figured out
how to get rid of it.)
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427)
Berkeley, CA		Domain:	torek at ee.lbl.gov



More information about the Comp.lang.c mailing list