home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 18 / CD_ASCQ_18_111294_W.iso / dos / prg / c / xref32 / xref32.txt < prev   
Text File  |  1994-09-01  |  41KB  |  1,164 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.                                         Xref
  21.                        The C language cross reference utility.
  22.                           (c) 1991-1994 by David Archibald.
  23.  
  24.  
  25.                                     Users Manual
  26.                                      Version 3.2
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.                                  _______
  41.                             ____|__     |                (R)
  42.                          --|       |    |-------------------
  43.                            |   ____|__  |  Association of
  44.                            |  |       |_|  Shareware
  45.                            |__|   o   |    Professionals
  46.                          -----|   |   |---------------------
  47.                               |___|___|    MEMBER
  48.  
  49.  
  50.  
  51.                    Xref - C language cross-reference utility. v3.2
  52.  
  53.  
  54.                                   Table of Contents
  55.  
  56.                     Introduction:
  57.                          What Xref does.......................101
  58.                          Registration benefits................102
  59.                          Registration and
  60.                          licensing information............... 103
  61.                          System requirements................. 104
  62.                          Installing Xref..................... 105
  63.                     Program output:
  64.                          Global variables and constants...... 201
  65.                          Summary list of functions........... 202
  66.                          Verbose list of functions........... 203
  67.                          Function tree....................... 204
  68.                     Running Xref:
  69.                          Command line syntax................. 301
  70.                          Module names........................ 302
  71.                          x command. Suppress function tree... 303
  72.                          t command. Suppress all but
  73.                            function tree..................... 304
  74.                          s command. Suppress all but
  75.                            function summary.................. 305
  76.                          w command. Output line length....... 306
  77.                          l command. Add identifiers.......... 307
  78.                          i command. Xref <...> include files. 308
  79.                          n command. Do not xref "..."
  80.                            include files..................... 309
  81.                          f command. Format verbose output.... 310
  82.                          p command. Source and header
  83.                            search paths.......................311
  84.                          o command. Functions without
  85.                            line-of-origins................... 312
  86.                          m command. Xrefing Windows programs. 313
  87.                          c command. Command file............. 314
  88.                          d and e commands. Section delimit
  89.                            characters.........................315
  90.                     Command line examples.................... 316
  91.                     The reserved word files: RES_WORD.TXT and
  92.                     WIN_RES.TXT.............................. 401
  93.                     What Xref ignores........................ 501
  94.                     Technical support........................ 601
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.                                     Page 1 of 18
  110.  
  111.  
  112.  
  113.                    Xref - C language cross-reference utility. v3.2
  114.  
  115.  
  116.           101  What it does.
  117.  
  118.                Xref is a cross-reference utility program for the C
  119.                programming language. It will read any number of your C text
  120.                modules and send the following to standard output:
  121.  
  122.                o A list of the module's global variables and constants,
  123.                  along with the line numbers they appear on.
  124.                o A summary listing of the module's functions.
  125.                o A verbose list of all the module's functions that
  126.                  includes:
  127.                     - The name of the module in which it originates.
  128.                     - Line of origin.
  129.                     - What line numbers the function is referenced on, and
  130.                          by which modules.
  131.                     - What functions, and the modules they are in, it
  132.                          references.
  133.                     - What local and global variables appear in the
  134.                          function.
  135.                o A tree that displays all of the functions calling
  136.                  hierarchy.
  137.  
  138.           ---------------------------------------------------------------
  139.           Note: To send the output to your printer or to a file, use DOS
  140.                 redirection (i.e. xref filename >LPT1, would send output
  141.                 to your printer).
  142.           ---------------------------------------------------------------
  143.  
  144.                A cross-reference listing can be helpful for:
  145.                     o Debugging. For example, it can tell you:
  146.                          - Which functions reference another.
  147.                          - What global variables are used in a function.
  148.                          - What functions use a certain variable.
  149.                     o Documenting your programs. It gives you a complete
  150.                       listing of your variables and functions, and where
  151.                       they are used.
  152.  
  153.                     o Program maintenance and modification. A cross-
  154.                       reference listing makes following a program's flow
  155.                       easier, and will show which parts of a program will
  156.                       be affected by, for example, changing a "define"
  157.                       statement. This means less time wasted deciphering a
  158.                       program, and fewer bugs.
  159.  
  160.           Xref is not C++ compatible at this time, but it will ignore C++
  161.           keywords and comments (i.e. "//").
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.                                     Page 2 of 18
  172.  
  173.  
  174.  
  175.                    Xref - C language cross-reference utility. v3.2
  176.  
  177.  
  178.           102  Registration benefits.
  179.  
  180.                Registered users will receive:
  181.  
  182.                o    The latest version of Xref (with the registration
  183.                     reminders removed).
  184.                o    The DOS memory extender version of Xref that can access
  185.                     up to 4 gigabytes of memory.
  186.                o    The printed manual.
  187.                o    A free Source file listing program. This Xref
  188.                     compatible program lists your files with line numbers,
  189.                     etc.
  190.                o    Free telephone support for three months.
  191.                o    Future updates, as they become available.
  192.  
  193.  
  194.           103  Registration and licensing information.
  195.  
  196.                Xref is a Shareware program, and copies of this program and
  197.                it's documentation may be freely distributed.
  198.  
  199.                Xref and this document are copyrighted and may not be
  200.                modified in any manner.
  201.  
  202.                You are licensed to use Xref for a thirty (30) day
  203.                evaluation period. Unregistered use of Xref after this trial
  204.                period is a violation of federal copyright laws.
  205.  
  206.                Individual copies may be licensed for $34.95 (see the
  207.                REGISTER.TXT file). You may access Xref through a network,
  208.                provided that site licenses have been obtained for all
  209.                workstations that will be using the software (see the
  210.                SITELICE.TXT file).
  211.  
  212.                This program is produced by a member of the Association of
  213.                Shareware Professionals (ASP). ASP wants to make sure that
  214.                the shareware principle works for you. If you are unable to
  215.                resolve a shareware-related problem with an ASP member by
  216.                contacting the member directly, ASP may be able to help. The
  217.                ASP Ombudsman can help you resolve a dispute or problem with
  218.                an ASP member, but does not provide technical support for
  219.                members' products. Please write to the ASP Ombudsman at 545
  220.                Grover Road, Muskegon, MI 49442 or send a CompuServe message
  221.                via CompuServe Mail to ASP Ombudsman 70007,3536.
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.                                     Page 3 of 18
  234.  
  235.  
  236.  
  237.                    Xref - C language cross-reference utility. v3.2
  238.  
  239.  
  240.                          Invoice/Registration Form For Xref
  241.  
  242.           Individual Registration fee                   $   34.95
  243.  
  244.                   Name:________________________________________________
  245.  
  246.                Company:________________________________________________
  247.  
  248.                Address:________________________________________________
  249.  
  250.                   City:________________________________________________
  251.  
  252.             State, Zip:________________________________________________
  253.  
  254.              E-mail address:___________________________________________
  255.  
  256.            Telephone number:___________________________________________
  257.  
  258.           Disk size:
  259.                    5 1/4:_____     3 1/2:_____    Either size:_____
  260.  
  261.           Ordering by check: Send this form and a check to:
  262.                          DA Software
  263.                          3717 Aldon Lane
  264.                          Flint, MI 48506
  265.  
  266.           Ordering with CompuServe's Software Registration Service:
  267.                          Enter GO SWREG at the ! prompt and follow the
  268.                          menus. Xref's registration ID is 1394.
  269.  
  270.           Credit card orders only:
  271.  
  272.           You can order with MC, Visa, Amex, or Discover from Public
  273.           (software) Library by calling 800-2424-PsL or 713-524-6394 or by
  274.           FAX to 713-524-6398 or by CIS Email to 71355,470.
  275.  
  276.                Please refer to product number: 11372.
  277.  
  278.           You can also mail credit card orders to PsL at P.O.Box 35705,
  279.           Houston, TX 77235-5705.
  280.  
  281.           THE ABOVE NUMBERS ARE FOR ORDERS ONLY.
  282.  
  283.           Any questions about the status of the shipment of the order,
  284.           refunds, registration options, product details, technical
  285.           support, volume discounts, dealer pricing, site licenses, etc,
  286.           must be directed to DA Software 3717 Aldon Lane Flint, MI 48506.
  287.  
  288.           To insure that you get the latest version, PsL will notify us the
  289.           day of your order and we will ship the product directly to you.
  290.  
  291.  
  292.  
  293.  
  294.  
  295.                                     Page 4 of 18
  296.  
  297.  
  298.  
  299.                    Xref - C language cross-reference utility. v3.2
  300.  
  301.  
  302.           104  System requirements.
  303.  
  304.                Config.sys file:
  305.  
  306.                  Xref can use up to 60 file handles. The recommended
  307.                  minimum number of handles is 20.
  308.  
  309.                  You can change the number of available handles by
  310.                  modifying the "files" statement in your config.sys file
  311.                  yourself, or allow the Xref's install program do it for
  312.                  you. To make the change yourself, use EDIT, or another
  313.                  ASCII text editor, and change the "files" statement to
  314.                  read "files=xx" ("xx" being the number of file handles).
  315.  
  316.                Memory limits:
  317.  
  318.                  There is no minimum memory, but the number of modules you
  319.                  can cross-reference is dependent on the amount of memory
  320.                  you have. (The registered version of Xref uses a DOS
  321.                  memory extender that can access up to four gigibytes of
  322.                  memory [a 80386 or higher is required]. The unregistered
  323.                  version does not include the DOS memory extender and can
  324.                  only use up to 640k of memory.)
  325.  
  326.                  The majority of program data is stored in a temporary
  327.                  file created by Xref, but some data remains in memory
  328.                  (mostly global variables and function names). If Xref
  329.                  runs out of memory it will output an error message to
  330.                  this effect, and terminate. (The registered version of
  331.                  Xref was tested by cross-referencing over 425 modules,
  332.                  which totaled 3.5 megabytes of C code, on a computer
  333.                  system with 8 megabytes of memory. No out-of-memory error
  334.                  was encountered.)
  335.  
  336.                  If you do run out of memory, and you are using the "i"
  337.                  command (which cross-references the standard header files
  338.                  along with your modules), try running Xref without this
  339.                  command. Standard header files have a large number of
  340.                  global defines and variables which are not stored in the
  341.                  temporary file, and remain in memory.
  342.  
  343.           105  Installing Xref.
  344.  
  345.                To install Xref, follow these steps:
  346.  
  347.                1.At the DOS prompt, change to the drive  on which you have
  348.                  the Xref package.
  349.                2.Type install and press ENTER.
  350.                3.Follow  the   online   instructions   to   complete   the
  351.                  installation.
  352.  
  353.                For a description of the installed files, see PACKING.LST.
  354.  
  355.  
  356.  
  357.                                     Page 5 of 18
  358.  
  359.  
  360.  
  361.                    Xref - C language cross-reference utility. v3.2
  362.  
  363.  
  364.           201  Global variables and constants.
  365.  
  366.                Xref assumes that anything declared outside a function's
  367.                boundaries (from the function name to the function's closing
  368.                brace) is a global variable or constant.
  369.  
  370.                The global variable and constant cross-reference section has
  371.                the following format:
  372.  
  373.           variable name [type]
  374.                {module name}  what line numbers the variable appears on in
  375.                               this the module.
  376.  
  377.                Sample output:
  378.  
  379.                char_pnt [char]
  380.                  {example.c   }    *1
  381.                  {explfile.c  }    10   *11   16  28   35   42
  382.                cnt [int]
  383.                  {example.c   }     4    11  *32
  384.                  {explfile.c  }    *8    14
  385.  
  386.                An "*" appearing before a line number indicates that the
  387.                variable is to the left of an assignment operator (i.e. "="
  388.                or "\=", etc.) on that line.
  389.  
  390.           ---------------------------------------------------------------
  391.           Note: a variable, constant, or a function is tagged as [unknown]
  392.           when it's data type is not known.
  393.           ---------------------------------------------------------------
  394.  
  395.           202  Summary list of functions.
  396.  
  397.                The summary list section has the following format:
  398.  
  399.           {module name}  :  line-of-origin  :  function name() [type]
  400.  
  401.           ---------------------------------------------------------------
  402.           Note: a line-of-origin of [NONE] indicates that the function was
  403.           reference, but it did not appear in any of the modules cross-
  404.           referenced.
  405.           ---------------------------------------------------------------
  406.                Sample output:
  407.                {example.c   }  :    [NONE]   :    getch()  [int]
  408.                {explfile.c  }  :     32      :    is_it_a_comma()  [int]
  409.                {example.c   }  :     7       :    main()  [void]
  410.                {explfile.c  }  :     39      :    not_comma()  [char]
  411.                {example.c   }  :     25      :    open_file()  [FILE]
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.                                     Page 6 of 18
  420.  
  421.  
  422.  
  423.                    Xref - C language cross-reference utility. v3.2
  424.  
  425.  
  426.           203  Verbose list of functions.
  427.  
  428.                The verbose list of functions has the following format:
  429.  
  430.           ---------------------------------------------------------------
  431.           Note: only those functions that have a line-of-origin are listed.
  432.           ---------------------------------------------------------------
  433.  
  434.           =================================================================
  435.                function name   [type]  :   {module name}  :  line-of-origin
  436.           =================================================================
  437.           USERS:
  438.                     {module name}  what line numbers in this module
  439.                                    reference this function.
  440.           -----------------------------------------------------------------
  441.                   CALLS:
  442.                    {module name}   function name()   {module}    function()
  443.           -----------------------------------------------------------------
  444.                   LOCAL VARIABLES:
  445.                     variable name [type]
  446.                          what line numbers in this function it appears on.
  447.           -----------------------------------------------------------------
  448.                   GLOBAL VARIABLES:
  449.                     variable name [type]
  450.                          what line numbers in this function it appears on.
  451.  
  452.                USERS are a list of the line numbers in a module that
  453.                reference this function.
  454.  
  455.                CALLS are other functions that this function references.
  456.  
  457.           ---------------------------------------------------------------
  458.           Note: A function name is truncated if it's length exceeds 20
  459.           characters. When this occurs, the truncated name will be followed
  460.           by an ellipsis of three periods.
  461.           [i.e. {filename.c  }Very_very_long_na...()]
  462.           ---------------------------------------------------------------
  463.  
  464.                LOCAL VARIABLES are any variable or constant that falls
  465.                between a function's name and it's closing brace.
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.                                     Page 7 of 18
  482.  
  483.  
  484.  
  485.                    Xref - C language cross-reference utility. v3.2
  486.  
  487.  
  488.           ---------------------------------------------------------------
  489.           Note: As with your C compiler, when a local and global variable
  490.           have the same name, the global variable is hidden, and all line
  491.           numbers that it appears on are assigned to the local variable.
  492.           Also, if the local variable is declared with an unknown specifier
  493.           type (for example, a typedef from a header file that was not
  494.           cross-referenced) it will be processed as a global variable.
  495.           ---------------------------------------------------------------
  496.  
  497.                GLOBAL VARIABLES are a list of any global variables or
  498.                constants that appear in this function. (This section is
  499.                suppressed when a function does not use any global
  500.                variables.)
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.                                     Page 8 of 18
  544.  
  545.  
  546.  
  547.                    Xref - C language cross-reference utility. v3.2
  548.  
  549.  
  550.                Sample verbose output:
  551.  
  552.           =================================================================
  553.           main()  [void] : {example.c} : 7
  554.           =================================================================
  555.           USERS:  [NONE]
  556.           -----------------------------------------------------------------
  557.              CALLS:
  558.              {example.c   }  close_file()  {explfile.c  }   not_comma()
  559.              {example.c   }   get_input()  {example.c   }   open_file()
  560.           -----------------------------------------------------------------
  561.              LOCAL VARIABLES:
  562.                argc [int]
  563.                    7   *10
  564.                column [int]
  565.                   *13   19
  566.                file_name [char]
  567.                    12  *17
  568.                file_pnt [FILE]
  569.                   *14   18   21
  570.           -----------------------------------------------------------------
  571.              GLOBAL VARIABLES:
  572.                cnt [int]
  573.                   11
  574.           =================================================================
  575.           not_comma()  [char] : {explfile.c} : 39
  576.           =================================================================
  577.           USERS:
  578.                   {explfile.c  }  13
  579.           -----------------------------------------------------------------
  580.              CALLS:  [NONE]
  581.           -----------------------------------------------------------------
  582.              LOCAL VARIABLES:
  583.                [NONE]
  584.           -----------------------------------------------------------------
  585.              GLOBAL VARIABLES:
  586.              char_pnt [char]
  587.                   *42
  588.  
  589.           ---------------------------------------------------------------
  590.           Note: As with the global variables, an "*" appearing before a
  591.           line number indicates that the variable is to the left of an
  592.           assignment operator (i.e. "=" or "\=", etc.) on that line.
  593.           ---------------------------------------------------------------
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.                                     Page 9 of 18
  606.  
  607.  
  608.  
  609.                    Xref - C language cross-reference utility. v3.2
  610.  
  611.  
  612.           204  Function tree.
  613.  
  614.                The function tree option generates a tree representation of
  615.                all of the module's function calls (or more simply stated:
  616.                who's calling who).
  617.  
  618.                The following is a sample tree for two modules:
  619.  
  620.                example.c  :main
  621.                example.c  :|_close_file
  622.                example.c  :|_output_char
  623.                example.c  :|_get_input
  624.                explfile.c :|  |_not_comma
  625.                explfile.c :|  |_is_it_a_comma
  626.                explfile.c :|    |_is_it_a_comma*
  627.                           :|
  628.                example.c  :|_open_file
  629.  
  630.           ---------------------------------------------------------------
  631.           Note: An "*" following a function name indicates that this is a
  632.           recursive function call.
  633.           ---------------------------------------------------------------
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.                                     Page 10 of 18
  668.  
  669.  
  670.  
  671.                    Xref - C language cross-reference utility. v3.2
  672.  
  673.  
  674.           301  The command line syntax.
  675.  
  676.                xref [-c filename -d -e -f \... -i -l -m -n -o
  677.                -p path;path... -s -t -w -x] sourcefilespec1
  678.                [sourcefilespec2...]
  679.  
  680.           ---------------------------------------------------------------
  681.           Note: A space must separate each command and source file name.
  682.           Also, Xref is not case sensitive, so commands can be entered as
  683.           upper or lower case letters.
  684.           ---------------------------------------------------------------
  685.  
  686.           302  Module names.
  687.  
  688.                Xref will accept any legal DOS file name. Standard DOS
  689.                pattern checking is supported ("?" and "*"). The file names
  690.                must be the last entries on the command line.
  691.  
  692.           ---------------------------------------------------------------
  693.           Note: Also, your text modules must be free of syntax errors,
  694.           otherwise the resulting output can be unpredictable.
  695.           ---------------------------------------------------------------
  696.  
  697.           303  x command. Suppress function tree.
  698.  
  699.                The "x" command suppresses output of the function tree.
  700.  
  701.           304  t command. Suppress all but function tree.
  702.  
  703.                The "t" command suppresses output of everything except the
  704.                function tree.
  705.  
  706.           305  s command. Suppress all but function summary.
  707.  
  708.                The "s" command suppresses all output except the function
  709.                summary.
  710.  
  711.           306  w command. Output line length.
  712.  
  713.                The default line width for output is 80 characters, but with
  714.                the "w" command you can set the line width to 132 characters
  715.                (useful if you have a wide carriage printer).
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.                                     Page 11 of 18
  730.  
  731.  
  732.  
  733.                    Xref - C language cross-reference utility. v3.2
  734.  
  735.  
  736.           307  l command. Add identifiers.
  737.  
  738.                The "l" command gives you an easy way to add identifiers
  739.                from your cross-referenced modules to the RES_WORD.TXT file
  740.                (Xref ignores anything in a module that appears in this
  741.                file. See section 401). The cross-reference listing is
  742.                suppressed when this command is entered.
  743.  
  744.                The identifiers--function names, global variables, and
  745.                defines--are displayed one at a time, and you can choose one
  746.                of three options:
  747.                     o Press "a" to add the item to the RES_WORD.TXT file.
  748.                     o Press "q" to quit and stop adding to the file.
  749.                     o Press any other key to skip the item.
  750.  
  751.           308  i command. Xref <...> include files.
  752.  
  753.                By default, Xref does not cross-reference the include files
  754.                enclosed by "<>"s (i.e. #include <stdio.h>). The "i" command
  755.                lets you include these files in the cross-reference.
  756.  
  757.                Xref keeps track of the include file names so that each file
  758.                is cross-referenced only once. It will cross-reference
  759.                nested include files up to 60 files deep, or to the limit of
  760.                file handles in your config.sys file.
  761.  
  762.           309  n command. Do not xref "..." include files.
  763.  
  764.                By default, Xref cross-references the include files enclosed
  765.                in double quotes (i.e. #include "mydef.h"). You can prevent
  766.                these files being read and cross-referenced with the "n"
  767.                command.
  768.  
  769.                Like the "i" command, Xref keeps track of the include file
  770.                names so that they are cross-referenced only once.
  771.  
  772.           ---------------------------------------------------------------
  773.           Note: Xref can not cross-reference include files when identifiers
  774.           are used in place of filenames (it does not preprocess define
  775.           statements). For example:
  776.                #define F_NAME "mydef.h"
  777.                #include F_NAME          /* won't cross-reference! */
  778.           ---------------------------------------------------------------
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.                                     Page 12 of 18
  792.  
  793.  
  794.  
  795.                    Xref - C language cross-reference utility. v3.2
  796.  
  797.  
  798.           310  f command. Format verbose output.
  799.  
  800.                This command allows you to format the output of the verbose
  801.                function section with linefeeds and formfeeds. The format
  802.                line uses C's standard newline and formfeed commands. For
  803.                example:
  804.  
  805.                     -f \n\n\n
  806.  
  807.                and
  808.  
  809.                     -f \f
  810.  
  811.                The first example would output three newlines between each
  812.                function's cross-reference listing. The second example would
  813.                output a formfeed after each function, placing each
  814.                function's cross-reference listing on a separate page.
  815.  
  816.                The only formatting commands that are recognized are the
  817.                newline and formfeed commands, and there must be a space
  818.                between the "f" command and the format string. No spaces may
  819.                appear in the formatting string.
  820.  
  821.           311  p command. Source and header search paths.
  822.  
  823.                Xref searches the file paths for source and header files in
  824.                the following order:
  825.                o    The path entered with the file names or included with
  826.                     the header files (i.e. "c:\text\myprog.c" or "#include
  827.                     <c:\headers\myheader.h>").
  828.                o    The default directory of the default drive.
  829.                o    The root directory of the default drive.
  830.                o    The paths entered with the "p" command.
  831.  
  832.                The "p" command has the following syntax:
  833.  
  834.                     -p c:\dos\;c:\prg\text\
  835.  
  836.                Each path name must be separate by a ";" (no spaces). You
  837.                can specify up to 20 alternate path names.
  838.  
  839.           312  o command. Functions without line-of-origins.
  840.  
  841.                By default, Xref does not produce a listing in the verbose
  842.                function section for functions that do not have a line-of-
  843.                origin. The "o" command will cause all functions to be
  844.                listed in the verbose section, whether they have a line-of-
  845.                origin or not.
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.                                     Page 13 of 18
  854.  
  855.  
  856.  
  857.                    Xref - C language cross-reference utility. v3.2
  858.  
  859.  
  860.           313  m command. Xrefing Windows programs.
  861.  
  862.                This command is useful when you are cross-referencing
  863.                Windows programs. The "m" command causes, Xref to load the
  864.                reserved word file WIN_RES.TXT in addition to RES_WORD.TXT.
  865.                Like RES_WORD.TXT, this file contains reserved and special
  866.                words, but these are distinct to Windows programs. Xref will
  867.                ignore these words.
  868.  
  869.                The "m" command also changes the output in the function tree
  870.                section. Instead of starting the tree output with "main," it
  871.                will begin with "WinMain" (there being no "main" in Windows'
  872.                programs). Xref also keeps track of all WNDCLASS assignments
  873.                to xxx.lpfnWndProc's, and treats the procedures that follow
  874.                as if they were also "main"s. For example:
  875.  
  876.                     wnd.lpfnWndProc = WinProc;
  877.  
  878.                "WinProc" would begin a function tree heading the same as if
  879.                it were "main." Xref will do this--treat each as a "main,"
  880.                and begin a new tree heading--for all lpfnWndProc
  881.                assignments that appear in the module(s).
  882.  
  883.           314  c command. Command file.
  884.  
  885.                Because of DOS's command line length limit, you may have a
  886.                hard time fitting all of the commands, paths, and filenames
  887.                on the command line. It can also be time consuming (not to
  888.                mention annoying) typing the same command line again and
  889.                again. To get around these limitations, Xref will read a
  890.                text file and process the commands found there as if they
  891.                were typed on the command line.
  892.  
  893.                The command file has a limit of 200 items, and each item has
  894.                a maximum length of 80 characters (Each entry separated by a
  895.                space is an item. For example: "-f \f" are two items). You
  896.                can pack a line by having more than one command on a line,
  897.                for example:
  898.  
  899.                     -f \f\f -x -m...
  900.  
  901.                or put each command on a separate line to make it more
  902.                readable:
  903.  
  904.                     -f \f\f
  905.                     -x
  906.                     -m...
  907.  
  908.                Xref will output an error message if a command file cannot
  909.                be opened, or it exceeds 200 items.
  910.  
  911.                One of the advantages of putting commands in a text file, is
  912.                that it allows you to have multiple command files. Multiple
  913.  
  914.  
  915.                                     Page 14 of 18
  916.  
  917.  
  918.  
  919.                    Xref - C language cross-reference utility. v3.2
  920.  
  921.  
  922.                command files gives you the ability to have a variety of
  923.                different and easy to run cross-reference configurations.
  924.                For example, you could have a number of command files with
  925.                different paths following the "p" command (if your include
  926.                files are in one path, then use that command file. If they
  927.                are in another path, then use that command file...). Or you
  928.                might have another command file that outputs only the
  929.                verbose listing with a formfeed after each function's
  930.                listing.
  931.  
  932.                You can build a basic set of command files into a more
  933.                complex file by chaining them together. Say you have three
  934.                command files: paths1.txt, paths2.txt and ver_only.txt. You
  935.                can use each of these command files by themselves, or you
  936.                can combine them on the command line. For example:
  937.  
  938.                     -c paths1.txt -c paths2.txt -c ver_only.txt
  939.  
  940.                You can also combine commands and command files on the
  941.                command line. For example:
  942.  
  943.                     xref -f \f -c paths1.txt -i *.c
  944.  
  945.           ---------------------------------------------------------------
  946.           Note: Whether you are using command files or command line input,
  947.           no commands may follow the module name(s).
  948.           ---------------------------------------------------------------
  949.  
  950.                Command files can also evoke other command files. This
  951.                feature lets you chain multiple command files, and get
  952.                around a file's 200 item limit. Need more than 200 items?
  953.                Put the commands in two files, and as the last command in
  954.                the first file, have it evoke the second. For example:
  955.  
  956.                     .
  957.                     .
  958.                     .
  959.                     -c paths2.txt  (this is the last command in the first
  960.                                    file, and it will evoke the second.)
  961.  
  962.                (When chaining files, I suggest that you always make this
  963.                the last command in the file, since it is possible to exceed
  964.                the 200 item limit otherwise.)
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.                                     Page 15 of 18
  978.  
  979.  
  980.  
  981.                    Xref - C language cross-reference utility. v3.2
  982.  
  983.  
  984.           315  e and d commands. Section delimit characters.
  985.  
  986.                By default, Xref uses a string of "=" and "-" characters to
  987.                divide the cross-reference listing's different sections from
  988.                one another. If, on the other hand, you would like to use
  989.                different characters than these, you can change them with
  990.                the "d" and "e" commands. For example:
  991.  
  992.                     -d +
  993.  
  994.                will replace the "-"s in the cross-reference listing with
  995.                "+"s and:
  996.  
  997.                     -e #
  998.  
  999.                will replace the "="s with "#"s where ever "="s would
  1000.                normally appear.
  1001.  
  1002.  
  1003.           316  Command line examples.
  1004.  
  1005.                xref -i -p c:\dos\;c:\prg\text\ -w mod??.c
  1006.  
  1007.                This command line will:
  1008.                o Outputs a complete cross-reference listing.
  1009.                o -i: Cross-reference all include files.
  1010.                o -p: Also look for the C modules and include files in the
  1011.                  "c:\dos\" and "c:\prg\text\" directories.
  1012.                o -w: Output in 132 column width.
  1013.                o Cross-reference any file that matches the file name
  1014.                  pattern "mod??.c".
  1015.  
  1016.                xref -t -e * -f \f c:\prg\*.c a:\text\bigprg?.*
  1017.  
  1018.                This command line will:
  1019.                o -t: Only output a function tree.
  1020.                o -e *: Replaces all "="s with "*"s.
  1021.                o -f: Output a formfeed after each function in the verbose
  1022.                  listing.
  1023.                o Cross-reference all files in the paths "c:\prg\*.c" and
  1024.                  "a:\text\bigprg?.*" that match the name patterns "*.c"
  1025.                  and "bigprg?.*".
  1026.  
  1027.           ---------------------------------------------------------------
  1028.           Note: running Xref with an empty command line (i.e. xref <ENTER>)
  1029.           you will get a short description of the command switches.
  1030.           ---------------------------------------------------------------
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.                                     Page 16 of 18
  1040.  
  1041.  
  1042.  
  1043.                    Xref - C language cross-reference utility. v3.2
  1044.  
  1045.  
  1046.           401  The reserved word files: RES_WORD.TXT and WIN_RES.TXT
  1047.  
  1048.                If Xref included references to C's function calls (printf,
  1049.                etc.) and reserved words, the output would soon become
  1050.                pretty long and messy.
  1051.  
  1052.                To prevent this, Xref reads two files (RES_WORD.TXT and
  1053.                WIN_RES.TXT), that contain a list of words it will ignore
  1054.                when cross-referencing the C modules.
  1055.  
  1056.                RES_WORD.TXT and WIN_RES.TXT are ASCII files that you can
  1057.                customize with the following limitations:
  1058.                     o Each entry must be separated by a newline.
  1059.                     o line length is limited to 80 characters.
  1060.  
  1061.                Comments can be added or an entry "rem"ed out by inserting
  1062.                an "*" in the first column (the "*" MUST be in the first
  1063.                column).
  1064.  
  1065.                Xref also accepts the asterisk as a wildcard character in
  1066.                the entries. The asterisk is used the same way with the
  1067.                entries, as it is used with DOS file names. Using the
  1068.                asterisk in this manner, you can specify entire groups of
  1069.                words to ignored. For example with the entries:
  1070.  
  1071.                     foo*
  1072.                     global_*
  1073.  
  1074.                any word that begins with "foo" or "global_" are ignored.
  1075.  
  1076.                The RES_WORD.TXT file included with Xref has all of C's and
  1077.                C++'s reserved words and function calls. It also includes
  1078.                the function calls and defines from Borland C++. WIN_RES.TXT
  1079.                contains the reserved words from WINDOWS.H and WINDOWSX.H.
  1080.                RES_WORD.TXT is always loaded, but the loading of
  1081.                WIN_RES.TXT is optional (see section 313).(The Windows'
  1082.                entries use about 30K of program memory, so to save memory
  1083.                when not cross-referencing Windows programs they were split
  1084.                in to their own separate file. Another added benefit is that
  1085.                execution time is improved by reducing the number of
  1086.                reserved words through which Xref has to search.)
  1087.  
  1088.                The RES_WORD.TXT and WIN_RES.TXT files must be in the same
  1089.                directory as Xref.
  1090.           ---------------------------------------------------------------
  1091.           Note: with the unregistered version of Xref, the RES_WORD.TXT
  1092.           file must be on a non-write protected disk. Xref modifies this
  1093.           file and it will not run if the file is write protected.
  1094.           ---------------------------------------------------------------
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.                                     Page 17 of 18
  1102.  
  1103.  
  1104.  
  1105.                    Xref - C language cross-reference utility. v3.2
  1106.  
  1107.  
  1108.           501  What Xref ignores.
  1109.  
  1110.                Xref ignores:
  1111.  
  1112.                o Anything enclosed by single or double quotes.
  1113.                o All comments (both "/*...*/" and "//").
  1114.                o Anything that matches the contents of the RES_WORD.TXT
  1115.                  and WIN_RES.TXT files (when loaded).
  1116.  
  1117.  
  1118.           601 Technical support.
  1119.  
  1120.                Telephone support will be provided to registered users for
  1121.                three months following registration. Unlimited support is
  1122.                available by e-mail and US mail.
  1123.  
  1124.                Bugs will be fixed for free for one year following
  1125.                registration, if possible. If not, a full refund will be
  1126.                offered. A written description of the bug, and a copy of
  1127.                your program file are essential to enable me to duplicate
  1128.                the problem.
  1129.  
  1130.                Support will be provided to non-registered users and users
  1131.                beyond the free support period on a time and materials
  1132.                basis.
  1133.  
  1134.                Question, problems or bug reports may be addressed to:
  1135.  
  1136.                By US mail:
  1137.                          David Archibald
  1138.                          DA Software
  1139.                          3717 Aldon Lane
  1140.                          Flint, MI 48506
  1141.                          U.S.A.
  1142.  
  1143.                By telephone:
  1144.                          810-736-0239
  1145.                          Monday-Friday 5:00PM-9:00PM
  1146.                          Saturday and Sunday 10:00AM-5:00PM.
  1147.  
  1148.                By e-mail:
  1149.                          CompuServe: 71573,616
  1150.                          Internet: 71573.616@compuserve.com
  1151.  
  1152.                If you have any questions please do not hesitate to contact
  1153.                me. The quickest response will be had in the following
  1154.                order: Telephone, e-mail, and US mail.
  1155.  
  1156.                If you contact me by e-mail or US mail, please include a
  1157.                telephone number where you can be reached in case I need
  1158.                further information.
  1159.  
  1160.  
  1161.  
  1162.  
  1163.                                     Page 18 of 18
  1164.