Mercurial > emacs
changeset 10047:9b284d98b102
* etags.c (print_help): print --regex usage for ctags also.
(main): use -h in addition to -H as abbreviation for --help.
author | Francesco Potortì <pot@gnu.org> |
---|---|
date | Tue, 22 Nov 1994 18:17:23 +0000 |
parents | 4c632e091d88 |
children | db01a04d2afb |
files | lib-src/etags.c |
diffstat | 1 files changed, 11 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/etags.c Tue Nov 22 12:23:40 1994 +0000 +++ b/lib-src/etags.c Tue Nov 22 18:17:23 1994 +0000 @@ -31,7 +31,7 @@ * Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer. */ -char pot_etags_version[] = "@(#) pot revision number is 11.8"; +char pot_etags_version[] = "@(#) pot revision number is 11.9"; #ifdef MSDOS #include <fcntl.h> @@ -291,12 +291,14 @@ /* Name this program was invoked with. */ char *progname; -struct option longopts[] = { +struct option longopts[] = +{ { "append", no_argument, NULL, 'a' }, { "backward-search", no_argument, NULL, 'B' }, { "c++", no_argument, NULL, 'C' }, { "cxref", no_argument, NULL, 'x' }, { "defines", no_argument, NULL, 'd' }, + { "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'H' }, { "ignore-indentation", no_argument, NULL, 'S' }, { "include", required_argument, NULL, 'i' }, @@ -531,18 +533,18 @@ puts ("-l LANG, --language=LANG\n\ Force the following files to be considered as written in the\n\ named language up to the next --language=LANG option."); + } + #ifdef ETAGS_REGEXPS - puts ("-r /REGEXP/, --regex=/REGEXP/\n\ + puts ("-r /REGEXP/, --regex=/REGEXP/\n\ Make a tag for each line matching pattern REGEXP in the\n\ following files. REGEXP is anchored (as if preceded by ^).\n\ The form /REGEXP/NAME/ creates a named tag. For example Tcl\n\ named tags can be created with:\n\ --regex=/proc[ \\t]+\\([^ \\t]+\\)/\\1/."); - puts ("-R, --no-regex\n\ + puts ("-R, --no-regex\n\ Don't create tags from regexps for the following files."); #endif /* ETAGS_REGEXPS */ - } - puts ("-o FILE, --output=FILE\n\ Write the tags to FILE."); puts ("-S, --ignore-indentation\n\ @@ -581,7 +583,7 @@ puts ("-V, --version\n\ Print the version of the program.\n\ --H, --help\n\ +-h, --help\n\ Print this help message."); print_language_names (); @@ -771,7 +773,7 @@ while (1) { int opt = getopt_long (argc, argv, - "-aCdDf:l:o:r:RStTi:BuvxwVH", longopts, 0); + "-aCdDf:l:o:r:RStTi:BuvxwVhH", longopts, 0); if (opt == EOF) break; @@ -842,6 +844,7 @@ case 'V': print_version (); break; + case 'h': case 'H': print_help (); break; @@ -852,16 +855,12 @@ typedefs++; typedefs_and_cplusplus++; break; - #if (!CTAGS) - /* Etags options */ case 'i': included_files[nincluded_files++] = optarg; break; - #else /* CTAGS */ - /* Ctags options. */ case 'B': searchar = '?'; @@ -878,9 +877,7 @@ case 'w': no_warnings++; break; - #endif /* CTAGS */ - default: fprintf (stderr, "%s: -%c flag not recognised.\n", progname, opt);