This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
RE: GNUWIN32 Question
- To: "gnu-win32 at cygnus dot com" <gnu-win32 at cygnus dot com>, "'Robert'" <macaul at vvm dot com>
- Subject: RE: GNUWIN32 Question
- From: Sergey Okhapkin <sos at prospect dot com dot ru>
- Date: Wed, 11 Jun 1997 10:00:56 +0400
- Encoding: 26 TEXT
Robert wrote:
> <<File: ATT00000.att>>
> I love your product, I just need one thing. A kbhit() function. The
#include <sys/socket.h>
#include <sys/time.h>
int kbhit()
{
FD_SET rfds;
struct timeval tv;
FD_ZERO(&rfds);
FD_SET(0, &rfds);
tv.tv_sec = 0;
tv.tv_usec = 0;
select(1, &rfds, 0, 0, &tv);
return(FD_ISSET(0, &rfds);
}
--
Sergey Okhapkin
Moscow, Russia
Looking for a job.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".