Non-destructive read of keyboard buffer

jit at slic.cellbio.duke.edu jit at slic.cellbio.duke.edu
Sat Jun 8 03:03:28 AEST 1991


Hi, I am trying to find out if a keyboard buffer is empty but not reading
it because I don't want to get stuck if there isn't any buffered.
(on ATT SVR3)

Is there a 'standard' way on unix to do this ?

(I am currently reading using non-canonical mode with vmin=0, then
ungetc if there is any.  Hopefully there is an easier way.)

Thanks in advance.
-- 

--------------------------------------------------------
Jit Keong Tan     | internet: jit at slic.cellbio.duke.edu
(919) 684-8098    | bitnet  : tan00001 at dukemc.bitnet



More information about the Comp.unix.programmer mailing list