Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cref(CP) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought

     Name
          cref - makes a cross-reference listing

     Syntax
          cref [ -acilnostux123 ] files

     Description
          cref makes a cross-reference listing of assembler or C
          programs. The program searches the given files for symbols
          in the appropriate C or assembly language syntax.

          The output report is in four columns:

               1.  Symbol
               2.  Filename
               3.  Current symbol or line number
               4.  Text as it appears in the file

          cref uses either an ignore file or an only file.  If the -i
          option is given, the next argument is taken to be an ignore
          file; if the -o option is given, the next argument is taken
          to be an only file.  ignore and only files are lists of
          symbols separated by newlines.  All symbols in an ignore
          file are ignored in columns 1 and 3 of the output.  If an
          only file is given, only symbols in that file will appear in
          column 1.  Only one of these options may be given; the
          default setting is -i using the default ignore file (see
          FILES below).  Assembler predefined symbols or C keywords
          are ignored.

          The -s option causes current symbols to be put in column 3.
          In the assembler, the current symbol is the most recent name
          symbol; in C, the current function name.  The -l option
          causes the line number within the file to be put in column
          3.

          The -t option causes the next available argument to be used
          as the name of the intermediate file (instead of the
          temporary file /tmp/crt??).  This file is created and is not
          removed at the end of the process.

          The cref options are:

          a   Uses assembler format (default)

          c   Uses C format

          i   Uses an ignore file (see above)

          l   Puts line number in column 3 (instead of current symbol)

          n   Omits column 4 (no context)

          o   Uses an only file (see above)

          s   Current symbol in column 3 (default)

          t   User-supplied temporary file

          u   Prints only symbols that occur exactly once

          x   Prints only C external symbols

          1   Sorts output on column 1 (default)

          2   Sorts output on column 2

          3   Sorts output on column 3

     Files
          /usr/lib/cref/*     Assembler specific files

     See Also
          as(CP), cc(CP), sort(C), xref(CP)

     Notes
          cref inserts an ASCII DEL character into the intermediate
          file after the eighth character of each name that is eight
          or more characters long in the source file.
                                                (printed 6/18/89)



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