summaryrefslogtreecommitdiff
path: root/lib-src
diff options
context:
space:
mode:
authorFrancesco Potortì <pot@gnu.org>1995-01-18 10:14:19 +0000
committerFrancesco Potortì <pot@gnu.org>1995-01-18 10:14:19 +0000
commita45c59439ab9f2668cc2b6deaf5f42f75ceafe19 (patch)
tree4439f74d4d1ba31ed318fc0f4e4eedaa6a3e06e6 /lib-src
parentffc4b5b118318a2fe1c25f68b7a62cbcc3375344 (diff)
downloademacs-a45c59439ab9f2668cc2b6deaf5f42f75ceafe19.tar.gz
* 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.c27
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. */
* 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 vgrind_style; /* -v: create vgrind style index output */
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 @@ struct option longopts[] =
{ "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 @@ names from stdin.\n\n", progname);
#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 @@ main (argc, argv)
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 @@ main (argc, argv)
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 @@ main (argc, argv)
++current_arg;
break;
#endif /* ETAGS_REGEXPS */
- case 'S':
- noindentypedefs = TRUE;
- break;
case 'V':
print_version ();
break;
@@ -816,8 +817,6 @@ main (argc, argv)
break;
#endif /* CTAGS */
default:
- fprintf (stderr,
- "%s: -%c flag not recognised.\n", progname, opt);
goto usage;
}
}
@@ -835,8 +834,8 @@ main (argc, argv)
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);
}