diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-06-20 17:24:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-06-20 17:24:00 +0000 |
commit | f55f857f8f078275f8f6d914367c3075c9e25022 (patch) | |
tree | 32eae989a5989bbd16b4929027c3c2df76fd428c /mdoc_validate.c | |
parent | 6b6c88dfdce932cd2de0f3b003a8bf31558b0fbe (diff) | |
download | mandoc-f55f857f8f078275f8f6d914367c3075c9e25022.tar.gz |
Start systematic improvements of error reporting.
So far, this covers all WARNINGs related to the prologue.
1) hierarchical naming of MANDOCERR_* constants
2) mention the macro name in messages where that adds clarity
3) add one missing MANDOCERR_DATE_MISSING msg
4) fix the wording of one message related to the man(7) prologue
Started on the plane back from Ottawa.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index a3029926..0078f8cc 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -935,10 +935,10 @@ pre_dt(PRE_ARGS) { if (NULL == mdoc->meta.date || mdoc->meta.os) - mdoc_nmsg(mdoc, n, MANDOCERR_PROLOGOOO); + mdoc_nmsg(mdoc, n, MANDOCERR_PROLOG_ORDER); if (mdoc->meta.title) - mdoc_nmsg(mdoc, n, MANDOCERR_PROLOGREP); + mdoc_nmsg(mdoc, n, MANDOCERR_PROLOG_REP); return(1); } @@ -948,10 +948,10 @@ pre_os(PRE_ARGS) { if (NULL == mdoc->meta.title || NULL == mdoc->meta.date) - mdoc_nmsg(mdoc, n, MANDOCERR_PROLOGOOO); + mdoc_nmsg(mdoc, n, MANDOCERR_PROLOG_ORDER); if (mdoc->meta.os) - mdoc_nmsg(mdoc, n, MANDOCERR_PROLOGREP); + mdoc_nmsg(mdoc, n, MANDOCERR_PROLOG_REP); return(1); } @@ -961,10 +961,10 @@ pre_dd(PRE_ARGS) { if (mdoc->meta.title || mdoc->meta.os) - mdoc_nmsg(mdoc, n, MANDOCERR_PROLOGOOO); + mdoc_nmsg(mdoc, n, MANDOCERR_PROLOG_ORDER); if (mdoc->meta.date) - mdoc_nmsg(mdoc, n, MANDOCERR_PROLOGREP); + mdoc_nmsg(mdoc, n, MANDOCERR_PROLOG_REP); return(1); } @@ -2184,7 +2184,7 @@ post_dt(POST_ARGS) * FIXME: don't be lazy: have this make all * characters be uppercase and just warn once. */ - mdoc_nmsg(mdoc, nn, MANDOCERR_UPPERCASE); + mdoc_nmsg(mdoc, nn, MANDOCERR_TITLE_CASE); break; } @@ -2228,7 +2228,7 @@ post_dt(POST_ARGS) mdoc->meta.vol = mandoc_strdup(cp); mdoc->meta.msec = mandoc_strdup(nn->string); } else { - mdoc_nmsg(mdoc, n, MANDOCERR_BADMSEC); + mdoc_nmsg(mdoc, n, MANDOCERR_MSEC_BAD); mdoc->meta.vol = mandoc_strdup(nn->string); mdoc->meta.msec = mandoc_strdup(nn->string); } @@ -2250,7 +2250,7 @@ post_dt(POST_ARGS) } else { cp = mdoc_a2arch(nn->string); if (NULL == cp) { - mdoc_nmsg(mdoc, nn, MANDOCERR_BADVOLARCH); + mdoc_nmsg(mdoc, nn, MANDOCERR_ARCH_BAD); free(mdoc->meta.vol); mdoc->meta.vol = mandoc_strdup(nn->string); } else |