CTAGS(1)

NAME
ctags - Generates "tags" and (optionally) "refs" files

SYNOPSIS
ctags [-r] files...

DESCRIPTION
ctags generates the "tags" and "refs" files from a group of C source files. The "tags" file is used by Elvis' ":tag" command, control-] command, and -t option. The "refs" file is used by the ref(1) program.

Each C source file is scanned for #define statements and global function definitions. The name of the macro or function becomes the name of a tag. For each tag, a line is added to the "tags" file which contains:
           - the name of the tag
           - a tab character
           - the name of the file containing the tag
           - a tab character
           - a way to find the particular line within the file.

The "refs" file is used by the ref(1) program, which can be invoked via Elvis' K command. When ctags finds a global function definition, it copies the function header into the "refs" file. The first line is flush against the right margin, but the argument definitions are indented. The ref program can search the "refs" file much faster than it could search all of the C source files.

The filenames list will typically be the names of all C source files in the current directory, like this:
    $ ctags -r *.[ch]

OPTIONS

-r  This causes ctags to generate both "tags" and "refs". Without -r, it would only generate "tags".

FILES

tags
    The "tags" file.

refs
    The "refs" file.

SEE ALSO
elvis(1), refs(1)

BUGS
This version of ctags doesn't parse ANSI-C source code very well. It has trouble recognizing the new-style function definitions.

AUTHOR
Steve Kirkendall
kirkenda@cs.pdx.edu
...uunet!tektronix!psueea!eecs!kirkenda