UTILS\CROSSREF\XREF.DOC  ·  DOC  ·  2.7 KB  ·  1987-11-15  ·  from PCPlus_Issue-18_Mar-1988
                       XREF By Gary L Watson.   (C) 1987

              XREF is written in C and compiled using Zorland C.
 XREF is a general purpose cross reference program. It has been designed in such
a way that it can cross reference any type of text file.

 Commands are:
          Exit      To Exit program
          Help      To obtain this help file.
          List      To list a file with line numbers.
          Quit      To Quit program (same as exit)
          Redirect  To redirect output to another device or file.
          Standard  To output  80 column width (default)
          Xref      To produce a cross reference listing.
          Wide      To output 132 column width

 Commands may be input in lower case if required.
 Only the first letter of the command is typed by the user.

 To list a file the command line will look something like this:

     XREF <source-file 1> <source-file 2> .... <source-file n>

 eg XREF A:DATA.TXT B:DATA.TXT

 If  you want a line number listing and a cross reference listing of the  same
file,first  use  option  L  to give line numbers and then  when  prompted  for
options  use  the X option for cross reference. When finished use option E  to
exit the program.


                             The Dictionary file.

 The dictionary file is called XREF.DIC . This file does not have to exist but
if  it  does then the program will do the following. It reads  the  dictionary
file  and  stores  all  the words it finds in its tables  and  marks  them  as
dictionary  words. When the user uses the X option to do a cross reference any
word  encountered  on the input file that is in the dictionary is ignored  and
the  line number not stored. So dictionary words are those words that the user
does NOT want to be cross referenced.

 The  most common use for the dictionary file is to hold a list of a compilers
reserved words. The supplied XREF.DIC file contains reserved words used by the
C  compiler that Xref is written in. The user should note that because of  the
way that the program stores the words the dictionary and input file should not
really  be in alphabetical order as this may make the running time  excessive.
This  is  because the words are held in a binary tree. Words  in  alphabetical
order  will make the tree unbalanced and will cause the program to search  the
whole tree when adding each word.

                                  The Output.
 Line numbers are output in the following fashion. <File-no>-<Line no>. So if
a line is shown as "1-0022 Hello" then this means that in source-file 1 on line
22 the word Hello appears.
Only a single character is used for the file number so this limits the number
of input files to 9.