From 430aedfb799019cad1ed93cdb6c3114b12b40405 Mon Sep 17 00:00:00 2001 From: obrien Date: Thu, 4 Apr 2002 21:09:06 +0000 Subject: Follow suit with OpenBSD and NetBSD and tell the program name in diagnostics. --- usr.bin/yacc/mkpar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'usr.bin/yacc/mkpar.c') diff --git a/usr.bin/yacc/mkpar.c b/usr.bin/yacc/mkpar.c index 92612ed..f7d2e66 100644 --- a/usr.bin/yacc/mkpar.c +++ b/usr.bin/yacc/mkpar.c @@ -251,9 +251,9 @@ unused_rules() if (nunused) { if (nunused == 1) - warnx("1 rule never reduced"); + warnx("%s: 1 rule never reduced", getprogname()); else - warnx("%d rules never reduced", nunused); + warnx("%s: %d rules never reduced", getprogname(), nunused); } } @@ -341,15 +341,15 @@ total_conflicts() if ((SRtotal != SRexpect) || RRtotal) { if (SRtotal == 1) - warnx("1 shift/reduce conflict"); + warnx("%s: 1 shift/reduce conflict", getprogname()); else if (SRtotal > 1) - warnx("%d shift/reduce conflicts", SRtotal); + warnx("%s: %d shift/reduce conflicts", getprogname(), SRtotal); } if (RRtotal == 1) - warnx("1 reduce/reduce conflict"); + warnx("%s: 1 reduce/reduce conflict", getprogname()); else if (RRtotal > 1) - warnx("%d reduce/reduce conflicts", RRtotal); + warnx("%s: %d reduce/reduce conflicts", getprogname(), RRtotal); } -- cgit v1.1