diff options
| author | Francesco Potortì | 1995-01-18 10:14:19 +0000 |
|---|---|---|
| committer | Francesco Potortì | 1995-01-18 10:14:19 +0000 |
| commit | 201f9f2b7cc366d0ce9f5f9e541f35d779eb9792 (patch) | |
| tree | 72dd929d1c532b78c4beda92cada52d9e92d4775 /lib-src | |
| parent | 9bb4544ba0ea10914ae9f3f186279a0198d81fe5 (diff) | |
| download | emacs-201f9f2b7cc366d0ce9f5f9e541f35d779eb9792.tar.gz emacs-201f9f2b7cc366d0ce9f5f9e541f35d779eb9792.zip | |
* etags.c (longopts, print_help, main): Use -I as abbreviation
for the --ignore-indentation option.
(main): Do not print an error message for unknown options.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/etags.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 6716e8da587..b50bbe48d63 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -31,7 +31,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 31 | * Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer. | 31 | * Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer. |
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | char pot_etags_version[] = "@(#) pot revision number is 11.15"; | 34 | char pot_etags_version[] = "@(#) pot revision number is 11.16"; |
| 35 | 35 | ||
| 36 | #ifdef MSDOS | 36 | #ifdef MSDOS |
| 37 | #include <fcntl.h> | 37 | #include <fcntl.h> |
| @@ -248,7 +248,7 @@ logical vgrind_style; /* -v: create vgrind style index output */ | |||
| 248 | logical no_warnings; /* -w: suppress warnings */ | 248 | logical no_warnings; /* -w: suppress warnings */ |
| 249 | logical cxref_style; /* -x: create cxref style output */ | 249 | logical cxref_style; /* -x: create cxref style output */ |
| 250 | logical cplusplus; /* .[hc] means C++, not C */ | 250 | logical cplusplus; /* .[hc] means C++, not C */ |
| 251 | logical noindentypedefs; /* -S: ignore indentation in C */ | 251 | logical noindentypedefs; /* -I: ignore indentation in C */ |
| 252 | #define permit_duplicates TRUE /* allow duplicate tags */ | 252 | #define permit_duplicates TRUE /* allow duplicate tags */ |
| 253 | 253 | ||
| 254 | struct option longopts[] = | 254 | struct option longopts[] = |
| @@ -260,7 +260,7 @@ struct option longopts[] = | |||
| 260 | { "defines", no_argument, NULL, 'd' }, | 260 | { "defines", no_argument, NULL, 'd' }, |
| 261 | { "help", no_argument, NULL, 'h' }, | 261 | { "help", no_argument, NULL, 'h' }, |
| 262 | { "help", no_argument, NULL, 'H' }, | 262 | { "help", no_argument, NULL, 'H' }, |
| 263 | { "ignore-indentation", no_argument, NULL, 'S' }, | 263 | { "ignore-indentation", no_argument, NULL, 'I' }, |
| 264 | { "include", required_argument, NULL, 'i' }, | 264 | { "include", required_argument, NULL, 'i' }, |
| 265 | { "language", required_argument, NULL, 'l' }, | 265 | { "language", required_argument, NULL, 'l' }, |
| 266 | { "no-defines", no_argument, NULL, 'D' }, | 266 | { "no-defines", no_argument, NULL, 'D' }, |
| @@ -485,7 +485,7 @@ names from stdin.\n\n", progname); | |||
| 485 | #endif /* ETAGS_REGEXPS */ | 485 | #endif /* ETAGS_REGEXPS */ |
| 486 | puts ("-o FILE, --output=FILE\n\ | 486 | puts ("-o FILE, --output=FILE\n\ |
| 487 | Write the tags to FILE."); | 487 | Write the tags to FILE."); |
| 488 | puts ("-S, --ignore-indentation\n\ | 488 | puts ("-I, --ignore-indentation\n\ |
| 489 | Don't rely on indentation quite as much as normal. Currently,\n\ | 489 | Don't rely on indentation quite as much as normal. Currently,\n\ |
| 490 | this means not to assume that a closing brace in the first\n\ | 490 | this means not to assume that a closing brace in the first\n\ |
| 491 | column is the final brace of a function or structure\n\ | 491 | column is the final brace of a function or structure\n\ |
| @@ -711,7 +711,7 @@ main (argc, argv) | |||
| 711 | while (1) | 711 | while (1) |
| 712 | { | 712 | { |
| 713 | int opt = getopt_long (argc, argv, | 713 | int opt = getopt_long (argc, argv, |
| 714 | "-aCdDf:l:o:r:RStTi:BuvxwVhH", longopts, 0); | 714 | "-aCdDf:Il:o:r:RStTi:BuvxwVhH", longopts, 0); |
| 715 | 715 | ||
| 716 | if (opt == EOF) | 716 | if (opt == EOF) |
| 717 | break; | 717 | break; |
| @@ -748,12 +748,16 @@ main (argc, argv) | |||
| 748 | case 'o': | 748 | case 'o': |
| 749 | if (tagfile) | 749 | if (tagfile) |
| 750 | { | 750 | { |
| 751 | fprintf(stderr, | 751 | fprintf (stderr, "%s: -%c option may only be given once.\n", |
| 752 | "%s: -%c flag may only be given once.\n", progname, opt); | 752 | progname, opt); |
| 753 | goto usage; | 753 | goto usage; |
| 754 | } | 754 | } |
| 755 | tagfile = optarg; | 755 | tagfile = optarg; |
| 756 | break; | 756 | break; |
| 757 | case 'I': | ||
| 758 | case 'S': /* for backward compatibility */ | ||
| 759 | noindentypedefs = TRUE; | ||
| 760 | break; | ||
| 757 | case 'l': | 761 | case 'l': |
| 758 | if (!get_language (optarg, &argbuffer[current_arg].function)) | 762 | if (!get_language (optarg, &argbuffer[current_arg].function)) |
| 759 | { | 763 | { |
| @@ -776,9 +780,6 @@ main (argc, argv) | |||
| 776 | ++current_arg; | 780 | ++current_arg; |
| 777 | break; | 781 | break; |
| 778 | #endif /* ETAGS_REGEXPS */ | 782 | #endif /* ETAGS_REGEXPS */ |
| 779 | case 'S': | ||
| 780 | noindentypedefs = TRUE; | ||
| 781 | break; | ||
| 782 | case 'V': | 783 | case 'V': |
| 783 | print_version (); | 784 | print_version (); |
| 784 | break; | 785 | break; |
| @@ -816,8 +817,6 @@ main (argc, argv) | |||
| 816 | break; | 817 | break; |
| 817 | #endif /* CTAGS */ | 818 | #endif /* CTAGS */ |
| 818 | default: | 819 | default: |
| 819 | fprintf (stderr, | ||
| 820 | "%s: -%c flag not recognised.\n", progname, opt); | ||
| 821 | goto usage; | 820 | goto usage; |
| 822 | } | 821 | } |
| 823 | } | 822 | } |
| @@ -835,8 +834,8 @@ main (argc, argv) | |||
| 835 | fprintf (stderr, "%s: No input files specified.\n", progname); | 834 | fprintf (stderr, "%s: No input files specified.\n", progname); |
| 836 | 835 | ||
| 837 | usage: | 836 | usage: |
| 838 | fprintf (stderr, "%s: Try `%s --help' for a complete list of options.\n", | 837 | fprintf (stderr, "\tTry `%s --help' for a complete list of options.\n", |
| 839 | progname, progname); | 838 | progname); |
| 840 | exit (BAD); | 839 | exit (BAD); |
| 841 | } | 840 | } |
| 842 | 841 | ||