Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/m4 print the source line and file where the error ha...



details:   https://anonhg.NetBSD.org/src/rev/92f0345b8be4
branches:  trunk
changeset: 449858:92f0345b8be4
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Mar 26 16:39:50 2019 +0000

description:
print the source line and file where the error happened.

diffstat:

 usr.bin/m4/expr.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 8d880334d113 -r 92f0345b8be4 usr.bin/m4/expr.c
--- a/usr.bin/m4/expr.c Tue Mar 26 15:50:23 2019 +0000
+++ b/usr.bin/m4/expr.c Tue Mar 26 16:39:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: expr.c,v 1.19 2009/10/26 21:11:28 christos Exp $       */
+/*     $NetBSD: expr.c,v 1.20 2019/03/26 16:39:50 christos Exp $       */
 /* $OpenBSD: expr.c,v 1.17 2006/01/20 23:10:19 espie Exp $ */
 /*
  * Copyright (c) 2004 Marc Espie <espie%cvs.openbsd.org@localhost>
@@ -19,7 +19,7 @@
 #include "nbtool_config.h"
 #endif
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: expr.c,v 1.19 2009/10/26 21:11:28 christos Exp $");
+__RCSID("$NetBSD: expr.c,v 1.20 2019/03/26 16:39:50 christos Exp $");
 #include <stdint.h>
 #include <stdio.h>
 #include <stddef.h>
@@ -36,7 +36,8 @@
 int
 yyerror(const char *msg)
 {
-       fprintf(stderr, "m4: %s in expr %s\n", msg, copy_toeval);
+       fprintf(stderr, "m4:%s:%zu: %s in expr %s\n", infile[ilevel].name,
+           infile[ilevel].lineno, msg, copy_toeval);
        return(0);
 }
 



Home | Main Index | Thread Index | Old Index