X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/c5e3e5105512fe14bc2c7d5fdcb49018712403e8..fc659dfd69a6b6492726e7abdfadb3bf9f7e58a0:/src/getargs.c diff --git a/src/getargs.c b/src/getargs.c index 0113f337..de468e55 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -1,4 +1,5 @@ -/* Parse command line arguments for bison. +/* Parse command line arguments for Bison. + Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002 Free Software Foundation, Inc. @@ -20,13 +21,15 @@ 02111-1307, USA. */ #include "system.h" -#include "getopt.h" -#include "argmatch.h" -#include "error.h" + +#include +#include +#include + #include "complain.h" -#include "struniq.h" -#include "getargs.h" #include "files.h" +#include "getargs.h" +#include "uniqstr.h" int debug_flag = 0; int defines_flag = 0; @@ -88,7 +91,7 @@ static const int trace_types[] = static void trace_argmatch (char *args) { - ARGMATCH_ASSERT (trace_args, trace_types); + verify (trace_constraint, ARGMATCH_CONSTRAINT (trace_args, trace_types)); if (args) { args = strtok (args, ","); @@ -139,7 +142,7 @@ static const int report_types[] = static void report_argmatch (char *args) { - ARGMATCH_ASSERT (report_args, report_types); + verify (report_constraint, ARGMATCH_CONSTRAINT (report_args, report_types)); args = strtok (args, ","); do { @@ -318,7 +321,8 @@ getargs (int argc, char *argv[]) { int c; - while ((c = getopt_long (argc, argv, short_options, long_options, NULL)) != EOF) + while ((c = getopt_long (argc, argv, short_options, long_options, NULL)) + != -1) switch (c) { case 0: @@ -410,5 +414,5 @@ getargs (int argc, char *argv[]) usage (EXIT_FAILURE); } - current_file = grammar_file = struniq_new (argv[optind]); + current_file = grammar_file = uniqstr_new (argv[optind]); }