[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

scr_dump, scr_init, scr_restore, scr_set Subroutine

Purpose

File input/output functions.

Library

Curses Library (libcurses.a)

Syntax

#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 subroutine writes the current contents of the virtual screen to the file named by filename in an unspecified format.

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

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

The scr_set subroutine is a combination of scr_restore and scr_init subroutines. It tells the program that the information i 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.

Parameters

filename

Return Values

Upon successful completion, these subroutines return OK. Otherwise, they return ERR.

Examples

For the scr_dump subroutine:

To write the contents of the virtual screen to /tmp/virtual.dump file, use:

scr_dump("/tmp/virtual.dump");

For the scr_restrore subroutine:

To restore the contents of the virtual screen from the /tmp/virtual.dump file and update the terminal screen, use:

scr_restore("/tmp/virtual.dump");
doupdate();

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The delscreen, doupdate, endwin, getwin, open, read, and write subroutines, scr_init subroutine, scr_restore subroutine.

Curses Overview for Programming, Manipulating Window Data with Curses, Understanding Terminals with Curses and List of Curses Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]