diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-11-03 20:46:41 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-11-03 20:46:41 +0000 |
commit | 4890c832ed623de70765f2f59dcd9e30d1d71b27 (patch) | |
tree | 12bb33486d244ed785bff8216215e8b7977ef392 /usr.bin | |
parent | 4d13c1fd09e13b89d439018840a7500fadc0d775 (diff) |
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')
-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 */ |