This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
polling keyboard
- To: help-gcc at gnu dot org
- Subject: polling keyboard
- From: lostin_space <petenoefingspammason at pop dot sttl dot usnoefingspamwest dot net>
- Date: Wed, 01 Sep 1999 21:36:13 -0700
- Newsgroups: gnu.gcc.help
- Reply-To: petenoefingspammason at usnoefingspamwest dot net
- Xref: wodc7nx0 gnu.gcc.help:812
I would like to get character input from either the keyboard or serial
port. I want to poll the device and if there is something available to
input, then input it. In Borland or MS C compilers there is a
"keypressed" function that you can use as follows:
if ( kbhit () )
char_in = getc (stdin);
Is threre anything similar in one of the libraries with gcc ? I am
runnin linux ( RH6.0 ).