Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site dartvax.UUCP Path: utzoo!watmath!clyde!akgua!mcnc!decvax!dartvax!lorien From: lorien@dartvax.UUCP (Lorien Y. Pratt) Newsgroups: net.bugs.4bsd Subject: Re: Bug in curses package Message-ID: <1661@dartvax.UUCP> Date: Wed, 23-May-84 15:45:18 EDT Article-I.D.: dartvax.1661 Posted: Wed May 23 15:45:18 1984 Date-Received: Wed, 30-May-84 09:22:31 EDT References: <82@chalmers.UUCP> <808@sdcsvax.UUCP> Organization: Dartmouth College Lines: 51 When I saw Mike Laman's bug fix for lack of scrolling in Curses, I thought it was just the thing to help us avoid an anticipated need to hack our C program to get around curses so that scrolling worked at a decent rate. Problem is, the bug fixes he proposes *don't work* at our (4.2bsd) installation. As it's not documented in the curses manual, perhaps I simply don't know how to get the screen to scroll. All I want to do is to display pages of data to users without clearing the screen between pages but rather to begin scrolling in a new page when they press some character indicating they want to go on. Here's the program I wrote to test if introducing Laymen's bug fix worked (only #1 on his list was not already fixed). *Tell me* how to modify Curses so that it uses the built-in scrolling facilities of my terminal instead of redrawing it all. /* Start of curtest.c */ #include #include main() { char temp[256]; char t; int i; initscr(); scrollok( stdscr, TRUE ); for(i=0;i<24;i++) { sprintf( temp, "This is the line numbered %d", i ); mvaddstr( i, 0, temp ); refresh(); } t = getch(); for(i=24;i<50;i++) { scroll( stdscr ); sprintf( temp, "Line %d", i ); mvaddstr( 23, 0, temp ); refresh(); } endwin(); } /* End of curtest.c */ Compile by: cc curtest.c -lcurses -ltermlib Run by: a.out