Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!ncar!ames!ucsd!ucsdhub!hp-sdd!ncr-sd!ncrlnk!uunet!mcvax!kth!enea!maxim!prc From: prc@maxim.ERBE.SE (Robert Claeson) Newsgroups: comp.lang.c Subject: Re: Behaviour of setjmp/longjmp and registers Message-ID: <483@maxim.ERBE.SE> Date: 4 Feb 89 17:37:21 GMT References: <25@torsqnt.UUCP> <8867@bloom-beacon.MIT.EDU> <9480@smoke.BRL.MIL> <3112@xyzzy.UUCP> Organization: ERBE DATA AB Lines: 35 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@xyzzy.UUCP>, meissner@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@ERBE.SE uucp: uunet!erbe.se!rclaeson Fax: +46 758-197 20 Internet: rclaeson@ERBE.SE BITNET: rclaeson@ERBE.SE