Date: Thu, 29 Dec 1994 06:10:25 -0500 (EST) From: Peter Dufault <dufault@hda.com> To: bde@zeta.org.au (Bruce Evans) Cc: jbeukema@HK.Super.NET, freebsd-hackers@freefall.cdrom.com Subject: Re: how to emulate kdhit()B? Message-ID: <199412291110.GAA21554@hda.com> In-Reply-To: <199412290647.RAA10527@godzilla.zeta.org.au> from "Bruce Evans" at Dec 29, 94 05:47:59 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans writes: > > >This "kbhit" just returns whether or not something is pending, which > >is all the Microsoft library promised when this was written (way back when). > > Does the Microsoft one look at the keyboard or at stdin? I'm familiar > with the Borland one, which is documented to look on the keyboard, but > actually looks at stdin. > > Be sure to implement this bug correctly :-). The MS documentation says "the kbhit function checks the console for a recent keystroke". What it actually does is left as an exercise for a user with a DOS system nearby. We used this (and other than testing it to see that it works on FreeBSD it probably hasn't been used in about 4 years; the MS C documentation is copyright 1987) for developing programs that ran in either a DOS or BSD environment. At the time I think we had one Vaxstation and some SONY News systems and this is what worked best for us. Peter -- Peter Dufault Real Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267 ++++ Formerly hd@world.std.com. E-mail problems? Tell hdslip@iii.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199412291110.GAA21554>