Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ctags.bsd(1) — Domain/IX SR9.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

CTAGS(1)

NAME

ctags − create a tags file

USAGE

ctags [ −BFatuwvx ] name ... 

DESCRIPTION

Ctags makes a tags file for ex (1) from the specified C, Pascal, and FORTRAN sources.  A tags file gives the locations of specified objects (in this case, functions and typedefs) in a group of files.  Each line of the tags file contains the object name, the file in which it is defined, and an address specification for the object definition. Functions are searched with a pattern, and type definitions (typedefs) are searched with a line number. Specifiers are given in separate fields on the line, separated by blanks or tabs. Using the tags file, ex (1) can quickly find these objects definitions. 

A file whose name ends in .c or .h is assumed to be a C source file and is searched for C routine and macro definitions.  Other files are first examined for Pascal or FORTRAN routine definitions.  If there are none present, the files are searched for C definitions. 

The tag main is treated specially in C programs.  The tag formed is created by prepending M to the name of the file, with a trailing .c (if any) removed.  Leading pathname components are also removed.  Thus, ctags is a practical tool to use on directories with more than one program. 

OPTIONS

−x Produce a list of object names, the line number, and filename on which each is defined, as well as the text of that line.  Print this on the standard output.  This is a simple index that can be printed out as an off-line readable function index. 

−F Use forward searching patterns (/.../) (default). 

−B Use backward searching patterns (?...?). 

−a Append to tags file. 

−t Create tags for typedefs. 

−w Suppress warning diagnostics. 

−u Update the specified files in tags, i.e., delete all references to them and append the new values to the file.  This option works very slowly; it is usually more efficient to simply rebuild the tags file. 

CAUTIONS

Ctags recognizes FORTRAN and Pascal functions, subroutines, and procedures in a very simpleminded way.  It makes no attempt to deal with block structure.  If you have two Pascal procedures in different blocks with the same name, you will not get the results you want. 

Ctags does not know about #ifdefs. 

Ctags does not know about Pascal types.  It relies on the input being well formed to detect typedefs.  Use of −tx shows only the last line of typedefs. 

FILES

tagsoutput tags file

RELATED INFORMATION

ex (1), vi (1). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026