Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ex(1)

vi(1)



  ctags(1)                            CLIX                            ctags(1)



  NAME

    ctags - Creates a tags file

  SYNOPSIS

    ctags [-auwx] name ...

  FLAGS

    The ctags command utilizes the following flags

    -a   Appends to the tags file.

    -w   Suppresses warning diagnostics.

    -u   Causes the specified files to be updated in the tags files, that is,
         all references to them are deleted, and the new values are appended
         to the file.  (Beware: this flag is implemented in a way which is
         rather slow; it is usually faster to simply rebuild the tags file.)

    -x   Causes the output to be in the cxref format.

  DESCRIPTION

    The ctags command makes a tags file for the ex command from the specified
    C 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, typedefs with a line number.  Specifiers are given in
    separate fields on the line, separated by blanks or tabs.  Using the tags
    file, the ex command can quickly find these objects definitions.

    If the -x flag is given, the ctags command produces a list of object
    names, the line number and filename on which each is defined, as well as
    the text of that line and displays this on stdout.  This is a simple index
    which can be printed out as an off-line readable function index.

    The ctags command places the tag descriptions in a file called tags.

    The tag main is treated specially in C programs.  The tag formed is
    created by prepending an ``M'' to the name of the file, with a trailing
    ``.c'' removed, if any, and leading pathname components also removed.
    This makes use of the ctags command in directories with more than one
    program.

  EXAMPLES

    1.  To create a vi tags file for the source code in main.c.




  2/94 - Intergraph Corporation                                              1






  ctags(1)                            CLIX                            ctags(1)



        ctags main.c


    2.  To cause the ctags file to be updated with the code from main.c,
        without displaying warning messages:

        ctags -w -u main.c


    3.  To add the tags from newcode.c to the ctags file:

        ctags -a newcode.c

        This is useful when adding pieces of a program.

  FILES

    tags   Outputs the tags file.

  DIAGNOSTICS

    This command contains the following diagnostic message:

    Duplicate function in file file line line: function

    A function was defined in more than one place for one tags file.  The
    second entry is usually ignored.

  EXIT VALUES

    The ctags command will return a 1 if an error occurs, and a 0 if the tags
    file was successfully made.

  RELATED INFORMATION

    Commands:  ex(1), vi(1)


















  2                                              Intergraph Corporation - 2/94




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