Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cxref(1) — NEWS-os 5.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

cpp(1)



cxref(1)                 USER COMMANDS                   cxref(1)



NAME
     cxref - generate C program cross-reference

SYNOPSIS
     cxref [options] files

DESCRIPTION
     The cxref command analyzes  a  collection  of  C  files  and
     builds  a  cross-reference table.  cxref uses a special ver-
     sion of cc 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 refer-
     ence 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.

FILES
     TMPDIR/xr1*         temporary files

     TMPDIR/xr2*         temporary files

     TMPDIR/xr3*         temporary files

     TMPDIR/xr4*         temporary files



                                                                1





cxref(1)                 USER COMMANDS                   cxref(1)



     LIBDIR/xcpp         special version of the C preprocessor

     LIBDIR/xpass        accessed by cxref

     LIBDIR              usually /usr/ccs/lib

     TMPDIR              usually /var/tmp but can be redefined by
                         setting  the environment variable TMPDIR
                         [see tempnam in tmpnam(3S)].

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:

     NAME     FILE   FUNCTION   LINE
     c        a.c    main       *4 7
     i        a.c    main       *3 6 7
     main()
              a.c    ---        *1


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

DIAGNOSTICS
     Error messages usually mean you cannot compile the files.


















                                                                2



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