Path: utzoo!utgpu!water!watmath!clyde!att!chinet!les From: les@chinet.UUCP (Leslie Mikesell) Newsgroups: comp.lang.c Subject: Re: Getchar w/wout echo (now curses) Message-ID: <6623@chinet.UUCP> Date: 18 Sep 88 02:47:38 GMT References: <371@marob.MASA.COM> <225800052@uxe.cso.uiuc.edu> <65197@sun.uucp> <628@wsccs.UUCP> <10608@ulysses.homer.nj.att.com> <1715@ddsw1.UUCP> Reply-To: les@chinet.UUCP (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 22 In article <1715@ddsw1.UUCP> karl@ddsw1.UUCP (Karl Denninger) writes: >Why is it that in a terminfo based implementation that the screen does not >redraw on a "refresh()" call if there are characters stacked by type-ahead? >I've seen this behavior on three different terminfo implementations, so I >assume it's something internal to the design. The worst part about this >problem is that there is _no way_ to prevent the gagging of output. The AT&T SysVr3 curses(3X) says that you can use the function typeahead(fildes) to tell curses to perform its type-ahead check on some other file instead of stdin or what you passed to newterm(). If fildes is -1, no typeahead checking is done. The idea is that if you have typed something ahead, you probably aren't interested in the pending display so it is postponed until the next time refresh() is called. In case your version doesn't have the typeahead() function, you might just call refresh() twice every time that it is important to update the display. If it completed on the first call it shouldn't output anything on the second. Les Mikesell