Date: Wed, 25 Oct 1995 10:00:33 +0200 (IST) From: Eli Zaretskii To: Herbert Kremser Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: need something better than kbhit() On 25 Oct 1995, Herbert Kremser wrote: > How can you determine if something is available at stdin? > I rather need a nonblocking input function. > > kbhit() doesn't work, since it checks the real keyboard, not the > (buffered) stdin descriptor. DJGPP v2.0 implements select() which might be what you want. It uses an IOCTL call (Int 21h/AX=4406h) to check whether input is available, and augments this by looking at the buffer of the FILE structure. If you need this for DJGPP v1.12, you will have to change it a bit (because the FILE structure is a bit different); in v2.0, just use select().