[comp.unix.questions] How does one refresh a terminal screen in SysV/386 curses ?

samc@ntpdvp1.UUCP (Sam Christie) (02/24/90)

We are building an application under SysV/386 which makes heavy
use of terminals and curses routines for screen optimization.
The application consists of multiple overlapping windows which
come and go frequently.

Dial up users find that noise really trashes the screen, so it
would be nice to refresh it at a certain key stroke, say cntl-R.
Since the entire application gets all input from one of two
'C' functions, we would like to build the refresh logic into 
those two places.  Does anyone know how to get curses to send its
entire terminal buffer out ?


Your reply via e-mail will be appreciated by,

Sam Christie                            Standard Disclaimer Applies
Northern Telecom - DMS-10
Research Triangle Park, NC
EMAIL ...!uunet!mcnc!rti!ntpdvp1!samc
919/992-3917

cpcahil@virtech.uucp (Conor P. Cahill) (02/25/90)

In article <342@ntpdvp1.UUCP> samc@ntpdvp1.UUCP (Sam Christie) writes:
>Dial up users find that noise really trashes the screen, so it
>would be nice to refresh it at a certain key stroke, say cntl-R.
>Since the entire application gets all input from one of two
>'C' functions, we would like to build the refresh logic into 
>those two places.  Does anyone know how to get curses to send its
>entire terminal buffer out ?

Either of the following should work:

1. Just touchwin() and wnoutrefresh() each window, followed by a doupdate().
   Of course, this requires the knowledge of what windows are on the screen.

2. scr_dump(/tmp/screen.[pid]),  followed by scr_restore(same_filename), 
   followed by doupdate()


-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+