From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]); by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id 00a1eb40; for ; Tue, 17 Feb 2015 13:09:45 -0500 (EST) Date: Tue, 17 Feb 2015 13:09:45 -0500 (EST) Message-Id: <11110378645627563530.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Cope with another one of the many kinds of DocBook stupidity: X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Cope with another one of the many kinds of DocBook stupidity: Instead of just using .br, DocBook sometimes fiddles with the utterly unportable internal register \n[an-break-flag] that is only available in the GNU implementation of man(7) and then arms an input line trap to call the equally unportable internal macro .an-trap that, in the GNU implementation, inspects that variable; all the world is GNU, isn't it? Since naddy@ reports that quite a few ports manuals suffer from this insanity, let's just translate it to the intended .br. Et ceterum censeo DocBookem esse delendam. Modified Files: -------------- mdocml: roff.c Revision Data ------------- Index: roff.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/roff.c,v retrieving revision 1.261 retrieving revision 1.262 diff -Lroff.c -Lroff.c -u -p -r1.261 -r1.262 --- roff.c +++ roff.c @@ -2337,10 +2337,19 @@ roff_it(ROFF_ARGS) return(ROFF_IGN); } - /* Arm the input line trap. */ + while (isspace((unsigned char)buf->buf[pos])) + pos++; + + /* + * Arm the input line trap. + * Special-casing "an-trap" is an ugly workaround to cope + * with DocBook stupidly fiddling with man(7) internals. + */ roffit_lines = iv; - roffit_macro = mandoc_strdup(buf->buf + pos); + roffit_macro = mandoc_strdup(iv != 1 || + strcmp(buf->buf + pos, "an-trap") ? + buf->buf + pos : "br"); return(ROFF_IGN); } -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv