home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / utils / pfp219 / pfp.prn < prev    next >
Encoding:
Text File  |  1995-05-19  |  50.7 KB  |  1,091 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.                                    PROGRAMMER'S
  20.                                    PROGRAMMER'S
  21.                                    PROGRAMMER'S
  22.                                        FILE
  23.                                        FILE
  24.                                        FILE
  25.                                      PRINTER
  26.                                      PRINTER
  27.                                      PRINTER
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.                                    Version 2.01
  42.                                    Version 2.01
  43.                                    Version 2.01
  44.  
  45.  
  46.  
  47.                               Programmer's File Printer
  48.                               Programmer's File Printer
  49.                               Programmer's File Printer
  50.  
  51.  
  52.        I
  53.        I
  54.        INTRODUCTION
  55.         NTRODUCTION
  56.         NTRODUCTION
  57.  
  58.        Thank you  for using  Programmer's File  Printer. The  author hopes
  59.        that  you'll  find  it   a  useful  addition  to   your  Windows  3
  60.        applications and that it will make work on Windows even easier.
  61.  
  62.        This manual covers all the aspects  of Programmer's File Printer in
  63.        detail, and you can use it to as  a reference. You'll find, though,
  64.        that the  program is  quite intuitive  to  use, as  it  follows the
  65.        standard Windows methods of doing things,  so you shouldn't need to
  66.        read much below in order to use it.
  67.  
  68.        The author is interested to hear any reports about how you find the
  69.        program. Your comments and suggestions for  further development are
  70.        welcome, as are reports of any problems. You'll find details of the
  71.        author's electronic mail address below.
  72.  
  73.  
  74.           Abstract
  75.           Abstract
  76.           Abstract
  77.  
  78.           Programmer's File Printer is  a Windows 3  application that lets
  79.           you print  text  files such  as  program  listings, and  produce
  80.           hexadecimal dumps of binary files.
  81.  
  82.           You have full  control over the  format of a  text file listing:
  83.           you can specify
  84.  
  85.                  -  Whether lines are numbered
  86.                  -  Whether pages have headers
  87.                  -  Whether long lines are wrapped or truncated
  88.                  -  How wide a tab stop is
  89.  
  90.           as well as selecting the type face and  type size. For both text
  91.           listings and hex dumps, you can choose to print either the whole
  92.           file, or only a part.
  93.  
  94.           You can, if you wish, specify a set  of listing attributes to be
  95.           used for all files of specific types, so that, for instance, you
  96.           could list all  .c
  97.                           .c
  98.                           .c files in one way,  and .dat
  99.                                                     .dat
  100.                                                     .dat files in another.
  101.           You can also over-ride  the details on an  individual file basis
  102.           for exact control.
  103.  
  104.           For single-sheet printers that stack pages  the "wrong" way, you
  105.           can specify that files are to be printed in reverse page order.
  106.  
  107.  
  108.           Distribution and Use
  109.           Distribution and Use
  110.           Distribution and Use
  111.  
  112.           Programmer's File Printer  is Copyright (c)  1991 Alan Phillips.
  113.           It may be  freely used by  individuals, educational institutions
  114.           and charities; however  use by  commercial organisations  is not
  115.           permitted except with the prior written agreement of the author.
  116.  
  117.           The program  may be  stored in  software archives  or  posted to
  118.           Bulletin Board systems. Apart from reasonable media and handling
  119.           costs, no charge may be levied for its distribution. The program
  120.           should be stored with  all the files that  accompany its release
  121.  
  122.  
  123.  
  124.                                        Page 
  125.                                        Page 
  126.                                        Page 1
  127.                                             1
  128.                                             1
  129.  
  130.  
  131.  
  132.                               Programmer's File Printer
  133.                               Programmer's File Printer
  134.                               Programmer's File Printer
  135.  
  136.  
  137.           by the author; however  archive systems may  repackage the files
  138.           to suit their own storage conventions.
  139.  
  140.  
  141.           Disclaimer
  142.           Disclaimer
  143.           Disclaimer
  144.  
  145.           Programmer's File  Printer  is offered  on  an  as is basis.  No
  146.           guarantee of any sort  is made or  should be inferred  as to its
  147.           functioning, or to its  suitability for any  purpose. The author
  148.           accepts  no  liability   for  any  loss   or  damage  whatsoever
  149.           occasioned in connection with its use.
  150.  
  151.           This program is  produced as a  private activity by  the author,
  152.           unconnected with his employment by the University of Lancaster.
  153.  
  154.           The author welcomes  comments and bug  reports; but there  is no
  155.           commitment to add any new features,  nor to address any problems
  156.           that may be reported.
  157.  
  158.  
  159.           Contacting the Author
  160.           Contacting the Author
  161.           Contacting the Author
  162.  
  163.           Comments  and  suggestions  on  Programmer's  File  Printer  are
  164.           welcomed. The  author  can  be  contacted  by  electronic  mail;
  165.           addresses are
  166.  
  167.             alan@uk.ac.lancaster
  168.             alan@uk.ac.lancaster
  169.             alan@uk.ac.lancaster          JANET
  170.                                           JANET
  171.                                           JANET
  172.             alan@lancaster.ac.uk
  173.             alan@lancaster.ac.uk
  174.             alan@lancaster.ac.uk          Internet and BITNET
  175.                                           Internet and BITNET
  176.                                           Internet and BITNET
  177.             alan%uk.ac.lancaster@ukc
  178.             alan%uk.ac.lancaster@ukc
  179.             alan%uk.ac.lancaster@ukc      UUCP
  180.                                           UUCP
  181.                                           UUCP
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.                                        Page 
  214.                                        Page 
  215.                                        Page 2
  216.                                             2
  217.                                             2
  218.  
  219.  
  220.  
  221.                               Programmer's File Printer
  222.                               Programmer's File Printer
  223.                               Programmer's File Printer
  224.  
  225.  
  226.        G
  227.        G
  228.        GETTING 
  229.         ETTING 
  230.         ETTING S
  231.                S
  232.                STARTED
  233.                 TARTED
  234.                 TARTED
  235.  
  236.        You can start  to use Programmer's  File Printer at  once, since it
  237.        has been set up to be useful even without configuration.
  238.  
  239.  
  240.           Installing the program
  241.           Installing the program
  242.           Installing the program
  243.  
  244.           To install Programmer's  File Printer, simply  copy the  pfp.exe
  245.                                                                    pfp.exe
  246.                                                                    pfp.exe,
  247.           pfp.ini
  248.           pfp.ini
  249.           pfp.ini and pfp.hlp
  250.                       pfp.hlp
  251.                       pfp.hlp files into a directory on your path. You can
  252.           then start it from Program  Manager or from File  Manager as any
  253.           other application.
  254.  
  255.  
  256.           Simple Use
  257.           Simple Use
  258.           Simple Use
  259.  
  260.           Programmer's File Printer can  be used very  simply, without the
  261.           need for configuration. When  you start it, you'll  see the  main
  262.           window appear: this contains two list boxes  on the left, one on
  263.           the right,  and  a  group  of  check boxes  that  are  initially
  264.           inactive.
  265.  
  266.           On the far left you'll see the  Directories list. This shows you
  267.           the names  of sub-directories  and drives,  and you  move around
  268.           your disk  by  double-clicking entries  here.  The program  will
  269.           always select the  directory that you  were working in  the last
  270.           time you used it, provided that it still exists and is on a hard
  271.           disk or a network.
  272.  
  273.           To the right of this is the  Files list. Until you configure the
  274.           program, you'll  see  the names  of  every file  in  the current
  275.           directory in  this list.  If there  are more  files than  can be
  276.           shown you'll see a scroll bar on the right of the list that will
  277.           let you move up and down.
  278.  
  279.           You select the files you want  to print from this  list. You can
  280.           click on an entry  to highlight it;  you can add  files to those
  281.           highlighted by holding  down  CONTROL
  282.                                         CONTROL
  283.                                         CONTROL and clicking,  or select  a
  284.           range by holding  SHIFT
  285.                             SHIFT
  286.                             SHIFT and clicking. Once  you have one or  more
  287.           files highlighted, you'll  see the  Select
  288.                                               Select
  289.                                               Select button become  active.
  290.           Clicking this will copy the names of  the selected file into the
  291.           list on the far right, the Files Selected To Print list.
  292.  
  293.           You can move around your disk  and add files to the  list on the
  294.           right as you  please. Then, when  you've selected all  the files
  295.           you want  to  print,  simply press  the  Print
  296.                                                    Print
  297.                                                    Print button  to  start
  298.           printing. The first time you do  this, Programmer's File Printer
  299.           will show you a dialog box letting you  select the type face and
  300.           type size to use; the program remembers  what you select, and so
  301.           you won't  need this  dialog again  unless you  choose to  use a
  302.           different type face or size.
  303.  
  304.           Finally, when printing is complete, the  Files Selected To Print
  305.           list will be emptied.
  306.  
  307.           If you decide  that you don't  want to  print some of  the files
  308.           you've selected, simply  highlight them  by clicking  them (here
  309.  
  310.  
  311.  
  312.                                        Page 
  313.                                        Page 
  314.                                        Page 3
  315.                                             3
  316.                                             3
  317.  
  318.  
  319.  
  320.                               Programmer's File Printer
  321.                               Programmer's File Printer
  322.                               Programmer's File Printer
  323.  
  324.  
  325.           again you can use the CONTROL
  326.                                 CONTROL
  327.                                 CONTROL and SHIFT
  328.                                             SHIFT
  329.                                             SHIFT keys to select more than
  330.           one file) and press the Unselect
  331.                                   Unselect
  332.                                   Unselect button.
  333.  
  334.  
  335.           Other Possibilities
  336.           Other Possibilities
  337.           Other Possibilities
  338.  
  339.           The  section  above   showed  you   the  simplest  way   to  use
  340.           Programmer's File  Printer,  using  only  the default  settings.
  341.           However, the program can be tuned to do exactly what you need in
  342.           several ways.
  343.  
  344.  
  345.              The files shown in the list
  346.              The files shown in the list
  347.              The files shown in the list
  348.  
  349.              One thing you might want to do is  to restrict the file names
  350.              shown the  in  the  Files list  to  those with  specific  file
  351.              types. At the bottom left  of the main window  you'll see the
  352.              File Types Shown In List area, containing 8 check boxes.
  353.  
  354.              Initially the boxes have  no text beside them,  and the whole
  355.              area is grayed and  inactive. If you want,  you can associate
  356.              up to eight file types -  such as .c
  357.                                                .c
  358.                                                .c,  .h
  359.                                                     .h
  360.                                                     .h and .asm
  361.                                                            .asm
  362.                                                            .asm - with the
  363.              boxes; then, with the area active,  Programmer's File Printer
  364.              will show only those files whose types are given beside boxes
  365.              that you check.
  366.  
  367.  
  368.              How listings are formatted
  369.              How listings are formatted
  370.              How listings are formatted
  371.  
  372.              As installed, Programmer's  File Printer will  list all files
  373.              with line numbering and page headers, using  a tab size of 8.
  374.              Most files will be  printed as text listings,  but some, such
  375.              as .exe
  376.                 .exe
  377.                 .exe,  .obj
  378.                        .obj
  379.                        .obj and .lib 
  380.                                 .lib 
  381.                                 .lib files, will be dumped  in hexadecimal
  382.              and ASCII.
  383.  
  384.              You can specify your own formats for listing through an easy-
  385.              to-use dialog. For  example, you  can select  .c
  386.                                                            .c
  387.                                                            .c files  to be
  388.              printed with a  tab size  of 4 and  line numbering;  and  .asm
  389.                                                                        .asm
  390.                                                                        .asm
  391.              files with a tab size of 8.
  392.  
  393.  
  394.              Page printing order
  395.              Page printing order
  396.              Page printing order
  397.  
  398.              If you  are  using  a single  sheet  printer  such  as an  HP
  399.              Deskjet, the output pages will be stacked in the wrong order,
  400.              so you  need  to  manually  shuffle  them  when  printing  is
  401.              complete. You  can  configure  Programmer's  File Printer  to
  402.              print files in reverse  page order, so that  the output stack
  403.              is the correct way up.
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.                                        Page 
  416.                                        Page 
  417.                                        Page 4
  418.                                             4
  419.                                             4
  420.  
  421.  
  422.  
  423.                               Programmer's File Printer
  424.                               Programmer's File Printer
  425.                               Programmer's File Printer
  426.  
  427.  
  428.        T
  429.        T
  430.        THE 
  431.         HE 
  432.         HE M
  433.            M
  434.            MAIN 
  435.             AIN 
  436.             AIN M
  437.                 M
  438.                 MENU
  439.                  ENU
  440.                  ENU
  441.  
  442.        Many of Programmer's File  Printer's actions are  controlled by the
  443.        main menu, which  you will see  at the top  of the main  window. In
  444.        this section we look at the  various options available and describe
  445.        how you use them.
  446.  
  447.  
  448.           The Files Menu
  449.           The Files Menu
  450.           The Files Menu
  451.  
  452.           This menu controls  things related  to your  files. It  lets you
  453.           specify what file  types are  shown in the  File Types Shown  In
  454.           List area, set up how you want each type to be printed, and also
  455.           to set up specific listing requirements for individual files.
  456.  
  457.           The menu also contains a number of miscellaneous items.
  458.  
  459.  
  460.              Set attributes for file types
  461.              Set attributes for file types
  462.              Set attributes for file types
  463.  
  464.              This menu options starts  a dialog that lets  you specify how
  465.              files of particular  types are to  be listed. You  can choose
  466.              between text  lists and  hex dumps,  and specify  whether you
  467.              want the lines to be numbered and the pages to have titles.
  468.  
  469.              To specify the  settings you  want to apply  to a  given file
  470.              type, either select the type from the list  box or type it in
  471.              to the  edit  control.  Be careful  when  you  type that  you
  472.              include a leading dot character.
  473.  
  474.              You can then check the options that  you require for the file
  475.              type and give the  tab size; then, to  make Programmer's File
  476.              Printer apply the values click the Use
  477.                                                 Use
  478.                                                 Use button.
  479.  
  480.              If you  want to  record the  options you've  set permanently,
  481.              click the Save
  482.                        Save
  483.                        Save button.
  484.  
  485.              Note that if you select the option to dump files with a given
  486.              type  in  hexadecimal  rather  than  listing  them  as  text,
  487.              Programmer's File Printer will dump the whole of the file. If
  488.              you want  to  dump  only  part  of  the  file,  use  the   Set
  489.              Attributes For Selected Files option described below.
  490.  
  491.  
  492.              Set attributes for selected file
  493.              Set attributes for selected file
  494.              Set attributes for selected file
  495.  
  496.              This menu  option  starts  a  dialog  that lets  you  specify
  497.              listing  attributes   for   the  specific   files   that  are
  498.              highlighted in the  Files Selected For Printing list. With it
  499.              you  can  over-ride  the  default   listing  attributes  that
  500.              Programmer's File Printer determines from the  file type, and
  501.              also select more complex options like a  range of lines to be
  502.              listed.
  503.  
  504.              You can only use this  option if you've selected  one or more
  505.              files in the Files Selected For Printing list.
  506.  
  507.  
  508.  
  509.  
  510.                                        Page 
  511.                                        Page 
  512.                                        Page 5
  513.                                             5
  514.                                             5
  515.  
  516.  
  517.  
  518.                               Programmer's File Printer
  519.                               Programmer's File Printer
  520.                               Programmer's File Printer
  521.  
  522.  
  523.              The dialog allows  you to switch  the way the  file is listed
  524.              between text printing and dumping in hexadecimal as you wish,
  525.              and to specify  such things as  the tab size  and whether you
  526.              want line  numbering.  By  default,  the  Whole File  box  is
  527.              checked, indicating that Programmer's File Printer will print
  528.              or dump the whole file. If you want select a range, click the
  529.              box to uncheck it and fill in the start and finish values you
  530.              require.
  531.  
  532.              When giving range values, you're specifying file addresses or
  533.              offsets for a hex dump, and can  give them either in decimal,
  534.              or as hex  numbers preceded by  x
  535.                                              x
  536.                                              x or  0x
  537.                                                    0x
  538.                                                    0x. For a  text listing
  539.              you're giving line  numbers (the  first line  in the  file is
  540.              numbered 1). In either case  you can use the  words start
  541.                                                                  start
  542.                                                                  start and
  543.              end
  544.              end
  545.              end for the start and end of the file if you wish.
  546.  
  547.              If you had more than  one file name highlighted  in the  Files
  548.              Selected For  Printing  list  when  you  selected  this  menu
  549.              option, the dialog box will appear for each one in turn.
  550.  
  551.              An alternative way of starting the  dialog to set the details
  552.              is to  double  click  on  the  file concerned  in  the   Files
  553.              Selected For Printing list.
  554.  
  555.  
  556.              Edit displayed types list
  557.              Edit displayed types list
  558.              Edit displayed types list
  559.  
  560.              Clicking this option  starts a  dialog which lets  you choose
  561.              what file  types you  want  associated with  the  eight check
  562.              boxes in the File Types Shown In List area.
  563.  
  564.              The dialog  box contains  eight  edit controls,  each  with a
  565.              check box beside  it. To associate  a file type  with a check
  566.              box in the File Types Shown In List area, simply type it into
  567.              the corresponding  edit  control (remembering  that  you must
  568.              always give a leading dot). If  you want the file  type to be
  569.              shown in the  list of  files, check the  box beside  the file
  570.              type.
  571.  
  572.              Once you leave the dialog, the boxes  in the File Types Shown
  573.              In List will be updated.
  574.  
  575.              You can also use this dialog to set whether Programmer's File
  576.              Printer uses the file  types selected or shows  all the files
  577.              in the directory;  this is equivalent  to using the  Show All
  578.                                                                   Show All
  579.                                                                   Show All
  580.              File Types
  581.              File Types
  582.              File Types menu option.
  583.  
  584.              If you want  to make the  selection of file  types permanent,
  585.              click the Save
  586.                        Save
  587.                        Save button in the dialog box.
  588.  
  589.  
  590.              Show all files in directory
  591.              Show all files in directory
  592.              Show all files in directory
  593.  
  594.              Clicking this  menu option  switches tells  Programmer's File
  595.              Printer to switch  between showing you  all the files  in the
  596.              current directory, and  showing only  those whose  file types
  597.              are checked in the Files Types Shown In List area.
  598.  
  599.  
  600.  
  601.                                        Page 
  602.                                        Page 
  603.                                        Page 6
  604.                                             6
  605.                                             6
  606.  
  607.  
  608.  
  609.                               Programmer's File Printer
  610.                               Programmer's File Printer
  611.                               Programmer's File Printer
  612.  
  613.  
  614.              If a check mark is  shown next to the  item Programmer's File
  615.              Printer will  display  the  names of  all  the  files in  the
  616.              current directory, regardless of their type.  Also, the check
  617.              boxes in the File Types Shown In List area will be inactive.
  618.  
  619.  
  620.              Rescan current directory
  621.              Rescan current directory
  622.              Rescan current directory
  623.  
  624.              Clicking this menu option forces Programmer's File Printer to
  625.              re-read the current directory  and rebuild the  list of files
  626.              shown.
  627.  
  628.              You will eed to use  this option to re-scan  the directory if
  629.              you've disabled automatic rescanning and  you've clicked some
  630.              of the file type boxes in the File Types Shown In List area.
  631.  
  632.  
  633.              Control Panel
  634.              Control Panel
  635.              Control Panel
  636.  
  637.              This menu option runs the Windows Control Panel, and lets you
  638.              configure aspects of your Windows system.
  639.  
  640.  
  641.           The Printer Menu
  642.           The Printer Menu
  643.           The Printer Menu
  644.  
  645.           This menu allows you to set things  that affect your printer and
  646.           the page layout. You can  select which printer you  wish to use,
  647.           specify the type  face and type  size, and specify  what margins
  648.           should be applied.
  649.  
  650.  
  651.              Select font to use
  652.              Select font to use
  653.              Select font to use
  654.  
  655.              This option  starts  a  dialog  that  lets  you  choose  what
  656.              typeface Programmer's File Printer is to use to print.
  657.  
  658.              Since Programmer's  File Printer  is designed  to  list files
  659.              such as  program  source,  it  contains  no  word  processing
  660.              features,  and  only   fixed  pitch  fonts,  in  which   every
  661.              character occupies the same width, will be shown in the list.
  662.  
  663.              After selecting the type  face you want, you  can also select
  664.              the type size.
  665.  
  666.              Programmer's File  Printer records  the details  of  the type
  667.              face you select,  and will  automatically select it  when you
  668.              use the same printer.
  669.  
  670.  
  671.              Set page margins
  672.              Set page margins
  673.              Set page margins
  674.  
  675.              Clicking this  menu option  lets you  tell  Programmer's File
  676.              Printer what margins  it should leave  on each page.  You can
  677.              select  margins   at  the   top,  bottom,   left   and  right
  678.              independently.
  679.  
  680.  
  681.  
  682.  
  683.  
  684.                                        Page 
  685.                                        Page 
  686.                                        Page 7
  687.                                             7
  688.                                             7
  689.  
  690.  
  691.  
  692.                               Programmer's File Printer
  693.                               Programmer's File Printer
  694.                               Programmer's File Printer
  695.  
  696.  
  697.              The settings you  give take  effect immediately. If  you want
  698.              them to become the default the next time you use Programmer's
  699.              File Printer, use the Save
  700.                                    Save
  701.                                    Save button to store them.
  702.  
  703.              All the margins are half an inch in size.
  704.  
  705.  
  706.              Printer setup
  707.              Printer setup
  708.              Printer setup
  709.  
  710.              This menu  option  runs a  dialog  that lets  you  choose the
  711.              printer to use, and to run the print driver's particular set-
  712.              up program.  It also  lets you  specify whether  output  to a
  713.              particular device is to be done in reverse page order.
  714.  
  715.              Programmer's File Printer  will select  the printer  you used
  716.              the last time  you ran the  program when it  starts (when you
  717.              use it for the first  time, it will use  the system's default
  718.              printer). This dialog allows you to  choose any other printer
  719.              that is available in your system configuration.
  720.  
  721.              The Setup
  722.                  Setup
  723.                  Setup button runs the specified printer's set-up program,
  724.              and lets  you,  for example,  set  the paper  size  or change
  725.              between landscape and portrait modes (if you printer supports
  726.              this, of course).
  727.  
  728.              Checking the  Reverse page order
  729.                            Reverse page order
  730.                            Reverse page order button causes  output to the
  731.              selected device to be  sent in reverse order.  The setting is
  732.              stored in the initialisation file, so you need to set this up
  733.              only once for each printer.
  734.  
  735.  
  736.           The Options Menu
  737.           The Options Menu
  738.           The Options Menu
  739.  
  740.           This menu item  controls various miscellaneous  options that you
  741.           may find useful.
  742.  
  743.  
  744.              Set options
  745.              Set options
  746.              Set options
  747.  
  748.              This  option  runs  a  dialog  that   lets  you  set  various
  749.              miscellaneous options. You can make the settings permanent by
  750.              clicking the Save
  751.                           Save
  752.                           Save button.
  753.  
  754.              The options currently selectable are:
  755.  
  756.                 Clear selection after printing
  757.                 Clear selection after printing
  758.                 Clear selection after printing
  759.  
  760.                 If you select this option, Programmer's  File Printer will
  761.                 empty the  Files Selected For  Printing list when  printing
  762.                 completes. Otherwise it  leaves the files  showing and you
  763.                 can, if you wish, print them again.
  764.  
  765.                 Don't action form feed
  766.                 Don't action form feed
  767.                 Don't action form feed
  768.  
  769.                 If this option is selected, Programmer's File Printer will
  770.                 not start  a  new  page when  it  encounters  a Form  Feed
  771.                 character (ASCII 12) in  the files it  prints, but instead
  772.                 will print them as ^L
  773.                                    ^L
  774.                                    ^L.
  775.  
  776.  
  777.                                        Page 
  778.                                        Page 
  779.                                        Page 8
  780.                                             8
  781.                                             8
  782.  
  783.  
  784.  
  785.                               Programmer's File Printer
  786.                               Programmer's File Printer
  787.                               Programmer's File Printer
  788.  
  789.  
  790.                 Restart in same directory
  791.                 Restart in same directory
  792.                 Restart in same directory
  793.  
  794.                 If this option is selected Programmer's  File Printer will
  795.                 start each session in the last directory on a hard disk or
  796.                 network drive selected in the previous session. Otherwise,
  797.                 it  starts  in  whatever  the  current  working  directory
  798.                 happens to be.
  799.  
  800.  
  801.           The Help Menu
  802.           The Help Menu
  803.           The Help Menu
  804.  
  805.           This menu  runs  the Windows  help  system to  provide  you with
  806.           assistance using Programmer's File Printer.
  807.  
  808.  
  809.              Index
  810.              Index
  811.              Index
  812.  
  813.              This  option  takes  you  to  the  main  index  of  the  help
  814.              information.
  815.  
  816.  
  817.              Using PFP
  818.              Using PFP
  819.              Using PFP
  820.  
  821.              This option takes  you to  the tutorial  section of  the help
  822.              file. Here you'll find  guidance on what the  program can do,
  823.              and how you can control it.
  824.  
  825.  
  826.              Command reference
  827.              Command reference
  828.              Command reference
  829.  
  830.              This option takes you the reference  section of the help file
  831.              that covers all the menu options.
  832.  
  833.  
  834.              Dialog reference
  835.              Dialog reference
  836.              Dialog reference
  837.  
  838.              This option takes  you to the  reference section of  the help
  839.              file that covers use of  the various dialog boxes  you use to
  840.              configure Programmer's File Printer.
  841.  
  842.  
  843.              Using help
  844.              Using help
  845.              Using help
  846.  
  847.              This option takes you  into a tutorial  section that explains
  848.              how to use the help system.
  849.  
  850.  
  851.              About
  852.              About
  853.              About
  854.  
  855.              This shows  you  information  about  the  current version  of
  856.              Programmer's File Printer. If  you want to  pass any comments
  857.              or bug reports to the author,  please determine the number of
  858.              the version you're using with this menu option.
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.                                        Page 
  867.                                        Page 
  868.                                        Page 9
  869.                                             9
  870.                                             9
  871.  
  872.  
  873.  
  874.                               Programmer's File Printer
  875.                               Programmer's File Printer
  876.                               Programmer's File Printer
  877.  
  878.  
  879.        A
  880.        A
  881.        APPENDIX 
  882.         PPENDIX 
  883.         PPENDIX 1: THE INITIALISATION FILE
  884.                 1: THE INITIALISATION FILE
  885.                 1: THE INITIALISATION FILE
  886.  
  887.        Programmer's File Printer reads initialisation information from the
  888.        file  pfp.ini
  889.              pfp.ini
  890.              pfp.ini when  it  starts,  and at  certain  times  while it's
  891.        running. This file is held in the same  directory that you keep the
  892.        executable program file in.
  893.  
  894.        Some of the information  is placed in  pfp.ini
  895.                                               pfp.ini
  896.                                               pfp.ini by Programmer's File
  897.        Printer itself, and some  of it can be  put there by  you, using an
  898.        editor such as the Notepad Editor supplied with Windows.
  899.  
  900.        The format of  the file  is the  same as  for the  standard Windows
  901.        initialisation files such as win.ini
  902.                                     win.ini
  903.                                     win.ini. It's divided into a number of
  904.        sections, each  preceded  by  the  section  name in  brackets:  for
  905.        example
  906.  
  907.                                      [fonts]
  908.                                      [fonts]
  909.                                      [fonts]
  910.  
  911.        introduces the section  concerned with  fonts. Within  each section
  912.        are one or more lines, which have the general form
  913.  
  914.                             key_string=arguments_list
  915.                             key_string=arguments_list
  916.                             key_string=arguments_list
  917.  
  918.        The key_string part is a  string of characters,  possibly including
  919.        spaces, which Programmer's  File Printer  uses to locate  the line.
  920.        The  arguments_list part  is  a  number  of  strings, separated  by
  921.        commas, which  provide  whatever  information  is appropriate.  For
  922.        example, a line might look like this:
  923.  
  924.                                  margins=y,n,n,n
  925.                                  margins=y,n,n,n
  926.                                  margins=y,n,n,n
  927.  
  928.        where the  key_string is  "margins" and  there are  four arguments,
  929.        "y", "n","n" and "n".
  930.  
  931.  
  932.           The [fonts] section
  933.           The [fonts] section
  934.           The [fonts] section
  935.  
  936.           This section records  the font  that you  have selected  for the
  937.           current default printer. Programmer's File  Printer updates this
  938.           section whenever  you  click  the  OK button  to  end  the  font
  939.           selection dialog.
  940.  
  941.           Every record in this section has the general form:
  942.  
  943.                       printer name=font name,size
  944.                       printer name=font name,size
  945.                       printer name=font name,size
  946.  
  947.           Printer name is the name of the printer you are using;  font name
  948.           is the default font  to be used  with that printer;  and size  is
  949.           the size in points to use with that font.
  950.  
  951.           For example, a record
  952.  
  953.                       Epson 24 pin=Roman 15cpi,10
  954.                       Epson 24 pin=Roman 15cpi,10
  955.                       Epson 24 pin=Roman 15cpi,10
  956.  
  957.           tells Programmer's  File  Printer to  select  the "Roman  15cpi"
  958.           font, 10 points high, whenever the  default printer is "Epson 24
  959.           pin".
  960.  
  961.  
  962.  
  963.                                        Page 
  964.                                        Page 
  965.                                        Page 10
  966.                                             10
  967.                                             10
  968.  
  969.  
  970.  
  971.                               Programmer's File Printer
  972.                               Programmer's File Printer
  973.                               Programmer's File Printer
  974.  
  975.  
  976.           The [general] section
  977.           The [general] section
  978.           The [general] section
  979.  
  980.           This section contains general settings used by Programmer's File
  981.           Printer.
  982.  
  983.  
  984.              Clearing selected files list
  985.              Clearing selected files list
  986.              Clearing selected files list
  987.  
  988.              The  clear_after record  specifies whether  Programmer's  File
  989.              Printer will empty the Files Selected For Printing List  after
  990.              printing them.
  991.  
  992.              The format of this record is:
  993.  
  994.                       clear_after=state
  995.                       clear_after=state
  996.                       clear_after=state
  997.  
  998.              where state is either y or n.
  999.  
  1000.              If this  record  is absent,  Programmer's  File Printer  will
  1001.              clear the list of files after they are printed.
  1002.  
  1003.  
  1004.              Setting margins
  1005.              Setting margins
  1006.              Setting margins
  1007.  
  1008.              The  margins  record  sets  the  default  selection  of  page
  1009.              margins. The format of this record is:
  1010.  
  1011.                       margins=left,right,top,bottom
  1012.                       margins=left,right,top,bottom
  1013.                       margins=left,right,top,bottom
  1014.  
  1015.              where left, right, top and bottom should be either y or n.
  1016.  
  1017.              If this record is absent, Programmer's  File Printer will not
  1018.              use any margins.
  1019.  
  1020.              For example, the record
  1021.  
  1022.                       margins=y,n,n,n
  1023.                       margins=y,n,n,n
  1024.                       margins=y,n,n,n
  1025.  
  1026.              selects a left margin, but no others.
  1027.  
  1028.              All margins are half-an-inch wide.
  1029.  
  1030.  
  1031.              Updating the files list
  1032.              Updating the files list
  1033.              Updating the files list
  1034.  
  1035.              The  auto_refresh  record  tells  Programmer's  File  Printer
  1036.              whether the list of files in  the current directory should be
  1037.              updated automatically whenever you click one of the file type
  1038.              selection check boxes. If  the current disk is  a floppy, you
  1039.              may find it more convenient to turn automatic updating off.
  1040.  
  1041.              The format of this record is
  1042.  
  1043.                       auto_refresh=state
  1044.                       auto_refresh=state
  1045.                       auto_refresh=state
  1046.  
  1047.              where state must be y or n.
  1048.  
  1049.  
  1050.  
  1051.  
  1052.                                        Page 
  1053.                                        Page 
  1054.                                        Page 11
  1055.                                             11
  1056.                                             11
  1057.  
  1058.  
  1059.  
  1060.                               Programmer's File Printer
  1061.                               Programmer's File Printer
  1062.                               Programmer's File Printer
  1063.  
  1064.  
  1065.              The default printer
  1066.              The default printer
  1067.              The default printer
  1068.  
  1069.              The  printer record  tells  Programmer's  File  Printer  what
  1070.              device to use for output. The format of the record is:
  1071.  
  1072.                       printer=name,driver,port,reverse_order
  1073.                       printer=name,driver,port,reverse_order
  1074.                       printer=name,driver,port,reverse_order
  1075.  
  1076.              where name is the  device name as  it appears in  the  win.ini
  1077.                                                                     win.ini
  1078.                                                                     win.ini
  1079.              file; driver is the name of the printer's driver module;  port
  1080.              is the  name  of  the output  port  to  which  the device  is
  1081.              attached; and reverse_order is "y" for reverse order printing
  1082.              and n" for forward printing.
  1083.  
  1084.              For example, a record
  1085.  
  1086.                       printer=HP Deskjet Family,DESKJET,LPT1:,y
  1087.                       printer=HP Deskjet Family,DESKJET,LPT1:,y
  1088.                       printer=HP Deskjet Family,DESKJET,LPT1:,y
  1089.  
  1090.              specifies the default  printer to be  an HP Deskjet  on LPT1,
  1091.              and selects reverse page order printing.
  1092.  
  1093.  
  1094.              The initial directory
  1095.              The initial directory
  1096.              The initial directory
  1097.  
  1098.              Programmer's File  Printer  can  be  configured  so  that  it
  1099.              changes the  working  directory  to  the  directory that  was
  1100.              current  the  last  time  it  was   used.  This  facility  is
  1101.              controlled by two initialisation file records, as follows:
  1102.  
  1103.              The reset_dir record enables  or disables  the facility;  the
  1104.              format is
  1105.  
  1106.                       reset_dir=state
  1107.                       reset_dir=state
  1108.                       reset_dir=state
  1109.  
  1110.              where state must be y or n.
  1111.  
  1112.              The  directory record  specifies  the  target  directory. The
  1113.              format is:
  1114.  
  1115.                       directory=pathname
  1116.                       directory=pathname
  1117.                       directory=pathname
  1118.  
  1119.              For example:
  1120.  
  1121.                       directory=c:\software\newapp\src
  1122.                       directory=c:\software\newapp\src
  1123.                       directory=c:\software\newapp\src
  1124.  
  1125.  
  1126.           The [select] section
  1127.           The [select] section
  1128.           The [select] section
  1129.  
  1130.           This section controls what file types appear associated with the
  1131.           eight selection  check boxes  in the  File Types  Shown In  List
  1132.           area. In order to select a file type,  such as .c
  1133.                                                          .c
  1134.                                                          .c explicitly, it
  1135.           must have an entry in this section.
  1136.  
  1137.           Each record in this section has the form
  1138.  
  1139.                       .filetype=letter
  1140.                       .filetype=letter
  1141.                       .filetype=letter
  1142.  
  1143.           where letter must be either  y or  n. Filetype is the  file type
  1144.           concerned, and must be preceded by a dot.
  1145.  
  1146.  
  1147.                                        Page 
  1148.                                        Page 
  1149.                                        Page 12
  1150.                                             12
  1151.                                             12
  1152.  
  1153.  
  1154.  
  1155.                               Programmer's File Printer
  1156.                               Programmer's File Printer
  1157.                               Programmer's File Printer
  1158.  
  1159.  
  1160.           Programmer's File Printer will read up  to eight lines from this
  1161.           section, and will associate the types they define with the check
  1162.           boxes in the selection area, in the order that they appear.
  1163.  
  1164.           If letter is y, the box will automatically be checked, and files
  1165.           with this type will  appear in the  Files list. If  letter is  n,
  1166.           the box will not be checked,  and files with this  type will not
  1167.           appear in the Files list until you subsequently click the box.
  1168.  
  1169.           One special record in this section  controls whether you want to
  1170.           see all file types in the  file list. If the  section contains a
  1171.           record
  1172.  
  1173.                       *=y
  1174.                       *=y
  1175.                       *=y
  1176.  
  1177.           all files in  the current  directory will be  shown in  the file
  1178.           list, regardless of their type.
  1179.  
  1180.           For example, the record
  1181.  
  1182.                       .asm=y
  1183.                       .asm=y
  1184.                       .asm=y
  1185.  
  1186.           will label one of the check boxes with .asm
  1187.                                                  .asm
  1188.                                                  .asm, and the box will be
  1189.           checked by default.
  1190.  
  1191.  
  1192.           The [formatting] section
  1193.           The [formatting] section
  1194.           The [formatting] section
  1195.  
  1196.           This section  defines  how  you  want  to  format  listings  for
  1197.           specific file types. It  contains a number of  records, all with
  1198.           the general form
  1199.  
  1200.                       .filetype=number,header,wrap,tabsize,hexdump
  1201.                       .filetype=number,header,wrap,tabsize,hexdump
  1202.                       .filetype=number,header,wrap,tabsize,hexdump
  1203.  
  1204.           Here  .filetype is  the file  type, preceded  by  a dot.  Number,
  1205.           title and  wrap must all be  either y or  n, and control  whether
  1206.           lines are numbered, whether pages have headers, and whether long
  1207.           lines are wrapped respectively.  Tabsize sets the width of a  tab
  1208.           stop, and must be a number between 4 and 16.  Hexdump, which must
  1209.           be y or  n, specifies whether the file is  to printed as text  or
  1210.           dumped in hexadecimal and ASCII.
  1211.  
  1212.           For example, the line
  1213.  
  1214.                       .c=y,y,n,4,n
  1215.                       .c=y,y,n,4,n
  1216.                       .c=y,y,n,4,n
  1217.  
  1218.           sets the formatting for files  with type " .c
  1219.                                                      .c
  1220.                                                      .c". The file will  be
  1221.           printed as  text;  lines  will  be  numbered;  pages  will  have
  1222.           headers; long lines will be truncated;  and tabs are expanded to
  1223.           every 4 characters.
  1224.  
  1225.           Note that when  a hexadecimal  dump is specified  for a  file in
  1226.           this way, Programmer's File Printer will dump the entire file.
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.                                        Page 
  1235.                                        Page 
  1236.                                        Page 13
  1237.                                             13
  1238.                                             13
  1239.  
  1240.  
  1241.  
  1242.                               Programmer's File Printer
  1243.                               Programmer's File Printer
  1244.                               Programmer's File Printer
  1245.  
  1246.  
  1247.           The [printers] section
  1248.           The [printers] section
  1249.           The [printers] section
  1250.  
  1251.           This section records  details relevant  to the  various printers
  1252.           configured on your  system. It  contains records of  the general
  1253.           form:
  1254.  
  1255.                       printer name=reverse_order
  1256.                       printer name=reverse_order
  1257.                       printer name=reverse_order
  1258.  
  1259.           Printer name is the  device name as  it appears in  your  win.ini
  1260.                                                                     win.ini
  1261.                                                                     win.ini
  1262.           file, and  reverse_order is  either " y" to  select reverse  page
  1263.           order printing or "n" to select normal order.
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.                                        Page 
  1314.                                        Page 
  1315.                                        Page 14
  1316.                                             14
  1317.                                             14
  1318.  
  1319.  
  1320.  
  1321.                               Programmer's File Printer
  1322.                               Programmer's File Printer
  1323.                               Programmer's File Printer
  1324.  
  1325.  
  1326.        APPENDIX 2: D
  1327.        APPENDIX 2: D
  1328.        APPENDIX 2: DEVICE 
  1329.                     EVICE 
  1330.                     EVICE F
  1331.                           F
  1332.                           FONTS AND 
  1333.                            ONTS AND 
  1334.                            ONTS AND GDI F
  1335.                                     GDI F
  1336.                                     GDI FONTS
  1337.                                          ONTS
  1338.                                          ONTS
  1339.  
  1340.        Windows 3  produces  text  output  on  printers using  one  of  two
  1341.        mechanisms. The most common method is to use GDI fonts, in which it
  1342.        sends the text to the printer as a  graphics dump. The other method
  1343.        involves the use of device fonts - here Windows sends the text as a
  1344.        stream of characters,  and the printer  uses the fonts  built in to
  1345.        it.
  1346.  
  1347.        For an application such  as Programmer's File  Printer, designed to
  1348.        list text files, there  are great advantages to  using device fonts
  1349.        rather than GDI fonts. There is no need  for Windows to construct a
  1350.        (very large) graphics dump file to send to the printer, and so both
  1351.        the listing  operation and  the  printing operation  are  very much
  1352.        quicker, and very much less  disk space is needed  by Print Manager
  1353.        for the spool file.
  1354.  
  1355.        Programmer's File Printer attempts to show you only device fonts in
  1356.        the list given in  the Fonts dialog. However, applications  such as
  1357.        Adobe Type Manager and sophisticated print drivers such as that for
  1358.        the Hewlett  Packard  Deskjet  500  printer  can  prevent  it  from
  1359.        determining which fonts are  GDI fonts and which  are device fonts,
  1360.        so that the  list you are  shown may  contain both. For  both Adobe
  1361.        Type Manager and the HP  Deskjet 500 driver, for  example, the font
  1362.        Courier will appear in the list,  even though it is a  GDI font and
  1363.        not a device font.
  1364.  
  1365.        Programmer's File Printer will work satisfactorily whatever type of
  1366.        font you choose. However, if you select a GDI font the program will
  1367.        be significantly slower, and you  will need a very  large amount of
  1368.        disk spool space  to accommodate  the graphics dump.  Printing will
  1369.        also be significantly slower.
  1370.  
  1371.  
  1372.           The HP Deskjet 500 printer
  1373.           The HP Deskjet 500 printer
  1374.           The HP Deskjet 500 printer
  1375.  
  1376.           The HP Deskjet 500 driver supports only GDI fonts. The only font
  1377.           name you will see in the font  selection dialog list is  Courier,
  1378.           and output  with this  font will  be sent  to the  printer  as a
  1379.           graphics dump. Each listing will need typically twenty to thirty
  1380.           times the size of the input file for spool space.
  1381.  
  1382.           You can substantially  improve matters  by using the  HP Deskjet
  1383.           Family print driver, supplied  on your Windows  3 release disks.
  1384.           This operates perfectly satisfactorily with the  Deskjet 500 for
  1385.           text output (and for most graphics output). This driver supports
  1386.           the fonts built in to the printer,  and also any font cartridges
  1387.           you may  have containing  fixed-pitch fonts;  using  this driver
  1388.           lets you send listings as text,  with a marked speed improvement
  1389.           and very great reduction in spool space requirements.
  1390.  
  1391.           You can select  the HP Deskjet Family  driver using  the  Control
  1392.           Panel, which you  can conveniently start  from Programmer's File
  1393.           Printer's system menu.
  1394.  
  1395.           One physical  difference  between  the  Deskjet  500  and  other
  1396.           Deskjet families  needs  to  be  compensated  for in  order  for
  1397.           printing to  work correctly.  The printable  area of  a  page is
  1398.  
  1399.  
  1400.                                        Page 
  1401.                                        Page 
  1402.                                        Page 15
  1403.                                             15
  1404.                                             15
  1405.  
  1406.  
  1407.  
  1408.                               Programmer's File Printer
  1409.                               Programmer's File Printer
  1410.                               Programmer's File Printer
  1411.  
  1412.  
  1413.           slightly different between  printer models,  and the  HP Deskjet
  1414.           Family driver believes the  printable area to be  larger than it
  1415.           actually is.  To correct  this, include  the following  lines in
  1416.           your pfp.ini
  1417.                pfp.ini
  1418.                pfp.ini file:
  1419.  
  1420.                       [printable_area]
  1421.                       [printable_area]
  1422.                       [printable_area]
  1423.                       HP Deskjet Family=11300,15360
  1424.                       HP Deskjet Family=11300,15360
  1425.                       HP Deskjet Family=11300,15360
  1426.  
  1427.           This sets the correct printable area size for A4 (210mm x 297mm)
  1428.           paper. However, since the built-in fonts  in the Deskjet 500 are
  1429.           slightly wider than in the Deskjet Plus,  you will find that you
  1430.           need to reduce the width value if you  use very small fonts such
  1431.           as Letter Gothic 33 pitch.
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.                                        Page 
  1480.                                        Page 
  1481.                                        Page 16
  1482.                                             16
  1483.                                             16
  1484.