Contents of the XRF.DOC file
XRF Cross-Reference Lister for C Programs
Creative System Design Co.
3452 E. Foothill Blvd. << Suite 601 >>
Pasadena, Ca. 91107
Modified for MSDOS By:
Digital Equipment Co.
PC Customer Information & Support Centre,
Hampshire RG22 4DE,
Modified for ANSI and Turbo C By:
P.O. Box 364
Brockport, NY 14420
XRF [-options] infile[.ext] infile[.ext]
XRF prepares a cross-reference listing for C source programs. The
following options are defined:
-s Print C source (with linenumbers) as well.
-c Concatanate C source files (treat as one).
-cfile Concatanate source files and write to .
-lxxx Set page length to xxx lines.
-wxxx Set page width to xxx columns.
-txx Expand tabs to xx spaces.
-f Strip form feed characters.
[infile] Name(s) of C programs. xrf accepts wild-card file input.
The '.c' suffix is provided automatically.
1. Input files may have wild-card names.
2. File Specifications may be stated WITHOUT AN EXTENSION.
An input extension ".C" is added automatically if no extension
is specified. An output extension of ".REF" is added automatically
in all cases.
3. Pathnames are supported on INPUT files only. Output files are
always directed to the current directory.
4. If the -c option is used with no filename, an output filename
is constructed as ".ref".
5. Logical names can be used for output with the -c option,
E.G. "-ccon" will direct output to the console (screen).
Experimental Version X1.0 5-May-80
Split off initialization X1.1 7-May-80
Prototype. Y1.2 9-May-80
Release. V1.3 9-May-80
Chg. for DECUS OTS. & Cmplr. V1.4 1-Jul-80
Add support for RT-11 V1.5 3-Jul-80
Conditionalized spool call V1.6 MM 9-Jul-80
Added narrow, outfile, etc. V1.7 MM 10-Jul-80
Added multiple infiles V1.8 MM 22-Jul-80
Fspool now in the library V1.9 MM 2-Aug-80
MSDOS version V1.10MC 13-Jan-85
Turbo C version V1.11SMB 28-Dec-89
Trying to get too much XRF ran out of memory space.
Cannot find "file" Specified file not found.
Cannot open "file" Cannot open input or output file "file."
Usage ... Parameter error.
None known (I hope).
CREATING FROM SOURCES
A makefile (XRF.MAK) has been provided if you want to recompile the
source code. Source files include:
XRF.H Header file.
XRFD.C Global variable declaration.
XRFP.C DOS command line parser.
XRFI.C DOS file I/O.
XRF0.C Main file.
XRF1.C Lexical processing.
XRF2.C Identifier tree and reference list management.
XRF3.C Sorted cross reference listing routines.
Macros in the makefile define the include directory and memory model. The
"compact" memory model was used to allow maximum space for input file
After making any changes to the source files, make sure they are all in
the default directory (and TCC and TLINK are in your path!). To make a
new XRF.EXE file then type:
A FINAL NOTE
Even if you do not alter this program it is interesting to study the
source code. The program makes excellent use of both a binary tree and
linked lists to organize the information it sifts from C source files.
For me the most fascinating aspect of XRF is that it is living proof
of the durability of the C language. Written nearly ten years ago (for
Unix, I assume), this source has survived at least two major alterations
and now performs with flying colors on a platform (DOS) that did not
even exist at the time.
Who knows? Perhaps XRF will still be kicking around in 1999.