=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/doas/parse.y,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/doas/parse.y 2015/07/16 22:33:01 1.3 +++ src/usr.bin/doas/parse.y 2015/07/16 23:02:56 1.4 @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.3 2015/07/16 22:33:01 zhuk Exp $ */ +/* $OpenBSD: parse.y,v 1.4 2015/07/16 23:02:56 nicm Exp $ */ /* * Copyright (c) 2015 Ted Unangst * @@ -44,6 +44,10 @@ 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 @@ 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 {