This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

kbhit()


i tried several kbhit() fucntions for linux:
1. the one that uses "select" and FDSET , etc.
2. speciall library - libkb (include <kb.h> and use the libkb.so lib)

in all methods of kbhit, i always got infinite printing on SINGLE key press,
while i wanted simply to print one line per keypress. here's my code:

int main()
{
while(1)
{
     if (kbhit()) //in the lib function i changed to kb_kbhit()
         printf("key pressed...\n");
}
}

GAD.

winmail.dat

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]