Less Optimized Curses

Phong Vo[drew] kpv at ulysses.att.com
Wed Nov 14 07:17:39 AEST 1990


In article <1990Nov13.090732 at mathcs.emory.edu>, km at mathcs.emory.edu (Ken Mandelberg) writes:
: I don't know how to officially describe the versions of libcurses.a except
: to say that the version that comes with SYSVR3.0 does the scrolling, while
: the version with SYSVR3.1, SYSVR3.2, SYSVR2.1, and every BSD version I
: tried repaints. I did the SYSV experiments on a 3B2 running SYSVR3.2, 
No version of BSD curses knows how use insert/delete lines for screen update
so there can be no scrolling using BSD curses. All sysV versions know how to
do this though via different algorithms. SysVr2.1 and SysV3.0 use an algorithm
based on Heckel's file differencing technique. SysVr3.1 and SysVr3.2
use an algorithm that I developed based on a string comparison
problem that I call the minimum-distance longest common subsequence problem.

: I'm going to include a tiny sample program that exhibits the behavior. With
: the 3.0 libcurses this will paint the screen once and do each refresh() as
: a physical scroll and a one line update. On all other versions the cursor
: will move over every position on the screen updating every cell. On a work
: station with very fast screen updates, you may not easily see the difference.
: Over a serial line on a terminal (even at 9600 baud) the difference is very
: obvious. 
: 
The error in your program is that you did not declare stdscr to be a window
on which insert/delete lines can be used. This is done via the call
	idlok(stdscr,TRUE);
I believe that the reason for requiring idlok() was because, contrary to
one's intuition, many people dislike the use of insert/delete lines.
It can be very distracting when the screen jumps up and down.
The minimum-distance longest common subsequence problem was invented to
alleviate this problem. Even then, there are still cases when the screen
jumps too much.

: Ken Mandelberg      | km at mathcs.emory.edu          PREFERRED

Phong Vo, att!ulysses!kpv



More information about the Comp.unix.questions mailing list