Lines Matching +full:out +full:- +full:of +full:- +full:window

2 .\" Copyright 2018-2023,2024 Thomas E. Dickey                                *
5 .\" Permission is hereby granted, free of charge, to any person obtaining a *
6 .\" copy of this software and associated documentation files (the *
10 .\" copies of the Software, and to permit persons to whom the Software is *
14 .\" in all copies or substantial portions of the Software. *
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
20 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
24 .\" Except as contained in this notice, the name(s) of the above copyright *
31 .TH scr_dump 5 2024-03-23 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "File formats"
48 scr_dump \-
53 contents of a window to an external file using \fBscr_dump\fP or \fBputwin\fP,
60 A longstanding implementation of screen-dump was
63 A \*(``magic number\*('' is written to the beginning of the dump file,
69 This 16-bit number was unused:
78 but to be more certain, this 32-bit number was chosen:
86 This is the pattern submitted to the maintainers of the \fBfile\fP program:
94 # ncurses6 (2015) uses this format, ignoring byte-order
102 so that internal data sizes are not directly related to the dump-format, and
103 enabling the library to read dumps from either narrow- or wide-character-
107 in a 32-bit \fBchtype\fP, while the \fIwide-character\fP library stores
109 32-bits.
112 screen-size,
117 The screen-dump feature was added to \fI\%ncurses\fP in June 1995.
121 The \fI\%WINDOW\fP structure was written in binary form.
123 The \fI\%WINDOW\fP structure refers to lines of data,
124 which were written as an array of binary data following the \fI\%WINDOW\fP.
126 When \fBgetwin\fP restored the window,
127 it would keep track of offsets into the array of line-data
128 and adjust the \fI\%WINDOW\fP structure which was read back into memory.
136 A brief survey of the existing implementations follows.
143 \*(``[t]he \fI\%getwin()\fP function reads window-related data stored in
145 The function then creates and initializes a new window using that data.
153 In the mid-1990s when the X/Open Curses document was written,
161 for base-level conformance;
167 beginning of the dump.
168 The \fI\%WINDOW\fP data and the lines of text follow, all in binary form.
191 (AIX and HP-UX)
202 Because most Unix vendors at the time used big-endian hardware,
203 the magic number is written with the high-order byte first.
212 the \fI\%WINDOW\fP structure and line data are written in binary format.
215 none of them documents the format used for screen dumps.
223 It produced dumps of different size
224 (all on 64-bit hardware,
229 HP-UX (90093 bytes)
243 Solaris furthermore supplies two versions of
268 the contents of the window are written piecemeal,
269 with coordinates and attributes for each chunk of text rather than
270 writing the whole window from top to bottom.
275 it writes the \fI\%WINDOW\fP structure in binary,
276 but begins the file with its three-byte identifier \*(``PDC\*('',
277 followed by a single-byte version number.
285 As of April 2017,
304 followed by a binary dump of the \fI\%WINDOW\fP,
306 some data for wide characters referenced by the \fI\%WINDOW\fP
314 (and for the sake of example, limiting the screen-size to 10x20):
338 scr_dump("foo.out");
357 _delay=-1
375 while the remainder of the file is printable text.
386 The parameters in the header are written out only if they are nonzero.
433 (back color erase) capability, and does not color the window background.
438 Here is the corresponding dump (using \*(``od \-t x1\*(''):
469 extended screen-dump format for \fI\%ncurses\fP 6.0 (2015)