changeset 10449:2266157d9bcc

* 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.
author Francesco Potortì <pot@gnu.org>
date Wed, 18 Jan 1995 10:14:19 +0000
parents ec596f12f13f
children 830e201e9603
files lib-src/etags.c
diffstat 1 files changed, 13 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/etags.c	Wed Jan 18 04:51:29 1995 +0000
+++ b/lib-src/etags.c	Wed Jan 18 10:14:19 1995 +0000
@@ -31,7 +31,7 @@
  *	Francesco Potorti` (pot@cnuce.cnr.it) is the current maintainer.
  */
 
-char pot_etags_version[] = "@(#) pot revision number is 11.15";
+char pot_etags_version[] = "@(#) pot revision number is 11.16";
 
 #ifdef MSDOS
 #include <fcntl.h>
@@ -248,7 +248,7 @@
 logical no_warnings;		/* -w: suppress warnings */
 logical cxref_style;		/* -x: create cxref style output */
 logical cplusplus;		/* .[hc] means C++, not C */
-logical noindentypedefs;	/* -S: ignore indentation in C */
+logical noindentypedefs;	/* -I: ignore indentation in C */
 #define permit_duplicates TRUE	/* allow duplicate tags */
 
 struct option longopts[] =
@@ -260,7 +260,7 @@
   { "defines",			no_argument,	   NULL, 'd' },
   { "help",			no_argument,	   NULL, 'h' },
   { "help",			no_argument,	   NULL, 'H' },
-  { "ignore-indentation",	no_argument,	   NULL, 'S' },
+  { "ignore-indentation",	no_argument,	   NULL, 'I' },
   { "include",			required_argument, NULL, 'i' },
   { "language",                 required_argument, NULL, 'l' },
   { "no-defines",		no_argument,	   NULL, 'D' },
@@ -485,7 +485,7 @@
 #endif /* ETAGS_REGEXPS */
   puts ("-o FILE, --output=FILE\n\
         Write the tags to FILE.");
-  puts ("-S, --ignore-indentation\n\
+  puts ("-I, --ignore-indentation\n\
         Don't rely on indentation quite as much as normal.  Currently,\n\
         this means not to assume that a closing brace in the first\n\
         column is the final brace of a function or structure\n\
@@ -711,7 +711,7 @@
   while (1)
     {
       int opt = getopt_long (argc, argv,
-			     "-aCdDf:l:o:r:RStTi:BuvxwVhH", longopts, 0);
+			     "-aCdDf:Il:o:r:RStTi:BuvxwVhH", longopts, 0);
 
       if (opt == EOF)
 	break;
@@ -748,12 +748,16 @@
 	case 'o':
 	  if (tagfile)
 	    {
-	      fprintf(stderr,
-		      "%s: -%c flag may only be given once.\n", progname, opt);
+	      fprintf (stderr, "%s: -%c option may only be given once.\n",
+		       progname, opt);
 	      goto usage;
 	    }
 	  tagfile = optarg;
 	  break;
+	case 'I':
+	case 'S':		/* for backward compatibility */
+	  noindentypedefs = TRUE;
+	  break;
 	case 'l':
 	  if (!get_language (optarg, &argbuffer[current_arg].function))
 	    {
@@ -776,9 +780,6 @@
 	  ++current_arg;
 	  break;
 #endif /* ETAGS_REGEXPS */
-	case 'S':
-	  noindentypedefs = TRUE;
-	  break;
 	case 'V':
 	  print_version ();
 	  break;
@@ -816,8 +817,6 @@
 	  break;
 #endif /* CTAGS */
 	default:
-	  fprintf (stderr,
-		   "%s: -%c flag not recognised.\n", progname, opt);
 	  goto usage;
 	}
     }
@@ -835,8 +834,8 @@
       fprintf (stderr, "%s: No input files specified.\n", progname);
 
     usage:
-      fprintf (stderr, "%s: Try `%s --help' for a complete list of options.\n",
-	       progname, progname);
+      fprintf (stderr, "\tTry `%s --help' for a complete list of options.\n",
+	       progname);
       exit (BAD);
     }