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