cxref(CP) 6 January 1993 cxref(CP) Name cxref - generate C program cross-reference Syntax cxref [ options ] files Description The cxref command analyzes a collection of C files and attempts to build a cross-reference table. It produces a listing on standard output of all symbols (auto, static, and global) in each file separately, or, with the -c option, in combination. Each symbol contains an asterisk (*) before the declaring reference. The default behavior of cxref is to cross-reference everything. You can also specify which items you want cross-referenced by using the -i option to turn off the default behavior, and one or more of -a, -e, -f, -l, -m, -v, and -y. The following options are interpreted by cxref: -A Turn off macro cross-referencing. -c Print a combined cross-reference of all input files. -Dname=def Define name with value def as if by a #define. If no =def is given, name is defined with value 1. -E Turn off constant cross-references. -F Turn off function cross-references. -i Turn off all cross-referencing, except that which is specified using the following flags (-i must be specified first on the command line): -a Turn on macro cross-references. -e Turn on constant cross-references. -f Turn on function cross-references. -l Turn on label cross-references. -m Turn on manifest cross-references. -v Turn on variable cross-references. -y Turn on typedef cross-references. -Ipathname Adds pathname to the list of directories to be searched when an #include file is not found in the directory containing the current source file or whenever angle brackets (< >) enclose the filename. If the file cannot be found in directories in this list, directories in a standard list are searched. The -I option can be used several times on the command line. This option only applies to source files appearing after it on the command line. -L Turn off label cross-references. -M Turn off manifest cross-references. -N Enable cross-referencing of symbols in /usr/include. By default these are not cross-referenced if they only appear in /usr/include files. -ofile Direct output to file, instead of standard output. -s Operate silently; do not print input file names. -t Format listing for 80-column width (default). -Uname, -Udefinition Remove any initial definition of name, where name is a reserved sym- bol that is predefined by the particular preprocessor. For more in- formation on the predefined symbols, see cpp(CP). Removes defini- tion of definition, where definition is a manifest define. For more information on the manifest defines, see cc(CP). -V Turn off variable cross-references. -w<num> Width option which formats output no wider than <num> (decimal) columns. This option will default to 80 if <num> is not specified or is less than 51. -Y Turn off typedef cross-references. Files LLIBDIR usually /usr/lib Diagnostics Error messages are unusually cryptic, but usually mean that you cannot compile these files. Notes The cxref command considers a formal argument in a #define macro defini- tion to be a declaration of that symbol. For example, a program that #includes ctype.h, will contain many declarations of the variable c. See also cc(CP), cpp(CP) Standards conformance cxref is conformant with: AT&T SVID Issue 2; and X/Open Portability Guide, Issue 3, 1989.