source: trunk/athena/bin/cxref/cxref.1 @ 6954

Revision 6954, 4.1 KB checked in by probe, 31 years ago (diff)
Initial revision
  • Property svn:executable set to *
Line 
1.TH CXREF 1 "Georgia Tech"
2.SH NAME
3cxref \- cross reference C source files
4.SH SYNOPSIS
5.B cxref
6[
7.B \-FSCcfis
8] [
9.B \-w
10.IR width " ]"
11[files]
12.SH DESCRIPTION
13.PP
14.I Cxref
15reads the named C source files and produces on the standard output
16a cross reference of all the identifiers and constants in the files.
17Constants are integer constants (12, 0421, 0x1A),
18floating point constants (123.45, 0.2e-4),
19string constants ("this is a string\en"),
20and character constants ('a', '\e033').
21Identifiers, character constants, and string constants
22are sorted lexicographically, i.e. according to the machine collating
23sequence (7-bit ASCII on the Vax or the Pyramid).
24Integer and floating point constants are sorted numerically.
25The trailing 'l' or 'L' on long integer constants will not show
26up in the output listing.
27.PP
28If no files are named,
29.I cxref
30reads the standard input. For multiple files, the argument "\-"
31(a single dash) indicates that the standard input should be read
32at that point.
33.PP
34If arguments are given, they must come before any file names.
35.PP
36.I Cxref
37recognizes the following arguments:
38.RS
39.TP
40.B \-F
41Fold case in comparison.  By default, case is distinct in comparison of
42identifiers and string and character constants.
43.RI ( cxref
44simply passes the "\-F" option on to
45.IR sort (1)
46as "\-f".)
47.TP
48.B \-S
49Cross reference all files separately.
50The default action is to cross reference all named files together.
51.TP
52.B \-c
53Leave character constants out of the cross reference listing.
54.TP
55.B \-f
56Leave floating point constants out of the cross reference listing.
57.TP
58.B \-i
59Leave integer constants out of the cross reference listing.
60.TP
61.B \-s
62Leave string constants out of the cross reference listing.
63.TP
64.B \-C
65Leave
66.I all
67constants, character, string, integer, and floating point, out of
68the cross reference listing.
69By default, all types of constants are included in the cross reference.
70.TP
71.BI "\-w " width
72Make the output be
73.I width
74columns wide.
75The output width will never be less than 51 or more than 132 columns.
76.I Cxref
77silently adjusts incorrect settings to the nearest allowable setting.
78If no width is specified, the output will default to 80 columns wide.
79.RE
80.PP
81.IR Cxref " does " not
82include #include files, or expand macro definitions.  Files named
83in #include lines can be listed on the command line if they should
84also be cross referenced.
85.PP
86If a quoted string has an escaped newline in it (see ``The C Programming
87Language'', page 181, or Section 2.5 of the C Reference Manual),
88it will show up inside the string in the output listing as \eN.
89This is to make it visible to the programmer, and to keep the
90various filters which
91.I Cxref
92uses to actually do the work from getting terribly confused.
93.PP
94.I Cxref
95is best run in the background, with its output redirected into
96a file or the line printer spooler
97.IR lpr (1),
98since it reads all
99the named files, using
100.IR sort (1)
101as an intermediate pass.
102The sorting can take time which the user can probably put to more productive
103use.
104.SH DIAGNOSTICS
105.PP
106Self explanatory.
107.SH BUGS
108.PP
109Systems running UNIX 4.0 and later already have a program named
110.IR cxref .
111Therefore, on those systems, this program should be renamed.
112.PP
113.I Cxref
114does not do any formatting on its output (other than to
115insure that it writes the proper number of columns),
116so it should probably be run piping its output into
117.IR pr (1).
118.PP
119Floating point constants are converted to a common format for sorting,
120therefore they may appear in the output in a format different from
121(but numerically equivalent to) their form in the original source code.
122.SH "SEE ALSO"
123.IR lex (1),
124.IR lpr (1),
125.IR pr (1),
126.IR sort (1)
127.SH FILES
128.TP
129/tmp/cxr.$$.*
130temporary files for integer and floating point contstants.
131.I Cxref
132removes these files when it is through.
133.SH AUTHOR
134.PP
135.nf
136Arnold Robbins
137School of Information and Computer Science
138Georgia Institute of Technology
139Atlanta, Geogia  30332
140
141UUCP:   gatech!arnold
142CSNET:  arnold@gatech
143ARPANET:        arnold%gatech.csnet@csnet-relay.arpa
144.fi
145
146Copyright (c) 1984 by Arnold Robbins.
147All rights reserved.
148This program may not be sold, but may be distributed
149provided this notice is included.
Note: See TracBrowser for help on using the repository browser.