delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/06/11/03:38:31

From: sos AT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: RE: GNUWIN32 Question
11 Jun 1997 03:38:31 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <01BC764E.5C314230.cygnus.gnu-win32@gater.krystalbank.msk.ru>
Original-To: "gnu-win32 AT cygnus DOT com" <gnu-win32 AT cygnus DOT com>,
"'Robert'"
<macaul AT vvm DOT com>
Encoding: 26 TEXT
Original-Sender: owner-gnu-win32 AT cygnus DOT com

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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019