How can I detect waiting characters in a curses application ?

Stacey Campbell staceyc at sco.COM
Sat Dec 15 05:37:41 AEST 1990


In article <677 at ntpdvp1.UUCP> samc at ntpdvp1.UUCP (Sam Christie) writes:
>I am using Interactive's 386/IX 2.0.2 on a Dell 386.
>
>	fcntl( 0, F_SETFL, i | O_NDELAY );

See the curses(3X) man page for the routine nodelay().

>	c = getchar();    /* didn't use getch() here because */
>                         /* I don't know how to ungetch() */

Your version of curses should support ungetch(), so use getch() otherwise,
as you have correctly decided, curses internal character buffering
will get confused.  It should be docced in the Input section of the
curses manual page.



More information about the Comp.unix.programmer mailing list