unbuffered stdin
How can I get unbuffered input on stdin ?
I want to process a character at a time from stdin, but I only seem to get data when an eol or eof character is input. I have tried using getchar(), fgetc(), read(), and also tried modifying the buffering with setvbuf() but with no joy. The ncurses library seems to have a getch() routine, but the program just output reams of nonsense when I link to that library. Can anyone help. I'm sure there must be an easy answer. Never had this problem with Win95/Win98 |
It sounds like what you want is the cbreak(3NCURSES) mode of curses (and possibly noecho as well).
hth --Jonas |
All times are GMT -5. The time now is 03:20 AM. |