Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!sco!staceyc From: staceyc@sco.COM (Stacey Campbell) Newsgroups: comp.unix.programmer Subject: Re: How can I detect waiting characters in a curses application ? Keywords: curses typeahead Message-ID: <9219@scolex.sco.COM> Date: 14 Dec 90 18:37:41 GMT References: <677@ntpdvp1.UUCP> Sender: news@sco.COM Organization: The Santa Cruz Operation, Inc. Lines: 15 In article <677@ntpdvp1.UUCP> samc@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.