ctags problem

From: Jeroen van Vianen <jeroen(at)design(dot)nl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ctags problem
Date: 1999-12-18 01:51:25
Message-ID: 4.2.0.58.19991218024325.00953180@mail.design.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 17 Dec 1999 01:24 Tom Lane wrote:
>> About ctags: is no one using Linux and ctags on the Postgres sources? Am I
>> the first one to find this bug?
>
>Apparently you're a little new to the world of portable software.
>I don't use ctags myself, being an Emacs man rather than a vi'er,
>but a few minutes' research yielded the following results:
>
>GNU ctags (from Emacs 19.34 distribution): -a, -d, -t, -f accepted.
>
>HPUX ctags (which claims to be based on the original UCB code and
>compliant to XPG4 standard): -a, -t, but no -d nor -f.
>
>SunOS 4.1: same as HPUX.
>
>RedHat 4.2 Linux: comes with something called "Exuberant Ctags, Version
>1.5" which accepts all four (apparently this is NOT the same code as the
>GNU distribution).
>
>
>Whatever Linux you're running: evidently only -a and -f.
>
>
>I don't know which variant of ctags you're running, but it's definitely
>odd man out as far as not accepting -t goes. I'd certainly want to use
>- -d (index #defines) anywhere it was accepted, too. Other side of the
>coin is that -a is the only one of these switches that works on all the
>ctags versions I was able to lay my hands on in five minutes plus yours.
>That should give you some pause about asserting that if -a -f is the
>right incantation for the version you have, then it must be the right
>thing for everybody.

This is the version I'm using

Exuberant Ctags 3.2.2, by Darren Hiebert <darren(at)hiebert(dot)com>

Usage: ctags [options] [file(s)]

-a Append the tags to an existing tag file.
-B Use backward searching patterns (?...?).
-e Output tag file for use with Emacs.
-f <name>
Output tags to the specified file (default is "tags"; or "TAGS"
if -e is specified). If specified as "-", tags are written to
standard output.
-F Use forward searching patterns (/.../) (default).
-h <list>
Specifies a list of file extensions used for headers.
The default list is ".h.H.hh.hpp.hxx.h++".
-i <types>
Nearly equivalent to --c-types=<types>.
-I <list | file>
A list of tokens to be specially handled is read from either the
command line or the specified file.
-L <file>
A list of source file names are read from the specified file.
If specified as "-", then standard input is read.
-n Equivalent to --excmd=number.
-N Equivalent to --excmd=pattern.
-o Alternative for -f.
-p <path>
Default path to use for all (relative path) filenames.
-R Equivalent to --recurse=yes.
-u Equivalent to --sort=no.
-V Enable verbose messages describing actions on each source file.
-x Print a tabular cross reference file to standard output.
--append=[yes|no]
Indicates whether tags should be appended to existing tag file
(default=no).
--c-types=types
Specifies a list of C/C++ language tag types to include in the
output file. "Types" is a group of one-letter flags designating
types of tags to either include or exclude from the output. Each
letter or group of letters may be preceded by either '+' (default,
if omitted) to add it to those already included, or '-' to exclude
it from the output. In the absence of any preceding '+' or '-'
sign, only those types listed in "types" will be included in the
output. Tags for the following language contructs are supported
(types are enabled by default except as noted):
c classes
d macro definitions
e enumerators (values inside an enumeration)
f function definitions
g enumeration names
m class, struct, and union members
n namespaces
p function prototypes [off]
s structure names
t typedefs
u union names
v variable definitions
x external variable declarations [off]
In addition, the following modifiers are accepted:
A record the access of members into the tag file [off]
C include extra, class-qualified tag entries for members [off]
--etags-include=file
Include reference to 'file' in Emacs-style tag file (requires -e).
--excmd=number|pattern|mix
Uses the specified type of EX command to locate tags (default=mix).
--eiffel-types=types
Specifies a list of Eiffel language tag types to be included in the
output. See --c-types for the definition of the format of "types".
Tags for the following Eiffel language contructs are supported
(types are enabled by default except as noted):
c classes
f features
l local entities [off]
--file-scope=[yes|no]
Indicates whether tags scoped only for a single file (e.g. "static"
tags) should be included in the output (default=yes).
--file-tags=[yes|no]
Indicates whether tags should be generated for source file names
(default=no).
--format=level
Forces output of specified tag file format (default=2).
--fortran-types=types
Specifies a list of Fortran language tag types to be included in the
output. See --c-types for the definition of the format of "types".
Tags for the following Fortran language contructs are supported
(all are enabled by default):
b block data
c common blocks
e entry points
f functions
i interfaces
l labels
m modules
m namelists
p programs
s subroutines
t derived types
--help
Prints this option summary.
--if0=[yes|no]
Indicates whether code within #if 0 conditional branches should
be examined for tags (default=no).
--java-types=types
Specifies a list of Java language tag types to be included in the
output. See --c-types for the definition of the format of "types".
Tags for the following Java language contructs are supported (all
are enabled by default):
c classes
f fields
i interfaces
m methods
p packages
In addition, the following modifiers are accepted:
A record the access of fields into the tag file [off]
C include extra, class-qualified tag entries for fields [off]
--kind-long=[yes|no]
Indicates whether verbose tag descriptions are placed into tag file
(default=no).
--lang=[c|c++|eiffel|fortran|java]
Forces specified language, disabling automatic selection.
--langmap=map(s)
Overrides the default mapping of language to source file extension.
--line-directives=[yes|no]
Indicates whether #line directives should be processed (default=no).
--links=[yes|no]
Indicates whether symbolic links should be followed (default=yes).
--recurse=[yes|no]
Recurse into directories supplied on command line (default=no).
--sort=[yes|no]
Indicates whether tags should be sorted (default=yes).
--totals=[yes|no]
Prints statistics about source and tag files (default=no).
--version
Prints a version identifier to standard output.

So, it's strange that my version doesn't have the -d and -t options any
longer (What's -t for?), unlike the 1.5 version in RH4.2.

>Bottom line here is that what we probably really need is a configurable
>makefile macro for the ctags switches. (In fact, what I'd personally
>like is another macro to determine whether we're using ctags or etags in
>the first place ;-).) But short of that, I'd definitely lean towards
>the GNU definition as being the most widespread code. I'm pretty
>surprised that your Linux distribution (which one is it?) seems to
>contain a non-GNU-compatible ctags.

I run SuSE 6.2.

Cheers,

Jeroen

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeroen van Vianen 1999-12-18 01:59:17 SIGSEGV in initdb
Previous Message Jan Wieck 1999-12-18 01:47:20 Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?