aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2015-07-16 23:02:56 +0000
committerNicholas Marriott <nicm@openbsd.org>2015-07-16 23:02:56 +0000
commit5fe12316b511d8392db3bdf9c8a4ac836bd85493 (patch)
treecc21734857a2f2500c54fbe29a7a6bd8302618b5
parent135b26bc13338163773b613e459bdac850927ae9 (diff)
downloadopendoas-5fe12316b511d8392db3bdf9c8a4ac836bd85493.tar.gz
Prototype yy* functions, and use verrx in yyerror(). ok tedu
-rw-r--r--parse.y12
1 files changed, 6 insertions, 6 deletions
diff --git a/parse.y b/parse.y
index d35f386..4e15878 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.2 2015/07/16 22:11:01 nicm Exp $ */
+/* $OpenBSD: parse.y,v 1.3 2015/07/16 22:33:01 zhuk Exp $ */
/*
* Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
*
@@ -44,6 +44,10 @@ FILE *yyfp;
struct rule **rules;
int nrules, maxrules;
+void yyerror(const char *, ...);
+int yylex(void);
+int yyparse(void);
+
%}
%token TPERMIT TDENY TAS TCMD
@@ -143,11 +147,7 @@ yyerror(const char *fmt, ...)
va_list va;
va_start(va, fmt);
- fprintf(stderr, "doas: ");
- vfprintf(stderr, fmt, va);
- fprintf(stderr, "\n");
- va_end(va);
- exit(1);
+ verrx(1, fmt, va);
}
struct keyword {