source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: When .TH sets no data, leave the date field in the page footer
@ 2011-11-03 20:48 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2011-11-03 20:48 UTC (permalink / raw)
  To: source

Log Message:
-----------
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@

Modified Files:
--------------
    mdocml:
        man_validate.c

Revision Data
-------------
Index: man_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_validate.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -Lman_validate.c -Lman_validate.c -u -p -r1.76 -r1.77
--- man_validate.c
+++ man_validate.c
@@ -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 */
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-11-03 20:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-03 20:48 mdocml: When .TH sets no data, leave the date field in the page footer schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).