Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: ames!ultra!!rmg@uunet.uu.net Newsgroups: comp.sys.sun Subject: Does SysV curses "notimeout(win, FALSE)" really work? Keywords: Miscellaneous Message-ID: <7480@brazos.Rice.edu> Date: 8 May 90 01:06:59 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 52 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 156, message 6 The SunOS 4.0.3 curses(3V) man pages states that, by default, when "keypad(win, TRUE)" is in effect when "wgetch(win)" is called, a timer will be started after recieving an Esc character, and, if the timer times out, the Esc will be passed back to the caller. This is to distinguish between an Esc leading in to a function key sequence and one typed by the user. But I can't seem to make it work like that. Here is the test program I am using: Makefile: --------- CC =/usr/5bin/cc LIBS =-ldb /usr/5lib/libtermlib.a all: ctst ctst: ctst.o $(CC) -o ctst ctst.o $(LIBS) ctst.c: ------- #include #include main() { int ch; initscr(); cbreak(); noecho(); nonl(); raw(); keypad(stdscr, TRUE); wmove(stdscr, 1, 1); ch = wgetch(stdscr); printf("got 0x%2x\n", ch); endwin(); } ------- The program will never return a single Esc character when it is typed. What gives? Or is it a ten minute timeout? (I haven't waited *that* long yet!) :-) - Rich Geiger Ultra Network Technologies / 101 Daggett Drive / San Jose CA 95134 rmg@ultra.com ...!ames!ultra!rmg (408) 922-0100 [w] (408) 739-7911 [h]