From: Brendan Simon Date: Wed, 30 Aug 1995 20:10:58 +1000 To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: kbhit with Unix/Linux I have been using DJGPP2 quite happily in my DOS (spew) enviroment. Now I want to be able to develop under unix/linux. I've tried to run some simple test programs that involve kbhit in a while loop. This is obviously fine in DOS but linux doesn't have kbhit. What I need to do is read the current count of characters/keypresses stored in the keyboard buffer (stdin???). I've tried feof(stdin) but the terminal streams don't seem to have an EOF indicator. I have also tried getchar() with setvbuf(stdin, NULL, _IONBF, 0) for unbufferd stream. No luck. Anybody have any suggestions. Is there something more portable that kbhit() that I can use on both OS platforms. Brendan Simon brendan AT rdt DOT monash DOT edu DOT au