version 1.19, 1997/02/16 20:51:08
|
version 1.20, 1997/03/04 22:09:54
|
Line 615 long key_avail (stream)
|
Line 615 long key_avail (stream)
|
|
|
if(!terminal_prepped) prep_terminal(); |
if(!terminal_prepped) prep_terminal(); |
|
|
#if defined (FIONREAD) |
#ifndef _WIN32 |
result = ioctl (tty, FIONREAD, &chars_avail); |
result = ioctl (tty, FIONREAD, &chars_avail); |
|
#else |
|
{ |
|
fd_set selin; |
|
static int now[2] = { 0 , 0 }; |
|
int res; |
|
|
|
FD_ZERO(&selin); |
|
FD_SET(tty, &selin); |
|
chars_avail=select(1, &selin, NULL, NULL, now); |
|
} |
#endif |
#endif |
|
|
if(chars_avail == -1L) |
if(chars_avail == -1L) |