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