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