Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Be Sweet - a set of visual source code browsers

, 1 Jul 2003
A set of source code and project browsers to compliment Visual Studio.
besweet-latest-greatest.zip
BeSweet-0.6.2
besweet-screen.jpg
ctags55
ctags.exe
dot-net-addin-experimental
AddIn.tlb
BeSweetDotNetAddin.dll
dte.tlh
install-screen-shot.jpg
MSADDNDR.tlh
MSO.tlh
ESBAddInSimulator.exe
ESBDSAddin.dll
ESBDSAddin.tlb
ESBServer.exe
ESBServer.ini
ESBServer.pdb
ESBServer.tlb
res
abstract256.bmp
class256.bmp
close_a256.bmp
close_f256.bmp
const256.bmp
Copy of enum256.bmp
enum256.bmp
ESBServer.ico
field256.bmp
function256.bmp
headerfile256.bmp
hierarchy.ico
icon2.ico
inherited_members_a256.bmp
inherited_members_f256.bmp
lock_hierarchy_a256.bmp
lock_hierarchy_f256.bmp
members_a256.bmp
method256.bmp
namespace256.bmp
no_fields_a256.bmp
no_field_f256.bmp
no_field_s256.bmp
no_public_a256.bmp
no_public_f256.bmp
no_public_s256.bmp
no_static_a256.bmp
no_static_f256.bmp
no_static_s256.bmp
outline-icon-large.bmp
outline.ico
outline256.bmp
overwriten256.bmp
packages_a256.bmp
package_browser.ico
previous_hierarchies_a256.bmp
previous_hierarchies_f256.bmp
private256.bmp
private_field256.bmp
private_method256.bmp
problem256.bmp
problem_256.bmp
protected256.bmp
protected_field256.bmp
protected_method256.bmp
public256.bmp
public_field256.bmp
public_method256.bmp
public_only_a256.bmp
public_only__f256.bmp
public__only_s256.bmp
questionmark256.bmp
questionmark_256.bmp
selection_arrow256.bmp
sort_a256.bmp
sort_f256.bmp
sort_s256.bmp
sourcefile256.bmp
static256.bmp
struct256.bmp
subtype_hierarchy_a256.bmp
subtype_hierarchy_f256.bmp
supertype_hierarchy_a256.bmp
supertype_hierarchy_f256.bmp
typebrowser.ico
typedef256.bmp
types_a256.bmp
type_hierarchy_a256.bmp
type_hierarchy_f256.bmp
union256.bmp
variable256.bmp
virtual256.bmp
workspace.ico
workspace256.bmp
stlport_vc645.dll
besweet_061_src.zip
BeSweet_061_src
beswee-screen.jpg
EclipseStyleBrowsers.dsw
ESBDSAddin
ESBDSAddin.clw
ESBDSAddin.dsp
res
Commands.rgs
ESBDSAddin.rgs
TBarLrge.bmp
TBarMedm.bmp
src
ESBDSAddin.def
ESBDSAddinSimulator
src
ESBAddInSimulator.clw
ESBAddInSimulator.dsp
res
ESBAddInSimulator.ico
ESBDSAddin.rgs
ESBServer
bin
ctags55
ctags.exe
res
.cvsignore
abstract256.bmp
class256.bmp
close_a256.bmp
close_f256.bmp
const256.bmp
Copy of enum256.bmp
enum256.bmp
ESBServer.ico
field256.bmp
function256.bmp
headerfile256.bmp
hierarchy.ico
icon2.ico
inherited_members_a256.bmp
inherited_members_f256.bmp
lock_hierarchy_a256.bmp
lock_hierarchy_f256.bmp
members_a256.bmp
method256.bmp
namespace256.bmp
no_fields_a256.bmp
no_field_f256.bmp
no_field_s256.bmp
no_public_a256.bmp
no_public_f256.bmp
no_public_s256.bmp
no_static_a256.bmp
no_static_f256.bmp
no_static_s256.bmp
outline-icon-large.bmp
outline.ico
outline256.bmp
overwriten256.bmp
packages_a256.bmp
package_browser.ico
previous_hierarchies_a256.bmp
previous_hierarchies_f256.bmp
private256.bmp
private_field256.bmp
private_method256.bmp
problem256.bmp
problem_256.bmp
protected256.bmp
protected_field256.bmp
protected_method256.bmp
public256.bmp
public_field256.bmp
public_method256.bmp
public_only_a256.bmp
public_only__f256.bmp
public__only_s256.bmp
questionmark256.bmp
questionmark_256.bmp
selection_arrow256.bmp
sort_a256.bmp
sort_f256.bmp
sort_s256.bmp
sourcefile256.bmp
static256.bmp
struct256.bmp
subtype_hierarchy_a256.bmp
subtype_hierarchy_f256.bmp
supertype_hierarchy_a256.bmp
supertype_hierarchy_f256.bmp
typebrowser.ico
typedef256.bmp
types_a256.bmp
type_hierarchy_a256.bmp
type_hierarchy_f256.bmp
union256.bmp
variable256.bmp
virtual256.bmp
workspace.ico
workspace256.bmp
doc
esbserver.proj
images
no_fields_a256.bmp
no_static_a256.bmp
outline.jpg
outlineProperties.jpg
public_only_a256.bmp
sort_a256.bmp
src
Controller
Browsers
ESBServer.clw
ESBServer.dsp
ESBServer.ini
ESBServer.rgs
ESBServerManager.rgs
ESBServerMgr.rgs
Model
CTags
MetaModel
Simulators
RemoteInterface
COM
Renderer
MFC
.#ESBServerCtrlPanel.cpp.1.20
3rdParty
OptionPage
Base
Browsers
.#ScopedNameBrowserRenderer.cpp.1.12
.#ScopedNameBrowserRenderer.h.1.12
Properties
res
abstract256.bmp
class256.bmp
close_a256.bmp
close_f256.bmp
const256.bmp
enum256.bmp
ESBServer.ico
field256.bmp
function256.bmp
headerfile256.bmp
hierarchy.ico
inherited_members_a256.bmp
inherited_members_f256.bmp
lock_hierarchy_a256.bmp
lock_hierarchy_f256.bmp
members_a256.bmp
method256.bmp
namespace256.bmp
no_fields_a256.bmp
no_field_f256.bmp
no_field_s256.bmp
no_public_a256.bmp
no_public_f256.bmp
no_public_s256.bmp
no_static_a256.bmp
no_static_f256.bmp
no_static_s256.bmp
outline-icon-large.bmp
outline.ico
outline256.bmp
overwriten256.bmp
packages_a256.bmp
package_browser.ico
previous_hierarchies_a256.bmp
previous_hierarchies_f256.bmp
private256.bmp
private_field256.bmp
private_method256.bmp
problem256.bmp
problem_256.bmp
protected256.bmp
protected_field256.bmp
protected_method256.bmp
prototype256.bmp
prototype_256.bmp
public256.bmp
public_field256.bmp
public_method256.bmp
public_only_a256.bmp
public_only__f256.bmp
public__only_s256.bmp
questionmark256.bmp
questionmark_256.bmp
selection_arrow256.bmp
sort_a256.bmp
sort_f256.bmp
sort_s256.bmp
sourcefile256.bmp
static256.bmp
struct256.bmp
subtype_hierarchy_a256.bmp
subtype_hierarchy_f256.bmp
supertype_hierarchy_a256.bmp
supertype_hierarchy_f256.bmp
typebrowser.ico
typedef256.bmp
types_a256.bmp
type_hierarchy_a256.bmp
type_hierarchy_f256.bmp
union256.bmp
variable256.bmp
virtual256.bmp
workspace.ico
workspace256.bmp
Test
Utilities
bsuite_demo.zip
BeSweet_051
ctags54
ctags.exe
ESBDSAddin.dll
ESBDSAddin.exp
ESBDSAddin.tlb
ESBDSAddinSimulator.exe
ESBServer.exe
ESBServer.ini
ESBServer.ini.bak
ESBServer.pdb
ESBServer.tlb
regsvr32.trg
res
abstract256.bmp
class256.bmp
close_a256.bmp
close_f256.bmp
const256.bmp
Copy of enum256.bmp
enum256.bmp
ESBServer.ico
field256.bmp
function256.bmp
headerfile256.bmp
hierarchy.ico
icon2.ico
inherited_members_a256.bmp
inherited_members_f256.bmp
lock_hierarchy_a256.bmp
lock_hierarchy_f256.bmp
members_a256.bmp
method256.bmp
namespace256.bmp
no_fields_a256.bmp
no_field_f256.bmp
no_field_s256.bmp
no_public_a256.bmp
no_public_f256.bmp
no_public_s256.bmp
no_static_a256.bmp
no_static_f256.bmp
no_static_s256.bmp
outline.ico
outline256.bmp
overwriten256.bmp
packages_a256.bmp
package_browser.ico
previous_hierarchies_a256.bmp
previous_hierarchies_f256.bmp
private256.bmp
private_field256.bmp
private_method256.bmp
problem256.bmp
problem_256.bmp
protected256.bmp
protected_field256.bmp
protected_method256.bmp
public256.bmp
public_field256.bmp
public_method256.bmp
public_only_a256.bmp
public_only__f256.bmp
public__only_s256.bmp
questionmark256.bmp
questionmark_256.bmp
selection_arrow256.bmp
sort_a256.bmp
sort_f256.bmp
sort_s256.bmp
sourcefile256.bmp
static256.bmp
struct256.bmp
subtype_hierarchy_a256.bmp
subtype_hierarchy_f256.bmp
supertype_hierarchy_a256.bmp
supertype_hierarchy_f256.bmp
typebrowser.ico
typedef256.bmp
types_a256.bmp
type_hierarchy_a256.bmp
type_hierarchy_f256.bmp
union256.bmp
variable256.bmp
virtual256.bmp
workspace.ico
workspace256.bmp
stlport_vc645.dll
bsuite_src.zip
EclipseStyleBrowsers
doc
images
architecture.jpg
hierarchybrowser.jpg
methodbrowser.jpg
outlinebrowser.jpg
overview.jpg
typebrowser.jpg
vsplugin.jpg
workspacebrowser.jpg
EclipseStyleBrowsers.dsw
ESBDSAddin
ESBDSAddin.dsp
res
Commands.rgs
ESBDSAddin.rgs
TBarLrge.bmp
TBarMedm.bmp
src
CVS
ESBDSAddin.def
ESBDSAddinSimulator
ESBDSAddinSimulator.clw
ESBDSAddinSimulator.dsp
res
ESBAddInSimulator.ico
src
ESBServer
bin
ctags54
ctags.exe
res
abstract256.bmp
class256.bmp
close_a256.bmp
close_f256.bmp
const256.bmp
Copy of enum256.bmp
CVS
enum256.bmp
ESBServer.ico
field256.bmp
function256.bmp
headerfile256.bmp
hierarchy.ico
icon2.ico
inherited_members_a256.bmp
inherited_members_f256.bmp
lock_hierarchy_a256.bmp
lock_hierarchy_f256.bmp
members_a256.bmp
method256.bmp
namespace256.bmp
no_fields_a256.bmp
no_field_f256.bmp
no_field_s256.bmp
no_public_a256.bmp
no_public_f256.bmp
no_public_s256.bmp
no_static_a256.bmp
no_static_f256.bmp
no_static_s256.bmp
outline.ico
outline256.bmp
overwriten256.bmp
packages_a256.bmp
package_browser.ico
previous_hierarchies_a256.bmp
previous_hierarchies_f256.bmp
private256.bmp
private_field256.bmp
private_method256.bmp
problem256.bmp
problem_256.bmp
protected256.bmp
protected_field256.bmp
protected_method256.bmp
public256.bmp
public_field256.bmp
public_method256.bmp
public_only_a256.bmp
public_only__f256.bmp
public__only_s256.bmp
questionmark256.bmp
questionmark_256.bmp
selection_arrow256.bmp
sort_a256.bmp
sort_f256.bmp
sort_s256.bmp
sourcefile256.bmp
static256.bmp
struct256.bmp
subtype_hierarchy_a256.bmp
subtype_hierarchy_f256.bmp
supertype_hierarchy_a256.bmp
supertype_hierarchy_f256.bmp
typebrowser.ico
typedef256.bmp
types_a256.bmp
type_hierarchy_a256.bmp
type_hierarchy_f256.bmp
union256.bmp
variable256.bmp
virtual256.bmp
workspace.ico
workspace256.bmp
src
Controller
Browsers
CVS
CVS
CVS
ESBServer.clw
ESBServer.dsp
ESBServer.ini
ESBServer.rgs
ESBServerMgr.rgs
Model
CTags
CVS
CVS
MetaModel
CVS
Simulators
CVS
RemoteInterface
COM
CVS
CVS
Renderer
CVS
MFC
3rdParty
CVS
OptionPage
CVS
Base
CVS
Browsers
CVS
CVS
Properties
CVS
res
abstract256.bmp
class256.bmp
close_a256.bmp
close_f256.bmp
const256.bmp
Copy of enum256.bmp
CVS
enum256.bmp
ESBServer.ico
field256.bmp
function256.bmp
headerfile256.bmp
hierarchy.ico
icon2.ico
inherited_members_a256.bmp
inherited_members_f256.bmp
lock_hierarchy_a256.bmp
lock_hierarchy_f256.bmp
members_a256.bmp
method256.bmp
namespace256.bmp
no_fields_a256.bmp
no_field_f256.bmp
no_field_s256.bmp
no_public_a256.bmp
no_public_f256.bmp
no_public_s256.bmp
no_static_a256.bmp
no_static_f256.bmp
no_static_s256.bmp
outline-icon-large.bmp
outline.ico
outline256.bmp
overwriten256.bmp
packages_a256.bmp
package_browser.ico
previous_hierarchies_a256.bmp
previous_hierarchies_f256.bmp
private256.bmp
private_field256.bmp
private_method256.bmp
problem256.bmp
problem_256.bmp
protected256.bmp
protected_field256.bmp
protected_method256.bmp
public256.bmp
public_field256.bmp
public_method256.bmp
public_only_a256.bmp
public_only__f256.bmp
public__only_s256.bmp
questionmark256.bmp
questionmark_256.bmp
selection_arrow256.bmp
sort_a256.bmp
sort_f256.bmp
sort_s256.bmp
sourcefile256.bmp
static256.bmp
struct256.bmp
subtype_hierarchy_a256.bmp
subtype_hierarchy_f256.bmp
supertype_hierarchy_a256.bmp
supertype_hierarchy_f256.bmp
typebrowser.ico
typedef256.bmp
types_a256.bmp
type_hierarchy_a256.bmp
type_hierarchy_f256.bmp
union256.bmp
variable256.bmp
virtual256.bmp
workspace.ico
workspace256.bmp
Test
CVS
Utilities
CVS
Content-type: text/html

<HTML><HEAD><TITLE>Manpage of CTAGS</TITLE>
</HEAD><BODY>
<H1>CTAGS</H1>
Section: User Commands  (1)<BR>Updated: Version 5.5<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>



<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

ctags - Generate tag files for source code


<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<DL COMPACT>
<DT><B>ctags</B> [<B>options</B>] [<I>file(s)</I>]<DD>
<DT><B>etags</B> [<B>options</B>] [<I>file(s)</I>]<DD>


</DL>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

The <B>ctags</B> and <B>etags</B> programs (hereinafter collectively referred to
as <B>ctags</B>, except where distinguished) generate an index (or &quot;tag&quot;) file
for a variety of language objects found in <I>file(s)</I>.
This tag file allows these items to be quickly and easily located by a text
editor or other utility. A &quot;tag&quot; signifies a language object for which an
index entry is available (or, alternatively, the index entry created for that
object).

Alternatively, <B>ctags</B> can generate a cross reference file which lists, in
human readable form, information about the various source objects found in a
set of language files.

Tag index files are supported by numerous editors, which allow the user to
locate the object associated with a name appearing in a source file and jump
to the file and line which defines the name. Those known about at the time of
this release are:

<DL COMPACT><DT><DD>
<B><A HREF="http://localhost/cgi-bin/man/man2html?1+Vi">Vi</A></B>(1) and its derivatives (e.g. Elvis, Vim, Vile, Lemmy),
<B>CRiSP</B>,
<B>Emacs</B>,
<B>FTE</B> (Folding Text Editor),
<B>JED</B>,
<B>jEdit</B>,
<B>NEdit</B> (Nirvana Edit),
<B>TSE</B> (The SemWare Editor),
<B>UltraEdit</B>,
<B>WorkSpace</B>,
<B>X2</B>,
<B>Zeus</B>
</DL>


<B>Ctags</B> is capable of generating different kinds of tags for each of many
different languages. For a complete list of supported languages, the names
by which they are recognized, and the kinds of tags which are generated for
each, see the <B>--list-languages</B> and <B>--list-kinds</B> options.


<A NAME="lbAE">&nbsp;</A>
<H2>SOURCE FILES</H2>


Unless the <B>--language-force</B> option is specified, the language of each
source file is automatically selected based upon a mapping of file names to
languages. The mappings in effect for each language may be display using the
<B>--list-maps</B> option and may be changed using the <B>--langmap</B> option.
On platforms which support it, if the name of a file is not mapped
to a language and the file is executable, the first line of the file is
checked to see if the file is a &quot;#!&quot; script for a recognized language.

By default, all other files names are ignored. This permits running
<B>ctags</B> on all files in either a single directory (e.g. &quot;ctags *&quot;), or on
all files in an entire source directory tree (e.g. &quot;ctags -R&quot;), since only
those files whose names are mapped to languages will be scanned.

[The reason that .h extensions are mapped to C++ files rather than C files
is because it is common to use .h extensions in C++, and no harm results in
treating them as C++ files.]


<A NAME="lbAF">&nbsp;</A>
<H2>OPTIONS</H2>


Despite the wealth of available options, defaults are set so that <B>ctags</B>
is most commonly executed without any options (e.g. &quot;ctags *&quot;, or &quot;ctags -R&quot;),
which will create a tag file in the current directory for all recognized
source files. The options described below are provided merely to allow custom
tailoring to meet special needs.

Note that spaces separating the single-letter options from their parameters
are optional.

Note also that the boolean parameters to the long form options (those
beginning with &quot;--&quot; and that take a &quot;<I>[=yes</I>|<I>no]</I>&quot; parameter) may
be omitted, in which case &quot;<B>=</B><I>yes</I>&quot; is implied. (e.g. <B>--sort</B>
is equivalent to <B>--sort</B>=<I>yes</I>). Note further that &quot;=<I>1</I>&quot; and
&quot;=<I>on</I>&quot; are considered synonyms for &quot;=<I>yes</I>&quot;, and that &quot;=<I>0</I>&quot;
and &quot;=<I>off</I>&quot; are considered synonyms for &quot;=<I>no</I>&quot;.

Some options are either ignored or useful only when used while running in
etags mode (see <B>-e</B> option). Such options will be noted.

Most options may appear anywhere on the command line, affecting only those
files which follow the option. A few options, however, must appear before the
first file name and will be noted as such.

Options taking language names will accept those names in either upper or lower
case. See the <B>--list-languages</B> option for a complete list of the
built-in language names.

<DL COMPACT>
<DT><B>-a</B>

<DD>
Equivalent to <B>--append</B>.

<DT><B>-B</B>

<DD>
Use backward searching patterns (e.g. ?pattern?). [Ignored in etags mode]

<DT><B>-e</B>

<DD>
Enable etags mode, which will create a tag file for use with the Emacs editor.
Alternatively, if <B>ctags</B> is invoked by a name containing the string
&quot;etags&quot; (either by renaming, or creating a link to, the executable), etags
mode will be enabled. This option must appear before the first file name.

<DT><B>-f</B><I> tagfile</I>

<DD>
Use the name specified by <I>tagfile</I> for the tag file (default is &quot;tags&quot;,
or &quot;TAGS&quot; when running in etags mode). If <I>tagfile</I> is specified as
&quot;-&quot;, then the tag file is written to standard output instead. <B>Ctags</B>
will stubbornly refuse to take orders if <I>tagfile</I> exists and its first
line contains something other than a valid tags line. This will save your neck
if you mistakenly type &quot;ctags -f *.c&quot;, which would otherwise overwrite your
first C file with the tags generated by the rest! It will also refuse to
accept a multi character file name which begins with a '-' (dash) character,
since this most likely means that you left out the tag file name and this
option tried to grab the next option as the file name. If you really want to
name your output tag file &quot;-ugly&quot;, specify it as &quot;./-ugly&quot;. This option must
appear before the first file name. If this option is specified more than once,
only the last will apply.

<DT><B>-F</B>

<DD>
Use forward searching patterns (e.g. /pattern/) (default).
[Ignored in etags mode]

<DT><B>-h</B><I> list</I>

<DD>
Specifies a list of file extensions, separated by periods, which are to be
interpreted as include (or header) files. To indicate files having no
extension, use a period not followed by a non-period character (e.g. &quot;.&quot;,
&quot;..x&quot;, &quot;.x.&quot;). This option only affects how the scoping of a particular kinds
of tags is interpreted (i.e. whether or not they are considered as globally
visible or visible only within the file in which they are defined); it does
not map the extension to any particular language. Any tag which is located in
a non-include file and cannot be seen (e.g. linked to) from another file is
considered to have file-limited (e.g. static) scope. No kind of tag appearing
in an include file will be considered to have file-limited scope. If the first
character in the list is a plus sign, then the extensions in the list will be
appended to the current list; otherwise, the list will replace the current
list. See, also, the <B>--file-scope</B> option. The default list is
&quot;.h.H.hh.hpp.hxx.h++.inc.def&quot;. To restore the default list, specify <B>-h</B>
<I>default</I>. Note that if an extension supplied to this option is not
already mapped to a particular language (see <B>SOURCE FILES</B>, above), you
will also need to use either the <B>--langmap</B> or <B>--language-force</B>
option.

<DT><B>-I</B><I> tokenlist</I>

<DD>
Specifies a list of tokens which are to be specially handled while parsing C
and C++ source files. This option is specifically provided to handle special
cases arising through the use of preprocessor macros. When the tokens listed
are simple tokens, these tokens will be ignored during parsing of the source
files. If a token is suffixed with a '+' character, <B>ctags</B> will also
ignore any parenthesis-enclosed argument list which may immediately follow the
token in the source files. If two tokens are separated with the '=' character,
the first token is replaced by the second token for parsing purposes. The list
of tokens may be supplied directly on the command line or read in from a
separate file. If the first character of <I>tokenlist</I> is '@', '.' or a
pathname separator ('/' or '\'), or the first two characters specify a drive
letter (e.g. &quot;C:&quot;), the parameter <I>tokenlist</I> will be interpreted as a
filename from which to read a list of tokens, one per input line.
Otherwise, <I>tokenlist</I> is a list of tokens (or token pairs) to be
specially handled, each delimited by a either a comma or by white space (in
which case the list should be quoted to keep the entire list as one command
line argument). Multiple <B>-I</B> options may be supplied. To clear the list
of ignore tokens, supply a single dash (&quot;-&quot;) for <I>tokenlist</I>.

This feature is useful when preprocessor macros are used in such a way that
they cause syntactic confusion due to their presence. Indeed, this is the best
way of working around a number of problems caused by the presence of
syntax-busting macros in source files (see <B>BUGS</B>, below). Some examples
will illustrate this point.

<DL COMPACT><DT><DD>
int foo ARGDECL4(void *, ptr, long int, nbytes)
</DL>


<DT><DD>
In the above example, the macro &quot;ARGDECL4&quot; would be mistakenly interpreted to
be the name of the function instead of the correct name of &quot;foo&quot;. Specifying
<B>-I</B> <I>ARGDECL4</I> results in the correct behavior.

<DL COMPACT><DT><DD>
/* creates an RCS version string in module */
<BR>

MODULE_VERSION(&quot;$Revision: 1.30 $&quot;)
</DL>


<DT><DD>
In the above example the macro invocation looks too much like a function
definition because it is not followed by a semicolon (indeed, it could even be
followed by a global variable definition that would look much like a K&amp;R style
function parameter declaration). In fact, this seeming function definition
could possibly even cause the rest of the file to be skipped over while trying
to complete the definition. Specifying <B>-I</B> <I>MODULE_VERSION+</I> would
avoid such a problem.

<DL COMPACT><DT><DD>
CLASS Example {
<BR>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;your&nbsp;content&nbsp;here
<BR>

};
</DL>


<DT><DD>
The example above uses &quot;CLASS&quot; as a preprocessor macro which expands to
something different for each platform. For instance CLASS may be defined as
&quot;class __declspec(dllexport)&quot; on Win32 platforms and simply &quot;class&quot; on UNIX.
Normally, the absence of the C++ keyword &quot;class&quot; would cause the source file
to be incorrectly parsed. Correct behavior can be restored by specifying
<B>-I</B> <I>CLASS=class</I>.

<DT><B>-L</B><I> file</I>

<DD>
Read from <I>file</I> a list of file names for which tags should be generated.
If <I>file</I> is specified as &quot;-&quot;, then file names are read from standard
input. File names read using this option are processed following file names
appearing on the command line. Options all also accepted in this input. If
this option is specified more than once, only the last will apply. <B>Note:</B>
<I>file</I> is read in line-oriented mode, where a new line is the only
delimiter and spaces are considered significant, in order that file names
containing spaces may be supplied; this can affect how options are parsed if
included in the input.

<DT><B>-n</B>

<DD>
Equivalent to <B>--excmd</B>=<I>number</I>.

<DT><B>-N</B>

<DD>
Equivalent to <B>--excmd</B>=<I>pattern</I>.

<DT><B>-o</B><I> tagfile</I>

<DD>
Equivalent to <B>-f</B> <I>tagfile</I>.

<DT><B>-R</B>

<DD>
Equivalent to <B>--recurse</B>.

<DT><B>-u</B>

<DD>
Equivalent to <B>--sort</B>=<I>no</I> (i.e. &quot;unsorted&quot;).

<DT><B>-V</B>

<DD>
Equivalent to <B>--verbose</B>.

<DT><B>-w</B>

<DD>
This option is silently ignored for backward-compatibility with the ctags
of SVR4 Unix.

<DT><B>-x</B>

<DD>
Print a tabular, human-readable cross reference (xref) file to standard output
instead of generating a tag file. The information contained in the output
includes: the tag name; the kind of tag; the line number, file name, and
source line (with extra white space condensed) of the file which defines the
tag. No tag file is written and all options affecting tag file output will be
ignored. Example applications for this feature are generating a listing of all
functions located in a source file (e.g. <B>ctags -x --c-kinds</B>=<I>f</I>
<I>file</I>), or generating a list of all externally visible global variables
located in a source file (e.g. <B>ctags -x --c-kinds</B>=<I>v</I>
<B>--file-scope</B>=<I>no file</I>). This option must appear before the first
file name.

<DT><B>--append</B>[=<I>yes</I>|<I>no</I>]<DD>
Indicates whether tags generated from the specified files should be appended
to those already present in the tag file or should replace them. This option
is off by default. This option must appear before the first file name.

<DT><B>--etags-include</B>=<I>file</I><DD>
Include a reference to <I>file</I> in the tag file. This option may be
specified as many times as desired. This supports Emacs' capability to use a
tag file which &quot;includes&quot; other tag files. [Available only in etags mode]

<DT><B>--exclude</B>=[<I>pattern</I>]<DD>
Add <I>pattern</I> to a list of excluded files and directories. This option
may be specified as many times as desired. For each file name considered by
<B>ctags</B>, each <I>pattern</I> specified using this option will be compared
against both the complete path (e.g. some/path/base.ext) and the base name
(e.g. base.ext) of the file, thus allowing patterns which match a given file
name irrespective of its path, or match only a specific path. If appropriate
support is available from the runtime library of your C compiler, then
<I>pattern</I> may contain the usual shell wildcards (not regular expressions)
common on Unix (be sure to quote the option parameter to protect the wildcards
from being expanded by the shell before being passed to <B>ctags</B>; also be
aware that wildcards can match the slash character, '/'). You can determine if
shell wildcards are available on your platform by examining the output of the
<B>--version</B> option, which will include &quot;+wildcards&quot; in the compiled
feature list; otherwise, <I>pattern</I> is matched against file names using a
simple textual comparison.

If <I>pattern</I> begins with the character '@', then the rest of the string
is interpreted as a file name from which to read exclusion patterns, one per
line. If <I>pattern</I> is empty, the list of excluded patterns is cleared.
Note that at program startup, the default exclude list contains &quot;EIFGEN&quot;,
&quot;SCCS&quot;, &quot;RCS&quot;, and &quot;CVS&quot;, which are names of directories for which it is
generally not desirable to descend while processing the <B>--recurse</B>
option.

<DT><B>--excmd</B>=<I>type</I><DD>
Determines the type of EX command used to locate tags in the source file.
[Ignored in etags mode]

The valid values for <I>type</I> (either the entire word or the first letter is
accepted) are:

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT><I>number</I>

<DD>
Use only line numbers in the tag file for locating tags. This has four
advantages:

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>1.<DD>
Significantly reduces the size of the resulting tag file.
<DT>2.<DD>
Eliminates failures to find tags because the line defining the tag has
changed, causing the pattern match to fail (note that some editors, such as
<B>vim</B>, are able to recover in many such instances).
<DT>3.<DD>
Eliminates finding identical matching, but incorrect, source lines (see
<B>BUGS</B>, below).
<DT>4.<DD>
Retains separate entries in the tag file for lines which are identical in
content. In <I>pattern</I> mode, duplicate entries are dropped because the
search patterns they generate are identical, making the duplicate entries
useless.
</DL>
</DL>



<DT><DD>
However, this option has one significant drawback: changes to the source files
can cause the line numbers recorded in the tag file to no longer correspond
to the lines in the source file, causing jumps to some tags to miss the target
definition by one or more lines. Basically, this option is best used when the
source code to which it is applied is not subject to change. Selecting this
option type causes the following options to be ignored: <B>-BF</B>.

<DT><I>pattern</I>

<DD>
Use only search patterns for all tags, rather than the line numbers usually
used for macro definitions. This has the advantage of not referencing obsolete
line numbers when lines have been added or removed since the tag file was
generated.

<DT><I>mixed</I>

<DD>
In this mode, patterns are generally used with a few exceptions. For C, line
numbers are used for macro definition tags. This was the default format
generated by the original <B>ctags</B> and is, therefore, retained as the
default for this option. For Fortran, line numbers are used for common blocks
because their corresponding source lines are generally identical, making
pattern searches useless for finding all matches.
</DL>
</DL>


<DT><B>--extra</B>=<I>[+|-]flags</I><DD>
Specifies whether to include extra tag entries for certain kinds of
information. The parameter <I>flags</I> is a set of one-letter flags, each
representing one kind of extra tag entry to include in the tag file. If
<I>flags</I> is preceded by by either the '+' or '-' character, the effect of
each flag is added to, or removed from, those currently enabled; otherwise the
flags replace any current settings. The meaning of each flag is as follows:

</DL>
<P>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT><I>f</I>

<DD>
Include an entry for the base file name of every source file (e.g.
&quot;example.c&quot;), which addresses the first line of the file.
<DT><I>q</I>

<DD>
Include an extra class-qualified tag entry for each tag which is a member
of a class (for languages for which this information is extracted; currently
C++, Eiffel, and Java). The actual form of the qualified tag depends upon the
language from which the tag was derived (using a form that is most natural for
how qualified calls are specified in the language). For C++, it is in the form
&quot;class::member&quot;; for Eiffel and Java, it is in the form &quot;class.member&quot;. This
may allow easier location of a specific tags when multiple occurrences of a
tag name occur in the tag file. Note, however, that this could potentially
more than double the size of the tag file.
</DL>
</DL>


<DL COMPACT>
<DT><B>--fields</B>=<I>[+|-]flags</I><DD>
Specifies the available extension fields which are to be included in the
entries of the tag file (see <B>TAG FILE FORMAT</B>, below, for more
information). The parameter <I>flags</I> is a set of one-letter flags, each
representing one type of extension field to include, with the following
meanings (disabled by default unless indicated):

</DL>
<P>


<DL COMPACT><DT><DD>
<DL COMPACT>
<DT><I>a</I>

<DD>
Access (or export) of class members
<DT><I>f</I>

<DD>
File-restricted scoping [enabled]
<DT><I>i</I>

<DD>
Inheritance information
<DT><I>k</I>

<DD>
Kind of tag as a single letter [enabled]
<DT><I>K</I>

<DD>
Kind of tag as full name
<DT><I>l</I>

<DD>
Language of source file containing tag
<DT><I>m</I>

<DD>
Implementation information
<DT><I>n</I>

<DD>
Line number of tag definition
<DT><I>s</I>

<DD>
Scope of tag definition [enabled]
<DT><I>S</I>

<DD>
Signature of routine (e.g. prototype or parameter list)
<DT><I>z</I>

<DD>
Include the &quot;kind:&quot; key in kind field

</DL>
</DL>


<DL COMPACT><DT><DD>
Each letter or group of letters may be preceded by either '+' to add it to the
default set, or '-' to exclude it. In the absence of any preceding '+' or '-'
sign, only those kinds explicitly listed in <I>flags</I> will be included in
the output (i.e. overriding the default set). This option is ignored if the
option <B>--format</B>=<I>1</I> has been specified. The default value 
of this options is <I>fks</I>.
</DL>


<DL COMPACT>
<DT><B>--file-scope</B>[=<I>yes</I>|<I>no</I>]<DD>
Indicates whether tags scoped only for a single file (i.e. tags which cannot
be seen outside of the file in which they are defined, such as &quot;static&quot; tags)
should be included in the output. See, also, the <B>-h</B> option. This option
is enabled by default.

<DT><B>--filter</B>[=<I>yes</I>|<I>no</I>]<DD>
Causes <B>ctags</B> to behave as a filter, reading source file names from
standard input and printing their tags to standard output on a file-by-file
basis. If <B>--sorted</B> is enabled, tags are sorted only within the source
file in which they are defined. File names are read from standard output in
line-oriented input mode (see note for <B>-L</B> option) and only after file
names listed on the command line or from any file supplied using the <B>-L</B>
option. When this option is enabled, the options <B>-f</B>, <B>-o</B>,
and <B>--totals</B> are ignored. This option is quite esoteric and is disabled
by default. This option must appear before the first file name.

<DT><B>--filter-terminator</B>=<I>string</I><DD>
Specifies a string to print to standard output following the tags for each
file name parsed when the <B>--filter</B> option is enabled. This may permit an
application reading the output of ctags to determine when the output for each
file is finished. Note that if the file name read is a directory and
<B>--recurse</B> is enabled, this string will be printed only one once at the
end of all tags found for by descending the directory. This string will always
be separated from the last tag line for the file by its terminating newline.
This option is quite esoteric and is empty by default. This option must appear
before the first file name.

<DT><B>--format</B>=<I>level</I><DD>
Change the format of the output tag file. Currently the only valid values for
<I>level</I> are <I>1</I> or <I>2</I>. Level 1 specifies the original tag file
format and level 2 specifies a new extended format containing extension fields
(but in a manner which retains backward-compatibility with original
<B><A HREF="http://localhost/cgi-bin/man/man2html?1+vi">vi</A></B>(1) implementations). The default level is 2. This option must appear
before the first file name. [Ignored in etags mode]

<DT><B>--help</B>

<DD>
Prints to standard output a detailed usage description.

<DT><B>--if0</B>[=<I>yes</I>|<I>no</I>]<DD>
Indicates a preference as to whether code within an &quot;#if 0&quot; branch of a
preprocessor conditional should be examined for non-macro tags (macro tags are
always included). Because the intent of this construct is to disable code, the
default value of this options is <I>no</I>. Note that this indicates a
preference only and does not guarantee skipping code within an &quot;#if 0&quot; branch,
since the fall-back algorithm used to generate tags when preprocessor
conditionals are too complex follows all branches of a conditional. This
option is disabled by default.

<DT><B>--&lt;LANG&gt;-kinds</B>=<I>[+|-]kinds</I><DD>
Specifies a list of language-specific kinds of tags (or kinds) to include in
the output file for a particular language, where <B>&lt;LANG&gt;</B> is
case-insensitive and is one of the built-in language names (see the
<B>--list-languages</B> option for a complete list). The parameter <I>kinds</I>
is a group of one-letter flags designating kinds of tags (particular to the
language) to either include or exclude from the output. The specific sets of
flags recognized for each language, their meanings and defaults may be list
using the <B>--list-kinds</B> option. Each letter or group of letters may be
preceded by either '+' to add it to, or '-' to remove it from, the default
set. In the absence of any preceding '+' or '-' sign, only those kinds
explicitly listed in <I>kinds</I> will be included in the output (i.e.
overriding the default for the specified language).

As an example for the C language, in order to add prototypes and external
variable declarations to the default set of tag kinds, but exclude macros,
use <B>--c-kinds</B>=<I>+px-d</I>; to include only tags for functions, use
<B>--c-kinds</B>=<I>f</I>.

<DT><B>--langdef</B>=<I>name</I><DD>
Defines a new user-defined language, <I>name</I>, to be parsed with regular
expressions. Once defined, <I>name</I> may be used in other options taking
language names. The typical use of this option is to first define the
language, then map file names to it using <I>--langmap</I>, then specify
regular expressions using <I>--regex-&lt;LANG&gt;</I> to define how its tags are
found.

<DT><B>--langmap</B>=<I>map[,map[...]]</I><DD>
Controls how file names are mapped to languages (see the <B>--list-maps</B>
option). Each comma-separated <I>map</I> consists of the language name (either
a built-in or user-defined language), a colon, and a list of file extensions
and/or file name patterns. A file extension is specified by preceding the
extension with a period (e.g. &quot;.c&quot;). A file name pattern is specified by
enclosing the pattern in parentheses (e.g. &quot;([Mm]akefile)&quot;). If appropriate
support is available from the runtime library of your C compiler, then the
file name pattern may contain the usual shell wildcards common on Unix (be
sure to quote the option parameter to protect the wildcards from being
expanded by the shell before being passed to <B>ctags</B>). You can determine
if shell wildcards are available on your platform by examining the output of
the <B>--version</B> option, which will include &quot;+wildcards&quot; in the compiled
feature list; otherwise, the file name patterns are matched against file names
using a simple textual comparison.

If the first character in a map is a plus sign, then the extensions and file
name patterns in that map will be appended to the current map for that
language; otherwise, the map will replace the current map. For example, to
specify that only files with extensions of .c and .x are to be treated as C
language files, use &quot;<B>--langmap</B>=<I>c:.c.x</I>&quot;; to also add files with
extensions of .j as Java language files, specify
&quot;<B>--langmap</B>=<I>c:.c.x,java:+.j</I>&quot;. To map makefiles (.e.g files
named either &quot;Makefile&quot;, &quot;makefile&quot;, or having the extension &quot;.mak&quot;) to a
language called &quot;make&quot;, specify &quot;<B>--langmap</B>=<I>make:([Mm]akefile).mak</I>&quot;.
To map files having no extension, specify a period not followed by a
non-period character (e.g. &quot;.&quot;, &quot;..x&quot;, &quot;.x.&quot;). To clear the mapping for a
particular language (thus inhibiting automatic generation of tags for that
language), specify an empty extension list (e.g.
&quot;<B>--langmap</B>=<I>fortran:</I>&quot;). To restore the default language mappings
for all a particular language, supply the keyword &quot;default&quot; for the mapping.
To specify restore the default language mappings for all languages, specify
&quot;<B>--langmap</B>=<I>default</I>&quot;. Note that file extensions are tested before
file name patterns when inferring the language of a file.

<DT><B>--language-force</B>=<I>language</I><DD>
By default, <B>ctags</B> automatically selects the language of a source file,
ignoring those files whose language cannot be determined (see
<B>SOURCE FILES</B>, above). This option forces the specified <I>language</I>
(case-insensitive; either built-in or user-defined) to be used for every
supplied file instead of automatically selecting the language based upon its
extension. In addition, the special value <I>auto</I> indicates that the
language should be automatically selected (which effectively disables this
option).

<DT><B>--languages</B>=<I>[+|-]list</I><DD>
Specifies the languages for which tag generation is enabled, with <I>list</I>
containing a comma-separated list of language names (case-insensitive; either
built-in or user-defined). If the first language of <I>list</I> is not preceded
by either a '+' or '-', the current list will be cleared before adding or
removing the languages in <I>list</I>. Until a '-' is encountered, each
language in the list will be added to the current list. As either the '+' or

removed from the current list, respectively. Thus, it becomes simple to
replace the current list with a new one, or to add or remove languages from
the current list. The actual list of files for which tags will be generated
depends upon the language extension mapping in effect (see the <B>--langmap</B>
option). Note that all languages, including user-defined languages are enabled
unless explicitly disabled using this option. Language names included in
<I>list</I> may be any built-in language or one previously defined with
<B>--langdef</B>. The default is &quot;all&quot;, which is also accepted as a valid
argument. See the <B>--list-languages</B> option for a complete list of the
built-in language names.

<DT><B>--license</B><DD>
Prints a summary of the software license to standard output.

<DT><B>--line-directives</B>[=<I>yes</I>|<I>no</I>]<DD>
Specifies whether &quot;#line&quot; directives should be recognized. These are present
in the output of preprocessors and contain the line number, and possibly the
file name, of the original source file(s) from which the preprocessor output
file was generated. When enabled, this option will cause <B>ctags</B> to
generate tag entries marked with the file names and line numbers of their
locations original source file(s), instead of their actual locations in the
preprocessor output. The actual file names placed into the tag file will have
the same leading path components as the preprocessor output file, since it is
assumed that the original source files are located relative to the
preprocessor output file (unless, of course, the #line directive specifies an
absolute path). This option is off by default. <B>Note:</B> This option is
generally only useful when used together with the <B>--excmd</B>=<I>number</I>
(<B>-n</B>) option. Also, you may have to use either the <B>--langmap</B> or
<B>--language-force</B> option if the extension of the preprocessor output file
is not known to <B>ctags</B>.

<DT><B>--links</B>[=<I>yes</I>|<I>no</I>]<DD>
Indicates whether symbolic links (if supported) should be followed. When
disabled, symbolic links are ignored. This option is on by default.

<DT><B>--list-kinds</B>[=<I>language</I>|<I>all</I>]<DD>
Lists the tag kinds recognized for either the specified language or all
languages. Each kind of tag recorded in the tag file is represented by a
one-letter flag, which is also used to filter the tags placed into the output
through use of the <B>--&lt;LANG&gt;-kind</B> option. Note that some languages and/or
tag kinds may be implemented using regular expressions and may not be
available if regex support is not compiled into <B>ctags</B> (see the
<B>--regex-&lt;LANG&gt;</B> option). Each kind listed is enabled unless followed by
&quot;[off]&quot;.

<DT><B>--list-maps</B>[=<I>language</I>|<I>all</I>]<DD>
Lists the file extensions and file name patterns which associate a file name
with a language for either the specified language or all languages. See
the <B>--langmap</B> option, and <B>SOURCE FILES</B>, above.

<DT><B>--list-languages</B><DD>
Lists the names of the languages understood by <B>ctags</B>. These language
names are case insensitive and may be used in the <B>--language-force</B>,
<B>--languages</B>, <B>--&lt;LANG&gt;-kinds</B>, and <B>--regex-&lt;LANG&gt;</B> options.

<DT><B>--options</B>=<I>file</I><DD>
Read additional options from <I>file</I>. As a special case, if
<B>--options</B>=<I>NONE</I> is specified as the first option on the command
line, it will disable the automatic reading of any configuration options from
either a file or the environment (see <B>FILES</B>).

<DT><B>--recurse</B>[=<I>yes</I>|<I>no</I>]<DD>
Recurse into directories encountered in the list of supplied files. If the
list of supplied files is empty and no file list is specified with the
<B>-L</B> option, then the current directory (i.e. &quot;.&quot;) is assumed. Symbolic
links are followed. If you don't like these behaviors, either explicitly
specify the files or pipe the output of <B><A HREF="http://localhost/cgi-bin/man/man2html?1+find">find</A></B>(1) into <B>ctags -L-</B>
instead. <B>Note:</B> This option is not supported on all platforms at present.
It is available if the output of the <B>--help</B> option includes this option.
See, also, the <B>--exclude</B> to limit recursion.

<DT><B>--regex-&lt;LANG&gt;</B>=<I>/regexp/replacement/[kind-spec/][flags]</I><DD>
The <I>/regexp/replacement/</I> pair define a regular expression replacement
pattern, similar in style to <B>sed</B> substitution commands, with which to
generate tags from source files mapped to the named language, <B>&lt;LANG&gt;</B>,
(case-insensitive; either a built-in or user-defined language). The regular
expression, <I>regexp</I>, defines an extended regular expression (roughly that
used by <B><A HREF="http://localhost/cgi-bin/man/man2html?1+egrep">egrep</A></B>(1)), which is used to locate a single source line
containing a tag and may specify tab characters using \t. When a matching
line is found, a tag will be generated for the name defined by
<I>replacement</I>, which generally will contain the special back-references
\1 through \9 to refer to matching sub-expression groups within
<I>regexp</I>. The '/' separator characters shown in the parameter to the
option can actually be replaced by any character. Note that whichever
separator character is used will have to be escaped with a backslash ('\')
character wherever it is used in the parameter as something other than a
separator. The regular expression defined by this option is added to the
current list of regular expressions for the specified language unless the
parameter is omitted, in which case the current list is cleared.

Unless modified by <I>flags</I>, <I>regexp</I> is interpreted as a Posix
extended regular expression. The <I>replacement</I> should expand for all
matching lines to a non-empty string of characters, or a warning message will
be reported. An optional kind specifier for tags matching <I>regexp</I> may
follow <I>replacement</I>, which will determine what kind of tag is reported in
the &quot;kind&quot; extension field (see <B>TAG FILE FORMAT</B>, below). The full form
of <I>kind-spec</I> is in the form of a single letter, a comma, a name (without
spaces), a comma, a description, followed by a separator, which specify
the short and long forms of the kind value and its textual description
(displayed using <B>--list-kinds</B>). Either the kind name and/or the
description may be omitted. If <I>kind-spec</I> is omitted, it defaults to
&quot;<I>r,regex</I>&quot;. Finally, <I>flags</I> are one or more single-letter characters
having the following effect upon the interpretation of <I>regexp</I>:

</DL>
<P>

<DL COMPACT><DT><DD>
<DL COMPACT>
<DT><I>b</I>

<DD>
The pattern is interpreted as a Posix basic regular expression.
<DT><I>e</I>

<DD>
The pattern is interpreted as a Posix extended regular expression (default).
<DT><I>i</I>

<DD>
The regular expression is to be applied in a case-insensitive manner.
</DL>
</DL>


<DL COMPACT><DT><DD>
Note that this option is available only if <B>ctags</B> was compiled with
support for regular expressions, which depends upon your platform. You can
determine if support for regular expressions is compiled in by examining the
output of the <B>--version</B> option, which will include &quot;+regex&quot; in the
compiled feature list.

For more information on the regular expressions used by <B>ctags</B>, see
either the <B>regex(5,7)</B> man page, or the GNU info documentation for regex
(e.g. &quot;info regex&quot;).
</DL>


<DL COMPACT>
<DT><B>--sort</B>[=<I>yes</I>|<I>no</I>|<I>foldcase</I>]<DD>
Indicates whether the tag file should be sorted on the tag name (default is
<I>yes</I>). Note that the original <B><A HREF="http://localhost/cgi-bin/man/man2html?1+vi">vi</A></B>(1) required sorted tags. 
The <I>foldcase</I> value specifies case insensitive (or case-folded) sorting.
Fast binary searches of tag files sorted with case-folding will require
special support from tools using tag files, such as that found in the ctags
readtags library, or Vim version 6.2 or higher (using &quot;set ignorecase&quot;). This
option must appear before the first file name. [Ignored in etags mode]

<DT><B>--tag-relative</B>[=<I>yes</I>|<I>no</I>]<DD>
Indicates that the file paths recorded in the tag file should be relative to
the directory containing the tag file, rather than relative to the current
directory, unless the files supplied on the command line are specified with
absolute paths. This option must appear before the first file name. The
default is <I>yes</I> when running in etags mode (see the <B>-e</B>
option), <I>no</I> otherwise.

<DT><B>--totals</B>[=<I>yes</I>|<I>no</I>]<DD>
Prints statistics about the source files read and the tag file written during
the current invocation of <B>ctags</B>. This option is off by default.
This option must appear before the first file name.

<DT><B>--verbose</B>[=<I>yes</I>|<I>no</I>]<DD>
Enable verbose mode. This prints out information on option processing and a
brief message describing what action is being taken for each file considered
by <B>ctags</B>. Normally, <B>ctags</B> does not read command line arguments
until after options are read from the configuration files (see <B>FILES</B>,
below) and the <B>CTAGS</B> environment variable. However, if this option is
the first argument on the command line, it will take effect before any options
are read from these sources. The default is <I>no</I>.

<DT><B>--version</B><DD>
Prints a version identifier for <B>ctags</B> to standard output. This is
guaranteed to always contain the string &quot;Exuberant Ctags&quot;.


</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>OPERATIONAL DETAILS</H2>


As <B>ctags</B> considers each file name in turn, it tries to determine the
language of the file by applying the following three tests in order: if the
file extension has been mapped to a language, if the file name matches a shell
pattern mapped to a language, and finally if the file is executable and its
first line specifies an interpreter using the Unix-style &quot;#!&quot; specification
(if supported on the platform). If a language was identified, the file is
opened and then the appropriate language parser is called to operate on the
currently open file. The parser parses through the file and adds an entry to
the tag file for each language object it is written to handle. See
<B>TAG FILE FORMAT</B>, below, for details on these entries.

This implementation of <B>ctags</B> imposes no formatting requirements on C
code as do legacy implementations. Older implementations of ctags tended to
rely upon certain formatting assumptions in order to help it resolve coding
dilemmas caused by preprocessor conditionals.

In general, <B>ctags</B> tries to be smart about conditional preprocessor
directives. If a preprocessor conditional is encountered within a statement
which defines a tag, <B>ctags</B> follows only the first branch of that
conditional (except in the special case of &quot;#if 0&quot;, in which case it follows
only the last branch). The reason for this is that failing to pursue only one
branch can result in ambiguous syntax, as in the following example:

<DL COMPACT><DT><DD>
#ifdef TWO_ALTERNATIVES
<BR>

struct {
<BR>

#else
<BR>

union {
<BR>

#endif
<DL COMPACT><DT><DD>
short a;
<BR>

long b;
</DL>

}
</DL>


Both branches cannot be followed, or braces become unbalanced and <B>ctags</B>
would be unable to make sense of the syntax.

If the application of this heuristic fails to properly parse a file,
generally due to complicated and inconsistent pairing within the conditionals,
<B>ctags</B> will retry the file using a different heuristic which does not
selectively follow conditional preprocessor branches, but instead falls back
to relying upon a closing brace (&quot;}&quot;) in column 1 as indicating the end of a
block once any brace imbalance results from following a #if conditional branch.

<B>Ctags</B> will also try to specially handle arguments lists enclosed in
double sets of parentheses in order to accept the following conditional
construct:

<DL COMPACT><DT><DD>
extern void foo __ARGS((int one, char two));
</DL>


Any name immediately preceding the &quot;((&quot; will be automatically ignored and
the previous name will be used.

C++ operator definitions are specially handled. In order for consistency with
all types of operators (overloaded and conversion), the operator name in the
tag file will always be preceded by the string &quot;operator &quot; (i.e. even if the
actual operator definition was written as &quot;operator&lt;&lt;&quot;).

After creating or appending to the tag file, it is sorted by the tag name,
removing identical tag lines.


<A NAME="lbAH">&nbsp;</A>
<H2>TAG FILE FORMAT</H2>


When not running in etags mode, each entry in the tag file consists of a
separate line, each looking like this in the most general case:

<DL COMPACT><DT><DD>
tag_name&lt;TAB&gt;file_name&lt;TAB&gt;ex_cmd;&quot;&lt;TAB&gt;extension_fields
</DL>


The fields and separators of these lines are specified as follows:


<DL COMPACT><DT><DD>
<DL COMPACT>
<DT>1.<DD>
tag name
<DT>2.<DD>
single tab character
<DT>3.<DD>
name of the file in which the object associated with the tag is located
<DT>4.<DD>
single tab character
<DT>5.<DD>
EX command used to locate the tag within the file; generally a search pattern
(either /pattern/ or ?pattern?) or line number (see <B>--excmd</B>). Tag file
format 2 (see <B>--format</B>) extends this EX command under certain
circumstances to include a set of extension fields (described below) embedded
in an EX comment immediately appended to the EX command, which leaves it
backward-compatible with original <B><A HREF="http://localhost/cgi-bin/man/man2html?1+vi">vi</A></B>(1) implementations.
</DL>
</DL>



A few special tags are written into the tag file for internal purposes. These
tags are composed in such a way that they always sort to the top of the file.
Therefore, the first two characters of these tags are used a magic number to
detect a tag file for purposes of determining whether a valid tag file is
being overwritten rather than a source file.

Note that the name of each source file will be recorded in the tag file
exactly as it appears on the command line. Therefore, if the path you
specified on the command line was relative to the current directory, then it
will be recorded in that same manner in the tag file. See, however, the
<B>--tag-relative</B> option for how this behavior can be modified.

Extension fields are tab-separated key-value pairs appended to the end of the
EX command as a comment, as described above. These key value pairs appear in
the general form &quot;<I>key</I>:<I>value</I>&quot;. Their presence in the lines of the
tag file are controlled by the <B>--fields</B> option. The possible keys and
the meaning of their values are as follows:

<DL COMPACT>
<DT><I>access</I>

<DD>
Indicates the visibility of this class member, where <I>value</I> is specific
to the language.

<DT><I>file</I>

<DD>
Indicates that the tag has file-limited visibility. This key has no
corresponding value.

<DT><I>kind</I>

<DD>
Indicates the type, or kind, of tag. Its value is either one of the
corresponding one-letter flags described under the various
<B>--&lt;LANG&gt;-kinds</B> options above, or a full name. It is permitted (and is,
in fact, the default) for the key portion of this field to be omitted. The
optional behaviors are controlled with the <B>--fields</B> option.

<DT><I>implementation</I>

<DD>
When present, this indicates a limited implementation (abstract vs. concrete)
of a routine or class, where <I>value</I> is specific to the language
(&quot;virtual&quot; or &quot;pure virtual&quot; for C++; &quot;abstract&quot; for Java).

<DT><I>inherits</I>

<DD>
When present, <I>value</I>. is a comma-separated list of classes from which
this class is derived (i.e. inherits from).

<DT><I>signature</I>

<DD>
When present, <I>value</I>. is a language-dependent representation of the
signature of a routine. A routine signature in its complete form specifies the
return type of a routine and its formal argument list. This extension field is
presently supported only for C-based languages and does not include the return
type.

</DL>
<P>

In addition, information on the scope of the tag definition may be available,
with the key portion equal to some language-dependent construct name and its
value the name declared for that construct in the program. This scope entry
indicates the scope in which the tag was found. For example, a tag generated
for a C structure member would have a scope looking like &quot;struct:myStruct&quot;.


<A NAME="lbAI">&nbsp;</A>
<H2>HOW TO USE WITH VI</H2>

Vi will, by default, expect a tag file by the name &quot;tags&quot; in the current
directory. Once the tag file is built, the following commands exercise the tag
indexing feature:
<DL COMPACT>
<DT><B>vi -t tag</B>

<DD>
Start vi and position the cursor at the file and line where &quot;tag&quot; is defined.
<DT><B>:ta tag</B>

<DD>
Find a tag.
<DT><B>Ctrl-]</B>

<DD>
Find the tag under the cursor.
<DT><B>Ctrl-T</B>

<DD>
Return to previous location before jump to tag (not widely implemented).


</DL>
<A NAME="lbAJ">&nbsp;</A>
<H2>HOW TO USE WITH GNU EMACS</H2>

Emacs will, by default, expect a tag file by the name &quot;TAGS&quot; in the current
directory. Once the tag file is built, the following commands exercise the
tag indexing feature:
<DL COMPACT>
<DT><B>M-x visit-tags-table &lt;RET&gt; FILE &lt;RET&gt;</B>

<DD>
Select the tag file, &quot;FILE&quot;, to use.
<DT><B>M-. [TAG] &lt;RET&gt;</B>

<DD>
Find the first definition of TAG. The default tag is the identifier under the
cursor.
<DT><B>M-*</B>

<DD>
Pop back to where you previously invoked &quot;M-.&quot;.
<DT><B>C-u M-.</B>

<DD>
Find the next definition for the last tag.

</DL>
<P>

For more commands, see the <I>Tags</I> topic in the Emacs info document.


<A NAME="lbAK">&nbsp;</A>
<H2>HOW TO USE WITH NEDIT</H2>

NEdit version 5.1 and later can handle the new extended tag file format (see
<B>--format</B>). To make NEdit use the tag file, select &quot;File-&gt;Load Tags
File&quot;. To jump to the definition for a tag, highlight the word, the press
Ctrl-D. NEdit 5.1 can can read multiple tag files from different directories.
Setting the X resource nedit.tagFile to the name of a tag file instructs NEdit
to automatically load that tag file at startup time.


<A NAME="lbAL">&nbsp;</A>
<H2>CAVEATS</H2>

Because <B>ctags</B> is neither a preprocessor nor a compiler, use of
preprocessor macros can fool <B>ctags</B> into either missing tags or
improperly generating inappropriate tags. Although <B>ctags</B> has been
designed to handle certain common cases, this is the single biggest cause of
reported problems. In particular, the use of preprocessor constructs which
alter the textual syntax of C can fool <B>ctags</B>. You can work around many
such problems by using the <B>-I</B> option.

White space is treated as a separator for file names and options read from
list files, specified using the <B>-L</B> option, and in filter mode (specified
using the <B>--filter</B> option). Therefore, it is not currently possible to
supply file names or other options containing embedded white space (spaces,
etc.) through these options.

Note that when <B>ctags</B> generates uses patterns for locating tags (see
the <B>--excmd</B> option), it is entirely possible that the wrong line may be
found by your editor if there exists another source line which is identical to
the line containing the tag. The following example demonstrates this condition:

<DL COMPACT><DT><DD>
int variable;

/* ... */
<BR>

void foo(variable)
<BR>

int variable;
<BR>

{
<DL COMPACT><DT><DD>
/* ... */
</DL>

}
</DL>


Depending upon which editor you use and where in the code you happen to be, it
is possible that the search pattern may locate the local parameter declaration
in foo() before it finds the actual global variable definition, since the
lines (and therefore their search patterns are identical). This can be avoided
by use of the <B>--excmd</B>=<I>n</I> option.


<A NAME="lbAM">&nbsp;</A>
<H2>BUGS</H2>

<B>Ctags</B> has more options than <B><A HREF="http://localhost/cgi-bin/man/man2html?1+ls">ls</A></B>(1).

When parsing a C++ member function definition (e.g. &quot;className::function&quot;),
<B>ctags</B> cannot determine whether the scope specifier is a class name or a
namespace specifier and always lists it as a class name in the scope portion
of the extension fields. Also, if a C++ function is defined outside of the
class declaration (the usual case), the access specification (i.e. public,
protected, or private) and implementation information (e.g. virtual, pure
virtual) contained in the function declaration are not known when the tag is
generated for the function definition. It will, however be available for
prototypes (e.g <B>--c++-kinds</B>=<I>+p</I>).

No qualified tags are generated for language objects inherited into a class.


<A NAME="lbAN">&nbsp;</A>
<H2>ENVIRONMENT VARIABLES</H2>


<DL COMPACT>
<DT><B>CTAGS</B>

<DD>
If this environment variable exists, it will be expected to contain a set of
default options which are read when <B>ctags</B> starts, after the
configuration files listed in <B>FILES</B>, below, are read, but before any
command line options are read. Options appearing on the command line will
override options specified in this variable. Only options will be read from
this variable. Note that all white space in this variable in considered a
separator, making it impossible to pass an option parameter containing an
embedded space. If this is a problem, use a configuration file instead.

<DT><B>ETAGS</B>

<DD>
Similar to the <B>CTAGS</B> variable above, this variable, if found, will be
read when <B>etags</B> starts. If this variable is not found, <B>etags</B> will
try to use <B>CTAGS</B> instead.

<DT><B>TMPDIR</B>

<DD>
On Unix-like hosts where mkstemp() is available, the value of this variable
specifies the directory in which to place temporary files. This can be useful
if the size of a temporary file becomes too large to fit on the partition
holding the default temporary directory defined at compilation time.
<B>ctags</B> creates temporary files only if either (1) an emacs-style tag file
is being generated, (2) the tag file is being sent to standard output, or (3)
the program was compiled to use an internal sort algorithm to sort the tag
files instead of the the sort utility of the operating system. If the sort
utility of the operating system is being used, it will generally observe this
variable also. Note that if <B>ctags</B> is setuid, the value of TMPDIR will be
ignored.


</DL>
<A NAME="lbAO">&nbsp;</A>
<H2>FILES</H2>


<I>/ctags.cnf (on MSDOS, MSWindows only)</I>

<BR>

<I>/etc/ctags.conf</I>

<BR>

<I>/usr/local/etc/ctags.conf</I>

<BR>

<I>$HOME/.ctags ($HOME/ctags.cnf on MSDOS, MSWindows)</I>

<BR>

<I>.ctags (ctags.cnf on MSDOS, MSWindows)</I>

<DL COMPACT>
<DT><DD>
If any of these configuration files exist, each will be expected to contain a
set of default options which are read in the order listed when <B>ctags</B>
starts, but before the <B>CTAGS</B> environment variable is read or any command
line options are read. This makes it possible to set up site-wide, personal
or project-level defaults. It is possible to compile <B>ctags</B> to read an
additional configuration file before any of those shown above, which will be
indicated if the output produced by the <B>--version</B> option lists the
&quot;custom-conf&quot; feature. Options appearing in the <B>CTAGS</B> environment
variable or on the command line will override options specified in these
files. Only options will be read from these files. Note that the option files
are read in line-oriented mode in which spaces are significant (since
shell quoting is not possible). Each line of the file is read as one command
line parameter (as if it were quoted with single quotes). Therefore, use new
lines to indicate separate command-line arguments.


<DT><I>tags</I>

<DD>
The default tag file created by <B>ctags</B>.
<DT><I>TAGS</I>

<DD>
The default tag file created by <B>etags</B>.

</DL>
<A NAME="lbAP">&nbsp;</A>
<H2>SEE ALSO</H2>

The official Exuberant Ctags web site at:

<DL COMPACT><DT><DD>
<A HREF="http://ctags.sourceforge.net">http://ctags.sourceforge.net</A>
</DL>


Also <B><A HREF="http://localhost/cgi-bin/man/man2html?1+ex">ex</A></B>(1), <B><A HREF="http://localhost/cgi-bin/man/man2html?1+vi">vi</A></B>(1), <B>elvis</B>, or, better yet, <B>vim</B>, the
official editor of <B>ctags</B>. For more information on <B>vim</B>, see the VIM
Pages web site at:

<DL COMPACT><DT><DD>
<A HREF="http://www.vim.org/">http://www.vim.org/</A>
</DL>



<A NAME="lbAQ">&nbsp;</A>
<H2>AUTHOR</H2>

Darren Hiebert &lt;<A HREF="mailto:dhiebert@users.sourceforge.net">dhiebert@users.sourceforge.net</A>&gt;
<BR>

<A HREF="http://DarrenHiebert.com/">http://DarrenHiebert.com/</A>


<A NAME="lbAR">&nbsp;</A>
<H2>MOTIVATION</H2>

&quot;Think ye at all times of rendering some service to every member of the human
race.&quot;

&quot;All effort and exertion put forth by man from the fullness of his heart is
worship, if it is prompted by the highest motives and the will to do service
to humanity.&quot;

<DL COMPACT><DT><DD>
-- From the Baha'i Writings
</DL>



<A NAME="lbAS">&nbsp;</A>
<H2>CREDITS</H2>

This version of <B>ctags</B> was originally derived from and inspired by the
ctags program by Steve Kirkendall &lt;<A HREF="mailto:kirkenda@cs.pdx.edu">kirkenda@cs.pdx.edu</A>&gt; that comes with the
Elvis vi clone (though virtually none of the original code remains).

Credit is also due Bram Moolenaar &lt;<A HREF="mailto:Bram@vim.org">Bram@vim.org</A>&gt;, the author of <B>vim</B>, who
has devoted so much of his time and energy both to developing the editor as a
service to others, and to helping the orphans of Uganda.

The section entitled &quot;HOW TO USE WITH GNU EMACS&quot; was shamelessly stolen from
the info page for GNU <B>etags</B>.
<P>

<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">SOURCE FILES</A><DD>
<DT><A HREF="#lbAF">OPTIONS</A><DD>
<DT><A HREF="#lbAG">OPERATIONAL DETAILS</A><DD>
<DT><A HREF="#lbAH">TAG FILE FORMAT</A><DD>
<DT><A HREF="#lbAI">HOW TO USE WITH VI</A><DD>
<DT><A HREF="#lbAJ">HOW TO USE WITH GNU EMACS</A><DD>
<DT><A HREF="#lbAK">HOW TO USE WITH NEDIT</A><DD>
<DT><A HREF="#lbAL">CAVEATS</A><DD>
<DT><A HREF="#lbAM">BUGS</A><DD>
<DT><A HREF="#lbAN">ENVIRONMENT VARIABLES</A><DD>
<DT><A HREF="#lbAO">FILES</A><DD>
<DT><A HREF="#lbAP">SEE ALSO</A><DD>
<DT><A HREF="#lbAQ">AUTHOR</A><DD>
<DT><A HREF="#lbAR">MOTIVATION</A><DD>
<DT><A HREF="#lbAS">CREDITS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 05:02:47 GMT, April 01, 2003
</BODY>
</HTML>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

cider1

Switzerland Switzerland
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141220.1 | Last Updated 2 Jul 2003
Article Copyright 2003 by cider1
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid