Path: utzoo!utgpu!watserv1!watmath!att!occrsh!uokmax!apple!usc!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!nicktrou From: nicktrou@rodan.acs.syr.edu (Nikos B. Troullinos) Newsgroups: comp.unix.programmer Subject: Can CURSES do a simple scroll? Keywords: curses Message-ID: <1990Sep12.051641.11113@rodan.acs.syr.edu> Date: 12 Sep 90 05:16:41 GMT Organization: Syracuse University, Syracuse, NY Lines: 49 Can anyone shed some light in the following perplexing problem? I am trying to use CURSES in a program where decent scrolling off the screen is required when the cursor is in the last line and a newline is echoed (how unusual!) Compiling with cc under SUN OS 4.1 I get scrolling but also repainting of the whole screen for each and every scroll! (whether idlok() is there or not) Compiling with /usr/5bin/cc (and the corresponding library) things improve but instead of a simple echoing of a nl/cr, the insert/delete capabilities of the terminal (vt100) are used and the cursor is sent for a brief time on the upper left 'home' position. This is very noticeable at a low baud rate. Is it too much to ask for curses to behave reasonably and just send a nl/cr? Or am I missing something really obvious? My little test program follows: Nikos Troullinos, CIS Syracuse University --------------------------------------------------------------------------- #include #define EOT 0x4 /* Minimum curses program to make curses do A SIMPLE SCROLLING under SUN OS 4.1 and with a vt100 terminal setting. */ void main() { int c; initscr(); cbreak(); noecho(); nl(); idlok(stdscr, TRUE); scrollok(stdscr, TRUE); refresh(); while ((c=getch()) != EOT) {addch(c);refresh();} refresh(); endwin(); }