tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* no current date in man(7) footers
@ 2011-11-01 16:13 Ingo Schwarze
  2011-11-03 15:05 ` Kristaps Dzonsons
  0 siblings, 1 reply; 2+ messages in thread
From: Ingo Schwarze @ 2011-11-01 16:13 UTC (permalink / raw)
  To: tech

Hi,

i'm currently leaving out the very last (footer) lines when doing
systematic output comparisons of groff and mandoc because they
differ gratuitiously in a number of ways.

Arguably, none of the ways to format the footer are really better
or worse than others, but i'd like to get rid of gratuitious
differences and simplify comparison scripts.

So, expect a series of small diffs to get the mandoc footer lines
in line with groff.  Here is the first one.

In man(7), mandoc uses the current date when .TH sets no date,
but groff uses the empty string instead.

OK?
  Ingo


Index: man_validate.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/man_validate.c,v
retrieving revision 1.48
diff -u -p -r1.48 man_validate.c
--- man_validate.c	16 Oct 2011 12:18:32 -0000	1.48
+++ man_validate.c	1 Nov 2011 16:15:16 -0000
@@ -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 */
 
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: no current date in man(7) footers
  2011-11-01 16:13 no current date in man(7) footers Ingo Schwarze
@ 2011-11-03 15:05 ` Kristaps Dzonsons
  0 siblings, 0 replies; 2+ messages in thread
From: Kristaps Dzonsons @ 2011-11-03 15:05 UTC (permalink / raw)
  To: tech

> i'm currently leaving out the very last (footer) lines when doing
> systematic output comparisons of groff and mandoc because they
> differ gratuitiously in a number of ways.
>
> Arguably, none of the ways to format the footer are really better
> or worse than others, but i'd like to get rid of gratuitious
> differences and simplify comparison scripts.
>
> So, expect a series of small diffs to get the mandoc footer lines
> in line with groff.  Here is the first one.
>
> In man(7), mandoc uses the current date when .TH sets no date,
> but groff uses the empty string instead.

Ingo,

Yes, please check this in.

Thanks,

Kristaps
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-03 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-01 16:13 no current date in man(7) footers Ingo Schwarze
2011-11-03 15:05 ` Kristaps Dzonsons

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).