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 | f9b6125d00f994da913fc8fd5ee5e8981844a70f (patch) | |
tree | d806da2b7a7a527a6048da073e3b7455223f0cef /mandoc.c | |
parent | 8dd2707522794fb010f2cdbc55b96f43d6773649 (diff) | |
download | mandoc-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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. */ |