Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cxref(1) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

lint(1)



cxref(1)                       DG/UX R4.11MU05                      cxref(1)


NAME
       cxref - generate C program cross-reference

SYNOPSIS
       cxref [options] files

DESCRIPTION
       Cxref analyzes a collection of C files and builds a cross-reference
       table.  Cxref uses a special preprocessor to include #define'd
       information in its symbol table.  It generates a list of all symbols
       (auto, static, and global) in each individual file, or, with the -c
       option, in combination.  The table includes four fields: NAME, FILE,
       FUNCTION, and LINE. The line numbers appearing in the LINE field also
       show reference marks as appropriate. The reference marks include:

            assignment     =
            declaration    -
            definition     *

       If no reference marks appear, you can assume a general reference.

   Options
       Cxref interprets the -D, -I, -U options in the same manner that cc
       does.  In addition, cxref interprets the following options:

       -c      Combine the source files into a single report.  Without the
               -c option, cxref generates a separate report for each file on
               the command line.

       -o file Direct output to file.

       -s      Operates silently; does not print input file names.

       -t      Format listing for 80-column width.

       -wnum   Width option that formats output no wider than num (decimal)
               columns.  This option will default to 80 if num is not
               specified or is less than 51.

       These options are accepted only in an ELF environment:

       -d      Disables printing declarations, making the report easier to
               read.

       -l      Does not print local variables.  Prints only global and file
               scope statistics.

       -C      Runs only the first pass of cxref, creating a .cx file that
               can later be passed to cxref.  This is similar to the -c
               option of cc or lint.

       -F      Prints the full path of the referenced file names.

       -Lcols  Modifies the number of columns in the LINE field.  If you do
               not specify a number, cxref defaults to five columns.

       -V      Prints version information on the standard error.

       -Wname, file, function, line
               Set the width of each field (name, file, function, and line
               are non-negative integers).  The default widths are:

                    Field             Characters

                    NAME           15
                    FILE           13
                    FUNCTION       15
                    LINE           20 (4 per column)

EXAMPLE
       a.c

       1    main()
       2    {
       3         int i;
       4         extern char c;
       5
       6         i=65;
       7         c=(char)i;
       8    }

       Resulting cross-reference table (some of the predefined names
       will depend on the sde currently in effect):

       NAME                    FILE         FUNCTION   LINE
       DGUX                    predefined   ---        0*
       DGUXSOURCE            predefined   ---        0*
       DGUXTARGET            predefined   ---        0*
       CLASSIFYTYPE       predefined   ---        0*
       DGUX                predefined   ---        0*
       CLASSIFYTYPE   predefined   ---        0*
       m88000              predefined   ---        0*
       m88k                predefined   ---        0*
       unix                predefined   ---        0*
       c                       a.c          ---        4-    7=
       i                       a.c          main       3*    6=    7
       m88000                  predefined   ---        0*
       m88k                    predefined   ---        0*
       main                    a.c          ---        2*
       unix                    predefined   ---        0*

FILES
       TMPDIR/tcx.*        temporary files
       TMPDIR/cx.*         temporary files
       TMPDIR              usually /usr/tmp but can be redefined by setting
                           the environment variable TMPDIR [see tempnam in
                           tmpnam(3S)].

DIAGNOSTICS
       Error messages may mean you cannot compile the files.  Certain ANSI C
       features, such as #pragma and function prototypes, are reported as
       errors by cxref but accepted by cc.

SEE ALSO
       cc(1), lint(1).


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026