/*
- * Copyright (c) 2011 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2011-2013 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
# include <stdlib.h>
# endif
#endif /* STDC_HEADERS */
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+# include "compat/stdbool.h"
+#endif /* HAVE_STDBOOL_H */
#ifdef HAVE_STRING_H
# include <string.h>
#endif /* HAVE_STRING_H */
#include <grp.h>
#include <pwd.h>
+#define SUDO_ERROR_WRAP 0
+
+#include "missing.h"
#include "list.h"
#include "parse.h"
#include "toke.h"
-#include "gram.h"
+#include "sudo_plugin.h"
+#include <gram.h>
+
+__dso_public int main(int argc, char *argv[]);
/*
* TODO: test realloc
*/
-YYSTYPE yylval;
+YYSTYPE sudoerslval;
struct fill_test {
const char *input;
{
if (!fill(input, len))
return -1;
- *resultp = yylval.string;
- return !strcmp(yylval.string, expect);
+ *resultp = sudoerslval.string;
+ return !strcmp(sudoerslval.string, expect);
}
static int
{
if (!fill_cmnd(input, len))
return -1;
- *resultp = yylval.command.cmnd;
- return !strcmp(yylval.command.cmnd, expect);
+ *resultp = sudoerslval.command.cmnd;
+ return !strcmp(sudoerslval.command.cmnd, expect);
}
static int
{
if (!fill_args(input, len, addspace))
return -1;
- *resultp = yylval.command.args;
- return !strcmp(yylval.command.args, expect);
+ *resultp = sudoerslval.command.args;
+ return !strcmp(sudoerslval.command.args, expect);
}
static int
/* STUB */
void
-cleanup(int gotsig)
-{
- return;
-}
-
-/* STUB */
-void
-yyerror(const char *s)
+sudoerserror(const char *s)
{
return;
}