scr_dump(3curses)


scr_dump -- screen file input/output functions

Synopsis

cc [options] file -lcurses
#include <curses.h>

int scr_dump(const char *filename);

int scr_init(const char *filename);

int scr_restore(const char *filename);

int scr_set(const char *filename);

Description

The scr_dump(3curses) function writes the current contents of the virtual screen to the file named by filename.

The scr_restore(3curses) function sets the virtual screen to the contents of the file named by filename, which must have been written using scr_dump(3curses). The next refresh operation restores the screen to the way it looked in the dump file.

The scr_init(3curses) function reads the contents of the file named by filename and uses them to initialise the Curses data structures to what the terminal currently has on its screen. The next refresh operation bases any updates on this information, unless either of the following conditions is true:

The scr_set(3curses) function is a combination of scr_restore(3curses) and scr_init(3curses). It tells the program that the information in the file named by filename is what is currently on the screen, and also what the program wants on the screen. This can be thought of as a screen inheritance function.

Return value

On successful completion, these functions return OK. Otherwise, they return ERR.

Errors

No errors are defined.

Usage

The scr_init(3curses) function is called after initscr(3curses) or a system(3S) call to share the screen with another process that has done a scr_dump(3curses) after its endwin(3curses) call.

To read a window from a file, call getwin(3curses); to write a window to a file, call putwin(3curses).

Standards Conformance

The Single UNIX Specification, Version 2; The Open Group.

References

delscreen(3curses), doupdate(3curses), endwin(3curses), getwin(3curses), open(2), read(2), write(2), curses(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004