/* Parse command line arguments for Bison.
- Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA. */
+#include <config.h>
#include "system.h"
#include <argmatch.h>
trace_all
};
+ARGMATCH_VERIFY (trace_args, trace_types);
static void
trace_argmatch (char *args)
{
- verify (trace_constraint, ARGMATCH_CONSTRAINT (trace_args, trace_types));
if (args)
{
args = strtok (args, ",");
report_all
};
+ARGMATCH_VERIFY (report_args, report_types);
static void
report_argmatch (char *args)
{
- verify (report_constraint, ARGMATCH_CONSTRAINT (report_args, report_types));
args = strtok (args, ",");
do
{
fputs (_("\
Operation modes:\n\
- -h, --help display this help and exit\n\
- -V, --version output version information and exit\n\
- -y, --yacc emulate POSIX yacc\n"), stdout);
+ -h, --help display this help and exit\n\
+ -V, --version output version information and exit\n\
+ --print-localedir output directory containing locale-dependent data\n\
+ -y, --yacc emulate POSIX yacc\n"), stdout);
putc ('\n', stdout);
fputs (_("\
putc ('\n', stdout);
fprintf (stdout,
- _("Copyright (C) %d Free Software Foundation, Inc.\n"), 2005);
+ _("Copyright (C) %d Free Software Foundation, Inc.\n"), 2006);
fputs (_("\
This is free software; see the source for copying conditions. There is NO\n\
`----------------------*/
/* Shorts options. */
-const char *short_options = "yvegdhr:ltknVo:b:p:S:T::";
+static char const short_options[] = "yvegdhr:ltknVo:b:p:S:T::";
/* Values for long options that do not have single-letter equivalents. */
enum
{
- LOCATIONS_OPTION = CHAR_MAX + 1
+ LOCATIONS_OPTION = CHAR_MAX + 1,
+ PRINT_LOCALEDIR_OPTION
};
static struct option const long_options[] =
{
/* Operation modes. */
- { "help", no_argument, 0, 'h' },
- { "version", no_argument, 0, 'V' },
+ { "help", no_argument, 0, 'h' },
+ { "version", no_argument, 0, 'V' },
+ { "print-localedir", no_argument, 0, PRINT_LOCALEDIR_OPTION },
/* Parser. */
{ "name-prefix", required_argument, 0, 'p' },
version ();
exit (EXIT_SUCCESS);
+ case PRINT_LOCALEDIR_OPTION:
+ printf ("%s\n", LOCALEDIR);
+ exit (EXIT_SUCCESS);
+
case 'g':
/* Here, the -g and --graph=FILE options are differentiated. */
graph_flag = true;