source: trunk/minix/man/man1/ctags.1@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 2.9 KB
RevLine 
[9]1.TH CTAGS 1
2.SH NAME
3ctags - Generates "tags" and (optionally) "refs" files
4.SH SYNOPSIS
5\fBctags\fP [\fB-stvra\fP] \fIfilesnames\fP...
6.SH DESCRIPTION
7\fIctags\fP generates the "tags" and "refs" files
8from a group of C source files.
9The "tags" file is used by Elvis' ":tag" command,
10control-] command,
11and -t option.
12The "refs" file is sometimes used by the \fIref(1)\fP program.
13.PP
14Each C source file is scanned for #define statements and
15global function definitions.
16The name of the macro or function becomes the name of a tag.
17For each tag, a line is added to the "tags" file which contains:
18.RS
19.nf
20 - the name of the tag
21 - a tab character
22 - the name of the file containing the tag
23 - a tab character
24 - a way to find the particular line within the file.
25.RE
26.fi
27.PP
28The filenames list will typically be the names of all C source
29files in the current directory, like this:
30.RS
31.nf
32$ ctags -stv *.[ch]
33.RE
34.fi
35.SH OPTIONS
36.IP \fB-t\fR
37Include typedefs.
38A tag will be generated for each user-defined type.
39Also tags will be generated for struct and enum names.
40Types are considered to be global if they are defined in a header file,
41and static if they are defined in a C source file.
42.IP \fB-v\fR
43Include variable declarations.
44A tag will be generated for each variable, except for those that are declared
45inside the body of a function.
46.IP \fB-s\fR
47Include static tags.
48\fICtags\fR will normally put global tags in the "tags" file, and silently ignore
49the static tags.
50This flag causes both global and static tags to be added.
51The name of a static tag is generated by prefixing the name of the declared
52item with the name of the file where it is defined, with a colon in between.
53For example, "static foo(){}" in "bar.c" results in a tag named "bar.c:foo".
54.IP \fB-r\fP
55This causes \fIctags\fP to generate both "tags" and "refs".
56Without \fB-r\fP, it would only generate "tags".
57.IP \fB-a\fR
58Append to "tags", and maybe "refs".
59Normally, \fIctags\fR overwrites these files each time it is invoked.
60This flag is useful when you have to many files in the current directory
61for you to list them on a single command-line;
62it allows you to split the arguments among several invocations.
63.SH FILES
64.IP tags
65A cross-reference that lists each tag name, the name of the source file that
66contains it, and a way to locate a particular line in the source file.
67.IP refs
68The "refs" file contains the definitions for each tag in the "tags" file,
69and very little else.
70This file can be useful, for example, when licensing restrictions prevent
71you from making the source code to the standard C library readable by everybody,
72but you still everybody to know what arguments the library functions need.
73.SH BUGS
74.PP
75\fIctags\fR is sensitive to indenting and line breaks.
76Consequently, it might not discover all of the tags in a file that
77is formatted in an unusual way.
78.SH "SEE ALSO"
79elvis(1), refs(1)
80.SH AUTHOR
81.nf
82Steve Kirkendall
83kirkenda@cs.pdx.edu
84.fi
Note: See TracBrowser for help on using the repository browser.