On Wed, 7 Feb 1996, root wrote: > This is more of a general c question I think. I want someone to be able > to type in a letter and have my code react immediately (not after they > press enter). All of the ansi c books I have say to use getch(). I > don't have getch(). It is supposed to be in stdio.h or conio.h. I don't > have a conio.h and it isn't in stdio.h. I am running linux(bunch of > different versions) with gnu c 2.6.3. Is there another name for getch()? The character-grabber in C I'm familiar with is getc(), but it polls standard input, not a socket. If you look deep into the socket-handling routines in circle, you may find an input buffer. If you can find this (I'm not sure if it exists in circle, I'm just guessing it works this way), and learn how it works, you can check the buffer before it gets passed to the command interpreter, and just check for the oldest character (the one that was entered first since the last buffer purge). Good luck with it... Sam
This archive was generated by hypermail 2b30 : 12/07/00 PST