QIO read with timeout
Alexander Stockdale
a204 at mindlink.UUCP
Wed Jun 13 22:43:55 AEST 1990
You probably should be using the IO$M_TIMED function modifier in your
QIO call. I've found that using this modifier and supplying a value of
0 for theime (in parameter P3) works well. If your input buffer is
only one character long, then this call will empty the type ahead buffer into
the input buffer until a termination condition occurs (i.e. buffer full). The
net effect is a getchar type of operation. I've spent a lot of time monkeying
around with QIO to simulate the operation of popular UNIX functions like
getchar(), and it can be a pain. The best way to approach it is to read the
I/O User's manual, chapter 8 (the terminal driver), very carefully. Even that
doesn't tell you everything (you can find some interesting and useful modifiers
by reading SYS$LIBRARY:iodef.h). You don't say much about how your application
works, but you will probably want to check out the use of PASSALL. I learned
about this from modifying the code to C-Kermit to work under VMS. Anyway,
hope this helps.
--
------------------------------------------------------------------------
Alexander Stockdale | I'm not getting older -- I'm getting bitter.
Vancouver, BC, Canada| - me (as far as I know)
More information about the Comp.lang.c
mailing list