From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.rz.uni-karlsruhe.de (Debian-exim@smtp1.rz.uni-karlsruhe.de [129.13.185.217]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o5AN6IZx003838 for ; Thu, 10 Jun 2010 19:06:20 -0400 (EDT) Received: from hekate.usta.de (asta-nat.asta.uni-karlsruhe.de [172.22.63.82]) by smtp1.rz.uni-karlsruhe.de with esmtp (Exim 4.63 #1) id 1OMqpE-0004Et-M6; Fri, 11 Jun 2010 01:06:16 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.71) (envelope-from ) id 1OMqpE-0007EK-Ke for tech@mdocml.bsd.lv; Fri, 11 Jun 2010 01:06:16 +0200 Received: from iris.usta.de ([172.24.96.5] helo=usta.de) by donnerwolke.usta.de with esmtp (Exim 4.69) (envelope-from ) id 1OMqpE-00028s-JK for tech@mdocml.bsd.lv; Fri, 11 Jun 2010 01:06:16 +0200 Received: from schwarze by usta.de with local (Exim 4.71) (envelope-from ) id 1OMqpE-0008V8-9J for tech@mdocml.bsd.lv; Fri, 11 Jun 2010 01:06:16 +0200 Date: Fri, 11 Jun 2010 01:06:15 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: [PATCH] unbreak special characters in the header Message-ID: <20100610230615.GA16301@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.20 (2009-06-14) Hi, testing initial -Tps support in OpenBSD, mandoc segfaulted in /usr/src/usr.sbin/bind/bin/check/named-checkconf.8, which has .TH "NAMED\-CHECKCONF" "8" "June 14, 2000" "BIND9" "BIND9" Thus, i committed -Tps together with the following patch: It is not a good idea to to print the header before setting up the character tables. While here, set p->tabwidth in terminal_man() for symmetry with terminal_mdoc(), as suggested by millert@ (and already committed to OpenBSD earlier). Since 5 is the default, this is not strictly required, but it is certainly clearer and more robust. OK to commit to bsd.lv, too? Yours, Ingo --- mdocml/man_term.c Fri Jun 11 00:41:37 2010 +++ mandoc/man_term.c Fri Jun 11 00:50:10 2010 @@ -158,9 +154,8 @@ terminal_man(void *arg, const struct man *man) p->overstep = 0; p->maxrmargin = p->defrmargin; + p->tabwidth = 5; - term_begin(p, print_man_head, print_man_foot, man_meta(man)); - if (NULL == p->symtab) switch (p->enc) { case (TERMENC_ASCII): @@ -174,6 +169,7 @@ terminal_man(void *arg, const struct man *man) n = man_node(man); m = man_meta(man); + term_begin(p, print_man_head, print_man_foot, m); p->flags |= TERMP_NOSPACE; mt.fl = 0; --- mdocml/mdoc_term.c Fri Jun 11 00:41:37 2010 +++ mandoc/mdoc_term.c Fri Jun 11 00:50:10 2010 @@ -276,9 +272,6 @@ terminal_mdoc(void *arg, const struct mdoc *mdoc) p->maxrmargin = p->defrmargin; p->tabwidth = 5; - term_begin(p, print_mdoc_head, - print_mdoc_foot, mdoc_meta(mdoc)); - if (NULL == p->symtab) switch (p->enc) { case (TERMENC_ASCII): @@ -291,6 +284,8 @@ terminal_mdoc(void *arg, const struct mdoc *mdoc) n = mdoc_node(mdoc); m = mdoc_meta(mdoc); + + term_begin(p, print_mdoc_head, print_mdoc_foot, m); if (n->child) print_mdoc_nodelist(p, NULL, m, n->child); -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv