

            page (2) --- display file in paginated form              06/21/84


          | _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n

          |      integer function page (fdin, prompt, eprompt, lines, fdout, options)
                 file_des fdin, fdout
                 character prompt (ARB), eprompt (ARB)
          |      integer lines, options

                 Library:  vswtlb (Standard Subsystem Library)


            _F_u_n_c_t_i_o_n

          |      'Page'  displays  the  contents  of a disk file in paginated
          |      form.  It also allows skipping pages forward and backward as
          |      well as searching for patterns within the file.   'Page'  is
          |      primarily  intended  for viewing a file on a high speed CRT,
          |      but it may be used from any terminal.

          |      'Page' accepts six arguments, of which the last is optional.
          |      'Fdin' is the swt file descriptor of a file to be displayed.
          |      'Prompt' specifies a format string (cf.  'print',  'encode')
          |      to  be used for prompting the user after each screen of text
          |      except the final page.  If this  format  string  contains  a
          |      format code for an integer (e.g.  "*i") then 'page' replaces
          |      it  with  the  current  page  number  in  the actual prompt.
          |      'Eprompt' specifies a format string to be used for prompting
          |      the user when the final page of the file is reached; it  may
          |      also  contain  a  format  code  for the current page number.
          |      'Lines' gives the number of lines in a page.  'Fdout' is the
          |      swt file descriptor  of  the  file  to  receive  the  output
          |      display;  'page'  only  pages output when the output file is
          |      connected to a terminal (i.e.  if  the  output  file  is  on
          |      disk,  'page'  simply copies the file to be displayed).  The
          |      final (optional) argument consists of flags that control the
          |      operation of the 'page' subroutine.  The following flags may
          |      be used singly or in combination (e.g.  PG_END + PG_VTH):

          |          PG_END     Do not prompt following the final page of the
          |                     file.  The default action is to prompt.
          |          PG_VTH     Use 'vth' to manage the screen.   By  default
          |                     'page' displays the file without using 'vth'.

          |      If  the  'options' argument is not specified, it defaults to
          |      0; 'page' displays the file using standard I/O  and  prompts
          |      after the last page of the file.

          |      If  'vth'  is  used  to  display  the paginated file, 'page'
          |      ignores the 'lines' argument and fixes the number  of  lines
          |      per page at the maximum number that can fit on the screen.

          |      'Page'  prompts  the  user  after  each  page of output, and
          |      awaits one of the following commands (note  that  alphabetic
          |      commands may be entered in upper or lower case):

          |           D<pages>  Display  given  number  of pages (default 1),
          |                     prompting only after the end of the range.


            page (2)                      - 1 -                      page (2)




            page (2) --- display file in paginated form              06/21/84


          |           E<path>   Examine the file whose pathname is <path>.
          |           E         Examine the original file.
          |           H or ?    Print a command summary.
          |           M<margin> Set column of left margin to be displayed.
          |           N or Q    Exit with OK status.
          |           P or ^    Redisplay previous page.
          |           S<lines>  Set page size to specified number of lines.
          |                     Display starts over on page 1.
          |           W <path>  Write a copy of the file being  displayed  to
          |                     <path>.   The  file  named  <path>  must  not
          |                     already exist.
          |           W+<path>  Append a copy of the file being displayed  to
          |                     <path>.
          |           W!<path>  Write  a  copy of the file being displayed to
          |                     <path>.   If the file already exists, it will
          |                     be overwritten.
          |           X         Exit with EOF status.
          |           Y or :    Advance to the next page.
          |           <ctrl-c>  Exit with EOF status (does not work in  'vth'
          |                     mode).
          |           <newline> Advance to the next page.
          |           <page>    Display specified page number.
          |           -<pages>  Back up given number of pages (default 1).
          |           .         Redisplay current page.
          |           +<pages>  Advance given number of pages (default 1).
          |           $         Display the last page.
          |           /<pat>[/] Display the next page containing <pat>.
          |           \<pat>[\] Display the previous page containing <pat>.

                 The  pattern <pat> is a regular expression with the full set
          |      of options found in the editor.  'Page' searches  circularly
          |      from  the  current  file  position  for  the  next page that
          |      contains the specified  pattern.   As  in  the  editor,  the
          |      trailing  delimiter  is  optional.  (See _I_n_t_r_o_d_u_c_t_i_o_n _t_o _t_h_e
                 _S_o_f_t_w_a_r_e _T_o_o_l_s _T_e_x_t _E_d_i_t_o_r in the _S_o_f_t_w_a_r_e  _T_o_o_l_s  _S_u_b_s_y_s_t_e_m
          *      _U_s_e_r_'_s _G_u_i_d_e for details.)


            _C_a_l_l_s

          |      close,  ctoc,  ctoi,  encode, fcopy, getlin, isatty, makpat,
          |      markf, match, open,print, putch, seekf, scopy, strim, vtclr,
          |      vtenb,  vtgetl,  vtinfo,  vtinit,  vtprt,  vtputl,   vtread,
          |      vtstop, vtupd, Primos break$, missin, mklb$f, mkon$f, pl1$nl


            _B_u_g_s

          |      Large amounts of stack space are used.

          |      If  any  format  code  other  than  "*i" is used in a format
          |      string, erroneous values will be displayed.

          |      If more than one format code is  specified,  'page'  gets  a
          |      pointer fault error.



            page (2)                      - 2 -                      page (2)




            page (2) --- display file in paginated form              06/21/84


          |      There is no way to change the page alignment.

          |      The "H" command output is not paged.


            _S_e_e _A_l_s_o

                 pg (1), _I_n_t_r_o_d_u_c_t_i_o_n _t_o _t_h_e _S_o_f_t_w_a_r_e _T_o_o_l_s _T_e_x_t _E_d_i_t_o_r


















































            page (2)                      - 3 -                      page (2)


