diff options
author | 2000-01-11 14:00:57 +0000 | |
---|---|---|
committer | 2000-01-11 14:00:57 +0000 | |
commit | 41c6d7ee5d54e51df44075e9274e15e46a589443 (patch) | |
tree | 3458e7c81900aa8b2966f07d9e2715eab416d800 | |
parent | sendmail is really /usr/libexec/sendmail/sendmail now - not /usr/sbin (diff) | |
download | wireguard-openbsd-41c6d7ee5d54e51df44075e9274e15e46a589443.tar.xz wireguard-openbsd-41c6d7ee5d54e51df44075e9274e15e46a589443.zip |
Show problematic evaluated expression in error messages.
-rw-r--r-- | usr.bin/m4/expr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/m4/expr.c b/usr.bin/m4/expr.c index 4305dfb473c..b6f280d40a6 100644 --- a/usr.bin/m4/expr.c +++ b/usr.bin/m4/expr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: expr.c,v 1.10 1999/11/17 15:34:13 espie Exp $ */ +/* $OpenBSD: expr.c,v 1.11 2000/01/11 14:00:57 espie Exp $ */ /* $NetBSD: expr.c,v 1.7 1995/09/28 05:37:31 tls Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)expr.c 8.2 (Berkeley) 4/29/95"; #else -static char rcsid[] = "$OpenBSD: expr.c,v 1.10 1999/11/17 15:34:13 espie Exp $"; +static char rcsid[] = "$OpenBSD: expr.c,v 1.11 2000/01/11 14:00:57 espie Exp $"; #endif #endif /* not lint */ @@ -108,6 +108,7 @@ static char rcsid[] = "$OpenBSD: expr.c,v 1.10 1999/11/17 15:34:13 espie Exp $"; #define HEX 16 static const char *nxtch; /* Parser scan pointer */ +static const char *where; static int query __P((void)); static int lor __P((void)); @@ -147,6 +148,7 @@ expr(expbuf) int rval; nxtch = expbuf; + where = expbuf; if (setjmp(expjump) != 0) return FALSE; @@ -616,6 +618,6 @@ static void experr(msg) const char *msg; { - printf("m4: %s in expr.\n", msg); + printf("m4: %s in expr %s.\n", msg, where); longjmp(expjump, -1); } |