Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/15/85; site ucbvax.ARPA Path: utzoo!watmath!clyde!cbosgd!ucbvax!info-vax From: info-vax@ucbvax.ARPA Newsgroups: fa.info-vax Subject: Re: Single character input to a C program Message-ID: <8421@ucbvax.ARPA> Date: Sun, 23-Jun-85 19:44:09 EDT Article-I.D.: ucbvax.8421 Posted: Sun Jun 23 19:44:09 1985 Date-Received: Mon, 24-Jun-85 06:43:35 EDT Sender: daemon@ucbvax.ARPA Organization: University of California at Berkeley Lines: 20 From: stew%lhasa@harvard.ARPA I have long wished that dec would make crmode() and nocrmode() work by setting a flag in the C runtimes which would make them do single character qio's. Is this not easy? Would this not work? To get escapes through, you have to turn off the TT$M_ESCAPE bit in your terminal's basic characteristics word, typically with the IO$_SENSEMODE and IO$_SETMODE functions of SYS$QIO. A good example of this can be found in the support for vms that I wrote for the new version of C-KERMIT, which is available by anonymous ftp from CU20A. This implements, entirely in C, the necessary calls to system services to do single character IO and other useful things like typeahead sensing. It is in KER:CKVTIO.C. You may be able to use this directly, or at least it will show you how to do such things from C. If I remember correctly, it does not turn off TT$M_ESCAPE, it uses pasthru mode instead, but perhaps this is what you want anyway. Stew