From 1e390373a2e27a0047fae8db8c21d17e044c8376 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 6 Feb 2015 16:06:25 +0000 Subject: replace the last legacy generic message type, "argument count wrong", by more specific messages, improving diagnostics for .cc .tr .Bl -column --- roff.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'roff.c') diff --git a/roff.c b/roff.c index 79c40c83..c07b192e 100644 --- a/roff.c +++ b/roff.c @@ -2538,7 +2538,8 @@ roff_cc(ROFF_ARGS) r->control = 0; if (*p != '\0') - mandoc_msg(MANDOCERR_ARGCOUNT, r->parse, ln, ppos, NULL); + mandoc_vmsg(MANDOCERR_ARG_EXCESS, r->parse, + ln, p - buf->buf, "cc ... %s", p); return(ROFF_IGN); } @@ -2553,7 +2554,7 @@ roff_tr(ROFF_ARGS) p = buf->buf + pos; if (*p == '\0') { - mandoc_msg(MANDOCERR_ARGCOUNT, r->parse, ln, ppos, NULL); + mandoc_msg(MANDOCERR_REQ_EMPTY, r->parse, ln, ppos, "tr"); return(ROFF_IGN); } @@ -2581,8 +2582,8 @@ roff_tr(ROFF_ARGS) } ssz = (size_t)(p - second); } else if (*second == '\0') { - mandoc_msg(MANDOCERR_ARGCOUNT, r->parse, - ln, (int)(p - buf->buf), NULL); + mandoc_vmsg(MANDOCERR_TR_ODD, r->parse, + ln, first - buf->buf, "tr %s", first); second = " "; p--; } -- cgit