Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!usc!apple!agate!ucbvax!ulysses!kpv From: kpv@ulysses.att.com (Phong Vo[drew]) Newsgroups: comp.unix.questions Subject: Re: Less Optimized Curses Message-ID: <14010@ulysses.att.com> Date: 13 Nov 90 20:17:39 GMT References: <1990Nov13.090732@mathcs.emory.edu> Organization: AT&T Bell Laboratories, Murray Hill Lines: 33 In article <1990Nov13.090732@mathcs.emory.edu>, km@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@mathcs.emory.edu PREFERRED Phong Vo, att!ulysses!kpv