MPE/iX Shell and Utilities Reference Manual, Vol 1
ctags(1) MPE/iX Shell and Utilities ctags(1)
NAME
ctags — produce tags file for ex, more, and vi
SYNOPSIS
ctags [–aBFwx][–f tagfile] sourcefile ...
DESCRIPTION
By default, ctags generates a file named tags in the current directory which summarizes
the
C function, macro, and typedef definitions found in the sourcefiles named on the com-
mand line. See tags(2) for a description of the format of the tags file. You can access this
file with the –t name option in ex, more, and vi, the command
:tag name
in ex and vi, and the command
:tname
in more. The idea is that you tell the utility which function you want to look at, and it checks
the tags file to determine which source file contains the function.
ctags makes special provision for the function main() which may occur in several source
files. The tags file contains an entry for the first main() routine found. For all occurrences
of main() (including the first), the tags file also contains an entry for Mname where name
is the name of the input sourcefile, with the .c suffix and any leading path name components
removed. For example, a tags file created for a
C source code file named foo.c would con-
tain an entry for Mfoo which represents the main() routine in foo.c.
ctags uses sort(1) to sort the file by tag name, according to the
POSIX locale’s collation
sequence.
Options
ctags accepts the following options:
–a appends output to the existing tags file rather than overwriting the file.
–B produces a tags file that searches backward from the current position to find the
pattern matching the tag.
–F searches for tag patterns in the forward direction (default).
–f tagfile
generates a file named tagfile rather than the default tags.
–w suppresses warning messages.
Commands and Utilities 1-143