]> git.saurik.com Git - bison.git/blobdiff - src/getargs.c
tests: minor fixes/simplifications
[bison.git] / src / getargs.c
index e5d1faa362e06da8fdedf5bcce90f3411468da5d..06e6e972be3ee13f26970fadac923dec92534e94 100644 (file)
@@ -40,6 +40,8 @@
 # undef HACK_FOR___GNU_LIBRARY___PROTOTYPE
 #endif
 
+#include <progname.h>
+
 #include "complain.h"
 #include "files.h"
 #include "getargs.h"
@@ -75,8 +77,6 @@ int language_prio = default_prio;
 struct bison_language const *language = &valid_languages[0];
 const char *include = NULL;
 
-char *program_name;
-
 
 /** Decode an option's set of keys.
  *
@@ -102,7 +102,7 @@ flags_argmatch (const char *option,
       args = strtok (args, ",");
       while (args)
         {
-          int no = strncmp (args, "no-", 3) == 0 ? 3 : 0;
+          int no = STRPREFIX_LIT ("no-", args) ? 3 : 0;
           int value = XARGMATCH (option, args + no, keys, values);
           if (value == 0)
             {