]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/curs_scr_dump.3x.html
ncurses 5.2
[ncurses.git] / doc / html / man / curs_scr_dump.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
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
10
11
12 </PRE>
13 <H2>SYNOPSIS</H2><PRE>
14        <B>#include</B> <B>&lt;curses.h&gt;</B>
15
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>
20
21
22 </PRE>
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>.
26
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.
31
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.
44
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.
50
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>].
53
54
55 </PRE>
56 <H2>RETURN VALUE</H2><PRE>
57        All routines return the integer <B>ERR</B> upon  failure  and  <B>OK</B>
58        upon success.
59
60
61 </PRE>
62 <H2>NOTES</H2><PRE>
63        Note  that  <B>scr_init</B>,  <B>scr_set</B>,  and  <B>scr_restore</B>  may  be
64        macros.
65
66
67 </PRE>
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".
74
75
76 </PRE>
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>
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127 </PRE>
128 <HR>
129 <ADDRESS>
130 Man(1) output converted with
131 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
132 </ADDRESS>
133 </BODY>
134 </HTML>