PRINT\PR.DOC  ·  DOC  ·  11.6 KB  ·  1988-03-09  ·  from PCPlus_Issue-21_Jun-1988
 PR  -  File Printing Utility
 --  -  ---- -------- -------

   Version 1.0      R.J. Hogg      March 1988


 Contents of this Document
 -------- -- ---- --------

   Files on Disk.

   Description of PR.

   Running PR.

   PR Examples.

   Setting your own defaults.

   PR Notes.


 Files on Disk
 ----- -- ----

   PR.DOC      This file.
   PR.EXE      The PR program.
   README.PR   Instructions for printing this file.
1Description of PR
 ----------- -- --

   PR  is a file printing utility capable of  printing  source files and
   text files in a paged format on a wide variety of printers.

   The main facilities of PR include :

   - Printing of a Banner Page
         - With up to two titles.
         - The  Filename  and  Extension are  printed  in  'Banner' type
           characters.
         - Date and Time are printed.
         - Copy number is printed.

   - Multiple Copies
         - Up to 999.

   - Margins
         - Left Margin.
         - Top Margin for each page.
         - Bottom Margin for each page.

   - Different Page lengths and widths for different sizes of paper.

   - A title and page number can be printed at the top of each page.

   - Rulers can be printed at the top and/or bottom of each page.

   - Linenumbers can preceed each printed line.

   - Long lines can be wrapped or truncated.

   - PR will pause, if required, after printing each page.

   - Listings can be started at any page.

   - Users can set their own defaults.

   - Fortran formatting characters, in column one of each line,   can be
     handled.

   - The listing can be moved to the top of the next page  either  using
     linefeeds or a formfeed.
1Running PR
 ------- --

   To get Help for PR type :

          A> PR

   To display PR's Copyright Notice type :

          A> PR ?

   To get PR to print a file type :

          A> PR pathname [parameters]

          pathname       is the pathname of the file to be printed.

          parameters     are   optional   parameters  which  change  the
                         default values used by PR.

   The parameters are described below :

   BMARGIN=n  or  BM=n
                         'n' specifies the number of lines to be printed
                         for the bottom margin of each page.

                         The default is 3 lines.

   CONTINUOUS  or  CN
                         produce  a  continuous  listing without titles,
                         page  numbers,   top and  bottom margins,   and
                         rulers.

   COPIES=n  or  CO=n
                         'n'  specifies  the  number  of  copies  to  be
                         printed.

                         The default is 1 copy.

   FORM      or  FM
                         Print a formfeed character to move  to  the top
                         of each new page rather than using linefeeds.

   FORTRAN   or  FO
                         Specifies that the file has  Fortran formatting
                         characters in the first column of each line.

                         0    in the first column advances an extra line
                              before printing the line.
                         1    in  the  first  column  starts  a new page
                              before printing the line.

                         blank  or any  other  character in  column one,
                         will just  print the line.   Note that  the '+'
                         formatting character is not supported.

1  LENGTH=n  or  LE=n
                         'n'  specifies the page length of the paper, in
                         lines per page.

                         The default is 66 lines.

   LINENUMBERS  or  LI
                         Print a linenumber before each line. The number
                         is  printed  in a  field of 6 characters and is
                         left justified.   The linenumber characters use
                         part of the specified page width.

                         The default is no linenumbers.

   LMARGIN=n  or  LM=n
                         'n' defines the number of  blank characters  to
                         be used for the left margin.    The margin does
                         not use part of the specified page width.

                         The default is 0 blank characters.

   NOBANNER  or  NOBA
                         Disable the printing of the Banner page.

   NOPTITLE  or  NOPT
                         Disable the printing of a title and page number
                         at the top of each page.

   NOWRAP  or  NOWR
                         Lines  greater  than the  page  width  will  be
                         truncated rather than wrapped.

   PAUSE  or  PA
                         Pause after printing each page. The message :

                             Pause (X or Q to exit)...

                         is printed on the screen.  Type X or Q to  exit
                         PR,   else type any other character to continue
                         printing.

   PTITLE=T1  or  PT=T1
                         Title one will be  printed  at the top of  each
                         new page.

                         The  Filename.Extension  is  the  default  page
                         title.

   PTITLE=T2  or  PT=T2
                         Title two will be  printed  at the top of  each
                         new page.

                         The Filename.Extension   is  the  default  page
                         title.
1  RULER  or  RU
                         Print top and bottom rulers on each page.

                         The default is no rulers.

   RULER=T  or  RU=T
                         Print top ruler on each page.

   RULER=B  or  RU=B
                         Print bottom ruler on each page.

   SPAGE=n  or  SP=n
                         'n' defines the start page for printing.  Note,
                         that n=0 specifies the Banner Page.

                         The default is page 0.

   TITLE1  or  T1
                         prompts the user for title one.   This title is
                         printed on the  banner  page  and  can  also be
                         printed as the title of each page if the  PT=T1
                         parameter is specified.

                         The  title can  include spaces and can be up to
                         80 characters long.

                         The default is no title one.

   TITLE1=s  or  T1=s
                         's' is  a string of  characters  defining title
                         one.  If  the  string is  read  from  the  user
                         defaults  file,   then  the  title  can contain
                         spaces; If read from the command line the title
                         cannot contain spaces.

   TITLE2  or  T2
                         prompts the user for title  two. This title  is
                         printed on the  banner  page  and  can  also be
                         printed as the title of each page if the  PT=T2
                         parameter is specified.

                         The  title can  include spaces and can be up to
                         80 characters long.

                         The default is no title two.

   TITLE2=s  or  T2=s
                         's' is a  string  of characters  defining title
                         two.  If the  string  is  read  from  the  user
                         defaults  file,   then the  title  can  contain
                         spaces; If read from the command line the title
                         cannot contain spaces.
1  TMARGIN=n  or  TM=n
                         'n' specifies the number of lines to be printed
                         for the top margin of each page.

                         The default is 3 lines.

   WIDTH=n  or  WI=n
                         'n'  specifies the page width of the paper. The
                         maximum  page width  including the left  margin
                         is 255.

                         The default is 80 columns.
1PR Examples
 -- --------

   PR CLIST.PAS
                         Print the file CLIST.PAS using all defaults.

   PR B:\INFO\TEXT.DOC
                         Print the file  TEXT.DOC  which can be found in
                         sub-directory INFO on disk drive B: .

   PR ASSEM.LST WIDTH=132 NOPTITLE
                         Print the file  ASSEM.LST  with a page width of
                         132 characters.    The listing requires no page
                         title or page numbers at the top of each page.

                         Macro Assembley listings may have to be printed
                         in this way,  as they  usually have  their  own
                         Page  titles and  Page  numbers embedded in the
                         file.


   PR MYPROG.F77 RULER LINENUMBERS
                         Print  the file  MYPROG.F77  with Rulers at the
                         top  and  bottom  of  each  page ,    and  with
                         linenumbers preceeding each line.

   PR TESTER.PAS LM=6 TITLE1
                         Print the file TESTER.PAS with a left margin of
                         6 character positions. PR will prompt for title
                         one which will be printed on the banner page.

   PR A:PROG1.FOR TITLE2=Fortran-Test LENGTH=70 LI
                         Print  the  file  PROG1.FOR  stored on drive A:
                         with a  page  length of  70  lines.   Title two
                         is set to  'Fortran-Test'.  Linenumbers will be
                         printed.

   PR MORE.PAS T2 PTITLE=T2 BM=6
                         Print the file MORE.PAS with a bottom margin of
                         6 lines.   PR will  prompt for  title two which
                         will be printed on the title line of each  page
                         as well as on the banner page.
1Setting Your Own Defaults
 ------- ---- --- --------

   When PR is run, it checks to see if the file PR.DEF is on the default
   drive.  If PR.DEF is found then user default parameters are read from
   the  file and will override PR's initial defaults.

   - Each line of PR.DEF consists of a single PR parameter.

   - The TITLE1=  or TITLE2=  parameters  can  be  followed  by  a title
     containing spaces.

   PR.DEF  Example :

        TITLE1= ACME Software     Copyright (C) 1988
        WIDTH=132
        LINENUMBERS

     The 3 lines above  will set up  defaults for  Title one,   the page
     width and Linenumber printing .
1PR Notes
 -- -----

 - Overprinting is not supported.

 - All control characters  (excepting Formfeed and Tab)  are ignored and
   are not printed.

 - All characters with ASCII codes greater than 126 are ignored  and are
   not printed.

 - A Formfeed  character  found at the  beginning of a line will start a
   new page.

 - Tab characters are converted to one or more spaces.

 - The Filename and/or Extension  Banner  characters  may  be one of the
   following :
     A..Z   a..z   0-9   $   &   %   (   )   _   @   ^   ~   #   !

 - PR can not detect printer errors, for example out-of-paper.    Re-run
   PR  using the  SPAGE=  parameter to  restart  the  listing  from  the
   required page.

 - PR is not capable of sending printer setup characters.

 - PR cannot detect lines that are automatically wrapped by the printer.