| on UNIX (SUN). Unfortunately, when refreshing the screen in Unix,
| it optimizes the flow of characters sent to the screen, which
| does not occur under VMS, which will always completely refresh.
| I tried using touchwin() before refreshing evry window, but for
| each window update the 3 or 4 layered windows flicker. This
| becomes annoying when it occurs every time you type a character...
Depends on the version of SunOS. If you have a version with System V
libraries, use the System V curses: it has two ways of optimizing output.
Sufficiently recent versions of the BSD curses may also possess one of these
The first way of doing this is to use delayed refresh. Refresh each window by
calling wnoutrefresh(win), then call doupdate() when you're done; this allows
curses to optimize *between* the window refreshes, and thereby do no output
for obsured parts of windows.
The second, which is fairly recent and likely not to be in the BSD-style
curses that is probably the default on SunOS, is to use echochar(). This
function is used exactly like addch(), but it sends output to the screen
*immediately* if other refresh operations are not needed. It bypasses the
refresh() mechanism when it can, so output is very rapid. (wechochar(win, ch)
is the version used on windows other than stdscr.)
If neither is available, you're stuck unless you hand-optimize by only
refreshing the current window and letting pending refreshes to other windows
sit until you absolutely need them. Unfortunately, if you *do* want
"background updates" of partially visible windows, you're stuck. (This is why
the wnoutrefresh()/doupdate() mechanism was developed.)
Me: Brandon S. Allbery VHF/UHF: KB8JRR on 220, 2m, 440
America OnLine: KB8JRR AMPR: KB8JRR.AmPR.ORG [184.108.40.206]
uunet!usenet.ins.cwru.edu!ncoast!allbery Delphi: ALLBERY