1999-08-24 01:06:48 +00:00
|
|
|
.\"***************************************************************************
|
2007-01-20 07:32:02 +00:00
|
|
|
.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
|
1999-08-24 01:06:48 +00:00
|
|
|
.\" *
|
|
|
|
.\" Permission is hereby granted, free of charge, to any person obtaining a *
|
|
|
|
.\" copy of this software and associated documentation files (the *
|
|
|
|
.\" "Software"), to deal in the Software without restriction, including *
|
|
|
|
.\" without limitation the rights to use, copy, modify, merge, publish, *
|
|
|
|
.\" distribute, distribute with modifications, sublicense, and/or sell *
|
|
|
|
.\" copies of the Software, and to permit persons to whom the Software is *
|
|
|
|
.\" furnished to do so, subject to the following conditions: *
|
|
|
|
.\" *
|
|
|
|
.\" The above copyright notice and this permission notice shall be included *
|
|
|
|
.\" in all copies or substantial portions of the Software. *
|
|
|
|
.\" *
|
|
|
|
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
|
|
|
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
|
|
|
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
|
|
|
.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
|
|
|
.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
|
|
|
.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
|
|
|
.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
|
|
|
.\" *
|
|
|
|
.\" Except as contained in this notice, the name(s) of the above copyright *
|
|
|
|
.\" holders shall not be used in advertising or otherwise to promote the *
|
|
|
|
.\" sale, use or other dealings in this Software without prior written *
|
|
|
|
.\" authorization. *
|
|
|
|
.\"***************************************************************************
|
|
|
|
.\"
|
2007-12-30 11:08:14 +00:00
|
|
|
.\" $Id: curs_scr_dump.3x,v 1.7 2006/12/24 16:05:49 tom Exp $
|
1999-08-24 01:06:48 +00:00
|
|
|
.TH curs_scr_dump 3X ""
|
2007-01-20 07:32:02 +00:00
|
|
|
.na
|
|
|
|
.hy 0
|
1999-08-24 01:06:48 +00:00
|
|
|
.SH NAME
|
2000-07-03 09:24:12 +00:00
|
|
|
\fBscr_dump\fR,
|
|
|
|
\fBscr_restore\fR,
|
|
|
|
\fBscr_init\fR,
|
|
|
|
\fBscr_set\fR - read (write) a \fBcurses\fR screen from (to) a file
|
2007-01-20 07:32:02 +00:00
|
|
|
.ad
|
|
|
|
.hy
|
1999-08-24 01:06:48 +00:00
|
|
|
.SH SYNOPSIS
|
|
|
|
\fB#include <curses.h>\fR
|
2007-01-20 07:32:02 +00:00
|
|
|
.sp
|
1999-08-24 01:06:48 +00:00
|
|
|
\fBint scr_dump(const char *filename);\fR
|
|
|
|
.br
|
|
|
|
\fBint scr_restore(const char *filename);\fR
|
|
|
|
.br
|
|
|
|
\fBint scr_init(const char *filename);\fR
|
|
|
|
.br
|
|
|
|
\fBint scr_set(const char *filename);\fR
|
|
|
|
.br
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The \fBscr_dump\fR routine dumps the current contents of the virtual screen
|
|
|
|
to the file \fIfilename\fR.
|
2007-01-20 07:32:02 +00:00
|
|
|
.PP
|
1999-08-24 01:06:48 +00:00
|
|
|
The \fBscr_restore\fR routine sets the virtual screen to the contents
|
|
|
|
of \fIfilename\fR, which must have been written using \fBscr_dump\fR. The next
|
|
|
|
call to \fBdoupdate\fR restores the screen to the way it looked in the dump
|
|
|
|
file.
|
2007-01-20 07:32:02 +00:00
|
|
|
.PP
|
1999-08-24 01:06:48 +00:00
|
|
|
The \fBscr_init\fR routine reads in the contents of \fIfilename\fR and uses
|
|
|
|
them to initialize the \fBcurses\fR data structures about what the terminal
|
|
|
|
currently has on its screen. If the data is determined to be valid,
|
|
|
|
\fBcurses\fR bases its next update of the screen on this information rather
|
|
|
|
than clearing the screen and starting from scratch. \fBscr_init\fR is used
|
2007-01-20 07:32:02 +00:00
|
|
|
after \fBinitscr\fR or a \fBsystem\fR call to share
|
1999-08-24 01:06:48 +00:00
|
|
|
the screen with another process which has done a \fBscr_dump\fR after its
|
|
|
|
\fBendwin\fR call. The data is declared invalid if the terminfo capabilities
|
|
|
|
\fBrmcup\fR and \fBnrrmc\fR exist; also if the terminal has been written to
|
|
|
|
since the preceding \fBscr_dump\fR call.
|
2007-01-20 07:32:02 +00:00
|
|
|
.PP
|
1999-08-24 01:06:48 +00:00
|
|
|
The \fBscr_set\fR routine is a combination of \fBscr_restore\fR and
|
|
|
|
\fBscr_init\fR. It tells the program that the information in \fIfilename\fR 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.
|
2007-01-20 07:32:02 +00:00
|
|
|
.PP
|
1999-08-24 01:06:48 +00:00
|
|
|
To read (write) a window from (to) a file, use the \fBgetwin\fR and
|
|
|
|
\fBputwin\fR routines [see \fBcurs_util\fR(3X)].
|
|
|
|
.SH RETURN VALUE
|
|
|
|
All routines return the integer \fBERR\fR upon failure and \fBOK\fR
|
|
|
|
upon success.
|
2007-01-20 07:32:02 +00:00
|
|
|
.PP
|
|
|
|
X/Open defines no error conditions.
|
|
|
|
In this implementation,
|
|
|
|
each will return an error if the file cannot be opened.
|
1999-08-24 01:06:48 +00:00
|
|
|
.SH NOTES
|
|
|
|
Note that \fBscr_init\fR, \fBscr_set\fR, and \fBscr_restore\fR may be macros.
|
|
|
|
.SH PORTABILITY
|
|
|
|
The XSI Curses standard, Issue 4, describes these functions (adding the const
|
|
|
|
qualifiers).
|
2007-01-20 07:32:02 +00:00
|
|
|
.PP
|
1999-08-24 01:06:48 +00:00
|
|
|
The SVr4 docs merely say under \fBscr_init\fR that the dump data is also
|
2007-01-20 07:32:02 +00:00
|
|
|
considered invalid "if the time-stamp of the tty is old" but do not define
|
1999-08-24 01:06:48 +00:00
|
|
|
"old".
|
|
|
|
.SH SEE ALSO
|
|
|
|
\fBcurses\fR(3X), \fBcurs_initscr\fR(3X), \fBcurs_refresh\fR(3X),
|
2007-12-30 11:08:14 +00:00
|
|
|
\fBcurs_util\fR(3X), \fBsystem\fR(3)
|
1999-08-24 01:06:48 +00:00
|
|
|
.\"#
|
|
|
|
.\"# The following sets edit modes for GNU EMACS
|
|
|
|
.\"# Local Variables:
|
|
|
|
.\"# mode:nroff
|
|
|
|
.\"# fill-column:79
|
|
|
|
.\"# End:
|