Behaviour of setjmp/longjmp and registers

Robert Claeson prc at maxim.ERBE.SE
Sun Feb 5 03:37:21 AEST 1989


I wrote:

| In a single-key (not character) keyboard read routine I've written,
| I recognizes function keys and returns a single, generic value for them
| instead of the usual character. I do this by setting an alarm(1) and
| reading character by character until I've got a non-redundant string, which
| in the case of a printable character (an 'a' for example) is that single
| character.

In article <3112 at xyzzy.UUCP>, meissner at tiktok.dg.com (Michael Meissner) writes:

.....
> In System V based UNIXes, you do an ioctl to set MIN/TIME to be the
> minimum number of characters to read and the timeout in tenths of a
> second.  This only works on terminals (and pty's if provided).
.....

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.
So how do I know what to put into VMIN?

> As an aside, I've used systems at times, where the latency between
> characters could be really high, and such simple minded function key
> mappings would break occansionally.

What better function key mapping algorithms are there? I've played with
don't having any timeouts at all for these cases, but then I cannot use
the single escape key (or whatever key the function key sequences
starts with).
-- 
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