From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout.scc.kit.edu (scc-mailout.scc.kit.edu [129.13.185.201]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id pA1GNU16010614 for ; Tue, 1 Nov 2011 12:23:30 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by scc-mailout-01.scc.kit.edu with esmtp (Exim 4.72 #1) id 1RLH7a-0002O3-4d; Tue, 01 Nov 2011 17:23:30 +0100 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RLH7a-0007U2-2j for tech@mdocml.bsd.lv; Tue, 01 Nov 2011 17:23:30 +0100 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1RLI3p-0000cl-Pk for tech@mdocml.bsd.lv; Tue, 01 Nov 2011 18:23:41 +0100 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1RLGxb-0005rU-N8 for tech@mdocml.bsd.lv; Tue, 01 Nov 2011 17:13:11 +0100 Date: Tue, 1 Nov 2011 17:13:11 +0100 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: no current date in man(7) footers Message-ID: <20111101161311.GO6817@iris.usta.de> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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