diff options
author | tjr <tjr@FreeBSD.org> | 2002-05-30 11:36:12 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-05-30 11:36:12 +0000 |
commit | b8ff33afe9579ff837b51f514100378252395e10 (patch) | |
tree | b885f5e6f1e863a30ca95dad9b3bf93c15336d8d /usr.bin/ctags | |
parent | 810a0724665f6fc25775a88ecce0284a13bd20ee (diff) | |
download | FreeBSD-src-b8ff33afe9579ff837b51f514100378252395e10.zip FreeBSD-src-b8ff33afe9579ff837b51f514100378252395e10.tar.gz |
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.
Diffstat (limited to 'usr.bin/ctags')
-rw-r--r-- | usr.bin/ctags/ctags.1 | 13 | ||||
-rw-r--r-- | usr.bin/ctags/ctags.c | 10 |
2 files changed, 17 insertions, 6 deletions
diff --git a/usr.bin/ctags/ctags.1 b/usr.bin/ctags/ctags.1 index 74410ad..39d5129 100644 --- a/usr.bin/ctags/ctags.1 +++ b/usr.bin/ctags/ctags.1 @@ -42,7 +42,7 @@ file .Sh SYNOPSIS .Nm -.Op Fl BFadtuwvx +.Op Fl BFTaduwvx .Op Fl f Ar tagsfile .Ar name ... .Sh DESCRIPTION @@ -80,6 +80,8 @@ Use backward searching patterns Use forward searching patterns .Pq Li /.../ (the default). +.It Fl T +Do not create tags for typedefs, structs, unions, and enums. .It Fl a Append to .Pa tags @@ -95,8 +97,6 @@ Place the tag descriptions in a file called .Ar tagsfile . The default behaviour is to place them in a file called .Pa tags . -.It Fl t -Create tags for typedefs, structs, unions, and enums. .It Fl u Update the specified files in the .Pa tags @@ -203,6 +203,13 @@ Duplicate objects are not considered errors. .Sh SEE ALSO .Xr ex 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 Recognition of functions, subroutines and procedures for Fortran and Pascal is done in a very simpleminded way. diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c index 2461ebc..04ac8ac 100644 --- a/usr.bin/ctags/ctags.c +++ b/usr.bin/ctags/ctags.c @@ -98,7 +98,8 @@ main(argc, argv) char *cmd; aflag = uflag = NO; - while ((ch = getopt(argc, argv, "BFadf:tuwvx")) != -1) + tflag = YES; + while ((ch = getopt(argc, argv, "BFTadf:tuwvx")) != -1) switch(ch) { case 'B': searchar = '?'; @@ -106,6 +107,9 @@ main(argc, argv) case 'F': searchar = '/'; break; + case 'T': + tflag = NO; + break; case 'a': aflag++; break; @@ -116,7 +120,7 @@ main(argc, argv) outfile = optarg; break; case 't': - tflag++; + tflag = YES; break; case 'u': uflag++; @@ -189,7 +193,7 @@ main(argc, argv) static void usage() { - (void)fprintf(stderr, "usage: ctags [-BFadtuwvx] [-f tagsfile] file ...\n"); + (void)fprintf(stderr, "usage: ctags [-BFTaduwvx] [-f tagsfile] file ...\n"); exit(1); } |