ReadKey like Function in C

Peter da Silva peter at ficc.uu.net
Thu Aug 17 01:17:07 AEST 1989


In article <2851 at ssc-vax.UUCP>, leea at ssc-vax.UUCP (Lee Carver) writes:
> In this zoo of discussion on "getch", i'd like to add a shot in
> support of "kbhit()".  In particular, I'd like kbhit to return
> ture if input is waiting (i.e. getchar will NOT block) and
> false otherwise.

Well, I'd personally prefer a function that would return the number of
characters available to read. That would have more meaningful semantics
for files, and also allow more efficient I/O under UNIX.
-- 
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.
Business: peter at ficc.uu.net, +1 713 274 5180. | "The sentence I am now
Personal: peter at sugar.hackercorp.com.   `-_-' |  writing is the sentence
Quote: Have you hugged your wolf today?  'U`  |  you are now reading"



More information about the Comp.std.c mailing list