ctags(1)

ctags(1)

DIAGNOSTICS

Too many entries to sort.

An attempt to get additional heap space failed; the sort could not be performed.

Unexpected end of function in file file, line line.

The tags ®le may be incorrect.

A} character was found unexpectedly in the ®rst column. This can lead to incorrect entries in the tags ®le.

Duplicate entry in file file, line line: name. Second entry ignored.

The same name was detected twice in the same ®le. A tags entry was made only for the ®rst name found.

Duplicate entry in files file1 and file2: name (Warning only).

The same name was detected in two different ®les. A tags entry was made only for the ®rst name found.

EXAMPLES

Create a tags ®le named tags in the current directory for all C source (*.c) ®les and all header (*.h) ®les in the current directory:

ctags *.[ch]

Once the tags ®le exists in the current directory, it can be used with commands that support tag ®les (such as vi (see vi(1)).

Use the tags ®le with vi to edit a particular function myfunc() located in one of the source ®les:

vi -t myfunc

While editing a C source ®le using vi, use the ex-mode tag command to edit function myfunc():

:tag myfunc

Use vi to ®nd main() in ®le myprog.c:

vi -t Mmyprog

While using vi, ®nd main() in ®le myprog.c (does not have to be the ®le currently being edited):

:tag Mmyprog

WARNINGS

Recognition of functions, subroutines , and procedures for FORTRAN and Pascal is done in a very simple way. No attempt is made to deal with block structure; if there are two Pascal procedures in different blocks with the same name, a warning message is generated.

The method of deciding whether to look for C or Pascal and FORTRAN functions is an approximation, and can be fooled by unusual programs.

ctags does not know about #ifdefs and Pascal types.

It relies on the input being well formed to detect typedefs.

Use of -txshows only the last line of typedefs.

ex is naive about tags ®les with several identical tags; it simply chooses the ®rst entry its (non-linear) search ®nds with that tag. Such ®les can be created with either the -uor -aoptions or by editing a tags ®le.

If more than one (function) de®nition appears on a single line, only the ®rst de®nition is indexed.

AUTHOR

ctags was developed by the University of California, Berkeley.

FILES

output tags ®le

tags

OTAGS

temporary ®le used by -u

c

HP-UX Release 11i: December 2000

− 2 −

Section 1151