tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: no current date in man(7) footers
Date: Tue, 1 Nov 2011 17:13:11 +0100	[thread overview]
Message-ID: <20111101161311.GO6817@iris.usta.de> (raw)

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

             reply	other threads:[~2011-11-01 16:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 16:13 Ingo Schwarze [this message]
2011-11-03 15:05 ` Kristaps Dzonsons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111101161311.GO6817@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).