Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!fluke!ssc-vax!leea From: leea@ssc-vax.UUCP (Lee Carver) Newsgroups: comp.lang.c Subject: Re: ReadKey like Function in C Message-ID: <2855@ssc-vax.UUCP> Date: 16 Aug 89 15:56:29 GMT References: <148@trigon.UUCP> <225800206@uxe.cso.uiuc.edu> <1677@crdgw1.crd.ge.com> <19095@mimsy.UUCP> Reply-To: leea@ssc-vax.UUCP (Lee Carver) Organization: Boeing Aerospace, Kent WA Lines: 13 In article <19095@mimsy.UUCP> chris@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 onas a standard across hundreds of systems, be sure > 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.