diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-05-21 08:04:21 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-05-21 08:04:21 +0000 |
commit | 8ff7ac7c15e6baa0340f60870e31e12764867164 (patch) | |
tree | 2a946f232f06936041d4970edcf6db47354a13d0 | |
parent | f724e544c79ba29c98e9b40f9ea6f12d3001ba7b (diff) | |
download | mandoc-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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. */ |