input ready under UNIX ??!!??
Rich Bono
rbono at necis.UUCP
Fri Oct 21 23:24:02 AEST 1988
HELP!! how can one (if at all) find out (non-destructivly) if there is
any input waiting to be read from stdin??? With the Microsoft-C libraries
I can use the kbhit() function which returns TRUE if there are any characters
waiting to be input. Clearing ICANON with a ioctl() for stdin does NOT do
what I want.....
here is a sample code concept that shows what I am trying to do:
for(;;)
{
if(kbhit())
{
fgets(buffer, BUFSIZE, stdin);
HandleInput(buffer);
}
else
{
/* do this */
}
}
I have several programs that make use of this call that I would
like to port to UNIX without redesigning.
Please EMAIL me with any soloutions.....
Thanks, Rich
--
#****************************************************************************#
# Rich Bono (NM1D) domain: rbono at necis.nec.com #
# (508) 635-6303 #
#****************************************************************************#
More information about the Comp.lang.c
mailing list