diff options
author | 2011-11-03 20:46:40 +0000 | |
---|---|---|
committer | 2011-11-03 20:46:40 +0000 | |
commit | 0b8421a5eb0c9bd35a02fd88ef6a69e44c87dd56 (patch) | |
tree | aeb66313ff1c2d215183571d0dc7b03645a73254 /usr.bin/mandoc/man_validate.c | |
parent | Correct .Eo spacing: (diff) | |
download | wireguard-openbsd-0b8421a5eb0c9bd35a02fd88ef6a69e44c87dd56.tar.xz wireguard-openbsd-0b8421a5eb0c9bd35a02fd88ef6a69e44c87dd56.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 'usr.bin/mandoc/man_validate.c')
-rw-r--r-- | usr.bin/mandoc/man_validate.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/mandoc/man_validate.c b/usr.bin/mandoc/man_validate.c index 5ce65c72979..19ce4aa6784 100644 --- a/usr.bin/mandoc/man_validate.c +++ b/usr.bin/mandoc/man_validate.c @@ -1,4 +1,4 @@ -/* $Id: man_validate.c,v 1.48 2011/10/16 12:18:32 schwarze Exp $ */ +/* $Id: man_validate.c,v 1.49 2011/11/03 20:46:40 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -411,10 +411,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 */ |