QIO read with timeout

Todd Pierzina 8099pierzina at vmsd.csd.mu.edu
Thu Jun 14 23:31:48 AEST 1990


I need to do a read from the keyboard in VAX C with a very small timeout
value.  I am in a loop, and I want to check for a key being pressed (any
key), and if one is pressed, then terminate the repeat loop.  I'm looking
for something like the (MS-DOS, I believe) function kbhit().  Any ideas?
The program uses getch, but it's been rewritten to conform with Un*x's (oh,
I'm on VAX C, VMS 5.3-1).  It does a sys$assign to kb_chan on the first
call, then reads from that channel with a qio request.

Please reply to me directly, as I am not on this list.  As you can probably
tell, I am not a C programmer, either, just trying to get an application
ported from Un*x to VMS.  Of course, by the time I get this thing to work, I
just may be a C guru!

Thanks.

Todd Pierzina

Student Programmer
Marquette University
8099PIER at MUCSD                (BITNET)
8099pierzina at vmsd.csd.mu.edu  (Internet)



More information about the Comp.lang.c mailing list