summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-05-21 08:04:21 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-05-21 08:04:21 +0000
commit8ff7ac7c15e6baa0340f60870e31e12764867164 (patch)
tree2a946f232f06936041d4970edcf6db47354a13d0
parentf724e544c79ba29c98e9b40f9ea6f12d3001ba7b (diff)
downloadmandoc-8ff7ac7c15e6baa0340f60870e31e12764867164.tar.gz
Do not print the style message "missing date" when the date is given
as "$Mdocdate$" without an actual date. That is the canonical way to write a new manual page and not bad style at all. Misleading message reported by kn@ on tech@.
-rw-r--r--mandoc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mandoc.c b/mandoc.c
index 063f7ec3..434d5d93 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -541,10 +541,10 @@ mandoc_normdate(struct roff_man *man, char *in, int ln, int pos)
/* No date specified: use today's date. */
- if (in == NULL || *in == '\0' || strcmp(in, "$" "Mdocdate$") == 0) {
+ if (in == NULL || *in == '\0')
mandoc_msg(MANDOCERR_DATE_MISSING, ln, pos, NULL);
+ if (in == NULL || *in == '\0' || strcmp(in, "$" "Mdocdate$") == 0)
return time2a(time(NULL));
- }
/* Valid mdoc(7) date format. */