summaryrefslogtreecommitdiff
path: root/usr/src/cmd/mandoc/mandoc.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/mandoc/mandoc.c')
-rw-r--r--usr/src/cmd/mandoc/mandoc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/cmd/mandoc/mandoc.c b/usr/src/cmd/mandoc/mandoc.c
index 3e16d2c64f..1279b52ed5 100644
--- a/usr/src/cmd/mandoc/mandoc.c
+++ b/usr/src/cmd/mandoc/mandoc.c
@@ -1,7 +1,7 @@
-/* $Id: mandoc.c,v 1.103 2017/07/03 13:40:19 schwarze Exp $ */
+/* $Id: mandoc.c,v 1.104 2018/07/28 18:34:15 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -541,6 +541,9 @@ mandoc_normdate(struct roff_man *man, char *in, int ln, int pos)
if (t > time(NULL) + 86400)
mandoc_msg(MANDOCERR_DATE_FUTURE, man->parse,
ln, pos, cp);
+ else if (*in != '$' && strcmp(in, cp) != 0)
+ mandoc_msg(MANDOCERR_DATE_NORM, man->parse,
+ ln, pos, cp);
return cp;
}