Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!ucbvax!info-vax
From: info-vax@ucbvax.ARPA
Newsgroups: fa.info-vax
Subject: Re: Single character input to a C program
Message-ID: <9091@ucbvax.ARPA>
Date: Mon, 15-Jul-85 22:41:35 EDT
Article-I.D.: ucbvax.9091
Posted: Mon Jul 15 22:41:35 1985
Date-Received: Wed, 17-Jul-85 20:01:06 EDT
Sender: daemon@ucbvax.ARPA
Organization: University of California at Berkeley
Lines: 27

From: ecsvax!jerryr%mcnc.csnet@csnet-relay.ARPA

I am wondering if the SMG$READ_STRING routine wouldn't be sufficient for this.
I don't think it will give you character waiting information, but from what
I've read (unfortunately not enough time to test it yet) it appears that this
routine uses qio's since you can give it max lengths, io modifiers and custom
terminator blocks.  You should be able to set up a terminator mask which
indicates that all ASCII characters are valid terminators, and receive which
terminator in the separate TERMINATOR-CODE parameter.  There are some rather
cryptic limitations for its use listed under the DISPLAY-ID parameter in the
RUN-TIME LIBRARY REFERENCE which need more investigation on my part.  But
I'd be happy to have someone experiment and report the results.

In fact, I'd be interested in any comments regarding the absence of usable
raw(), etc. routines in the VMS Curses package that comes with VMS "C" V.2.
I'd think (and was going to test this out) that one could use the above
routine for standard input, with the use of a few others to set the
terminator masks and the read modifiers in pre-defined fields which then
would be used by SMG$READ_STRING.  raw() would set the terminator mask
suggested above as well as set the IO$M_NOFILTR read bit, noraw() back
to defaults, echo() reset the IO$M_NOECHO read bit, noecho() set it, etc.
I'm suspecting that it's not as simple as it seems, but then again
*knowing DEC...*

					Jerry Robinson
				    UNC School of Medicine
				    UUCP: ...mcnc!ecsvax!jerryr