home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / Basic / SOURCE13.ZIP / SOURCE.DOC < prev    next >
Encoding:
Text File  |  1992-11-07  |  101.8 KB  |  2,276 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                    SOURCE
  26.  
  27.  
  28.                                 Version 1.3
  29.  
  30.                               November 7, 1992
  31.  
  32.  
  33.                                  Written by
  34.  
  35.                                  Rick Maddy
  36.  
  37.  
  38.  
  39.                           SOURCE Table of Contents
  40.  
  41.      1    Distribution . . . . . . . . . . . . . . . . . . . .  Page 1
  42.  
  43.      2    What is SOURCE?  . . . . . . . . . . . . . . . . . .  Page 1
  44.  
  45.      3    Quick Start  . . . . . . . . . . . . . . . . . . . .  Page 2
  46.  
  47.      4    The SOURCE Command Line  . . . . . . . . . . . . . .  Page 3
  48.           4.1  Global Options  . . . . . . . . . . . . . . . .  Page 3
  49.           4.2  Filenames . . . . . . . . . . . . . . . . . . .  Page 4
  50.           4.3  Local Options . . . . . . . . . . . . . . . . .  Page 5
  51.           4.4  Full Command Line . . . . . . . . . . . . . . .  Page 5
  52.  
  53.      5    SOURCE Options . . . . . . . . . . . . . . . . . . .  Page 5
  54.  
  55.      6    SOURCE.CFG . . . . . . . . . . . . . . . . . . . . . Page 17
  56.           6.1  SOURCE.CFG Location . . . . . . . . . . . . . . Page 17
  57.           6.2  Named Configuration Options . . . . . . . . . . Page 17
  58.           6.3  SOURCE.CFG Format . . . . . . . . . . . . . . . Page 18
  59.           6.4  Commenting SOURCE.CFG . . . . . . . . . . . . . Page 19
  60.           6.5  Modifying SOURCE.CFG  . . . . . . . . . . . . . Page 19
  61.  
  62.      7    SOURCE.PRT . . . . . . . . . . . . . . . . . . . . . Page 19
  63.           7.1  Default Printer . . . . . . . . . . . . . . . . Page 20
  64.           7.2  SOURCE.PRT Format . . . . . . . . . . . . . . . Page 20
  65.           7.3  Modifying Your Printer  . . . . . . . . . . . . Page 24
  66.  
  67.      8    SOURCE.LNG . . . . . . . . . . . . . . . . . . . . . Page 24
  68.           8.1  SOURCE.LNG Location . . . . . . . . . . . . . . Page 24
  69.           8.2  SOURCE.LNG Format . . . . . . . . . . . . . . . Page 25
  70.           8.3  Commenting SOURCE.LNG . . . . . . . . . . . . . Page 26
  71.           8.4  Defining Language Specific Features . . . . . . Page 26
  72.                8.4.1     Comments  . . . . . . . . . . . . . . Page 26
  73.                8.4.2     String and Character Literals . . . . Page 27
  74.                8.4.3     Blocks  . . . . . . . . . . . . . . . Page 28
  75.                8.4.4     Keywords  . . . . . . . . . . . . . . Page 29
  76.                8.4.5     Complete Definition . . . . . . . . . Page 30
  77.           8.5  General Points  . . . . . . . . . . . . . . . . Page 31
  78.  
  79.      9    Network Support  . . . . . . . . . . . . . . . . . . Page 31
  80.  
  81.      10   Definition of Shareware  . . . . . . . . . . . . . . Page 32
  82.  
  83.      11   Disclaimer - Agreement For Trying SOURCE . . . . . . Page 33
  84.  
  85.      12   Registering  . . . . . . . . . . . . . . . . . . . . Page 33
  86.  
  87.      13   Future Enhancements  . . . . . . . . . . . . . . . . Page 34
  88.  
  89.      14   Acknowledgements . . . . . . . . . . . . . . . . . . Page 34
  90.  
  91.      15   Release History  . . . . . . . . . . . . . . . . . . Page 34
  92.  
  93.      SOURCE REGISTRATION . . . . . . . . . . . . . . . . . . . Page 37
  94.  
  95.  
  96.  
  97.                                    Page i
  98.                                    SOURCE
  99.  
  100.      SOURCE Version 1.3 - Source code file printing utility
  101.      Copyright 1992 Rick Maddy
  102.  
  103.      1    Distribution
  104.  
  105.      The SOURCE program is made up of these files:
  106.  
  107.           SOURCE.EXE     The SOURCE program file.
  108.           SOURCE.DOC     This documentation file.
  109.           SOURCE.PRT     The default printer definition file.
  110.           SOURCE.CFG     The default configuration option file.
  111.           SOURCE.LNG     The default language definition file.
  112.           README.1ST     Quick summary and last minute notes.
  113.           REGISTER.TXT   Order form to register SOURCE.
  114.  
  115.      This unregistered shareware program is distributed in the PKZIP
  116.      format.  SOURCE.ZIP may be passed onto as many people as you
  117.      like, provided it remains intact, ALL files are kept together,
  118.      and only the original files are distributed.  DO NOT zip up and
  119.      pass on your modified files.  See section 10 below for further
  120.      information on shareware.
  121.  
  122.      2    What is SOURCE?
  123.  
  124.      SOURCE, in its most basic form, is a program for printing source
  125.      code and text files.  However, using SOURCE to its fullest
  126.      potential gives you an extremely powerful and flexible program
  127.      for printing source code and allows for numerous options for
  128.      formatting the output:
  129.  
  130.           - Custom page sizing
  131.           - Adjustable margins
  132.           - Page orientation (portrait or landscape) 
  133.           - Character pitch (pica, elite, or compressed)
  134.           - Number of columns per page
  135.           - User definable page header/footers
  136.           - Optional banner page before/after files
  137.           - Output may be redirected to any device or file
  138.           - Printing ranges may be specified, including starting
  139.             and/or ending line or page numbers
  140.           - Multiple files can be queued for printing   
  141.  
  142.      In addition to these basic printing options, SOURCE contains many
  143.      options specifically geared toward formatting source code (such
  144.      as C, Pascal, Fortran, dBase, or whatever you code in).  These
  145.      include:
  146.  
  147.           - User definable line and page numbering
  148.           - Comments in the source code may be printed as bold,
  149.             italic, or underlined  
  150.           - Keywords may be highlighted
  151.           - Code blocks grouped graphically
  152.           - Adjustable tab sizes for printing
  153.           - Configurable language support
  154.  
  155.  
  156.                                    Page 1
  157.                                    SOURCE
  158.  
  159.      These are just some of the powerful options available to you. 
  160.      Yet, SOURCE is very easy to use.  SOURCE only needs to know the
  161.      name of the file(s) you wish to print and it does the rest.  You
  162.      can use SOURCE right out of the box (so to speak).  
  163.  
  164.      For example:
  165.  
  166.      C:\> SOURCE kludge.c
  167.  
  168.      This would print your file to the default printer using the built
  169.      in defaults. 
  170.  
  171.      You may configure each option to suit your needs.  See section 5
  172.      for a complete list of all the options.  Besides the printing
  173.      options, SOURCE is extremely flexible in its ability to work with
  174.      almost any printer and most programming languages. 
  175.  
  176.      To facilitate this dynamic environment, SOURCE consists of an
  177.      executable (SOURCE.EXE) and three support files:
  178.  
  179.           SOURCE.PRT:    Contains all the printer definitions.
  180.           SOURCE.CFG:    Contains all the default options used by
  181.                          SOURCE to print your files.
  182.           SOURCE.LNG:    Contains all the language and filename
  183.                          extension specifications needed for comment
  184.                          and keyword highlighting and block grouping.
  185.  
  186.      By default, all four files that make up SOURCE are named
  187.      "SOURCE.???" where '???' is "EXE", "PRT", "CFG", and "LNG".  If
  188.      you prefer to use a different name, such as "SRC", instead of
  189.      "SOURCE", simply rename all four files to the same prefix. 
  190.      Example:
  191.  
  192.           C:\>ren source.* src.*
  193.  
  194.      This will result in all four files having the "SRC.???" name
  195.      instead of "SOURCE.???".  Anywhere in this documentation you are
  196.      to execute "SOURCE", enter "SRC" instead.  The only advantage to
  197.      this is to save on typing "SOURCE" all the time, now you enter
  198.      "SRC".  You could even change all the names to "S" if you really
  199.      like terse, UNIX-like command names.
  200.  
  201.      3    Quick Start
  202.  
  203.      Before running SOURCE for the first time (as if you have read
  204.      this far without having already done so), make sure you have
  205.      placed SOURCE.EXE, SOURCE.PRT, SOURCE.LNG, and SOURCE.CFG all
  206.      within the same directory.  You may also wish to include this
  207.      directory in your path so that you can run SOURCE from anywhere
  208.      on your system.  If you need more information on PATHs, see your
  209.      DOS manual.
  210.  
  211.      The simplest way of running SOURCE is to type:
  212.  
  213.           SOURCE filename.ext
  214.  
  215.                                    Page 2
  216.                                    SOURCE
  217.  
  218.      "SOURCE" is the program SOURCE and "filename.ext" is the name of
  219.      the file you are going to print.  You may press the [Esc] key
  220.      anytime while a file is printing to abort SOURCE and stop the
  221.      current file from printing.  Remember, most printers have buffers
  222.      and the printing will probably not stop immediately.
  223.  
  224.      The first time you run SOURCE you will be asked to select your
  225.      default printer.  This printer should be the one connected to
  226.      printer port one, "LPT1:".  If you are using a different port,
  227.      see section 6.5 for information on changing the printer port used
  228.      by SOURCE.  The list of printers initially supported by SOURCE
  229.      contains printers which should cover most of the printers in use. 
  230.      Pick the printer that closest matches the one you have.  
  231.  
  232.           Note:  If none of the printers are like yours, select
  233.           the "Generic" printer for now.  You will still be able
  234.           to print files, you just won't be able to take full
  235.           advantage of SOURCE's strengths.  Later on you'll see
  236.           how to modify SOURCE.PRT to take full advantage of your
  237.           printer.  See section 7 for more information on printer
  238.           definitions.
  239.  
  240.      Typing "SOURCE" at the prompt with no options will give you a few
  241.      lines about the general command line syntax.  You may type
  242.      "SOURCE -?" to see a few screens showing the command line syntax,
  243.      what each option is, and the options' current defaults.  After
  244.      the options, you will be shown what printers, languages, and
  245.      named configuration options are defined in the SOURCE.PRT,
  246.      SOURCE.LNG, and SOURCE.CFG files. 
  247.  
  248.      4    The SOURCE Command Line
  249.  
  250.      SOURCE is a command line utility.  To run SOURCE, type the name
  251.      of this program, SOURCE, followed by any options you wish to use
  252.      along with the filename(s) of the file(s) you wish to print.  The
  253.      command line syntax is as follows:
  254.  
  255.      SOURCE [-global options] filename.ext [-local options] . . .
  256.  
  257.      Objects in square brackets are optional and the ". . ." means you
  258.      may repeat as many filenames as you wish to have printed.
  259.  
  260.      The command line has two levels of options, global and local. 
  261.      Global options are configuration options that apply to all files
  262.      on the command line.  Local options only apply to the files that
  263.      immediately precede them. 
  264.  
  265.      4.1  Global Options
  266.  
  267.      Global options appear after the program name and before the first
  268.      filename.  These options apply to all the files specified on the
  269.      command line.  Global parameters are optional.  The syntax of
  270.      global options is a hyphen ( - ) followed by a one letter option
  271.      followed by any required parameters.  Options that take
  272.      parameters require that there be no space between the option and
  273.  
  274.                                    Page 3
  275.                                    SOURCE
  276.  
  277.      the parameter.  String parameters are slightly different.  A
  278.      space before the parameter is allowed.  String parameters may
  279.      also be enclosed in double quotes.  The quotes are required only
  280.      if the string contains spaces.  An example is:
  281.  
  282.           SOURCE -n -N4 -r com1
  283.  
  284.      The above example only contains global options (in this case,
  285.      four digit line numbers with output redirected to comm port one).
  286.      This example will not actually produce any output because no
  287.      files are specified yet.
  288.  
  289.      Options that you use frequently can be permanently preset within
  290.      the SOURCE.CFG file.  This way, you do not have to specify them
  291.      each time you use SOURCE.  See section 6 for a discussion on
  292.      setting global options as defaults. 
  293.  
  294.      4.2  Filenames
  295.  
  296.      After the global parameters, if any, you may specify the files
  297.      you wish to print.  In the simplest form, this would be a single
  298.      filename and its extension.
  299.  
  300.           SOURCE foobar.c
  301.  
  302.      Running this would cause SOURCE to print the file "foobar.c" from
  303.      the current directory.  To specify a file in another directory or
  304.      on another disk drive, use the full path name, as in the example
  305.      below:
  306.  
  307.           SOURCE c:\src\code.pas
  308.  
  309.      This would print the file "code.pas" found in the "c:\src"
  310.      directory despite your current working directory.
  311.  
  312.      There are three methods for printing multiple files.  The most
  313.      tiresome is to run SOURCE once for each file you need to print.
  314.  
  315.      The second option is to use wildcards when specifying the
  316.      filename.  The wildcards allowed are '*' and '?'.  These behave
  317.      exactly like the wildcards used by DOS commands (such as copy and
  318.      delete).  If you do not understand how wildcards work, please
  319.      refer to your DOS manual for more information.  An example of
  320.      wildcard use is:
  321.  
  322.           SOURCE *.c
  323.  
  324.      This would cause SOURCE to print all files in the current
  325.      directory that had the extension ".c".  Each file will be printed
  326.      separately, starting on page one, line one.
  327.  
  328.      The third method for printing multiple files is to enter more
  329.      than one name on the command line:
  330.  
  331.           SOURCE program.c data.txt
  332.  
  333.                                    Page 4
  334.                                    SOURCE
  335.  
  336.      This would cause SOURCE to print the two files, "program.c" and
  337.      "data.txt", from the current directory.  You may specify as many
  338.      files as the command line has room for.
  339.  
  340.      Any combination of these methods may be used, for example:
  341.  
  342.           SOURCE *.c b:*.txt c:\proj\*.*
  343.  
  344.      This command line would print all 'C' files in the current
  345.      directory, all files with the extension ".txt" from the disk in
  346.      the B drive, and all files from the "proj" directory of the C
  347.      drive.
  348.  
  349.      4.3  Local Options
  350.  
  351.      In addition to the global options, you may specify "local"
  352.      options after each filename.  These local options override the
  353.      global options and only apply to the file they immediately follow
  354.      on the command line.  Local options are optional.  The syntax for
  355.      local options is identical to that of global options (see section
  356.      4.1).  Example:
  357.  
  358.           SOURCE -n hello.c goodbye.c -n-
  359.  
  360.      This command will cause SOURCE to print the file "hello.c" from
  361.      the current directory with line numbers and "goodbye.c" without
  362.      line numbers.  The global option "-n" causes line numbering to be
  363.      turned on for all files.  Specifying "-n-" after "goodbye.c"
  364.      tells SOURCE to turn line numbering off only for "goodbye.c" and
  365.      does not affect "hello.c".  Local options used after filenames
  366.      with wildcards will apply to all the files matched by the
  367.      wildcards:
  368.  
  369.           SOURCE *.c -b -c
  370.  
  371.      will print all 'C' files with block tracing and highlighted
  372.      comments turned on for each file.  This also shows that you may
  373.      specify more than one local option per file.  Of course, you do
  374.      not have to specify any local options if they are not needed.
  375.  
  376.      4.4  Full Command Line
  377.  
  378.      The command line for SOURCE is very flexible.  This flexibility
  379.      can also lead to some pretty long and complicated command lines. 
  380.      There are many ways to remedy this.  See section 6 for ways to
  381.      minimize the command line options.  The most complex command line
  382.      would be as follows:
  383.  
  384.           SOURCE -n -N4 file.pas -c -b *.c -h2 *.dat -n-
  385.  
  386.      This line contains global options and three file specifications
  387.      each giving their own local options.  You will not normally have
  388.      such lines, but the power is there to use.
  389.  
  390.      5    SOURCE Options
  391.  
  392.                                    Page 5
  393.                                    SOURCE
  394.  
  395.      What follows is an alphabetized list of all the command line
  396.      options that SOURCE recognizes.  These options may be specified
  397.      as global or local options on the command line (unless indicated
  398.      otherwise).  They may also appear in the SOURCE.CFG file to
  399.      define default options for those options you wish to have in
  400.      effect each time you run SOURCE.  See section 6 for more on the
  401.      SOURCE.CFG file.  All options are case sensitive so do not run
  402.      SOURCE with your caps lock on.
  403.  
  404.      Conventions used below:
  405.  
  406.           [x]       Square brackets indicate optional items.  There
  407.                     may not be a space between the option and the
  408.                     parameter if specified.  Example:
  409.  
  410.                     n[-] may entered as n or n-.
  411.  
  412.           {x|y}     Curly braces containing a list of choices
  413.                     separated with a vertical bar indicate that you
  414.                     must select one of the options available for that
  415.                     item.  There may not be a space between the option
  416.                     and the chosen parameter.  Example:
  417.  
  418.                     a{a|o|r} allows aa, ao, or ar.
  419.  
  420.           "text"    Quotes indicate that you must enter a text string. 
  421.                     You do not have to type the double quotes unless
  422.                     the string contains spaces.  There may be a space
  423.                     between the option and the string.  Example:
  424.  
  425.                     z "list" allows:
  426.                          z.exe.obj      <== No spaces
  427.                          z".exe.obj"    <== Quotes optional, no spaces
  428.                          z".exe .obj"   <== Quotes required, spaces
  429.                          z .exe.obj
  430.                          z ".exe.obj"
  431.                          z ".exe .obj"
  432.  
  433.                     Not allowed would be:
  434.  
  435.                          z .exe .obj
  436.  
  437.                     because the parameter contains a space and must be
  438.                     enclosed in quotes.
  439.  
  440.           #         A pound symbol indicates that you must enter a
  441.                     number after the option.  Numbers may be made up
  442.                     of the 10 numeric digits and minus for negative
  443.                     numbers.  There may not be a space between the
  444.                     option and the number.  Example:
  445.  
  446.                     w# allows w1, w2, w3, etc.
  447.                     h# allows h-1, h2, h0, etc.
  448.  
  449.  
  450.  
  451.                                    Page 6
  452.                                    SOURCE
  453.  
  454.      Option         Description
  455.  
  456.      -?             Help.  The '?' option displays a quick command
  457.                     summary showing all the available options and
  458.                     their current defaults.  Running SOURCE with no
  459.                     options simply shows the command line syntax and
  460.                     the '-?' option.
  461.  
  462.      -a{a|o|r}      Append/Overwrite.  The 'a' option describes the
  463.                     action SOURCE will take when redirecting the
  464.                     output to a file and the file already exists.  See
  465.                     the 'r' option for more on redirecting the output. 
  466.                     When the 'a' option is followed by an 'a', SOURCE
  467.                     will automatically append the new output to the
  468.                     previous contents of the file.  When followed by
  469.                     an 'o', SOURCE will automatically overwrite the
  470.                     old contents of the file and leave only the new
  471.                     output.  When followed by an 'r', SOURCE will
  472.                     interactively prompt you for the action to take. 
  473.                     You may specify 'append', 'overwrite', enter a
  474.                     different file, or quit SOURCE.  Default is 'ar',
  475.                     request.
  476.  
  477.      -b[-]          Block Grouping.  The 'b' option sets whether block
  478.                     grouping is turned on or not.  The 'b' may be
  479.                     followed by '-'.  The 'b' option alone turns on
  480.                     block grouping, the minus turns it off.  For this
  481.                     option to work, SOURCE must know what language the
  482.                     file is written in.  This is done by using the
  483.                     filename extension as defined in the SOURCE.LNG
  484.                     file or the 'x' option may be used to force a
  485.                     specific language.  The lines used for block
  486.                     grouping may be drawn using either standard ASCII
  487.                     characters or the IBM line drawing characters. 
  488.                     See the 'g' option to set how the lines are drawn. 
  489.                     Default is 'b', block grouping on.
  490.  
  491.                     Below is some sample C code with block grouping
  492.                     turned on:
  493.  
  494.                          while (x < 10)
  495.                               ┌{
  496.                               │if (a < b)
  497.                               │    ┌{
  498.                               │    │puts("Hello");
  499.                               │    └}
  500.                               │else
  501.                               │    ┌{
  502.                               │    │puts("Goodbye");
  503.                               │    └}
  504.                               │x++;
  505.                               └}
  506.  
  507.  
  508.  
  509.  
  510.                                    Page 7
  511.                                    SOURCE
  512.  
  513.                     The above also assumes the 'g' option is on.  With
  514.                     the 'g' option off, the same code looks as
  515.                     follows:
  516.  
  517.                          while (x < 10)
  518.                               +{
  519.                               |if (a < b)
  520.                               |    +{
  521.                               |    |puts("Hello");
  522.                               |    +}
  523.                               |else
  524.                               |    +{
  525.                               |    |puts("Goodbye");
  526.                               |    +}
  527.                               |x++;
  528.                               +}
  529.  
  530.      -B[*]#         Banner.  The 'B' option allows you to print a
  531.                     banner before and/or after each file.  The banner
  532.                     contains the filename and extension in BIG
  533.                     letters.  The 'B' must be followed by a number
  534.                     from 0 to 3.  0 means no banner at all.  1 means a
  535.                     banner only before the file.  2 means a banner
  536.                     only after the file.  3 means a banner before and
  537.                     after the file.  You may also specify an optional
  538.                     asterisk ('*') before the number.  This will cause
  539.                     the letters of the banner to be made up of
  540.                     asterisks instead of the default individual
  541.                     letter.  Default is 'B3', print banner before and
  542.                     after using letters.
  543.  
  544.      -c[-]          Comment Highlighting.  The 'c' option sets whether
  545.                     comments within your programming code are
  546.                     highlighted or not.  The 'c' may be followed by
  547.                     '-'.  The 'c' option alone turns on highlighting,
  548.                     the minus turns it off.  For this option to work,
  549.                     SOURCE must know what language the file is written
  550.                     in.  This is done by using the filename extension
  551.                     as defined in the SOURCE.LNG file or the 'x'
  552.                     option may be used to force a specific language. 
  553.                     The highlighting method used is as defined in the
  554.                     SOURCE.PRT file for the selected pitch.  Default
  555.                     is 'c', highlighted comments on.
  556.  
  557.      -d "printer"   Select Printer.  The 'd' option specifies which
  558.                     printer definition in the SOURCE.PRT file SOURCE
  559.                     should use when printing out files.  The 'd' must
  560.                     be followed by the printer name.  The name
  561.                     specified is not case sensitive.  If you only have
  562.                     one printer connected to your computer you will
  563.                     not need to use this option.
  564.  
  565.                     If you have multiple printers connected to
  566.                     different ports, you can specify this option at
  567.                     the command line when you are using a printer
  568.  
  569.                                    Page 8
  570.                                    SOURCE
  571.  
  572.                     other than the default.  If this is the case, you
  573.                     will also need to use the 'r' option to specify
  574.                     the port the printer is connected to.  If you use
  575.                     different printers often, you may wish to define a
  576.                     named configuration in the SOURCE.CFG file for
  577.                     each printer.  Then all you need to specify on the
  578.                     command line is the 'u' option.  See the 'u'
  579.                     option for more details on using named
  580.                     configurations.  The default printer is selected
  581.                     by the user the first time SOURCE is run or by
  582.                     modifying the SOURCE.PRT file.  See section 7 for
  583.                     more on SOURCE.PRT.
  584.  
  585.      -e[-]          Escape Codes.  The 'e' option sets whether printer
  586.                     escape codes are output along with your text or
  587.                     not.  Normally you would want this left on so your
  588.                     printer will print the file properly.  Turning
  589.                     this option off would typically be used when
  590.                     redirecting output to a file when you would not
  591.                     want the escape codes embedded in the target file. 
  592.                     The 'e' may be followed by '-'.  The 'e' option
  593.                     alone causes the codes to be printed, the minus
  594.                     prevents the codes.  Default is 'e', codes
  595.                     printed.
  596.  
  597.      -f#            Final Line.  The 'f' option allows you to specify
  598.                     the final line number of the file to print out. 
  599.                     This would be used to print only a desired block
  600.                     of code instead of having to print the entire
  601.                     file.  The 'f' must be followed by a positive
  602.                     number.  Specifying zero means the last physical
  603.                     line.  This option may not be used with the 'F' or
  604.                     'I' options unless set to zero.  Default is 'f0',
  605.                     print through last line.
  606.  
  607.      -F#            Final Page.  The 'F' option allows you to specify
  608.                     the number of the final page of the file to print
  609.                     out.  This would be used to print only a block of
  610.                     code, or part of a page range, instead of printing
  611.                     out the entire file.  The 'F' must be followed by
  612.                     a positive number.  Specifying zero means the last
  613.                     physical page.  This option may not be used with
  614.                     the 'f' or 'i' options unless set to zero. 
  615.                     Default is 'F0', print through last page.
  616.  
  617.      -g[-]          Graphics.  The 'g' option determines how the block
  618.                     group lines are printed (see option 'b' for more
  619.                     on block grouping).  When the option is on, the
  620.                     lines will be printed using the IBM line drawing
  621.                     characters.  With the option off, simple ASCII
  622.                     characters will be used.  If your printer cannot
  623.                     print the extended IBM character set then turn
  624.                     this off.  If your printer can print the lines
  625.                     then set this to on.  You may need to send a
  626.                     special code to your printer to select the IBM
  627.  
  628.                                    Page 9
  629.                                    SOURCE
  630.  
  631.                     extended character set.  To do so, place the
  632.                     proper printer codes in the 'Init' record in the
  633.                     SOURCE.PRT file for your printer.  Default is
  634.                     'g-', print using standard ASCII.
  635.  
  636.      -h#            Header Page.  The 'h' option is used to specify
  637.                     when to print the page header or footer.  The 'h'
  638.                     must be followed by a number.  Zero means no
  639.                     header or footer will be printed.  A one means to
  640.                     print the header only on the first page.  Any
  641.                     value of two or more will result in the header
  642.                     being printed on all pages.  To cause the header
  643.                     to be printed at the bottom of the page (now a
  644.                     footer), specify a negative number.  Negative one
  645.                     means to print a footer only on the first page. 
  646.                     Any number of -2 or less (-100 etc.) will cause
  647.                     the footer to be placed on all pages.  Page
  648.                     headers and footers are underlined and printed in
  649.                     10 pitch regardless of the pitch selected for the
  650.                     rest of the file.  The contents of the header are
  651.                     user definable by using the 'H' option.  Default
  652.                     is 'h2', header on all pages.
  653.  
  654.      -H "header"    Header Definition.  The 'H' option is used to
  655.                     define the contents of the header or footer.  The
  656.                     definition consists of literal text and escape
  657.                     codes.  Since the definition will likely contain
  658.                     literal spaces, remember to enclose the definition
  659.                     within double quotes.  The escape commands are
  660.                     case sensitive and literal text will be shown as
  661.                     entered.  The escape sequences are described here:
  662.  
  663.                     &fn       Current filename and extension.  The
  664.                               filename is shown in uppercase.  No path
  665.                               is displayed.
  666.                     &fd#c     File creation date in specified format
  667.                               where # is 1 to 5 and c is the delimiter
  668.                               character ('/', ',', or '.').
  669.                     &ft#c     File creation time in specified format
  670.                               where # is 1 to 4 and c is the delimiter
  671.                               character (':', ',', or '.').
  672.                     &cd#c     Current date in specified format where #
  673.                               is 1 to 5 and c is the delimiter
  674.                               character ('/', ',', or '.').
  675.                     &ct#c     Current time in specified format where #
  676.                               is 1 to 4 and c is the delimiter
  677.                               character (':', ',', or '.').
  678.                     &pn#      Current page number in specified format
  679.                               where # is the number of digits the page
  680.                               number will take up.  The value must be
  681.                               in the range 1 to 9.  The page number
  682.                               will be left padded with spaces.  If you
  683.                               prefer zeros instead, precede the number
  684.                               with a zero.  Example:  &pn03.
  685.                     &li       Initial line number on page.
  686.  
  687.                                   Page 10
  688.                                    SOURCE
  689.  
  690.                     &lf       Final line number on page.
  691.                     &h+       Turn on highlighting (using 10 high).
  692.                     &h-       Turn off highlighting (using 10 high).
  693.                     &jl       Left justify text.
  694.                     &jc       Center justify text.
  695.                     &jr       Right justify text.
  696.                     &&        Prints a literal ampersand character.
  697.  
  698.                     Date formats:
  699.                     1)   mm dd yy       ex.  &fd1/     07/31/92
  700.                     2)   dd mm yy       ex.  &cd2.     31.07.92
  701.                     3)   yy mm dd       ex.  &cd3,     92,07,31
  702.                     4)   dd Mmm yy      ex.  &fd4-     31-Jul-92
  703.                     5)   Month dd  yyyy ex.  &cd5,     July 31, 1992
  704.  
  705.                     Time formats:
  706.                     1)   hh mm ss       ex.  &ct1:     15:45:21
  707.                     2)   hh mm          ex.  &ft2.     15.45
  708.                     3)   hh mm ss am    ex.  &ft3,     03,45,21 pm
  709.                     4)   hh mm am       ex.  &cd4:     03:45 pm
  710.  
  711.                     Example header definition:
  712.  
  713.                     '&h+File:&h-  &fn&jr&h+Page:&h-  &pn03'
  714.  
  715.                     This definition results in the following text:
  716.  
  717.                     File:  filename.ext                     Page:  001
  718.  
  719.                     where the text 'File:' and 'Page:' are
  720.                     highlighted, 'filename.ext' is the actual filename
  721.                     of the file, and the page number is right
  722.                     justified on the page.  Default is "File:  ",
  723.                     filename, file date, file time, "Printed:  ",
  724.                     date, time, "Page:  ", page number.
  725.  
  726.      -i#            Initial Line.  The 'i' option allows you to
  727.                     specify the initial line number of the file to
  728.                     output.  This would be used to print only a block
  729.                     of code instead of the whole file.  The 'i' must
  730.                     be followed by a positive number.  Specifying zero
  731.                     means the first physical line.  It is likely that
  732.                     'i' would be used in conjunction with the 'f'
  733.                     option to print a specific range of text starting
  734.                     and finishing at the line numbers chosen.  This
  735.                     option may not be used with the 'F' or 'I' options
  736.                     unless set to zero.  Default is 'i0', the first
  737.                     line.
  738.  
  739.      -I#            Initial Page.  The 'I' option allows you to
  740.                     specify the final page number of the file to
  741.                     output.  This would be used to print only a block
  742.                     of code instead of the whole file.  The 'I' must
  743.                     be followed by a positive number.  Specifying zero
  744.                     means the first physical page.  It is likely that
  745.  
  746.                                   Page 11
  747.                                    SOURCE
  748.  
  749.                     'I' would be used in conjunction with the 'F'
  750.                     option to print a specific range of text starting
  751.                     and finishing at the page numbers chosen.  This
  752.                     option may not be used with the 'f' or 'i' options
  753.                     unless set to zero.  Default is 'I0', the first
  754.                     page.
  755.  
  756.      -k[-]          Highlighted Keywords.  The 'k' option sets whether
  757.                     keywords within your programming code are
  758.                     highlighted or not.  The 'k' may be followed by
  759.                     '-'.  The 'k' option alone turns on highlighting,
  760.                     the minus turns it off.  Only those words listed
  761.                     in the "keyword" section of a language definition
  762.                     are highlighted.  For this option to work, SOURCE
  763.                     must know what language the file is written in. 
  764.                     This is done by using the filename extension as
  765.                     defined in the SOURCE.LNG file or the 'x' option
  766.                     may be used to force a specific language.  The
  767.                     highlighting method used is as defined in the
  768.                     SOURCE.PRT file for the selected pitch.  Default
  769.                     is 'k', highlighted keywords on.
  770.  
  771.      -l{6|8}        Line Spacing.  The 'l' option specifies the number
  772.                     of lines per inch to print.  The 'l' must be
  773.                     followed by a 6 or an 8.  Ensure that the proper
  774.                     printer codes have been defined in the SOURCE.PRT
  775.                     file for the eight lines per inch option to work. 
  776.                     Default is 'l6', six lines per inch.
  777.  
  778.      m              Shareware Message.  The 'm' option causes a full
  779.                     screen message to display about registering
  780.                     SOURCE.  This command is only recognized if in
  781.                     SOURCE.CFG or as a global command line option.
  782.  
  783.      -n[-]          Line Numbering.  The 'n' option is used to specify
  784.                     whether line numbers will be shown or not.  Line
  785.                     numbers are shown in the format specified in the
  786.                     'N' option.  The 'n' may be followed by '-'.  The
  787.                     'n' option alone turns on line numbering, the
  788.                     minus turns it off.  Default is 'n', line
  789.                     numbering on.
  790.  
  791.      -N "beg#end"   Line Number Format.  The 'N' option specifies the
  792.                     size and format of line numbers.  The value of #
  793.                     must be a number between 1 and 9.  The terms "beg"
  794.                     and "end" represent literal text that may be shown
  795.                     before and after the line numbers.  For example,
  796.                     if you want four digit line numbers within square
  797.                     brackets, you would specify the option as 'N[4]'. 
  798.                     This would result in [   1], [   2], etc., being
  799.                     printed.  Another example would be if you wanted
  800.                     to specify 'N04:', which is the default, and this
  801.                     would result in the line numbers being printed as
  802.                     0001:, 0002:, and so on.  
  803.  
  804.  
  805.                                   Page 12
  806.                                    SOURCE
  807.  
  808.                     The line numbers are left padded with spaces.  If
  809.                     you prefer the number to be left padded with
  810.                     zeros, precede the number with a zero.  For
  811.                     example:  'N4' will cause    1,    2, entering
  812.                     'N04' will cause 0001, 0002, etc.  Both the
  813.                     'begin' and 'end' text are optional.  If there is
  814.                     no 'end' text, the source code will be adjacent to
  815.                     the line number.  To avoid this, you may wish to
  816.                     specify 'N"4 "'.  The space inside the double
  817.                     quotes will print after each line number.  
  818.  
  819.                     Specifying a value for the number of digits that
  820.                     is too small for the number of lines in the file
  821.                     to be printed will result in the line numbers
  822.                     wrapping around.  For example, if you specify N01
  823.                     and have 19 lines, line 10 would show up as 0, and
  824.                     line 11 would become 1.  This wrapping holds true
  825.                     for any size specified.  If your code typically
  826.                     has less than 1000 lines, specify 3 for the value
  827.                     of #, less than 10,000 lines, specify 4.  The
  828.                     default is 'N04:' which will produce 0001:, 0002:,
  829.                     etc.
  830.  
  831.      -o{l|p}        Page Orientation.  The 'o' option specifies the
  832.                     page orientation.  This will probably only work on
  833.                     laser printers since most dot matrix printers
  834.                     cannot print in landscape.  The 'o' must be
  835.                     followed by 'l' or 'p'.  The 'l' indicates
  836.                     landscape (sideways) printing and the 'p' is
  837.                     portrait (normal).  The landscape option requires
  838.                     that the 'landscape' field be filled in in the
  839.                     SOURCE.PRT file.  Default is 'op', portrait.
  840.  
  841.      -p{p|e|c}      Pitch.  The 'p' option indicates the character
  842.                     pitch to print the files in.  The 'p' must be
  843.                     followed by 'p' (pica or 10 cpi), 'e' (elite or 12
  844.                     cpi), or 'c' (compressed using your printers
  845.                     compressed value, usually 15, 16.666, or 17).  If
  846.                     your printer allows large pitch sizes such as 5
  847.                     cpi, you could also use the compressed setting for
  848.                     this.  See section 7 for more on setting the
  849.                     compressed pitch value.  Default is 'pp', pica.
  850.  
  851.      -q[-]          Page Count Query.  The 'q' option causes SOURCE to
  852.                     pre-scan each file and return the number of lines
  853.                     in the file and how many pages (excluding any
  854.                     banner pages) are required to print it based on
  855.                     all other print options.  You are then asked to
  856.                     confirm whether to print the file or not. 
  857.                     Pressing 'Y' or 'y' will cause the file to be
  858.                     printed.  Any other keystroke will prevent the
  859.                     file from being printed.  Pressing the [Esc] key
  860.                     will cause SOURCE to terminate.  The 'q' may be
  861.                     followed by '-'.  The 'q' option alone turns on
  862.                     the print statistics, the minus turns it off. 
  863.  
  864.                                   Page 13
  865.                                    SOURCE
  866.  
  867.                     Turning on the 'q' option automatically turns on
  868.                     the 'v' (print verification) option.  Default is
  869.                     'q', show page count.
  870.  
  871.      -r "output"    Redirect.  The 'r' option allows you to redirect
  872.                     the output to a file or other device such as the
  873.                     screen or another printer port.  The 'r' must be
  874.                     followed by a filename or device name.  The file
  875.                     or device name is not case sensitive.  Example
  876.                     devices would be "LPT1", "PRN", or "COM2".  You
  877.                     may even specify "CON" to send the output to the
  878.                     screen.  When specifying a file, enter as much of
  879.                     the full path name as is needed.  You may specify
  880.                     another drive or directory.  You may specify
  881.                     wildcards in the filename.  This allows you to do
  882.                     things like:
  883.  
  884.                          SOURCE *.c -r*.prn
  885.  
  886.                     This will result in each 'C' file being output to
  887.                     its own '.prn' file.  The wildcards act just like
  888.                     they would in a DOS COPY command.  If the
  889.                     specified file already exists, SOURCE will act as
  890.                     specified by the 'a' option.  If more than one
  891.                     file being printed is to be redirected to the same
  892.                     output file, the latter ones will be appended to
  893.                     the first.  Default is 'r lpt1', output to printer
  894.                     port one.
  895.  
  896.      -s{1|2}        Column Count.  The 's' option specifies the number
  897.                     of columns to print per page.  The 's' must be
  898.                     followed by a 1 or a 2.  It is recommended that
  899.                     compressed landscape printing be used with two
  900.                     columns.  Using two columns in 10 pitch, portrait
  901.                     print, leads to some difficult to read output. 
  902.                     Default is 's1', one column per page.
  903.  
  904.      -S[-]          Show Column Separator.  The 'S' option is used in
  905.                     conjunction with the 's' option.  When you specify
  906.                     more than one column, the columns are separated by
  907.                     a vertical line.  The 'S' option allows you to
  908.                     tell SOURCE whether to display this vertical line
  909.                     or not.  The 'S' may be followed by '-'.  The 'S'
  910.                     alone turns the line on, the minus turns it off. 
  911.                     Default is 'S', line on.
  912.  
  913.      -t#            Tab Stop Size.  The 't' option allows you to
  914.                     specify how many spaces a tab character should be
  915.                     printed as.  The 't' must be followed by a number
  916.                     from 0 to 8.  Specifying zero is equivalent to
  917.                     having all tabs removed from the file.  Default is
  918.                     't8', eight spaces per tab stop.
  919.  
  920.      -u "name"      Use Named Configuration.  The 'u' option is used
  921.                     to specify a named configuration from within the
  922.  
  923.                                   Page 14
  924.                                    SOURCE
  925.  
  926.                     SOURCE.CFG file.  See section 6.2 for more on
  927.                     named configurations.  The 'u' must be followed by
  928.                     a configuration name that has been defined in
  929.                     SOURCE.CFG.  The name is not case sensitive.  No
  930.                     default.
  931.  
  932.      -v[-]          Print Verification.  The 'v' option is used to ask
  933.                     the user to confirm the printing of each file. 
  934.                     This would most likely be used in conjunction with
  935.                     wildcards in the filename.  For example, you want
  936.                     to print all but one or two files in a directory. 
  937.                     Specify "*.*/v" on the command line to select all
  938.                     the files.  SOURCE will then ask you to confirm
  939.                     the printing of each file.  Just press 'Y' or 'y'
  940.                     for the ones you want to print.  Any other key
  941.                     stroke other than 'Y' or 'y' will be the same as
  942.                     no.  Pressing the [Esc] key will cause SOURCE to
  943.                     terminate.  The 'v' option is automatically turned
  944.                     on when the 'q' option is turned on.  The 'v'
  945.                     option may be followed by '-'.  The 'v' option
  946.                     alone turns on the print verify, the minus turns
  947.                     it off.  Default is 'v-', do not ask about each
  948.                     file.
  949.  
  950.      -w#            Whitespace.  The 'w' option is used to specify the
  951.                     number of blank lines printed between the
  952.                     header/footer and the first/last line of text of
  953.                     the file on the page.  The 'w' must be followed by
  954.                     a value between 0 and 9.  Specifying zero will
  955.                     result in no blank space.  See the 'h' and 'H'
  956.                     options for more on user definable headers and
  957.                     footers.  Default is 'w1', one line.
  958.  
  959.      -x "language"  Force Language.  The 'x' option allows you to tell
  960.                     SOURCE the language of a file regardless of its
  961.                     extension.  This option is useful only when using
  962.                     the 'b', 'c', or 'k' options (block grouping and
  963.                     comment or keyword highlighting).  The 'x' must be
  964.                     followed by a language name defined in SOURCE.LNG. 
  965.                     The name is not case sensitive.  For example, if
  966.                     you have a file with a 'bak' extension that really
  967.                     is a Pascal program, by following the file with
  968.                     the '-xPascal' option, SOURCE will treat the file
  969.                     as Pascal code so comments and blocks print
  970.                     correctly.  This assumes that there is a
  971.                     definition for 'Pascal' in the SOURCE.LNG file. 
  972.                     Default is none (use extension).
  973.  
  974.      -y[-]          Sound.  The 'y' option determines whether the
  975.                     speaker will emit a bell or buzz sound when
  976.                     prompts or errors occur.  This option is not
  977.                     recognized as a local option.  The 'y' may be
  978.                     followed by '-'.  The 'y' option alone turns on
  979.                     sound, the minus turns them off.  Default is 'y-',
  980.                     sound off.
  981.  
  982.                                   Page 15
  983.                                    SOURCE
  984.  
  985.      -z "list"      Ignore These Extensions.  The 'z' option is used
  986.                     to tell SOURCE what files to ignore during
  987.                     wildcard expansion.  For example, if you run
  988.                     SOURCE with "*.*", you will have a mess at your
  989.                     printer when it tries to print executables and
  990.                     object code!  You could specify the 'v' option
  991.                     each time and say no to files with ".exe" or
  992.                     ".obj" extensions, or you could use the 'z' option
  993.                     to tell SOURCE to automatically ignore the ".exe"
  994.                     and ".obj" extensions every time.  The syntax for
  995.                     the 'z' option is the list of extensions
  996.                     (including the period) between a pair of double
  997.                     quotes (if you place a space between each).  The
  998.                     list is not case sensitive.  To continue the
  999.                     example, specify the 'z' option as 'z ".exe
  1000.                     .obj"'.  You may specify as many extensions as you
  1001.                     like as long as all are specified with one 'z'
  1002.                     option.  Using two 'z' options will cause the
  1003.                     first one to be ignored.  Default is 'z ".exe .com
  1004.                     .sys .obj"'.
  1005.  
  1006.      Below is a list of the command line options broken out by
  1007.      category.
  1008.  
  1009.      Page Format:
  1010.      -p             Pitch.
  1011.      -o             Page Orientation.
  1012.      -s             Column Count.
  1013.      -S             Show Column Separator.
  1014.      -l             Line Spacing.
  1015.      -g             Graphics.
  1016.      -e             Escape Codes.
  1017.  
  1018.      Page Layout:
  1019.      -t             Tab Stop Size.
  1020.      -n             Line Numbering.
  1021.      -N             Line Number Format.
  1022.      -h             Header Page.
  1023.      -H             Header Definition.
  1024.      -w             Whitespace.
  1025.      -B             Banner.
  1026.  
  1027.      Language Features:
  1028.      -b             Block Grouping.
  1029.      -c             Comment Highlighting.
  1030.      -k             Keyword Highlighting.
  1031.      -x             Force Language.
  1032.  
  1033.      File Selection:
  1034.      -i             Initial Line.
  1035.      -f             Final Line.
  1036.      -I             Initial Page.
  1037.      -F             Final Page.
  1038.      -q             Page Count Query.
  1039.      -v             Print Verification.
  1040.  
  1041.                                   Page 16
  1042.                                    SOURCE
  1043.  
  1044.      -z             Ignore These Extensions.
  1045.  
  1046.      Output:
  1047.      -r             Redirect.
  1048.      -a             Append/Overwrite.
  1049.      -d             Select Printer.
  1050.  
  1051.      Miscellaneous:
  1052.      -?             Help.
  1053.      -y             Sound.
  1054.      -u             Use Named Configuration.
  1055.  
  1056.      6    SOURCE.CFG
  1057.  
  1058.      The SOURCE.CFG file is used to store groups of configuration
  1059.      options that may be used by SOURCE.  Among these groups are a set
  1060.      of default options.  These default options are seen by running
  1061.      SOURCE with the '-?' global option.  These default options, as
  1062.      initially defined, are actually the same defaults hard coded
  1063.      within SOURCE itself.
  1064.  
  1065.      6.1  SOURCE.CFG Location
  1066.  
  1067.      SOURCE.CFG is actually not needed.  If SOURCE can not find
  1068.      SOURCE.CFG, it will fall back on the built in defaults and
  1069.      continue to work fine.  SOURCE.CFG can be located in many
  1070.      different places.  By default, you should place a copy in the
  1071.      same directory as SOURCE.EXE (from now on referred to as the
  1072.      SOURCE directory).  With this setup, running SOURCE from any
  1073.      directory will cause SOURCE to use the defaults defined in
  1074.      SOURCE.CFG in the SOURCE directory.
  1075.  
  1076.      In addition to placing SOURCE.CFG in the SOURCE directory, you
  1077.      may also place other copies in any other directory you wish.  For
  1078.      example, you have a 'prog' directory on your hard disk.  If you
  1079.      place another copy of SOURCE.CFG in 'prog' and run SOURCE while
  1080.      your default directory is 'prog', SOURCE will use the SOURCE.CFG
  1081.      file in the 'prog' directory instead of the SOURCE directory.  By
  1082.      tailoring the SOURCE.CFG file to the files in 'prog', you can
  1083.      minimize the amount of command line options you need to specify. 
  1084.      The whole point to allowing this kind of flexibility is that you
  1085.      might be working on different projects that require different
  1086.      printing styles.  By placing tailored SOURCE.CFG files in the
  1087.      different directories, you can easily accomplish the diverse
  1088.      printing needs.
  1089.  
  1090.      6.2  Named Configuration Options
  1091.  
  1092.      If you have looked at the contents of SOURCE.CFG, you will notice
  1093.      that there seems to be more than just defaults defined in there. 
  1094.      SOURCE.CFG can actually store up to fifty sets of configuration
  1095.      options.  The first of which (as supplied) is the default
  1096.      options.  These different sets of options are referred to as
  1097.      named configuration options.  The supplied defaults are actually
  1098.      a named configuration option titled 'Default'.  SOURCE
  1099.  
  1100.                                   Page 17
  1101.                                    SOURCE
  1102.  
  1103.      automatically looks for 'Default' and loads the options in if
  1104.      found.  In addition to the 'Default' setup, you may define 49
  1105.      more of your own design.  If for some reason you do not want the
  1106.      defaults loaded, rename 'Default' to something else.  You may
  1107.      then refer to the defaults explicitly by using the 'u' option on
  1108.      the command line.  See section 5 for more information on
  1109.      selecting named configurations from the command line using the
  1110.      'u' option.
  1111.  
  1112.      The idea behind named configurations allows you to define a
  1113.      commonly used, but cumbersome, set of configuration options into
  1114.      a simple, single command line option.  A common use for them
  1115.      might be on a LAN where each user has their own favorite set of
  1116.      defaults.  The SOURCE.CFG file could contain one set for each
  1117.      user using their name or initials to name the options.  On the
  1118.      command line, simply specify "-u name" and all the options
  1119.      defined as "name" in SOURCE.CFG will be used.  Another
  1120.      circumstance could be to use named options when you are using
  1121.      SOURCE with multiple printers.  If you have "printer1" on "lpt1"
  1122.      and "printer2" on "com3", you could add two named configurations,
  1123.      "p1" and "p2".  "p1" would have '-d printer1 -r lpt1' and "p2"
  1124.      would have '-d printer2 -r com3'.  You could also add the 'g'
  1125.      option if one printer could print the IBM line drawing characters
  1126.      and one could not.  Typing 'source -u p1' at the command line is
  1127.      easier than 'source -d printer1 -r lpt1 -g'.  One other
  1128.      possibility would be if you wished to print source code in
  1129.      different languages in different formats.
  1130.  
  1131.      The named set of options may also contain a 'u' option.  This
  1132.      allows for nested definitions.  As an example, let's say you have
  1133.      two named configurations, "name1" and "name2".  If "name1"
  1134.      contains '-u name2', "name1" will pull in the options defined in
  1135.      "name2".  The result of using "name1" will be all the options in
  1136.      "name1" and all the options in "name2" being used.
  1137.  
  1138.      6.3  SOURCE.CFG Format
  1139.  
  1140.      The format of the SOURCE.CFG file is simple.  A named
  1141.      configuration begins with the key word "begin" followed by a
  1142.      name.  This name can contain any characters you can type at the
  1143.      DOS prompt.  I recommend descriptive names that indicate what the
  1144.      options represent.  Spaces are not allowed in the name.  The only
  1145.      limit is the full name must be 20 characters or less.  After the
  1146.      "begin" line, enter any set of options you like.  There are two
  1147.      ways of entering the options.  The easiest to read is to place
  1148.      one command per line.  Each command must be preceded by a hyphen. 
  1149.      Example:
  1150.  
  1151.      -t3
  1152.      -pp
  1153.  
  1154.      The second method allows more than one command per line.  This is
  1155.      identical to global options on the command line.  Simply separate
  1156.      the commands by at least one space.  Again, each command must be
  1157.      preceded by a hyphen.  Example:
  1158.  
  1159.                                   Page 18
  1160.                                    SOURCE
  1161.  
  1162.      -l8  -s2
  1163.  
  1164.      You may also enter the commands using any combination of the two
  1165.      methods.  Example:
  1166.  
  1167.      -q  -i5 -f100
  1168.      -z ".exe .obj .sys"
  1169.  
  1170.      After all options have been specified, enter the key word "end"
  1171.      on a line by itself to signal the end of the named definition. 
  1172.      You may define up to 20 named configurations.  A full definition
  1173.      would look as follows:
  1174.  
  1175.           begin Test
  1176.           -q -F2
  1177.           end
  1178.  
  1179.      6.4  Commenting SOURCE.CFG
  1180.  
  1181.      You may place comments in the SOURCE.CFG file by beginning a line
  1182.      with a semicolon ( ; ).  All text on that line will be ignored by
  1183.      SOURCE.  Do not place comments on lines with options.  The
  1184.      comment must go on a line by itself.  Example:
  1185.  
  1186.      ; This is a valid comment
  1187.      -b -c   ; This is not a valid comment - must be on own line
  1188.  
  1189.      6.5  Modifying SOURCE.CFG
  1190.  
  1191.      I recommend you modify the 'Default' named option in SOURCE.CFG
  1192.      to suit your most common needs.  This will result in having to
  1193.      specify little on the command line other than the filenames to
  1194.      print.  If you need to print a file slightly different one time,
  1195.      specify only the options required for the difference.  Add other
  1196.      named options for other commonly used configurations like those
  1197.      mentioned above.  This allows you to use very different print
  1198.      formats with minimal command line typing.
  1199.  
  1200.      One common change to the defaults would be to specify a different
  1201.      printer port.  Initially, SOURCE assumes printer port one, LPT1:. 
  1202.      If you are using a serial printer on a COM port or another
  1203.      printer port, change the default setting for the 'r' option. 
  1204.      Replace the word 'lpt1' with 'com1' or 'lpt2' or whatever is
  1205.      appropriate for you.
  1206.  
  1207.      7    SOURCE.PRT
  1208.  
  1209.      This file allows you to define any printer configuration you may
  1210.      have.  Only one copy of SOURCE.PRT is used and this must reside
  1211.      in the same directory as SOURCE.EXE.  This file is required and
  1212.      SOURCE will not run if not found.  SOURCE.PRT can contain printer
  1213.      definitions for up to 20 different printers, though I doubt you
  1214.      will ever need that many.  Once you define your printer, you can
  1215.      delete all other definitions if you like.  However, if you have
  1216.      more than one printer, leave all the necessary definitions.
  1217.  
  1218.                                   Page 19
  1219.                                    SOURCE
  1220.  
  1221.      7.1  Default Printer
  1222.  
  1223.      If you have more than one printer defined, you must make one the
  1224.      default.  This can be done automatically the first time you run
  1225.      SOURCE.  If you would like to change that default at a later
  1226.      time, you must manually edit the SOURCE.PRT file.  To make a
  1227.      printer the default, place the keyword "default" after the
  1228.      printer name.  Example:  'begin HPLJII+ default'.  If you specify
  1229.      more than one default, the fist one will be chosen.  Remember you
  1230.      can use the 'd' option to select a printer other than the default
  1231.      if needed.  If you only have one printer defined in SOURCE.PRT
  1232.      you do not need to specify the keyword "default".
  1233.  
  1234.      7.2  SOURCE.PRT Format
  1235.  
  1236.      Similar to SOURCE.CFG, each definition in SOURCE.PRT begins with
  1237.      the keyword 'begin' followed by a name.  The name may be made up
  1238.      of any characters you can type at the DOS prompt up to 20
  1239.      characters.  The name may not contain spaces.  The printer
  1240.      definition ends with the keyword 'end' on a line by itself.  In
  1241.      between are the lines specifying your printer setup.  The syntax
  1242.      of each line is a field name, a colon, and the value you enter
  1243.      for that field.  Each line can contain only one field.  
  1244.  
  1245.      For those fields that require a printer escape sequence, you can
  1246.      enter the codes as literal characters or by entering the decimal
  1247.      value in square brackets.  You may also enter the code as a
  1248.      combination of both.  For example, the reset code on a Hewlett
  1249.      Packard Laser Jet is [Esc]E.  You might not be able to enter a
  1250.      literal escape character in your editor.  The solution is to use
  1251.      the decimal value in square brackets.  [Esc] is ASCII value 27. 
  1252.      The 'E' can be entered literally.  The two codes together would
  1253.      be entered into the reset field as:  [27]E.  Since the square
  1254.      brackets are being used as special characters by SOURCE, you may
  1255.      not enter them as literal characters in the printer code.  If
  1256.      your code needs the characters '[' or ']', enter the decimal
  1257.      value in square brackets.  The left bracket '[' becomes [91] and
  1258.      the right bracket ']' becomes [93].  The value inside the bracket
  1259.      must be a decimal number from 1 to 255.  If an ASCII character of
  1260.      32 (space) is required, you may enter a literal space or [32].
  1261.  
  1262.      A list of the fields and a description of each is as follows:
  1263.  
  1264.      page width:    This field is the physical page width in inches. 
  1265.                     This will typically be 8.5 for standard letter
  1266.                     sized paper.  If you are using wide computer
  1267.                     paper, this could be 14.  This field is required.
  1268.  
  1269.      page length:   This field is the physical page length in inches. 
  1270.                     Normal letter size paper would be 11.  Legal size
  1271.                     paper would be 14.  This field is required.
  1272.  
  1273.      top margin:    Indicates the top margin in inches.  The first
  1274.                     printed line will be placed this far from the top
  1275.                     of the page.  A standard half inch margin would be
  1276.  
  1277.                                   Page 20
  1278.                                    SOURCE
  1279.  
  1280.                     .5.  This value must be greater than or equal to
  1281.                     the top edge.  This field is required.
  1282.  
  1283.      bottom margin: Indicates the bottom margin in inches.  The last
  1284.                     line printed will be this far from the bottom of
  1285.                     the page.  This value must be greater than or
  1286.                     equal to the bottom edge.  This field is required.
  1287.  
  1288.      left margin:   This is the left margin in inches.  The left most
  1289.                     characters will be this far from the left edge of
  1290.                     the paper.  This value must be greater than or
  1291.                     equal to the left edge.  This field is required.
  1292.  
  1293.      right margin:  This is the right margin in inches.  The right
  1294.                     most characters will be this far from the right
  1295.                     edge of the paper.  This value must be greater
  1296.                     than or equal to the right edge.  This field is
  1297.                     required.
  1298.  
  1299.      top edge:      The top edge is used to define the physical
  1300.                     limitation of the printer to print at the top of
  1301.                     the page.  Laser printers typically are set with a
  1302.                     half inch limit at the top.  By entering .5 here,
  1303.                     the margin specified in 'top margin' will come out
  1304.                     correctly.  This field is required.
  1305.  
  1306.      bottom edge:   The bottom edge is used to define the physical
  1307.                     limitation of the printer to print at the bottom
  1308.                     of the page.  Laser printers typically are set
  1309.                     with a half inch limit at the bottom.  By entering
  1310.                     .5 here, the margin specified in 'bottom margin'
  1311.                     will come out correctly.  This field is required.
  1312.  
  1313.      left edge:     The left edge is used to define the physical
  1314.                     limitation of the printer to print at the left
  1315.                     edge of the page.  Laser printers typically cannot
  1316.                     print on the first quarter inch of the left edge. 
  1317.                     By entering .25 here, the margin specified in
  1318.                     'left margin' will come out correctly.  The exact
  1319.                     value entered may be slightly different.  Try .2
  1320.                     or .3.  Experiment with the proper value to set
  1321.                     your printer up correctly.  This field is
  1322.                     required.
  1323.  
  1324.      right edge:    The right edge is used to define the physical
  1325.                     limitation of the printer to print at the right
  1326.                     edge of the page.  Laser printers typically cannot
  1327.                     print on the last quarter inch of the right edge. 
  1328.                     By entering .25 here, the margin specified in
  1329.                     'right margin' will come out correctly.  The exact
  1330.                     value entered may be slightly different.  Try .2
  1331.                     or .3.  Experiment with the proper value to set
  1332.                     your printer up correctly.  This field is
  1333.                     required.
  1334.  
  1335.  
  1336.                                   Page 21
  1337.                                    SOURCE
  1338.  
  1339.      10 pitch:      This field is used to enter the escape sequence
  1340.                     used by your printer to print text at ten
  1341.                     characters per inch.  Enter the sequence exactly
  1342.                     as shown in your printer manual including case.
  1343.  
  1344.      12 pitch:      This field is used to enter the escape sequence
  1345.                     used by your printer to print text at 12
  1346.                     characters per inch.  Enter the sequence exactly
  1347.                     as shown in your printer manual including case. 
  1348.                     This field is required to use this feature.
  1349.  
  1350.      compressed:    This field is used to enter the escape sequence
  1351.                     used by your printer to print text in compressed
  1352.                     mode.  This is usually 15, 16.66, or 17.  You may
  1353.                     even enter the code for enlarged print such as 5
  1354.                     cpi.  Enter the sequence exactly as shown in your
  1355.                     printer manual including case.  This field is
  1356.                     required to use this feature.
  1357.  
  1358.      comp size:     This field is used to specify the characters per
  1359.                     inch your printer will print while in compressed
  1360.                     mode.  Typically this value will be 15, 16.666, or
  1361.                     17 (or even 5 for enlarged print).  This field is
  1362.                     required to print in compressed mode.
  1363.  
  1364.      underline on:  This is the printer escape sequence for turning
  1365.                     underlining on.  This is used only by the page
  1366.                     header/footer.  This field is required to use this
  1367.                     feature.  If you do not want the header
  1368.                     underlined, leave this field blank.
  1369.  
  1370.      underline off: This is the printer escape sequence for turning
  1371.                     underlining off.  This is used only by the page
  1372.                     header/footer.  This field is required to use this
  1373.                     feature.  If you do not want the header
  1374.                     underlined, leave this field blank.
  1375.  
  1376.      10 high on:    This is the printer escape sequence used to print
  1377.                     comments when the 'c' option is used and the 'p'
  1378.                     option was set to 10.  This code could be almost
  1379.                     anything your printer can do.  Examples are bold,
  1380.                     underline, and italic.  DO NOT use a code that
  1381.                     prints in a different size font like expanded or
  1382.                     double height.  This will cause the file to print
  1383.                     incorrectly.  Whatever code is used must not
  1384.                     change the current print size.  This field is
  1385.                     required to use this feature.
  1386.  
  1387.      10 high off:   This is the printer escape sequence used to turn
  1388.                     off the code used by '10 high on'.  This field is
  1389.                     required to use this feature.
  1390.  
  1391.      12 high on:    This is the printer escape sequence used to print
  1392.                     comments when the 'c' option is used and the 'p'
  1393.                     option was set to 12.  This code could be almost
  1394.  
  1395.                                   Page 22
  1396.                                    SOURCE
  1397.  
  1398.                     anything your printer can do.  Examples are bold,
  1399.                     underline, and italic.  DO NOT use a code that
  1400.                     prints in a different size font like expanded or
  1401.                     double height.  This will cause the file to print
  1402.                     incorrectly.  What ever code is used must not
  1403.                     change the current print size.  This field is
  1404.                     required to use this feature.
  1405.  
  1406.      12 high off:   This is the printer escape sequence used to turn
  1407.                     off the code used by '12 high on'.  This field is
  1408.                     required to use this feature.
  1409.  
  1410.      comp high on:  This is the printer escape sequence used to print
  1411.                     comments when the 'c' option is used and the 'p'
  1412.                     option was set to your compressed value.  This
  1413.                     code could be almost anything your printer can do. 
  1414.                     Examples are bold, underline, and italic.  DO NOT
  1415.                     use a code that prints in a different size font
  1416.                     like expanded or double height.  This will cause
  1417.                     the file to print incorrectly.  What ever code is
  1418.                     used must not change the current print size.  This
  1419.                     field is required to use this feature.
  1420.  
  1421.      comp high off: This is the printer escape sequence used to turn
  1422.                     off the code used by 'comp high on'.  This field
  1423.                     is required to use this feature.
  1424.  
  1425.      init:          This code is sent to the printer before the first
  1426.                     file is printed.  This should contain all required
  1427.                     printer initialization codes to setup your
  1428.                     printer.  Examples would be the initialize printer
  1429.                     code, character set selection (not pitch size),
  1430.                     and print quality (draft, NLQ, etc.).  There
  1431.                     should be nothing in here for selecting pitch or
  1432.                     page orientation since this will be done using the
  1433.                     other codes specific to those settings.  This is
  1434.                     not required.
  1435.  
  1436.      reset:         This code is sent to the printer after the last
  1437.                     file is sent.  This can be blank.  This may be
  1438.                     used to place the printer back into the mode it
  1439.                     was prior to the "Init" code being sent.  This is
  1440.                     not required.
  1441.  
  1442.      portrait:      This is the code sent to the printer to set the
  1443.                     paper orientation to portrait - the usual way the
  1444.                     page is set.  This only applies to laser printers
  1445.                     since dot matrix printers cannot print any other
  1446.                     way using straight text printing (as opposed to
  1447.                     graphics).  This must be filled in if your printer
  1448.                     supports portrait and landscape printing.
  1449.  
  1450.      landscape:     This is the code sent to the printer to set the
  1451.                     paper orientation to landscape - sideways
  1452.                     printing.  This only applies to laser printers
  1453.  
  1454.                                   Page 23
  1455.                                    SOURCE
  1456.  
  1457.                     since dot matrix printers cannot print landscape
  1458.                     without using graphics.  This must be filled in to
  1459.                     make use of the landscape printing feature.
  1460.  
  1461.      6 lpi:         This code is used to print the file at six lines
  1462.                     per inch.  This is the usual default for all
  1463.                     printers.  If your printer does not support eight
  1464.                     lines per inch than you may leave this blank,
  1465.                     otherwise this is required.
  1466.  
  1467.      8 lpi:         This code is used to print the file at eight lines
  1468.                     per inch.  If your printer does not support eight
  1469.                     lines per inch than you may leave this blank,
  1470.                     otherwise this is required to use the feature.
  1471.  
  1472.      There are many relationships between the values placed in the
  1473.      above fields.  The sum of the top and bottom margins must be less
  1474.      than the page length.  The sum of the left and right margins must
  1475.      be less than the page width.  All margins must be greater than or
  1476.      equal to their corresponding edge.  If you only have 10 pitch
  1477.      printing, you may leave all three pitch codes blank.  If you can
  1478.      only print at six lines per inch, you may leave both the six and
  1479.      eight lines per inch codes blank.
  1480.  
  1481.      Certain combinations of print options do not work together on
  1482.      some printers.  For example, Hewlett Packard laser jet printers
  1483.      will not print bold or italic while in compressed print.  This is
  1484.      why there are separate highlight codes for the different pitch
  1485.      sizes.  This allows you to specify bold or italic for 10 and 12
  1486.      pitch and underlining for compressed printing.
  1487.  
  1488.      7.3  Modifying Your Printer
  1489.  
  1490.      As delivered, the SOURCE.PRT file has only a few basic printers
  1491.      within it.  These may not fit your printer completely if at all. 
  1492.      To take full advantage of your printer's abilities, you can edit
  1493.      SOURCE.PRT by placing an entry for your printer within it.  To do
  1494.      so, either reuse an existing entry that is similar to your
  1495.      printer or copy the 'Generic' definition and rename the copy to
  1496.      match your printer name.  Once you have this done, open up your
  1497.      printer's reference manual to the section that describes all the
  1498.      features and their associated escape sequences.  Enter the codes
  1499.      you need into the proper fields and you will be ready to go.  It
  1500.      may take some trial and error to get everything perfect, but it
  1501.      can be done.
  1502.  
  1503.      8    SOURCE.LNG
  1504.  
  1505.      SOURCE.LNG contains the definitions for the language support
  1506.      features of SOURCE.  The two options are comment highlighting and
  1507.      code block grouping or tracing.  The SOURCE.LNG file details what
  1508.      makes a comment, a literal string and character, and what
  1509.      represents a code block.
  1510.  
  1511.      8.1  SOURCE.LNG Location
  1512.  
  1513.                                   Page 24
  1514.                                    SOURCE
  1515.  
  1516.      SOURCE.LNG is not a required file.  If SOURCE can not find
  1517.      SOURCE.LNG, it will ignore the use of the b and c options and
  1518.      continue to work fine.  SOURCE.LNG can actually be located in
  1519.      many different places.  By default, you should place a copy in
  1520.      the same directory as SOURCE.EXE (from now on referred to as the
  1521.      SOURCE directory).  With this setup, running SOURCE from any
  1522.      directory will cause SOURCE to use the definitions in the
  1523.      SOURCE.LNG in the SOURCE directory.
  1524.  
  1525.      In addition to placing SOURCE.LNG in the SOURCE directory, you
  1526.      may also place other copies in any other directory you wish.  For
  1527.      example, you have a 'prog' directory on your hard disk.  If you
  1528.      place another copy of SOURCE.LNG in 'prog' and run SOURCE while
  1529.      your default directory is 'prog', SOURCE will use the SOURCE.LNG
  1530.      file in the 'prog' directory instead of the SOURCE directory.  By
  1531.      tailoring the SOURCE.LNG file to the files in 'prog', you can
  1532.      work with different dialects of the same language.
  1533.  
  1534.      The whole point to allowing this kind of flexibility is that you
  1535.      might be working on different projects that require different
  1536.      language definitions.  By placing tailored SOURCE.LNG files in
  1537.      the different directories, you can easily accomplish the diverse
  1538.      needs.
  1539.  
  1540.      8.2  SOURCE.LNG Format
  1541.  
  1542.      The format of SOURCE.LNG is similar to the other support files. 
  1543.      You begin a language definition with the keyword 'beginlang'
  1544.      followed first by the name of the language and then a list of
  1545.      filename extensions associated with the language.  The language
  1546.      name can be any characters you can type at the DOS prompt.  The
  1547.      name cannot contain spaces and may be up to 20 characters long. 
  1548.      The list of extensions are used to tell SOURCE to treat any file
  1549.      with the given extension as a file of that language.  An example
  1550.      would be:  'beginlang C .c .h'.  This defines a language called
  1551.      "C".  Any file with the extension ".c" or ".h" would be treated
  1552.      as a "C" file.  You may specify up to 10 extensions per language.
  1553.  
  1554.      The second line of the definition is a list of legal characters
  1555.      that may be found in identifiers and keywords.  Identifiers
  1556.      include variables and labels within a program.  These characters
  1557.      are used to tell SOURCE how to discern between to words in a
  1558.      program.  Most languages allow letter and numbers.  Some also
  1559.      allow some puncuation like underscores.  See your language
  1560.      reference.  It should detail the allowable characters.  The list
  1561.      of characters must be contiguous and on one line with no spaces. 
  1562.      You only need to specify either lower or upper case letters, not
  1563.      both.
  1564.  
  1565.      The language definition is completed with the keyword 'endlang'
  1566.      on a line by itself.  This may be followed by the keyword 'case'
  1567.      to indicate that the language is case sensitive and/or 'part' to
  1568.      indicate that keywords only need to match partially.  This is
  1569.      explained in detail below.  Any other keywords, or none at all,
  1570.      indicate that the language is case independent and keywords
  1571.  
  1572.                                   Page 25
  1573.                                    SOURCE
  1574.  
  1575.      require a full match.  Example:  'endlang case' terminates the
  1576.      language definition and specifies case dependency.  'endlang' or
  1577.      'endlang nocase' indicate the end of a case independent language.
  1578.  
  1579.      The SOURCE.LNG file may contain up to twenty language
  1580.      definitions.  You only need those for which you have use, so feel
  1581.      free to delete unneeded languages from the supplied SOURCE.LNG
  1582.      file.
  1583.  
  1584.      8.3  Commenting SOURCE.LNG
  1585.  
  1586.      You may place comments in the SOURCE.LNG file by beginning a line
  1587.      with a semicolon (;).  All text on that line will be ignored by
  1588.      SOURCE.  Do not place comments within a language definition, only
  1589.      before the 'beginlang' line or after the 'endlang' line.
  1590.  
  1591.      8.4  Defining Language Specific Features
  1592.  
  1593.      8.4.1  Comments
  1594.  
  1595.      After the 'beginlang' line, you specify how comments are defined. 
  1596.      This begins with the line ':comment:'.  After the ':comment:'
  1597.      line, you specify three lines.  The first line is the begin
  1598.      comment command, the second is the end comment command.  The
  1599.      third line contains a number from zero to 80 or the letter 'B'. 
  1600.      If a number is specified, it indicates the column that the begin
  1601.      comment command must begin in.  A zero indicates that the comment
  1602.      may begin in any column.  If the letter 'B' is specified, it
  1603.      means that the begin comment marker may begin in any column but
  1604.      mst be the first non-whitespace character on the line.  An
  1605.      example for the 'C' language would be:
  1606.  
  1607.           :comment:
  1608.           /*                       <== Begin comment
  1609.           */                       <== End comment
  1610.           0                        <== Comment may be in any column
  1611.  
  1612.      You may specify more than one comment.  For example, Turbo Pascal
  1613.      allows the following:
  1614.  
  1615.           :comment:
  1616.           {
  1617.           }
  1618.           0
  1619.           (*
  1620.           *)
  1621.           0
  1622.  
  1623.      For languages such as BASIC where comments are terminated by the
  1624.      end of line, specify the begin command on the first line and
  1625.      leave the second line blank.  Example:
  1626.  
  1627.           :comment:
  1628.           REM
  1629.                                    <== This is a blank line
  1630.  
  1631.                                   Page 26
  1632.                                    SOURCE
  1633.  
  1634.           0
  1635.  
  1636.      One of the few examples of specifying a non-zero column number
  1637.      would be for FORTRAN.  Comments in FORTRAN are specified by
  1638.      placing a 'C' in column one.  The definition for this would be:
  1639.  
  1640.           :comment:
  1641.           C                        <== Comments begin with a C
  1642.                                    <== Terminated by end-of-line
  1643.           1                        <== 'C' must be in column one
  1644.  
  1645.      An example of using the 'B' column position is dBASE.  The 'note'
  1646.      and '*' comment markers used for comments must be the first
  1647.      characters on the line (not necessarily column one).  The
  1648.      definition would be:
  1649.  
  1650.           :comment:
  1651.           *                        <== Comment begins with '*'
  1652.                                    <== Terminated by end-of-line
  1653.           B                        <== * must be first character
  1654.           note                     <== Comment begins with 'note'
  1655.                                    <== Terminated by end-of-line
  1656.           B                        <== 'n' must be first character
  1657.  
  1658.      Since blank lines are interpreted as part of the syntax, you may
  1659.      not leave blank lines within a language definition in the
  1660.      SOURCE.LNG file unless it is required as above.  You may define
  1661.      up to 7 comment marker pairs per language.
  1662.  
  1663.      8.4.2  String and Character Literals
  1664.  
  1665.      After defining the comments, you define what makes up literal
  1666.      strings and characters.  This is done just like comments.  You
  1667.      begin with the line ':string:'.  After this line, you enter two
  1668.      lines per string or character.  The first line contains the
  1669.      delimiter used to begin and end a literal string or character
  1670.      (typically a single or double quote).  The second line specifies
  1671.      an escape sequence.  This is the sequence (usually one character)
  1672.      used to allow the delimiter character to be used literally within
  1673.      a string or as a character.  'C' is a good example of this. 
  1674.      Strings are set in double quotes.  To place a double quote within
  1675.      a string, you must precede the double quote with a backslash ("He
  1676.      said \"Hello\"").  The definition would be as follows:
  1677.  
  1678.           :string:
  1679.           "                        <== String Delimiter
  1680.           \                        <== Escape Sequence
  1681.  
  1682.      Characters in 'C' are similar.  Literal characters are defined by
  1683.      single quotes.  To assign a literal single quote in 'C', you
  1684.      precede the literal quote with a backslash ('\'').  The
  1685.      definition would be:
  1686.  
  1687.           :string:
  1688.           '                        <== Character Delimiter
  1689.  
  1690.                                   Page 27
  1691.                                    SOURCE
  1692.  
  1693.           \                        <== Escape Sequence
  1694.  
  1695.      For languages such as Pascal where strings are defined by single
  1696.      quotes and a literal single quote is specified by two single
  1697.      quotes ('It''s mine'), simply place the following definition:
  1698.  
  1699.           :string:
  1700.           '                        <== String & Character Delimiter
  1701.           '                        <== Escape Sequence
  1702.  
  1703.      For languages such as BASIC which do not allow you to place the
  1704.      string delimiter within the string, you would leave the second
  1705.      line blank.
  1706.  
  1707.      You may declare up to five pairs of delimiters per language.  The
  1708.      full string definition for 'C' would be:
  1709.  
  1710.           :string:
  1711.           "
  1712.           \
  1713.           '
  1714.           \
  1715.  
  1716.      8.4.3  Blocks
  1717.  
  1718.      After specifying the string definition, you must define what
  1719.      commands make up blocks.  The keywords defined here are used with
  1720.      the 'b' option to allow block grouping to work.  The definition
  1721.      begins with the keyword ':block:'.  Following are two lines per
  1722.      block.  The first line is the begin block command and the second
  1723.      line is the end block command.  For 'C', this is easy because all
  1724.      blocks are marked the same.  Blocks begin with a left curly brace
  1725.      and end with a right curly brace.  The definition would be:
  1726.  
  1727.           :block:
  1728.           {
  1729.           }
  1730.  
  1731.      For languages like Pascal, you may have numerous block pairs. 
  1732.      Example:
  1733.  
  1734.           :block:
  1735.           begin
  1736.           end
  1737.           record
  1738.           end
  1739.           case
  1740.           end
  1741.           repeat
  1742.           until
  1743.  
  1744.      For most languages, the keyword used to define a block must be
  1745.      entered in its entirety.  You can't specify 
  1746.  
  1747.           beg
  1748.  
  1749.                                   Page 28
  1750.                                    SOURCE
  1751.  
  1752.           ...
  1753.           end
  1754.  
  1755.      in Pascal for example.  You must enter the whole keyword.  A
  1756.      counter example to this is the dBase programming language.  dBase
  1757.      allows you to enter only the first four letters of each keyword. 
  1758.      A 'while' loop could be entered as:
  1759.  
  1760.           do while                           do whil
  1761.           ...                 or             ...
  1762.           enddo                              endd
  1763.  
  1764.      For SOURCE to work with a language such as this, you must specify
  1765.      the "part" or "partial" keyword after the "endlang" keyword at
  1766.      the end of the language definition followed by the number of
  1767.      characters needed.  SOURCE will use this number when comparing
  1768.      the block specified in SOURCE.LNG with words found in the source
  1769.      file.  If the number of characters required is 4, and the keyword
  1770.      is 'endif', SOURCE will recognize 'endi' and 'endif', but not
  1771.      'end', 'endis' or 'endif1'.  If the 'part' keyword is not
  1772.      specified, SOURCE will treat the comment and block keywords in
  1773.      SOURCE.LNG as the full keyword that must be found in the file
  1774.      being printed.
  1775.  
  1776.      8.4.4  Keywords
  1777.  
  1778.      After specifying the block definition, you must define those
  1779.      keywords that you would like highlighted when the 'k' option is
  1780.      active.  The definition begins with the keyword ':keyword:' and
  1781.      is followed by one keyword per line.  The keywords may have
  1782.      spaces in them.  The words may be entered in any order.  You may
  1783.      enter any words you like.  The idea is to highlight reserved
  1784.      words so you can pick out variables and function names easier. 
  1785.      If you have certain functions or other words you would like
  1786.      highlighted, simply add them to the list.  A partial list for 'C'
  1787.      would be:
  1788.  
  1789.           :keyword:
  1790.           auto
  1791.           break
  1792.           case
  1793.           char
  1794.           const
  1795.           continue
  1796.           . . .
  1797.  
  1798.      If the language is case dependant, ensure the keywords are
  1799.      entered in the proper case.  If case independant, the entered
  1800.      case is irrelevant.  If the language supports partial keyword
  1801.      matching (like dBASE), you must still enter the entire keyword. 
  1802.      SOURCE will highlight the entire keyword found in the program. 
  1803.      For example, if you have the keyword 'endtext' in the language
  1804.      definition, SOURCE will highlight 'endt', 'endte', 'endtex', or
  1805.      'endtext' in the program if the 'part 4' definition was placed at
  1806.      the end of language definition.
  1807.  
  1808.                                   Page 29
  1809.                                    SOURCE
  1810.  
  1811.      It is important that the keywords entered into the definition
  1812.      only contain those characters entered on the second line of
  1813.      language definition.  If other characters are used, the keyword
  1814.      may not be highlighted properly.  You may define up to 400
  1815.      keywords per language.
  1816.  
  1817.      8.4.5  Complete Definition
  1818.  
  1819.      Now that you have seen each part of the definition, here is a
  1820.      full definition as it would appear in SOURCE.LNG for 'C'.
  1821.  
  1822.           beginlang C .c .h
  1823.           abcdefghijklmnopqrstuvwxyz0123456789_   <== Valid characters
  1824.           :comment:
  1825.           /*
  1826.           */
  1827.           0                        <== Any column
  1828.           :string:
  1829.           "
  1830.           \
  1831.           '
  1832.           \
  1833.           :block:
  1834.           {
  1835.           }
  1836.           :keyword:
  1837.           auto
  1838.           break
  1839.           case
  1840.           char
  1841.           const
  1842.           continue
  1843.           . . .          <== There are more, but you get the point
  1844.           endlang case
  1845.  
  1846.      For dBase, the full definition would be:
  1847.  
  1848.           beginlang dbase .prg
  1849.           :comment:
  1850.           *
  1851.                                    <== Comments end with end-of-line
  1852.           B                        <== Any column, but first character
  1853.           &&
  1854.                                    <== Comments end with end-of-line
  1855.           0                        <== Comment begins in any column
  1856.           note
  1857.                                    <== Comments end with end-of-line
  1858.           B
  1859.           :string:
  1860.           "
  1861.                                    <== No double quotes in strings
  1862.           :block:
  1863.           do case
  1864.           endcase
  1865.           do while
  1866.  
  1867.                                   Page 30
  1868.                                    SOURCE
  1869.  
  1870.           enddo
  1871.           if
  1872.           endif
  1873.           text
  1874.           endtext
  1875.           :keyword:
  1876.           accept
  1877.           additive
  1878.           alias
  1879.           all
  1880.           all like
  1881.           append
  1882.           append from
  1883.           . . .          <== There are more, but you get the point
  1884.           endlang part 4
  1885.  
  1886.      8.5  General Points
  1887.  
  1888.      Some points to keep in mind when defining a language.  If you
  1889.      have more than one language with the same extension, SOURCE will
  1890.      choose the last.  To override this, you can use the 'x' option on
  1891.      the command line to explicitly choose the language you really
  1892.      need.  
  1893.  
  1894.      While defining a comment or a block, you may not define two or
  1895.      more pairs that begin with the same keyword, regardless of the
  1896.      ending keyword.  However, you may define any number of pairs that
  1897.      have the same ending keyword as long as the beginning keywords
  1898.      are unique.  This should never be a problem because two blocks
  1899.      with the same beginning keyword would lead to a rather ambiguous
  1900.      syntax.
  1901.  
  1902.      When defining blocks for the language, be careful with statements
  1903.      using variable syntax.  A good example is the 'IF' statement in
  1904.      some BASICs.  The syntax can be:
  1905.  
  1906.      1)   IF condition THEN statement [ELSE statement]
  1907.  
  1908.           or
  1909.  
  1910.      2)   IF condition THEN
  1911.             statements
  1912.           [ELSE
  1913.             statements]
  1914.           ENDIF
  1915.  
  1916.      DO NOT specify in your block definitions 'IF' - 'ENDIF' because
  1917.      if SOURCE encounters the first syntax, the line will never
  1918.      terminate because it will not find the 'ENDIF'.  Unfortunately,
  1919.      there is no solution to this.  The only downside is that you will
  1920.      not get trace lines for your IF statements.  If you know for a
  1921.      fact that you did not use the first syntax, then go ahead and
  1922.      specify the 'IF' - 'ENDIF' block.
  1923.  
  1924.      9    Network Support
  1925.  
  1926.                                   Page 31
  1927.                                    SOURCE
  1928.  
  1929.      SOURCE currently has limited network support.  The support
  1930.      offered at this time allows you to define an environment variable
  1931.      called "USER".  SOURCE will determine the value of "USER" and
  1932.      load the named configuration, from SOURCE.CFG, of the same name. 
  1933.      This configuration option will be used as the default set of
  1934.      options instead of "Default".
  1935.  
  1936.      This setup allows SOURCE to be installed on a network server. 
  1937.      Each user would add a line like:
  1938.  
  1939.      set USER=<name>
  1940.  
  1941.      to their "autoexec.bat" file.  The <name> would be a unique
  1942.      identifier for that person.  This could be a last name or
  1943.      initials.  The SOURCE.CFG file in the SOURCE directory would
  1944.      contain a named configuration for each user on the network.
  1945.  
  1946.      Care must be taken to limit write access to the common SOURCE.CFG
  1947.      file.  You may wish to allow only the network supervisor to
  1948.      update this file to prevent problems with each user adding their
  1949.      options.  Data will get lost if two people try editing at the
  1950.      same time.
  1951.  
  1952.      If SOURCE cannot find a named configuration with the same name as
  1953.      the value of "USER", SOURCE will fall back on the "Default" named
  1954.      configuration.
  1955.  
  1956.      Having the environment variable defined is slightly different
  1957.      from using the '-u <name>' command line option.  When using the
  1958.      environment variable, the matching named configuration is used in
  1959.      place of the default named configuration.  When using the 'u'
  1960.      option, the matching named configuration is loaded in addition to
  1961.      the default named configuration.
  1962.  
  1963.      10   Definition of Shareware
  1964.  
  1965.      Shareware distribution gives users a chance to try software
  1966.      before buying it.  If you try a Shareware program and continue
  1967.      using it, you are expected to register.
  1968.  
  1969.      Copyright laws apply to both Shareware and commercial software,
  1970.      and the copyright holder retains all rights, with a few specific
  1971.      exceptions as stated below.  Shareware authors are accomplished
  1972.      programmers, just like commercial authors, and the programs are
  1973.      of comparable quality.  (In both cases, there are good programs
  1974.      and bad ones!)  The main difference is in the method of
  1975.      distribution.  The author specifically grants the right to copy
  1976.      and distribute the software, either to all and sundry or to a
  1977.      specific group.  For example, some authors require written
  1978.      permission before a commercial disk vendor may copy their
  1979.      Shareware.
  1980.  
  1981.      Shareware is a distribution method, not a type of software.  You
  1982.      should find software that suits your needs and pocketbook,
  1983.      whether it's commercial or Shareware.  The Shareware system makes
  1984.  
  1985.                                   Page 32
  1986.                                    SOURCE
  1987.  
  1988.      fitting your needs easier, because you can try before you buy.  
  1989.      And because the overhead is low, prices are low also.  Shareware
  1990.      has the ultimate money-back guarantee -- if you don't use the
  1991.      product, you don't pay for it.
  1992.  
  1993.      11   Disclaimer - Agreement For Trying SOURCE
  1994.  
  1995.      Users of SOURCE must accept this disclaimer of warranty:
  1996.  
  1997.           "SOURCE is supplied as is.  The author disclaims all
  1998.           warranties, expressed or implied, including, without
  1999.           limitation, the warranties of merchantability and of
  2000.           fitness for any purpose.  The author assumes no
  2001.           liability for damages, direct or consequential, which
  2002.           may result from the use of SOURCE."
  2003.  
  2004.      SOURCE is a "shareware program" and is provided at no charge to
  2005.      the user for evaluation.  Feel free to share it with your
  2006.      friends, but please do not give it away altered or as part of
  2007.      another system.  The essence of "user-supported" software is to
  2008.      provide personal computer users with quality software without
  2009.      high prices, and yet to provide incentive for programmers to
  2010.      continue to develop new products.  If you find this program
  2011.      useful and find that you are using SOURCE and continue to use
  2012.      SOURCE after a reasonable trial period, you must make a
  2013.      registration payment to Rick Maddy.  
  2014.  
  2015.      The registration fee will license one copy for use on any one
  2016.      computer at any one time.  You must treat this software just like
  2017.      a book.  An example is that this software may be used by any
  2018.      number of people and may be freely moved from one computer
  2019.      location to another, so long as there is no possibility of it
  2020.      being used at one location while it's being used at another. 
  2021.      Just as a book cannot be read by two different persons at the
  2022.      same time.  Site-License arrangements may be made by contacting
  2023.      Rick Maddy.
  2024.  
  2025.      You are encouraged to pass a copy of SOURCE along to your friends
  2026.      for evaluation.  Please encourage them to register their copy if
  2027.      they find that they can use it.  All registered users will
  2028.      receive a copy of the latest version of SOURCE in your name,
  2029.      printed documentation, a quick reference card, upgrade notices
  2030.      and discounts, and customer support.
  2031.  
  2032.      12   Registering
  2033.  
  2034.      You may use SOURCE for a free 30 day trial period.  If you
  2035.      continue to use SOURCE after the 30 day trial period, you are
  2036.      required to register your copy of SOURCE.
  2037.  
  2038.      When you register SOURCE you will be sent a disk with the latest
  2039.      version of SOURCE in your name, printed documentation, a quick
  2040.      reference card, upgrade notices and discounts, and customer
  2041.      support.  The cost of registration is $20.00.
  2042.  
  2043.  
  2044.                                   Page 33
  2045.                                    SOURCE
  2046.  
  2047.      You can order directly from Rick Maddy by completing the
  2048.      registration form and mailing it and a check to:
  2049.  
  2050.                          Rick Maddy
  2051.                          7111 Kurth Lane
  2052.                          Seabrook, MD 20706
  2053.  
  2054.      The registration form is at the end of this document and in a
  2055.      separate file called register.txt.
  2056.  
  2057.      If you have any questions or comments, feel free to call Rick
  2058.      Maddy at (301) 794-8466 or leave a mail message on Compuserve at
  2059.      76460,1601.
  2060.  
  2061.      13   Future Enhancements
  2062.  
  2063.      I have a few ideas for making SOURCE an even better utility. 
  2064.      Here is a brief list:
  2065.  
  2066.           - Full screen interface to replace command line.
  2067.           - Full screen programs for editing printer, language, and
  2068.             configuration files.
  2069.           - Windows 3.1 version.
  2070.           - Optional log file of all printed files.
  2071.           - Expanded file selection (i.e. date range).
  2072.           - Print files in sorted order by name, size, date, etc.
  2073.           - Expanded network/multi-user support.
  2074.  
  2075.      I am open to any comments or suggestions for improvements or
  2076.      additions to SOURCE.  Please drop me a line.
  2077.  
  2078.      14   Acknowledgements
  2079.  
  2080.      I would like to thank the following people for all there help in
  2081.      finishing this program:
  2082.  
  2083.           - Scott Sidel for his help with making this program easier
  2084.             to use and writing this documentation.
  2085.  
  2086.           - Robert Harvey and William Moussiaux for beta testing
  2087.             SOURCE.
  2088.  
  2089.           - All the kind people who answered my questions about OS/2
  2090.             on Compuserve.
  2091.  
  2092.      15   Release History
  2093.  
  2094.      10/14/92       Version 1.01
  2095.           - Original public release.
  2096.  
  2097.      10/21/92       Version 1.1
  2098.           - Fixed comment highlighting bug.  If two comment markers
  2099.             were found one character apart, SOURCE picked the one
  2100.             defined first in SOURCE.LNG instead of the first on the
  2101.             line.  Example in C:
  2102.  
  2103.                                   Page 34
  2104.                                    SOURCE
  2105.  
  2106.                     //*** Comment ***
  2107.  
  2108.             SOURCE found the /* marker and then the // marker.  Since
  2109.             the starting position was only one character apart, SOURCE
  2110.             chose the /* marker since it was defined first.
  2111.  
  2112.           - Added additional comment support by adding the 'B'
  2113.             position specifier.  This allows you to define a comment
  2114.             to be anywhere on the line as long as it is the first non-
  2115.             whitespace character found.  Example in dBASE:
  2116.  
  2117.                     * This is a comment
  2118.                     A = B * C
  2119.  
  2120.             The '*' is a comment marker.  The entire first line is a
  2121.             comment.  The second line does not contain a comment since
  2122.             the '*' is not the first character.  Version 1.01 would
  2123.             have highlighted the '*' and the 'C' on the second line
  2124.             since the comment position was specified to be 0, any
  2125.             position.
  2126.  
  2127.           - Fixed Append/Overwrite mode with numerous files.  When
  2128.             specifying overwrite mode with a list of files, the output
  2129.             of each file overwrote the output of the previous file. 
  2130.             Now, each subsequent file's output is appended to the
  2131.             first file's output.
  2132.  
  2133.           - Fixed a bug that caused comment highlighting to always be
  2134.             on if keyword highlighting was on.
  2135.  
  2136.           - Fixed a bug that caused keyword highlighting to work
  2137.             incorrectly if comment highlighting and block tracing were
  2138.             turned off.
  2139.  
  2140.           - Added a print statement explaining which language SOURCE
  2141.             will default to for an extension defined in more than one
  2142.             language.
  2143.  
  2144.      10/30/92       Version 1.2
  2145.           - Changed 'B' option to allow user to specify whether the
  2146.             letters of the banner are made up of the specific letter
  2147.             or asterisks.
  2148.  
  2149.           - Changed how SOURCE performs query or verify so all files
  2150.             are checked before any printing is done.
  2151.  
  2152.           - Enhanced a few error messages so they are more clear.
  2153.  
  2154.           - Enhanced the 'r' option to allow wildcards when
  2155.             redirecting to a file.  The functionality is now
  2156.             equivalent to the DOS COPY command.
  2157.  
  2158.      11/07/92       Version 1.3
  2159.           - Changed how partial keyword matching is implemented.  This
  2160.             change now requires that the full keywords be listed in
  2161.  
  2162.                                   Page 35
  2163.             the SOURCE.LNG file for languages like dBASE and Clipper. 
  2164.             This makes their definition like all other languages
  2165.             except for the 'part #' after the 'endlang' line in the
  2166.             definition.  This change will lower the number of
  2167.             extraneous keyword highlighting occurrences.
  2168.  
  2169.           - Fixed a small bug that only occured if you had a [91] or
  2170.             [95] in the 8 lpi line of a printer definition.
  2171.  
  2172.           - Fixed a small bug that prevented SOURCE from reporting an
  2173.             error if the printer code was too long for a given
  2174.             attribute.
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198.  
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.  
  2211.  
  2212.  
  2213.  
  2214.  
  2215.  
  2216.  
  2217.  
  2218.  
  2219.  
  2220.  
  2221.  
  2222.                             SOURCE REGISTRATION
  2223.  
  2224.      Remit to:                From:
  2225.  
  2226.      Rick Maddy               Name:__________________________________
  2227.      7111 Kurth Lane          Company:_______________________________
  2228.      Seabrook, Md 20706       Street:________________________________
  2229.      (301) 794-8466           City:__________________________________
  2230.                               State/Zip:_____________________________
  2231.      Compuserve Id:           Phone:_________________________________
  2232.      76460, 1601
  2233.                               Name to register in:
  2234.                               (Up to 40 characters)
  2235.  
  2236.                               _______________________________________
  2237.  
  2238.  
  2239.      Qty:                          Unit Price     Total:
  2240.  
  2241.      ____ SOURCE Software          $20.00         ________
  2242.  
  2243.  
  2244.      Specify Disk Size:
  2245.  
  2246.      _____  5 1/4"       _____  3 1/2"
  2247.  
  2248.  
  2249.      Current Version of Source:______________________________________
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.