X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=doc%2Fhtml%2Fman%2Fscr_dump.5.html;h=0295c9d53b3d5eeee807065e084f50e2ae7b0f6c;hb=bf2c36c4930ac5bb04cd2b1ba209cd09b6f510ab;hp=53b9508a612c7f5b1918719592101570c3b7c641;hpb=159cd0555e0efc14be66c9c3a1548f58908b6a1d;p=ncurses.git diff --git a/doc/html/man/scr_dump.5.html b/doc/html/man/scr_dump.5.html index 53b9508a..0295c9d5 100644 --- a/doc/html/man/scr_dump.5.html +++ b/doc/html/man/scr_dump.5.html @@ -27,19 +27,19 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: scr_dump.5,v 1.41 2023/12/23 16:27:25 tom Exp @ + * @Id: scr_dump.5,v 1.42 2023/12/30 22:06:36 tom Exp @ --> -scr_dump 5 2023-12-23 ncurses 6.4 File formats +scr_dump 5 2023-12-30 ncurses 6.4 File formats -

scr_dump 5 2023-12-23 ncurses 6.4 File formats

+

scr_dump 5 2023-12-30 ncurses 6.4 File formats

 scr_dump(5)                      File formats                      scr_dump(5)
 
@@ -50,10 +50,6 @@
        scr_dump - curses screen dump
 
 
-

SYNOPSIS

-       scr_dump
-
-
 

DESCRIPTION

        The  curses library provides applications with the ability to write the
        contents of a window to an external file using scr_dump or putwin,  and
@@ -129,48 +125,34 @@
 
 
 

PORTABILITY

-       There  is  no  standard  format for putwin.  This section gives a brief
-       description of the existing formats.
+       There is no standard format for curses screen dumps.  A brief survey of
+       the existing implementations follows.
 
 
 

X/Open Curses

-       Refer to X/Open Curses, Issue 7 (2009).
-
-       X/Open's documentation for enhanced curses says only:
+       X/Open Curses, Issue 7 specifies little.  It  says  (boldface  emphasis
+       added)
 
-          The getwin( ) function reads window-related data stored in the  file
-          by  putwin( ).   The  function  then  creates  and initializes a new
+          "[t]he  getwin()  function  reads  window-related data stored in the
+          file by putwin().  The function then creates and initializes  a  new
           window using that data.
 
-          The putwin( ) function writes all data associated with win into  the
-          stdio(3)  stream to which filep points, using an unspecified format.
-          This information can be retrieved later using getwin( ).
-
-       In the mid-1990s when the X/Open Curses  document  was  written,  there
-       were  still  systems  using older, less capable curses libraries (aside
-       from the BSD curses library which was not relevant to X/Open because it
-       did not meet the criteria for base curses).  The document explained the
-       term "enhanced" as follows:
-
-          o   Shading is used to identify  X/Open  Enhanced  Curses  material,
-              relating to interfaces included to provide enhanced capabilities
-              for applications originally written to be  compiled  on  systems
-              based  on  the  Unix  operating system.  Therefore, the features
-              described may not be present on systems that conform to XPG4  or
-              to  earlier  XPG  releases.   The  relevant  reference pages may
-              provide additional or more specific portability  warnings  about
-              use of the material.
+          The  putwin()  function writes all data associated with win into the
+          stdio stream to which filep points,  using  an  unspecified  format.
+          This information can be retrieved later using getwin()."
 
-       In  the foregoing, emphasis was added to unspecified format and to XPG4
-       or to earlier XPG releases, for clarity.
+       In  the  mid-1990s  when  the X/Open Curses document was written, there
+       were still System V systems using older, less capable curses libraries.
+       BSD  curses  was  not  relevant  to  X/Open because it did not meet the
+       criteria for base-level conformance; see ncurses(3x).
 
 
-

Unix System V

-       Unix System V curses identified the file format  by  writing  a  "magic
-       number" at the beginning of the dump.  The WINDOW data and the lines of
-       text follow, all in binary form.
+

System V

+       System V curses identified the file format by writing a "magic  number"
+       at  the  beginning  of the dump.  The WINDOW data and the lines of text
+       follow, all in binary form.
 
-       The Solaris curses source has these definitions:
+       Solaris curses has the following definitions.
 
            /* terminfo magic number */
            #define MAGNUM  0432
@@ -180,28 +162,28 @@
            #define SVR3_DUMP_MAGIC_NUMBER  0434
 
        That is, the feature was likely introduced in SVr2 (1984), and improved
-       in SVr3 (1987).  The Solaris curses source has no magic number for SVr4
-       (1989).  Other operating systems (AIX and HP-UX)  use  a  magic  number
-       which would correspond to this definition:
+       in  SVr3  (1987).   Solaris curses has no magic number for SVr4 (1989).
+       Other System V operating systems (AIX and HP-UX)  use  a  magic  number
+       that would correspond to the following.
 
            /* curses screen dump magic number */
            #define SVR4_DUMP_MAGIC_NUMBER  0435
 
-       That  octal number in bytes is 001, 035.  Because most Unix vendors use
-       big-endian hardware, the magic number is written  with  the  high-order
-       byte first, e.g.,
+       That  octal  number in bytes is 001, 035.  Because most Unix vendors at
+       the time used big-endian hardware, the magic number is written with the
+       high-order byte first.
 
            \001\035
 
-       After  the magic number, the WINDOW structure and line-data are written
-       in binary format.  While the magic number used by the Unix systems  can
-       be seen using od(1), none of the Unix systems documents the format used
-       for screen-dumps.
+       After  the magic number, the WINDOW structure and line data are written
+       in binary format.  While the magic number used by these systems can  be
+       observed  with od(1), none of them documents the format used for screen
+       dumps.
 
-       The Unix systems  do  not  use  identical  formats.   While  collecting
-       information  for  for  this  manual  page,  the savescreen test-program
-       produced dumps of different size (all  on  64-bit  hardware,  on  40x80
-       screens):
+       Nor do they use an identical format, even  with  the  System V  family.
+       The ncurses savescreen test program was used to collect information for
+       this manual page.  It produced dumps of different size (all  on  64-bit
+       hardware, on 40x80 screens):
 
        o   AIX (51817 bytes)
 
@@ -213,53 +195,54 @@
 
 
 

Solaris

-       As  noted  above,  Solaris  curses has no magic number corresponding to
-       SVr4 curses.  This is odd since Solaris was the first operating  system
-       to pass the SVr4 guidelines.  Solaris has two versions of curses:
+       As  noted  above,  Solaris  curses has no magic number corresponding to
+       SVr4 curses.  This is odd, since Solaris was the first operating system
+       to meet the SVr4 guidelines.  Solaris furthermore supplies two versions
+       of curses.
 
-       o   The default curses library uses the SVr3 magic number.
+       o   The default curses library uses the SVr3 magic number.
 
-       o   There  is  an  alternate  curses library in /usr/xpg4.  This uses a
-           textual format with no magic number.
+       o   An alternate curses library (which we term xcurses),  available  in
+           /usr/xpg4, uses a textual format with no magic number.
 
-           According to the copyright notice, the xpg4 Solaris curses  library
-           was developed by MKS (Mortice Kern Systems) from 1990 to 1995.
+           According  to  its  copyright  notice,  this  xcurses  library  was
+           developed by MKS (Mortice Kern Systems) from 1990 to 1995.
 
-           Like  ncurses6,  there  is  a  file-header with parameters.  Unlike
-           ncurses6, the contents of the window are  written  piecemeal,  with
-           coordinates  and  attributes  for  each  chunk  of text rather than
+           Like ncurses6,  it  includes  a  header  with  parameters.   Unlike
+           ncurses6,  the  contents  of the window are written piecemeal, with
+           coordinates and attributes for  each  chunk  of  text  rather  than
            writing the whole window from top to bottom.
 
 
 

PDCurses

-       PDCurses added support for screen dumps in version  2.7  (2005).   Like
-       Unix  System V  and ncurses5, it writes the WINDOW structure in binary,
-       but begins the file with its three-byte identifier "PDC", followed by a
-       one-byte version, e.g.,
+       PDCurses  added  support  for screen dumps in version 2.7 (2005).  Like
+       System V and ncurses5, it writes the WINDOW structure  in  binary,  but
+       begins  the  file  with  its three-byte identifier "PDC", followed by a
+       single-byte version number.
 
                 "PDC\001"
 
 
 

NetBSD

-       As  of  April  2017,  NetBSD  curses  does  not  support  scr_dump  and
+       As  of  April  2017,  NetBSD  curses  does  not  support  scr_dump  and
        scr_restore (or scr_init, scr_set), although it has putwin and getwin.
 
-       Like ncurses5, NetBSD putwin does not identify its dumps with a  useful
+       Like  ncurses5, NetBSD putwin does not identify its dumps with a useful
        magic number.  It writes
 
-       o   the curses shared library major and minor versions as the first two
-           bytes (e.g., 7 and 1),
+       o   the curses shared library major and minor versions as the first two
+           bytes (for example, 7 and 1),
 
        o   followed by a binary dump of the WINDOW,
 
-       o   some data for wide-characters referenced by the  WINDOW  structure,
+       o   some  data  for wide characters referenced by the WINDOW structure,
            and
 
        o   finally, lines as done by other implementations.
 
 
 

EXAMPLES

-       Given  a  simple  program  which writes text to the screen (and for the
+       Given a simple program which writes text to the  screen  (and  for  the
        sake of example, limiting the screen-size to 10x20):
 
            #include <curses.h>
@@ -317,13 +300,13 @@
 
        o   The actual color pair values are not written to the file.
 
-       o   All  characters  are  shown  in  printable form; spaces are "\s" to
+       o   All characters are shown in printable  form;  spaces  are  "\s"  to
            ensure they are not overlooked.
 
-       o   Attributes are written in escaped curly  braces,  e.g.,  "\{BOLD}",
+       o   Attributes  are  written  in escaped curly braces, e.g., "\{BOLD}",
            and may include a color pair (C1 or C2 in this example).
 
-       o   The  parameters  in  the  header  are  written out only if they are
+       o   The parameters in the header are  written  out  only  if  they  are
            nonzero.  When reading back, order does not matter.
 
        Running the same program with Solaris xpg4 curses gives this dump:
@@ -362,12 +345,12 @@
            9,19,0,0,
            CUR=11,5
 
-       Solaris getwin requires that all parameters are  present,  and  in  the
-       same  order.  The xpg4 curses library does not know about the bce (back
+       Solaris  getwin  requires  that  all parameters are present, and in the
+       same order.  The xpg4 curses library does not know about the bce  (back
        color erase) capability, and does not color the window background.
 
-       On the other  hand,  the  SVr4  curses  library  does  know  about  the
-       background  color.   However,  its screen dumps are in binary.  Here is
+       On  the  other  hand,  the  SVr4  curses  library  does  know about the
+       background color.  However, its screen dumps are in  binary.   Here  is
        the corresponding dump (using "od -t x1"):
 
            0000000 1c 01 c3 d6 f3 58 05 00 0b 00 0a 00 14 00 00 00
@@ -407,12 +390,11 @@
 
 
 
-ncurses 6.4                       2023-12-23                       scr_dump(5)
+ncurses 6.4                       2023-12-30                       scr_dump(5)