ReadKey like Function in C

Lee Carver leea at ssc-vax.UUCP
Thu Aug 17 01:56:29 AEST 1989


In article <19095 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
>What does `kbhit()' mean when stdin is a socket?  How about in a VMS
>batch job?
>
>What does getch() do at end of file?
>
>Before you settle on <X> as a standard across hundreds of systems, be sure
><X> can well-defined everywhere.

Yes, but kbhit() can be "well defined" for all streams.  kbhit()
should return true if the next "getch()" (or read ( fd, buf, 1 ))
will NOT block.  This means that the data must already be available
to the OS, and simply awaits transfer to the application.



More information about the Comp.lang.c mailing list