aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì1994-11-22 18:17:23 +0000
committerFrancesco Potortì1994-11-22 18:17:23 +0000
commit7537186d2be36f704cf6614d5d13bfc2df975431 (patch)
tree9752f0a521560b90e61a9fe6f5c06be3ada73c6e /lib-src
parentf797cb30c9f10d5fb9a8c19b8f2784ce392677e2 (diff)
downloademacs-7537186d2be36f704cf6614d5d13bfc2df975431.tar.gz
emacs-7537186d2be36f704cf6614d5d13bfc2df975431.zip
* 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 1e21d5664f1..7ff17df45ac 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
34char pot_etags_version[] = "@(#) pot revision number is 11.8"; 34char pot_etags_version[] = "@(#) pot revision number is 11.9";
35 35
36#ifdef MSDOS 36#ifdef MSDOS
37#include <fcntl.h> 37#include <fcntl.h>
@@ -291,12 +291,14 @@ int noindentypedefs; /* -S: ignore indentation in C */
291/* Name this program was invoked with. */ 291/* Name this program was invoked with. */
292char *progname; 292char *progname;
293 293
294struct option longopts[] = { 294struct option longopts[] =
295{
295 { "append", no_argument, NULL, 'a' }, 296 { "append", no_argument, NULL, 'a' },
296 { "backward-search", no_argument, NULL, 'B' }, 297 { "backward-search", no_argument, NULL, 'B' },
297 { "c++", no_argument, NULL, 'C' }, 298 { "c++", no_argument, NULL, 'C' },
298 { "cxref", no_argument, NULL, 'x' }, 299 { "cxref", no_argument, NULL, 'x' },
299 { "defines", no_argument, NULL, 'd' }, 300 { "defines", no_argument, NULL, 'd' },
301 { "help", no_argument, NULL, 'h' },
300 { "help", no_argument, NULL, 'H' }, 302 { "help", no_argument, NULL, 'H' },
301 { "ignore-indentation", no_argument, NULL, 'S' }, 303 { "ignore-indentation", no_argument, NULL, 'S' },
302 { "include", required_argument, NULL, 'i' }, 304 { "include", required_argument, NULL, 'i' },
@@ -531,18 +533,18 @@ names from stdin.\n\n", progname);
531 puts ("-l LANG, --language=LANG\n\ 533 puts ("-l LANG, --language=LANG\n\
532 Force the following files to be considered as written in the\n\ 534 Force the following files to be considered as written in the\n\
533 named language up to the next --language=LANG option."); 535 named language up to the next --language=LANG option.");
536 }
537
534#ifdef ETAGS_REGEXPS 538#ifdef ETAGS_REGEXPS
535 puts ("-r /REGEXP/, --regex=/REGEXP/\n\ 539 puts ("-r /REGEXP/, --regex=/REGEXP/\n\
536 Make a tag for each line matching pattern REGEXP in the\n\ 540 Make a tag for each line matching pattern REGEXP in the\n\
537 following files. REGEXP is anchored (as if preceded by ^).\n\ 541 following files. REGEXP is anchored (as if preceded by ^).\n\
538 The form /REGEXP/NAME/ creates a named tag. For example Tcl\n\ 542 The form /REGEXP/NAME/ creates a named tag. For example Tcl\n\
539 named tags can be created with:\n\ 543 named tags can be created with:\n\
540 --regex=/proc[ \\t]+\\([^ \\t]+\\)/\\1/."); 544 --regex=/proc[ \\t]+\\([^ \\t]+\\)/\\1/.");
541 puts ("-R, --no-regex\n\ 545 puts ("-R, --no-regex\n\
542 Don't create tags from regexps for the following files."); 546 Don't create tags from regexps for the following files.");
543#endif /* ETAGS_REGEXPS */ 547#endif /* ETAGS_REGEXPS */
544 }
545
546 puts ("-o FILE, --output=FILE\n\ 548 puts ("-o FILE, --output=FILE\n\
547 Write the tags to FILE."); 549 Write the tags to FILE.");
548 puts ("-S, --ignore-indentation\n\ 550 puts ("-S, --ignore-indentation\n\
@@ -581,7 +583,7 @@ names from stdin.\n\n", progname);
581 583
582 puts ("-V, --version\n\ 584 puts ("-V, --version\n\
583 Print the version of the program.\n\ 585 Print the version of the program.\n\
584-H, --help\n\ 586-h, --help\n\
585 Print this help message."); 587 Print this help message.");
586 588
587 print_language_names (); 589 print_language_names ();
@@ -771,7 +773,7 @@ main (argc, argv)
771 while (1) 773 while (1)
772 { 774 {
773 int opt = getopt_long (argc, argv, 775 int opt = getopt_long (argc, argv,
774 "-aCdDf:l:o:r:RStTi:BuvxwVH", longopts, 0); 776 "-aCdDf:l:o:r:RStTi:BuvxwVhH", longopts, 0);
775 777
776 if (opt == EOF) 778 if (opt == EOF)
777 break; 779 break;
@@ -842,6 +844,7 @@ main (argc, argv)
842 case 'V': 844 case 'V':
843 print_version (); 845 print_version ();
844 break; 846 break;
847 case 'h':
845 case 'H': 848 case 'H':
846 print_help (); 849 print_help ();
847 break; 850 break;
@@ -852,16 +855,12 @@ main (argc, argv)
852 typedefs++; 855 typedefs++;
853 typedefs_and_cplusplus++; 856 typedefs_and_cplusplus++;
854 break; 857 break;
855
856#if (!CTAGS) 858#if (!CTAGS)
857
858 /* Etags options */ 859 /* Etags options */
859 case 'i': 860 case 'i':
860 included_files[nincluded_files++] = optarg; 861 included_files[nincluded_files++] = optarg;
861 break; 862 break;
862
863#else /* CTAGS */ 863#else /* CTAGS */
864
865 /* Ctags options. */ 864 /* Ctags options. */
866 case 'B': 865 case 'B':
867 searchar = '?'; 866 searchar = '?';
@@ -878,9 +877,7 @@ main (argc, argv)
878 case 'w': 877 case 'w':
879 no_warnings++; 878 no_warnings++;
880 break; 879 break;
881
882#endif /* CTAGS */ 880#endif /* CTAGS */
883
884 default: 881 default:
885 fprintf (stderr, 882 fprintf (stderr,
886 "%s: -%c flag not recognised.\n", progname, opt); 883 "%s: -%c flag not recognised.\n", progname, opt);