aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì <[email protected]>1994-11-22 18:17:23 +0000
committerFrancesco Potortì <[email protected]>1994-11-22 18:17:23 +0000
commit7537186d2be36f704cf6614d5d13bfc2df975431 (patch)
tree9752f0a521560b90e61a9fe6f5c06be3ada73c6e /lib-src
parentf797cb30c9f10d5fb9a8c19b8f2784ce392677e2 (diff)
* etags.c (print_help): print --regex usage for ctags also.
(main): use -h in addition to -H as abbreviation for --help.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/etags.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 1e21d5664f..7ff17df45a 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -31,7 +31,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
* Francesco Potorti` ([email protected]) 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 @@ int noindentypedefs; /* -S: ignore indentation in C */
/* 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 @@ names from stdin.\n\n", progname);
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 @@ names from stdin.\n\n", progname);
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 @@ main (argc, argv)
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 @@ main (argc, argv)
case 'V':
print_version ();
break;
+ case 'h':
case 'H':
print_help ();
break;
@@ -852,16 +855,12 @@ main (argc, argv)
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 @@ main (argc, argv)
case 'w':
no_warnings++;
break;
-
#endif /* CTAGS */
-
default:
fprintf (stderr,
"%s: -%c flag not recognised.\n", progname, opt);