Behaviour of setjmp/longjmp and registers

Robert Claeson prc at maxim.ERBE.SE
Mon Feb 6 18:42:17 AEST 1989


In article <9597 at smoke.BRL.MIL>, gwyn at smoke.BRL.MIL (Doug Gwyn ) writes:
> In article <483 at maxim.ERBE.SE> prc at maxim.ERBE.SE (Robert Claeson) writes:
> >Does this really work that good? A function key (control) character
> >sequence can be of arbitrary length. The up-arrow  key on my keyboard
> >sends three characters, whereas a typical F-key sends 5 characters.
> 
> The character sequence should follow ANSI X3.64, meaning that it begins
> with an ESC character and continues through an alpha.  That can be
> parsed without any timeouts at all.

I have already written code to parse ANSI X3.64 sequences, but since
there's so many non-ANSI terminals out there, I'm not really sure I
want to lock myself into ANSI-compatible terminals (even though I'd
like to).

> What probably is contributing to the confusion is that you bought
> keyboards that have an ESC key the user can press that violates the
> X3.64 standard.  Remove the key or tell your users how to recover
> from it (treating a second consecutive ESC specially is one way).

I'd like to get rid of all escape keys in the world (that's why I
only buy VT220-style keyboards nowadays), but on the other hand, I
don't think an escape key violates the standard. As I recall, all
function key sequences should start with the CSI 8-bit character
or 7-bit character sequence (ESC [) and end with an alphanumeric
character.

Oh, come to think of it, maybe I should get rid of my table-driven
code and invent "terminal handlers" instead. You know, determine
the terminal type (with ESC Z or by reading the TERM variable) and
start an appropriate process that handles all i/o to the terminal,
and have my application talk to that process (via good 'ole pipes,
message queues or shared memory).
-- 
Robert Claeson, ERBE DATA AB, P.O. Box 77, S-175 22 Jarfalla, Sweden
"No problems." -- Alf
Tel: +46 758-202 50  EUnet:    rclaeson at ERBE.SE  uucp:   uunet!erbe.se!rclaeson
Fax: +46 758-197 20  Internet: rclaeson at ERBE.SE  BITNET: rclaeson at ERBE.SE



More information about the Comp.lang.c mailing list