diff options
author | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-30 11:36:12 +0000 |
---|---|---|
committer | Tim J. Robbins <tjr@FreeBSD.org> | 2002-05-30 11:36:12 +0000 |
commit | a5d521237123600d010bd182a9a5e222ef41439e (patch) | |
tree | b885f5e6f1e863a30ca95dad9b3bf93c15336d8d /usr.bin/ctags | |
parent | 24ef71e9f038c1dd5e80e189362b60ec58048927 (diff) | |
download | src-a5d521237123600d010bd182a9a5e222ef41439e.tar.gz src-a5d521237123600d010bd182a9a5e222ef41439e.zip |
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.
Notes
Notes:
svn path=/head/; revision=97577
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 74410adb47ee..39d5129efbe9 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 2461ebc0fead..04ac8ac4f289 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); } |