summaryrefslogtreecommitdiffstats
path: root/mandoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-06-20 17:24:00 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-06-20 17:24:00 +0000
commitf55f857f8f078275f8f6d914367c3075c9e25022 (patch)
tree32eae989a5989bbd16b4929027c3c2df76fd428c /mandoc.c
parent6b6c88dfdce932cd2de0f3b003a8bf31558b0fbe (diff)
downloadmandoc-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 'mandoc.c')
-rw-r--r--mandoc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mandoc.c b/mandoc.c
index 7ddead57..bc001a61 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -509,14 +509,14 @@ mandoc_normdate(struct mparse *parse, char *in, int ln, int pos)
if (NULL == in || '\0' == *in ||
0 == strcmp(in, "$" "Mdocdate$")) {
- mandoc_msg(MANDOCERR_NODATE, parse, ln, pos, NULL);
+ mandoc_msg(MANDOCERR_DATE_MISSING, parse, ln, pos, NULL);
time(&t);
}
else if (a2time(&t, "%Y-%m-%d", in))
t = 0;
else if (!a2time(&t, "$" "Mdocdate: %b %d %Y $", in) &&
!a2time(&t, "%b %d, %Y", in)) {
- mandoc_msg(MANDOCERR_BADDATE, parse, ln, pos, NULL);
+ mandoc_msg(MANDOCERR_DATE_BAD, parse, ln, pos, NULL);
t = 0;
}
out = t ? time2a(t) : NULL;