aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.c
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
commitf9b6125d00f994da913fc8fd5ee5e8981844a70f (patch)
treed806da2b7a7a527a6048da073e3b7455223f0cef /mandoc.c
parent8dd2707522794fb010f2cdbc55b96f43d6773649 (diff)
downloadmandoc-f9b6125d00f994da913fc8fd5ee5e8981844a70f.tar.gz
mandoc-f9b6125d00f994da913fc8fd5ee5e8981844a70f.tar.zst
mandoc-f9b6125d00f994da913fc8fd5ee5e8981844a70f.zip
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@.
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 fb9395a5..564669fe 100644
--- a/mandoc.c
+++ b/mandoc.c
@@ -1,4 +1,4 @@
-/* $Id: mandoc.c,v 1.114 2018/12/30 00:49:55 schwarze Exp $ */
+/* $Id: mandoc.c,v 1.115 2019/05/21 08:04:21 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
@@ -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. */