home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / editor / elvis / ctags.doc < prev    next >
Text File  |  1994-01-30  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. CTAGS(1)            UNIX Programmer's Manual             CTAGS(1)
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ctags - Generates "tags" and (optionally) "refs" files
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ccccttttaaaaggggssss [----ssssttttvvvvrrrraaaa] _f_i_l_e_s_n_a_m_e_s...
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      _c_t_a_g_s generates the "tags" and "refs" files from a group of
  16.      C source files.  The "tags" file is used by Elvis' ":tag"
  17.      command, control-] command, and -t option.  The "refs" file
  18.      is sometimes used by the _r_e_f(_1) program.
  19.  
  20.      Each C source file is scanned for #define statements and
  21.      global function definitions.  The name of the macro or func-
  22.      tion becomes the name of a tag.  For each tag, a line is
  23.      added to the "tags" file which contains:
  24.                  - the name of the tag
  25.                  - a tab character
  26.                  - the name of the file containing the tag
  27.                  - a tab character
  28.                  - a way to find the particular line within the file.
  29.  
  30.      The filenames list will typically be the names of all C
  31.      source files in the current directory, like this:
  32.           $ ctags -stv *.[ch]
  33.  
  34. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  35.      ----tttt   Include typedefs.  A tag will be generated for each
  36.           user-defined type.  Also tags will be generated for
  37.           struct and enum names.  Types are considered to be glo-
  38.           bal if they are defined in a header file, and static if
  39.           they are defined in a C source file.
  40.  
  41.      ----vvvv   Include variable declarations.  A tag will be generated
  42.           for each variable, except for those that are declared
  43.           inside the body of a function.
  44.  
  45.      ----ssss   Include static tags.  _C_t_a_g_s will normally put global
  46.           tags in the "tags" file, and silently ignore the static
  47.           tags.  This flag causes both global and static tags to
  48.           be added.  The name of a static tag is generated by
  49.           prefixing the name of the declared item with the name
  50.           of the file where it is defined, with a colon in
  51.           between.  For example, "static foo(){}" in "bar.c"
  52.           results in a tag named "bar.c:foo".
  53.  
  54.      ----rrrr   This causes _c_t_a_g_s to generate both "tags" and "refs".
  55.           Without ----rrrr, it would only generate "tags".
  56.  
  57.      ----aaaa   Append to "tags", and maybe "refs".  Normally, _c_t_a_g_s
  58.           overwrites these files each time it is invoked.  This
  59.           flag is useful when you have to many files in the
  60.  
  61.  
  62.  
  63. Printed 6/13/92                                                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CTAGS(1)            UNIX Programmer's Manual             CTAGS(1)
  71.  
  72.  
  73.  
  74.           current directory for you to list them on a single
  75.           command-line; it allows you to split the arguments
  76.           among several invocations.
  77.  
  78. FFFFIIIILLLLEEEESSSS
  79.      tags A cross-reference that lists each tag name, the name of
  80.           the source file that contains it, and a way to locate a
  81.           particular line in the source file.
  82.  
  83.      refs The "refs" file contains the definitions for each tag
  84.           in the "tags" file, and very little else.  This file
  85.           can be useful, for example, when licensing restrictions
  86.           prevent you from making the source code to the standard
  87.           C library readable by everybody, but you still every-
  88.           body to know what arguments the library functions need.
  89.  
  90. BBBBUUUUGGGGSSSS
  91.      _c_t_a_g_s is sensitive to indenting and line breaks.  Conse-
  92.      quently, it might not discover all of the tags in a file
  93.      that is formatted in an unusual way.
  94.  
  95. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  96.      elvis(1), refs(1)
  97.  
  98. AAAAUUUUTTTTHHHHOOOORRRR
  99.      Steve Kirkendall
  100.      kirkenda@cs.pdx.edu
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Printed 6/13/92                                                 2
  130.  
  131.  
  132.  
  133.