4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>scr_dump</B>, <B>scr_restore</B>, <B>scr_init</B>, <B>scr_set</B> - read (write) a
9 <B>curses</B> screen from (to) a file
13 <H2>SYNOPSIS</H2><PRE>
14 <B>#include</B> <B><curses.h></B>
16 <B>int</B> <B>scr_dump(const</B> <B>char</B> <B>*filename);</B>
17 <B>int</B> <B>scr_restore(const</B> <B>char</B> <B>*filename);</B>
18 <B>int</B> <B>scr_init(const</B> <B>char</B> <B>*filename);</B>
19 <B>int</B> <B>scr_set(const</B> <B>char</B> <B>*filename);</B>
23 <H2>DESCRIPTION</H2><PRE>
24 The <B>scr_dump</B> routine dumps the current contents of the
25 virtual screen to the file <I>filename</I>.
27 The <B>scr_restore</B> routine sets the virtual screen to the
28 contents of <I>filename</I>, which must have been written using
29 <B>scr_dump</B>. The next call to <B>doupdate</B> restores the screen
30 to the way it looked in the dump file.
32 The <B>scr_init</B> routine reads in the contents of <I>filename</I> and
33 uses them to initialize the <B>curses</B> data structures about
34 what the terminal currently has on its screen. If the
35 data is determined to be valid, <B>curses</B> bases its next
36 update of the screen on this information rather than
37 clearing the screen and starting from scratch. <B>scr_init</B>
38 is used after <B>initscr</B> or a <B>system</B> [see <B>system</B>(BA_LIB)]
39 call to share the screen with another process which has
40 done a <B>scr_dump</B> after its <B>endwin</B> call. The data is
41 declared invalid if the terminfo capabilities <B>rmcup</B> and
42 <B>nrrmc</B> exist; also if the terminal has been written to
43 since the preceding <B>scr_dump</B> call.
45 The <B>scr_set</B> routine is a combination of <B>scr_restore</B> and
46 <B>scr_init</B>. It tells the program that the information in
47 <I>filename</I> is what is currently on the screen, and also what
48 the program wants on the screen. This can be thought of
49 as a screen inheritance function.
51 To read (write) a window from (to) a file, use the <B>getwin</B>
52 and <B>putwin</B> routines [see <B><A HREF="curs_util.3x.html">curs_util(3x)</A></B>].
56 <H2>RETURN VALUE</H2><PRE>
57 All routines return the integer <B>ERR</B> upon failure and <B>OK</B>
63 Note that <B>scr_init</B>, <B>scr_set</B>, and <B>scr_restore</B> may be
68 <H2>PORTABILITY</H2><PRE>
69 The XSI Curses standard, Issue 4, describes these func-
70 tions (adding the const qualifiers).
71 The SVr4 docs merely say under <B>scr_init</B> that the dump data
72 is also considered invalid "if the time-stamp of the tty
73 is old" but don't define "old".
77 <H2>SEE ALSO</H2><PRE>
78 <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="curs_initscr.3x.html">curs_initscr(3x)</A></B>, <B><A HREF="curs_refresh.3x.html">curs_refresh(3x)</A></B>,
79 <B><A HREF="curs_util.3x.html">curs_util(3x)</A></B>, <B><A HREF="system.3S.html">system(3S)</A></B>
130 Man(1) output converted with
131 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>