'\" te .\" Copyright (c) 1990, 1995 by Mortice Kern Systems Inc. All Rights Reserved Portions Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH SCR_DUMP 3XCURSES "Jun 5, 2002" .SH NAME scr_dump, scr_init, scr_restore, scr_set \- write screen contents to/from a file .SH SYNOPSIS .LP .nf \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e \fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ] \fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ] #include \fBint\fR \fBscr_dump\fR(\fBconst char *\fR\fIfilename\fR); .fi .LP .nf \fBint\fR \fBscr_init\fR(\fBconst char *\fR\fIfilename\fR); .fi .LP .nf \fBint\fR \fBscr_restore\fR(\fBconst char *\fR\fIfilename\fR); .fi .LP .nf \fBint\fR \fBscr_set\fR(\fBconst char *\fR\fIfilename\fR); .fi .SH PARAMETERS .sp .ne 2 .na \fB\fIfilename\fR\fR .ad .RS 12n Is a pointer to the file in which screen contents are written. .RE .SH DESCRIPTION .sp .LP These function perform input/output functions on a screen basis. .sp .LP The \fBscr_dump()\fR function writes the contents of the virtual screen, \fBcurscr\fR, to \fIfilename\fR. .sp .LP The \fBscr_restore()\fR function reads the contents of \fIfilename\fR from \fBcurscr\fR (which must have been written with \fBscr_dump()\fR). The next refresh operation restores the screen to the way it looks in \fIfilename\fR. .sp .LP The \fBscr_init()\fR function reads the contents of \fIfilename\fR and uses those contents to initialize the X/Open Curses data structures to what is actually on screen. The next refresh operation bases its updates on this data, unless the terminal has been written to since \fIfilename\fR was saved or the \fBterminfo\fR capabilities \fBrmcup\fR and \fBnrrmc\fR are defined for the current terminal. .sp .LP The \fBscr_set()\fR function combines \fBscr_restore()\fR and \fBscr_init()\fR. It informs the program that the contents of the file \fIfilename\fR are what is currently on the screen and that the program wants those contents on the screen. .SH RETURN VALUES .sp .LP On success, these functions return \fBOK\fR. Otherwise, they return \fBERR\fR. .SH ERRORS .sp .LP None. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Standard _ MT-Level Unsafe .TE .SH SEE ALSO .sp .LP \fBdelscreen\fR(3XCURSES), \fBdoupdate\fR(3XCURSES), \fBendwin\fR(3XCURSES), \fBgetwin\fR(3XCURSES), \fBlibcurses\fR(3XCURSES), \fBattributes\fR(5), \fBstandards\fR(5)