CREF (I)                    2/5/1973                     CREF (I)

NAME            cref  --  make cross reference listing

SYNOPSIS        cref [ -soi ] name1 ...

DESCRIPTION     CREF makes a cross reference listing of files in

                assembler format (see AS(I)).  The files named as

                arguments in the command line are searched for

                symbols (defined as a succession of alphabetics,

                numerics, '.', or '_', beginning with an alpha-

                betic, '.', or '_').

                The output report is in four columns:

                (1)     (2)     (3)     (4)

                symbol  file    see     text as it appears in file


                The third column contains the line number in the

                file by default; the -s option will cause the

                most recent name symbol to appear there instead.

                CREF uses either an ignore file or an only file.

                If the -i option is given, it will take the next

                file name to be an ignore file; if the -o option

                is given, the next file name will be taken as an

                only file.  Ignore and only files should be lists

                of symbols separated by new lines.  If an ignore

                file is given, all the symbols in the file will

                be ignored in columns (1) and (3) of the output.

                If an only file is given, only symbols appearing

                in the file will appear in column (1), but column

                (3) will still contain the most recent name en-

                countered.  Only one of the options -i or -o may

                be used.  The default setting is -i; all symbols

                predefined in the assembler are ignored, except

                system call names, which are collected.

FILES           Files t.0, t.1, t.2, t.3 are created (i.e. DE-

                STROYED) in the working directory of anyone using

                cref. This nuisance will be repaired soon.  The

                output is left in file s.out in the working di-


                /usr/lem/ is the default ignore file.

SEE ALSO        as(I)

DIAGNOSTICS     "line too long" -- input line >131 characters

                "symbol too long" -- symbol >20 characters

                "too many symbols" -- >10 symbols in line

                "cannot open t.?" -- bug; see LEM

                "cannot fork; examine t.out" -- can't start sort

                    process; intermediate results are on files

                    t.0, t.1,t.2,t.3.  These may be sorted inde-

                    pendently and the results concatenated by the


                "cannot sort" -- odd response from sort; examine

                    intermediate results, as above.

                "impossible situation" -- system bug

                "cannot open" file -- one of the input names

                    cannot be opened for reading.

BUGS            The destruction of unsuspecting users' files

                should soon be fixed.  A limitation that may

                eventually go away is the restriction to assem-

                bler language format. There should be options for

                FORTRAN, English, etc., lexical analysis.

                File names longer than eight characters cause

                misalignment in the output if tabs are set at ev-

                ery eighth column.

                It should write on the standard output, not