tags

format of tags file

File Format


DESCRIPTION

When you use the vi or ex :tag command, the more :t command, or the ex, more, or vi -t option, that utility looks for a file called tags in the current directory. This lets you quickly locate various points of interest in a C or FORTRAN program which may span more than one source file. These points of interest are tags. Typically, you use the ctags command to construct a tags file.

For C source code, the tags file may contain tags for function definitions, pre-processor macro definitions, and typedef definitions. For FORTRAN source code, the tags file may contain tags for function and subroutine definitions.

For each tag, the tags file contains one line in the following form:
tagname        sourcefile        address
The tagname field is the name of the C function, macro, or typedef or the name of the FORTRAN function or subroutine. The sourcefile field has the name of the source file containing the tag named tagname. The address field is an editor address within sourcefile to reach the tag definition. This is either a line number in the file or a regular expression (enclosed in ? or / characters) that uniquely matches the line of source code where the tag appears. A tab character separates each field.

For vi or more to use the tags file correctly, it must be sorted by tagname using the POSIX locale's collation sequence.


SEE ALSO

Commands:
ctags, more, sort, vi


Updated MKS Toolkit [3khat16.ico]HP3000 [3khat16.ico]3kMail [archive16.gif]