Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ctags(C) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ex(C)

vi(C)


 ctags(C)                        19 June 1992                        ctags(C)


 Name

    ctags - create a tags file

 Syntax

    ctags [ -a ] [ -u ] [ -v ] [ -w ] [ -x ] [ file ... ]

 Description

    The ctags command makes a tags file for vi(C) from the specified C or
    FORTRAN sources. A tags file gives the locations of specified objects (in
    this case, functions) in a group of files.  Each line of the tags file
    contains the function name, the file in which it is defined, and a scan-
    ning pattern used to find the function definition.  These are given in
    separate fields on the line, separated by blanks or tabs.  Using the tags
    file, vi can quickly find function definitions.

    -a   Append new values for the specified files to tags.

    -u   Update the specified files in tags; that is, all references to them
         are deleted, and the new values are appended to the file.  (This can
         be slow; it is usually faster to simply rebuild the tags file.)

    -v   Produce a list of function names, the filename in which each func-
         tion is declared, and the function's line number. This list prints
         on the standard output, and no tags file is created.

    -w   Suppress warning diagnostics.

    -x   Produce a function index, printing the line in which each function
         is defined, along with the filename, function name, and line number.
         No tags file is created.

    Files whose names end in .c or .h are assumed to be C source files and
    are searched for C routine and macro definitions.  Otherwise, the files
    are scanned for the FORTRAN keywords function, procedure, program, and
    subroutine.  If any of these keywords is found, ctags assumes file is a
    FORTRAN file; otherwise, it assumes it is a C file.

    The tag main is treated specially in C programs.  The tag formed is cre-
    ated by prefixing M to the name of the file, with a trailing .c.  Leading
    pathname components are also removed.  This makes use of ctags practical
    in directories with more than one program.

 File

    tags            Output tags file

 See also

    ex(C), vi(C)

 Credit

    This utility was developed at the University of California at Berkeley
    and is used with permission.


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