Create tags for typedefs, structs, unions and enums by default (imply the

-t option). Make a new option, -T, to revert to the old behaviour.
This commit is contained in:
Tim J. Robbins 2002-05-30 11:36:12 +00:00
parent 24ef71e9f0
commit a5d5212371
2 changed files with 17 additions and 6 deletions

View File

@ -42,7 +42,7 @@
file file
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl BFadtuwvx .Op Fl BFTaduwvx
.Op Fl f Ar tagsfile .Op Fl f Ar tagsfile
.Ar name ... .Ar name ...
.Sh DESCRIPTION .Sh DESCRIPTION
@ -80,6 +80,8 @@ Use backward searching patterns
Use forward searching patterns Use forward searching patterns
.Pq Li /.../ .Pq Li /.../
(the default). (the default).
.It Fl T
Do not create tags for typedefs, structs, unions, and enums.
.It Fl a .It Fl a
Append to Append to
.Pa tags .Pa tags
@ -95,8 +97,6 @@ Place the tag descriptions in a file called
.Ar tagsfile . .Ar tagsfile .
The default behaviour is to place them in a file called The default behaviour is to place them in a file called
.Pa tags . .Pa tags .
.It Fl t
Create tags for typedefs, structs, unions, and enums.
.It Fl u .It Fl u
Update the specified files in the Update the specified files in the
.Pa tags .Pa tags
@ -203,6 +203,13 @@ Duplicate objects are not considered errors.
.Sh SEE ALSO .Sh SEE ALSO
.Xr ex 1 , .Xr ex 1 ,
.Xr vi 1 .Xr vi 1
.Sh COMPATIBILITY
The
.Fl t
option is a no-op for compatibility with previous versions of
.Nm
that did not create tags for typedefs, enums, structs and unions
by default.
.Sh BUGS .Sh BUGS
Recognition of functions, subroutines and procedures Recognition of functions, subroutines and procedures
for Fortran and Pascal is done in a very simpleminded way. for Fortran and Pascal is done in a very simpleminded way.

View File

@ -98,7 +98,8 @@ main(argc, argv)
char *cmd; char *cmd;
aflag = uflag = NO; aflag = uflag = NO;
while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != -1) tflag = YES;
while ((ch = getopt(argc, argv, "BFTadf:tuwvx")) != -1)
switch(ch) { switch(ch) {
case 'B': case 'B':
searchar = '?'; searchar = '?';
@ -106,6 +107,9 @@ main(argc, argv)
case 'F': case 'F':
searchar = '/'; searchar = '/';
break; break;
case 'T':
tflag = NO;
break;
case 'a': case 'a':
aflag++; aflag++;
break; break;
@ -116,7 +120,7 @@ main(argc, argv)
outfile = optarg; outfile = optarg;
break; break;
case 't': case 't':
tflag++; tflag = YES;
break; break;
case 'u': case 'u':
uflag++; uflag++;
@ -189,7 +193,7 @@ main(argc, argv)
static void static void
usage() usage()
{ {
(void)fprintf(stderr, "usage: ctags [-BFadtuwvx] [-f tagsfile] file ...\n"); (void)fprintf(stderr, "usage: ctags [-BFTaduwvx] [-f tagsfile] file ...\n");
exit(1); exit(1);
} }