From f9b6125d00f994da913fc8fd5ee5e8981844a70f Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 21 May 2019 08:04:21 +0000 Subject: 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@. --- mandoc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mandoc.c') 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 * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze @@ -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. */ -- cgit v1.2.3-56-ge451