home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / WINDOWS / UTIL / PFP.ZIP / PFP.PRN < prev    next >
Encoding:
Text File  |  1991-05-11  |  43.3 KB  |  1,025 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                                    Version 2                                    Version 2
  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.  
  84.           Distribution and Use          Distribution and Use          Distribution and Use
  85.  
  86.           Programmer's File Printer is Copyright (c) 1991 Alan Phillips.
  87.           It may be freely used by individuals, educational institutions
  88.           and charities; however use by commercial organisations is not
  89.           permitted except with the prior written agreement of the author.
  90.  
  91.           The program may be stored in software archives or posted to
  92.           Bulletin Board systems. Apart from reasonable media and handling
  93.           costs, no charge may be levied for its distribution. The program
  94.           should be stored with all the files that accompany its release
  95.           by the author; however archive systems may repackage the files
  96.           to suit their own storage conventions.
  97.  
  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.           Disclaimer          Disclaimer          Disclaimer
  108.  
  109.           Programmer's File Printer is offered on an as is basis. No
  110.           guarantee of any sort is made or should be inferred as to its
  111.           functioning, or to its suitability for any purpose. The author
  112.           accepts no liability for any loss or damage whatsoever
  113.           occasioned in connection with its use.
  114.  
  115.           This program is produced as a private activity by the author,
  116.           unconnected with his employment by the University of Lancaster.
  117.  
  118.           The author welcomes comments and bug reports; but there is no
  119.           commitment to add any new features, nor to address any problems
  120.           that may be reported.
  121.  
  122.  
  123.           Contacting the Author          Contacting the Author          Contacting the Author
  124.  
  125.           Comments and suggestions on Programmer's File Printer are
  126.           welcomed. The author can be contacted by electronic mail;
  127.           addresses are
  128.  
  129.             alan@uk.ac.lancaster            alan@uk.ac.lancaster            alan@uk.ac.lancaster          JANET                                          JANET                                          JANET
  130.             alan@lancaster.ac.uk            alan@lancaster.ac.uk            alan@lancaster.ac.uk          Internet and BITNET                                          Internet and BITNET                                          Internet and BITNET
  131.             alan%uk.ac.lancaster@ukc            alan%uk.ac.lancaster@ukc            alan%uk.ac.lancaster@ukc      UUCP                                          UUCP                                          UUCP
  132.  
  133.  
  134.  
  135.  
  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.           and pfp.ini              pfp.ini              pfp.ini files into a directory on your path. You can then
  183.           start it from Program Manager or from File Manager as any other
  184.           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.
  198.  
  199.           To the right of this is the Files list. Until you configure the
  200.           program, you'll see the names of every file in the current
  201.           directory in this list. If there are more files than can be
  202.           shown you'll see a scroll bar on the right of the list that will
  203.           let you move up and down.
  204.  
  205.           You select the files you want to print from this list. You can
  206.           click on an entry to highlight it; you can add files to those
  207.           highlighted by holding down CONTROL                                      CONTROL                                      CONTROL and clicking, or select a
  208.           range by holding SHIFT                           SHIFT                           SHIFT and clicking. Once you have one or more
  209.           files highlighted, you'll see the Select                                            Select                                            Select button become active.
  210.           Clicking this will copy the names of the selected file into the
  211.           list on the far right, the Files Selected To Print list.
  212.  
  213.           You can move around your disk and add files to the list on the
  214.           right as you please. Then, when you've selected all the files
  215.           you want to print, simply press the Print                                              Print                                              Print button to start
  216.           printing. The first time you do this, Programmer's File Printer
  217.           will show you a dialog box letting you select the type face and
  218.           type size to use; the program remembers what you select, and so
  219.           you won't need this dialog again unless you choose to use a
  220.           different type face or size.
  221.  
  222.           Finally, when printing is complete, the Files Selected To Print
  223.           list will be emptied.
  224.  
  225.           If you decide that you don't want to print some of the files
  226.           you've selected, simply highlight them by clicking them (here
  227.           again you can use the CONTROL                                CONTROL                                CONTROL and SHIFT                                            SHIFT                                            SHIFT keys to select more than
  228.           one file) and press the Unselect                                  Unselect                                  Unselect button.
  229.  
  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.           Other Possibilities          Other Possibilities          Other Possibilities
  240.  
  241.           The section above showed you the simplest way to use
  242.           Programmer's File Printer, using only the default settings.
  243.           However, the program can be tuned to do exactly what you need in
  244.           several ways.
  245.  
  246.  
  247.              The files shown in the list             The files shown in the list             The files shown in the list
  248.  
  249.              One thing you might want to do is to restrict the file names
  250.              shown the in the Files list to those with specific file
  251.              types. At the bottom left of the main window you'll see the
  252.              File Types Shown In List area, containing 8 check boxes.
  253.  
  254.              Initially the boxes have no text beside them, and the whole
  255.              area is grayed and inactive. If you want, you can associate
  256.              up to eight file types - such as .c                                              .c                                              .c, .h                                                  .h                                                  .h and .asm                                                         .asm                                                         .asm - with the
  257.              boxes; then, with the area active, Programmer's File Printer
  258.              will show only those files whose types are given beside boxes
  259.              that you check.
  260.  
  261.  
  262.              How listings are done             How listings are done             How listings are done
  263.  
  264.              As installed, Programmer's File Printer will list all files
  265.              with line numbering and page headers, using a tab size of 8.
  266.              Most files will be printed as text listings, but some, such
  267.              as .exe                .exe                .exe, .obj                      .obj                      .obj and .lib                                .lib                                .lib files, will be dumped in hexadecimal
  268.              and ASCII.
  269.  
  270.              You can specify your own formats for listing through an easy-
  271.              to-use dialog. For example, you can select .c                                                        .c                                                        .c files to be
  272.              printed with a tab size of 4 and line numbering; and .asm                                                                  .asm                                                                  .asm
  273.              files with a tab size of 8.
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  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. You might need to do this, for example, if you've
  448.              created some files with another application since selecting
  449.              the directory.
  450.  
  451.              You will also need to use this option to re-scan the
  452.              directory if you've disabled automatic rescanning and you've
  453.              clicked some of the file type boxes in the File Types Shown
  454.              In List area.
  455.  
  456.  
  457.              Control Panel             Control Panel             Control Panel
  458.  
  459.              This menu option runs the Windows Control Panel, and lets you
  460.              configure aspects of your Windows system.
  461.  
  462.  
  463.              About             About             About
  464.  
  465.              This shows you information about the current version of
  466.              Programmer's File Printer. If you want to pass any comments
  467.              or bug reports to the author, please determine the number of
  468.              the version you're using with this menu option.
  469.  
  470.  
  471.           The Printer Menu          The Printer Menu          The Printer Menu
  472.  
  473.           This menu allows you to set things that affect your printer and
  474.           the page layout. You can select which printer you wish to use,
  475.           specify the type face and type size, and specify what margins
  476.           should be applied.
  477.  
  478.  
  479.              Select font to use             Select font to use             Select font to use
  480.  
  481.              This option starts a dialog that lets you choose what
  482.              typeface Programmer's File Printer is to use to print.
  483.  
  484.              Since Programmer's File Printer is designed to list files
  485.              such as program source, it contains no word processing
  486.              features, and only fixed pitch fonts, in which every
  487.              character occupies the same width, will be shown in the list.
  488.  
  489.              After selecting the type face you want, you can also select
  490.              the type size.
  491.  
  492.              Programmer's File Printer records the details of the type
  493.              face you select, and will automatically select it when you
  494.              use the same printer.
  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.              Set page margins             Set page margins             Set page margins
  504.  
  505.              Clicking this menu option lets you tell Programmer's File
  506.              Printer what margins it should leave on each page. You can
  507.              select margins at the top, bottom, left and right
  508.              independently.
  509.  
  510.              The settings you give take effect immediately. If you want
  511.              them to become the default the next time you use Programmer's
  512.              File Printer, use the Save                                   Save                                   Save button to store them.
  513.  
  514.              All the margins are half an inch in size.
  515.  
  516.  
  517.              Printer setup             Printer setup             Printer setup
  518.  
  519.              This menu option runs a dialog that lets you choose the
  520.              printer to use, and to run the print driver's particular set-
  521.              up program.
  522.  
  523.              Programmer's File Printer will always select your current
  524.              default printer (which you set with the Windows Control
  525.              Panel) when it starts. However, with this dialog you can
  526.              choose to use any other printer that is available in your
  527.              system configuration.
  528.  
  529.              The Setup                 Setup                 Setup button runs the specified printer's set-up program,
  530.              and lets you, for example, set the paper size or change
  531.              between landscape and portrait modes (if you printer supports
  532.              this, of course).
  533.  
  534.  
  535.           The Options Menu          The Options Menu          The Options Menu
  536.  
  537.           This menu item controls various miscellaneous options that you
  538.           may find useful.
  539.  
  540.  
  541.              Set options             Set options             Set options
  542.  
  543.              This option runs a dialog that lets you set various
  544.              miscellaneous options. You can make the settings permanent by
  545.              clicking the Save                          Save                          Save button.
  546.  
  547.              The options currently selectable are:
  548.  
  549.                 Clear Selection After Printing                Clear Selection After Printing                Clear Selection After Printing
  550.  
  551.                 If you select this option, Programmer's File Printer will
  552.                 empty the Files Selected For Printing list when printing
  553.                 completes. Otherwise it leaves the files showing and you
  554.                 can, if you wish, print them again.
  555.  
  556.                 Don't Action Form Feed                Don't Action Form Feed                Don't Action Form Feed
  557.  
  558.                 If this option is selected, Programmer's File Printer will
  559.                 not start a new page when it encounters a Form Feed
  560.  
  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.                 character (ASCII 12) in the files it prints, but instead
  570.                 will print them as ^L                                   ^L                                   ^L.
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  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 [select] section          The [select] section          The [select] section
  768.  
  769.           This section controls what file types appear associated with the
  770.           eight selection check boxes in the File Types Shown In List
  771.           area. In order to select a file type, such as .c                                                        .c                                                        .c explicitly, it
  772.           must have an entry in this section.
  773.  
  774.           Each record in this section has the form
  775.  
  776.                       .filetype=letter                      .filetype=letter                      .filetype=letter
  777.  
  778.           where letter must be either y or n. Filetype is the file type
  779.           concerned, and must be preceded by a dot.
  780.  
  781.           Programmer's File Printer will read up to eight lines from this
  782.           section, and will associate the types they define with the check
  783.           boxes in the selection area, in the order that they appear.
  784.  
  785.           If letter is y, the box will automatically be checked, and files
  786.           with this type will appear in the Files list. If letter is n,
  787.           the box will not be checked, and files with this type will not
  788.           appear in the Files list until you subsequently click the box.
  789.  
  790.           One special record in this section controls whether you want to
  791.           see all file types in the file list. If the section contains a
  792.           record
  793.  
  794.                       *=y                      *=y                      *=y
  795.  
  796.           all files in the current directory will be shown in the file
  797.           list, regardless of their type.
  798.  
  799.           For example, the record
  800.  
  801.                       .asm=y                      .asm=y                      .asm=y
  802.  
  803.           will label one of the check boxes with .asm                                                 .asm                                                 .asm, and the box will be
  804.           checked by default.
  805.  
  806.  
  807.           The [formatting] section          The [formatting] section          The [formatting] section
  808.  
  809.           This section defines how you want to format listings for
  810.           specific file types. It contains a number of records, all with
  811.           the general form
  812.  
  813.                       .filetype=number,header,wrap,tabsize,hexdump                      .filetype=number,header,wrap,tabsize,hexdump                      .filetype=number,header,wrap,tabsize,hexdump
  814.  
  815.           Here .filetype is the file type, preceded by a dot. Number,
  816.           title and wrap must all be either y or n, and control whether
  817.           lines are numbered, whether pages have headers, and whether long
  818.           lines are wrapped respectively. Tabsize sets the width of a tab
  819.           stop, and must be a number between 4 and 16. Hexdump, which must
  820.           be y or n, specifies whether the file is to printed as text or
  821.           dumped in hexadecimal and ASCII.
  822.  
  823.           For example, the line
  824.  
  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.                       .c=y,y,n,4,n                      .c=y,y,n,4,n                      .c=y,y,n,4,n
  834.  
  835.           sets the formatting for files with type ".c                                                   .c                                                   .c". The file will be
  836.           printed as text; lines will be numbered; pages will have
  837.           headers; long lines will be truncated; and tabs are expanded to
  838.           every 4 characters.
  839.  
  840.           Note that when a hexadecimal dump is specified for a file in
  841.           this way, Programmer's File Printer will dump the entire file.
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  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.        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
  900.  
  901.        Windows 3 produces text output on printers using one of two
  902.        mechanisms. The most common method is to use GDI fonts, in which it
  903.        sends the text to the printer as a graphics dump. The other method
  904.        involves the use of device fonts -                                          here Windows sends the text as a
  905.        stream of characters, and the printer uses the fonts built in to
  906.        it.
  907.  
  908.        For an application such as Programmer's File Printer, designed to
  909.        list text files, there are great advantages to using device fonts
  910.        rather than GDI fonts. There is no need for Windows to construct a
  911.        (very large) graphics dump file to send to the printer, and so both
  912.        the listing operation and the printing operation are very much
  913.        quicker, and very much less disk space is needed by Print Manager
  914.        for the spool file.
  915.  
  916.        Programmer's File Printer attempts to show you only device fonts in
  917.        the list given in the Fonts dialog. However, applications such as
  918.        Adobe Type Manager and sophisticated print drivers such as that for
  919.        the Hewlett Packard Deskjet 500 printer can prevent it from
  920.        determining which fonts are GDI fonts and which are device fonts,
  921.        so that the list you are shown may contain both. For both Adobe
  922.        Type Manager and the HP Deskjet 500 driver, for example, the font
  923.        Courier will appear in the list, even though it is a GDI font and
  924.        not a device font.
  925.  
  926.        Programmer's File Printer will work satisfactorily whatever type of
  927.        font you choose. However, if you select a GDI font the program will
  928.        be significantly slower, and you will need a very large amount of
  929.        disk spool space to accommodate the graphics dump. Printing will
  930.        also be significantly slower.
  931.  
  932.  
  933.           The HP Deskjet 500 printer          The HP Deskjet 500 printer          The HP Deskjet 500 printer
  934.  
  935.           The HP Deskjet 500 driver supports only GDI fonts. The only font
  936.           name you will see in the font selection dialog list is Courier,
  937.           and output with this font will be sent to the printer as a
  938.           graphics dump. Each listing will need typically twenty to thirty
  939.           times the size of the input file for spool space.
  940.  
  941.           You can substantially improve matters by using the HP Deskjet
  942.           Family print driver, supplied on your Windows 3 release disks.
  943.           This operates perfectly satisfactorily with the Deskjet 500 for
  944.           text output (and for most graphics output). This driver supports
  945.           the fonts built in to the printer, and also any font cartridges
  946.           you may have containing fixed-pitch fonts; using this driver
  947.           lets you send listings as text, with a marked speed improvement
  948.           and very great reduction in spool space requirements.
  949.  
  950.           You can select the HP Deskjet Family driver using the Control
  951.           Panel, which you can conveniently start from Programmer's File
  952.           Printer's system menu.
  953.  
  954.           One physical difference between the Deskjet 500 and other
  955.           Deskjet families needs to be compensated for in order for
  956.           printing to work correctly. The printable area of a page is
  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.           slightly different between printer models, and the HP Deskjet
  966.           Family driver believes the printable area to be larger than it
  967.           actually is. To correct this, include the following lines in
  968.           your pfp.ini               pfp.ini               pfp.ini file:
  969.  
  970.                       [printable_area]                      [printable_area]                      [printable_area]
  971.                       HP Deskjet Family=11300,15360                      HP Deskjet Family=11300,15360                      HP Deskjet Family=11300,15360
  972.  
  973.           This sets the correct printable area size for A4 (210mm x 297mm)
  974.           paper. However, since the built-in fonts in the Deskjet 500 are
  975.           slightly wider than in the Deskjet Plus, you will find that you
  976.           need to reduce the width value if you use very small fonts such
  977.           as Letter Gothic 33 pitch.
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.                                        Page                                        Page                                        Page 15                                            15                                            15