Module Name: src
Committed By: christos
Date: Sun May 10 19:54:49 UTC 2020
Modified Files:
src/crypto/dist/ipsec-tools/src/setkey: token.l
Log Message:
prefix errors with the program name and use stderr.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/crypto/dist/ipsec-tools/src/setkey/token.l
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/crypto/dist/ipsec-tools/src/setkey/token.l
diff -u src/crypto/dist/ipsec-tools/src/setkey/token.l:1.23 src/crypto/dist/ipsec-tools/src/setkey/token.l:1.24
--- src/crypto/dist/ipsec-tools/src/setkey/token.l:1.23 Tue Jul 23 00:30:32 2019
+++ src/crypto/dist/ipsec-tools/src/setkey/token.l Sun May 10 15:54:49 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: token.l,v 1.23 2019/07/23 04:30:32 ozaki-r Exp $ */
+/* $NetBSD: token.l,v 1.24 2020/05/10 19:54:49 christos Exp $ */
/* $KAME: token.l,v 1.44 2003/10/21 07:20:58 itojun Exp $ */
/*
@@ -49,6 +49,7 @@
#include <unistd.h>
#include <errno.h>
#include <netdb.h>
+#include <err.h>
#include "vchar.h"
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || \
@@ -335,7 +336,7 @@ yyfatal(const char *s)
void
yyerror(const char *s)
{
- printf("line %d: %s at [%s]\n", lineno, s, yytext);
+ warnx("line %d: %s at [%s]", lineno, s, yytext);
}
int
@@ -347,7 +348,7 @@ parse(FILE **fp)
parse_init();
if (yyparse()) {
- printf("parse failed, line %d.\n", lineno);
+ warnx("line %d: parse failed", lineno);
return(-1);
}