diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-06 16:06:25 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-02-06 16:06:25 +0000 |
commit | 1e390373a2e27a0047fae8db8c21d17e044c8376 (patch) | |
tree | 307219573169623faa5b504c9632626fb6659c65 /roff.c | |
parent | daf2e16fdc43b128212a4ed878eda6db14c08074 (diff) | |
download | mandoc-1e390373a2e27a0047fae8db8c21d17e044c8376.tar.gz |
replace the last legacy generic message type, "argument count wrong",
by more specific messages, improving diagnostics for .cc .tr .Bl -column
Diffstat (limited to 'roff.c')
-rw-r--r-- | roff.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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--; } |