This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Read from keyboard?
- To: "gnu-win32 at cygnus dot com" <gnu-win32 at cygnus dot com>
- Subject: Read from keyboard?
- From: "Neal Krawetz" <nealk at net66 dot com>
- Date: Sun, 31 Aug 97 10:43:27
- Reply-To: "Neal Krawetz" <nealk at net66 dot com>
Hello,
I have a text-based application that has been successfully ported to OS/2,
SunOS, Linux, IRIX, and HP-UX. (The only difference is the non-blocking
read from a keyboard function.) I'd like to port it to Win95.
I have tried GCC and an older version of Cygnus-GCC, but both seem to be
unable to perform a non-blocking read from a text-based application.
I'm basically looking for "int getch(stdin)" where it returns the
character in the read buffer, or -1 if no character is available.
Under GCC for OS/2, the function _read_kbd(0,0,0) does exactly what I
want. Under Unix, we use curses to set stdin to non-blocking.
Is a possible to make a text-based application with non-blocking read from
stdin using the current Cygnus GCC compiler? If so, how?
(I wrote about 6 months ago with the same question and was told that it
currently cannot be done, but may be possible in the future.)
-Neal
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".