Getchar w/wout echo (now curses)

Leslie Mikesell les at chinet.UUCP
Sun Sep 18 12:47:38 AEST 1988


In article <1715 at ddsw1.UUCP> karl at 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



More information about the Comp.lang.c mailing list