]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/man/curs_scr_dmp.3x.html
ncurses 4.2
[ncurses.git] / Ada95 / html / man / curs_scr_dmp.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4        <STRONG>scr_dump</STRONG>,  <STRONG>scr_restore</STRONG>, <STRONG>scr_init</STRONG>, <STRONG>scr_set</STRONG> - read (write) a
5        <STRONG>curses</STRONG> screen from (to) a file
6
7
8 </PRE>
9 <H2>SYNOPSIS</H2><PRE>
10        <STRONG>#include</STRONG> <STRONG><curses.h></STRONG>
11
12        <STRONG>int</STRONG> <STRONG>scr_dump(const</STRONG> <STRONG>char</STRONG> <STRONG>*filename);</STRONG>
13        <STRONG>int</STRONG> <STRONG>scr_restore(const</STRONG> <STRONG>char</STRONG> <STRONG>*filename);</STRONG>
14        <STRONG>int</STRONG> <STRONG>scr_init(const</STRONG> <STRONG>char</STRONG> <STRONG>*filename);</STRONG>
15        <STRONG>int</STRONG> <STRONG>scr_set(const</STRONG> <STRONG>char</STRONG> <STRONG>*filename);</STRONG>
16
17
18 </PRE>
19 <H2>DESCRIPTION</H2><PRE>
20        The <STRONG>scr_dump</STRONG> routine dumps the  current  contents  of  the
21        virtual screen to the file <EM>filename</EM>.
22
23        The  <STRONG>scr_restore</STRONG>  routine  sets  the virtual screen to the
24        contents of <EM>filename</EM>, which must have been  written  using
25        <STRONG>scr_dump</STRONG>.   The  next call to <STRONG>doupdate</STRONG> restores the screen
26        to the way it looked in the dump file.
27
28        The <STRONG>scr_init</STRONG> routine reads in the contents of <EM>filename</EM> and
29        uses  them  to initialize the <STRONG>curses</STRONG> data structures about
30        what the terminal currently has on  its  screen.   If  the
31        data  is  determined  to  be  valid, <STRONG>curses</STRONG> bases its next
32        update of the  screen  on  this  information  rather  than
33        clearing  the  screen and starting from scratch.  <STRONG>scr_init</STRONG>
34        is used after <STRONG>initscr</STRONG> or  a  <STRONG>system</STRONG>  [see  <STRONG>system</STRONG>(BA_LIB)]
35        call  to  share  the screen with another process which has
36        done a <STRONG>scr_dump</STRONG>  after  its  <STRONG>endwin</STRONG>  call.   The  data  is
37        declared  invalid  if  the terminfo capabilities <STRONG>rmcup</STRONG> and
38        <STRONG>nrrmc</STRONG> exist; also if the  terminal  has  been  written  to
39        since the preceding <STRONG>scr_dump</STRONG> call.
40
41        The  <STRONG>scr_set</STRONG>  routine  is a combination of <STRONG>scr_restore</STRONG> and
42        <STRONG>scr_init</STRONG>.  It tells the program that  the  information  in
43        <EM>filename</EM> is what is currently on the screen, and also what
44        the program wants on the screen.  This can be  thought  of
45        as a screen inheritance function.
46
47        To  read (write) a window from (to) a file, use the <STRONG>getwin</STRONG>
48        and <STRONG>putwin</STRONG> routines [see <STRONG><A HREF="curs_util.3x.html">curs_util(3X)</A></STRONG>].
49
50
51 </PRE>
52 <H2>RETURN VALUE</H2><PRE>
53        All routines return the integer <STRONG>ERR</STRONG> upon  failure  and  <STRONG>OK</STRONG>
54        upon success.
55
56
57 </PRE>
58 <H2>NOTES</H2><PRE>
59        Note  that  <STRONG>scr_init</STRONG>,  <STRONG>scr_set</STRONG>,  and  <STRONG>scr_restore</STRONG>  may  be
60        macros.
61
62
63 </PRE>
64 <H2>PORTABILITY</H2><PRE>
65        The XSI Curses standard, Issue 4,  describes  these  func-
66        is also considered invalid "if the time-stamp of  the  tty
67        is old" but don't define "old".
68
69
70 </PRE>
71 <H2>SEE ALSO</H2><PRE>
72        <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>,       <STRONG><A HREF="curs_initscr.3x.html">curs_initscr(3X)</A></STRONG>,      <STRONG><A HREF="curs_refresh.3x.html">curs_refresh(3X)</A></STRONG>,
73        <STRONG><A HREF="curs_util.3x.html">curs_util(3X)</A></STRONG>, <STRONG><A HREF="system.3s.html">system(3S)</A></STRONG>
74
75
76
77
78
79
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 </PRE>
121 </BODY>
122 </HTML>