summaryrefslogtreecommitdiffstats
path: root/man_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-02 05:52:24 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-02 05:52:24 +0000
commit82b921ceb9411072fc74ac549038d20ec4b2dc2a (patch)
treee2b75775d1bc0f63e7c29fa50870bc570f854d0d /man_validate.c
parent6953ebc600f2fbc755c081f62f54e09e92399d68 (diff)
downloadmandoc-82b921ceb9411072fc74ac549038d20ec4b2dc2a.tar.gz
Improve "skipping paragraph macro" messages,
showing which macro was skipped and before or after what.
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/man_validate.c b/man_validate.c
index ad01423f..def1e47d 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -357,7 +357,9 @@ check_par(CHKARGS)
break;
case MAN_BODY:
if (0 == n->nchild)
- man_nmsg(man, n, MANDOCERR_IGNPAR);
+ mandoc_vmsg(MANDOCERR_PAR_SKIP,
+ man->parse, n->line, n->pos,
+ "%s empty", man_macronames[n->tok]);
break;
case MAN_HEAD:
if (n->nchild)
@@ -381,7 +383,9 @@ post_IP(CHKARGS)
break;
case MAN_BODY:
if (0 == n->parent->head->nchild && 0 == n->nchild)
- man_nmsg(man, n, MANDOCERR_IGNPAR);
+ mandoc_vmsg(MANDOCERR_PAR_SKIP,
+ man->parse, n->line, n->pos,
+ "%s empty", man_macronames[n->tok]);
break;
default:
break;
@@ -579,7 +583,9 @@ post_vs(CHKARGS)
case MAN_SH:
/* FALLTHROUGH */
case MAN_SS:
- man_nmsg(man, n, MANDOCERR_IGNPAR);
+ mandoc_vmsg(MANDOCERR_PAR_SKIP, man->parse, n->line, n->pos,
+ "%s after %s", man_macronames[n->tok],
+ man_macronames[n->parent->tok]);
/* FALLTHROUGH */
case MAN_MAX:
/*