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