aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitb3b89a43d7165af5fd4fe84f88cdeef6cb5ee1aa (patch)
tree66e68d5d37c2a505037e623de69d48b21809cfd2 /mandoc.c
parent8358cc737b994d172459eaf3401807c2b0d3811c (diff)
downloadmandoc-b3b89a43d7165af5fd4fe84f88cdeef6cb5ee1aa.tar.gz
mandoc-b3b89a43d7165af5fd4fe84f88cdeef6cb5ee1aa.tar.zst
mandoc-b3b89a43d7165af5fd4fe84f88cdeef6cb5ee1aa.zip
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mandoc.c b/mandoc.c
index 5eed4727..1354e026 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/* $Id: mandoc.c,v 1.79 2014/04/20 16:46:04 schwarze Exp $ */
+/* $Id: mandoc.c,v 1.80 2014/06/20 17:24:00 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;