From b3b89a43d7165af5fd4fe84f88cdeef6cb5ee1aa Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 20 Jun 2014 17:24:00 +0000 Subject: 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. --- mandoc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mandoc.c') 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 * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze @@ -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; -- cgit v1.2.3