aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_validate.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-11-03 20:48:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-11-03 20:48:52 +0000
commita5d5b6e354fbae06bcd3677e4c366370ade84e2a (patch)
treedb3af4bb218865893a0fc2cc32184575309d6c06 /man_validate.c
parenta136214ec402b0533c03cdddc34e83145b748398 (diff)
downloadmandoc-a5d5b6e354fbae06bcd3677e4c366370ade84e2a.tar.gz
mandoc-a5d5b6e354fbae06bcd3677e4c366370ade84e2a.tar.zst
mandoc-a5d5b6e354fbae06bcd3677e4c366370ade84e2a.zip
When .TH sets no data, leave the date field in the page footer blank,
do not use the current date. This removes a gratuitous output difference with respect to groff. ok kristaps@
Diffstat (limited to 'man_validate.c')
-rw-r--r--man_validate.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/man_validate.c b/man_validate.c
index 28352a0c..5ab775ac 100644
--- a/man_validate.c
+++ b/man_validate.c
@@ -1,4 +1,4 @@
-/* $Id: man_validate.c,v 1.76 2011/10/16 12:20:34 schwarze Exp $ */
+/* $Id: man_validate.c,v 1.77 2011/11/03 20:48:52 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -415,10 +415,12 @@ post_TH(CHKARGS)
if (n)
n = n->next;
- if (n)
+ if (n && n->string && '\0' != n->string[0]) {
pos = n->pos;
- m->meta.date = mandoc_normdate
- (m->parse, n ? n->string : NULL, line, pos);
+ m->meta.date = mandoc_normdate
+ (m->parse, n->string, line, pos);
+ } else
+ m->meta.date = mandoc_strdup("");
/* TITLE MSEC DATE ->SOURCE<- VOL */