[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


scr_init Subroutine

Purpose

Initializes the curses data structures from a dump file.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>


scr_init( Filename)
char *Filename;

Description

The scr_init subroutine initializes the curses data structures from a dump file. You create dump files with the scr_dump subroutine. If the file's data is valid, the next screen update is based on the contents of the file rather than clearing the screen and starting from scratch. The data is invalid if the terminfo database boolean capability nrrmc is TRUE or the contents of the terminal differ from the contents of the dump file.

Note: If nrrmc is TRUE, avoid calling the putp subroutine with the exit_ca_mode value before calling scr_init subroutine in your application.

You can call the scr_init subroutine after the initscr subroutine to update the screen with the dump file contents. Using the keypad, meta, slk_clear, curs_set, flash, and beep subroutines do not affect the contents of the screen, but cause the terminal's modification time to change.

You can allow more than one process to share screen dumps. Both processes must be run from the same terminal. The scr_init subroutine first ensures that the process that created the dump is in sync with the current terminal data. If the modification time of the terminal is not the same as that specified in the dump file, the scr_init subroutine assumes that the screen image on the terminal has changed from that in the file, and the file's data is invalid.

If you are allowing two processes to share a screen dump, it is important to understand that one process starts up another process. The following activities happen:

Return Values


ERR Indicates the dump file's time stamp is old or the boolean capability nrrmc is TRUE.
OK Indicates that the curses data structures were successfully initialized using the contents of the dump file.

Parameters


Filename Points to a dump file.

Related Information

The scr_dump (scr_dump, scr_init, scr_restore, scr_set Subroutine) subroutine, scr_restore (scr_restore Subroutine) subroutine.

Curses Overview for Programming, List of Curses Subroutines, Manipulating Window Data with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]