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 p8IKijBT010075 for ; Sun, 18 Sep 2011 16:44:46 -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 1R5OEF-00071m-CH; Sun, 18 Sep 2011 22:44:43 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.72) (envelope-from ) id 1R5OEF-0002Qf-IO for tech@mdocml.bsd.lv; Sun, 18 Sep 2011 22:44:43 +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 1R5OEB-0006Du-OU for tech@mdocml.bsd.lv; Sun, 18 Sep 2011 22:44:39 +0200 Received: from schwarze by usta.de with local (Exim 4.72) (envelope-from ) id 1R5O4S-0006mV-H0 for tech@mdocml.bsd.lv; Sun, 18 Sep 2011 22:34:36 +0200 Date: Sun, 18 Sep 2011 22:34:36 +0200 From: Ingo Schwarze To: tech@mdocml.bsd.lv Subject: 1.11.7 regression: bold and underlined hyphens Message-ID: <20110918203436.GH29692@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) CVSROOT: /cvs Module name: src Changes by: schwarze@cvs.openbsd.org 2011/09/18 14:38:02 Modified files: usr.bin/mandoc : term.c Log message: fix a regression introduced in 1.11.7: even a breakable hyphen may be bold or underlined With this fix, 1.11.7 reduces the groff/mandoc differences in base by about 10% (100k -> 90k lines of diffs) with respect to 1.11.5. OK to commit to bsd.lv as well? Ingo Index: term.c =================================================================== RCS file: /cvs/src/usr.bin/mandoc/term.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -p -r1.59 -r1.60 --- term.c 29 May 2011 21:22:18 -0000 1.59 +++ term.c 18 Sep 2011 20:38:02 -0000 1.60 @@ -572,13 +572,16 @@ encode(struct termp *p, const char *word adjbuf(p, p->col + 1 + (len * 3)); for (i = 0; i < len; i++) { - if ( ! isgraph((unsigned char)word[i])) { + if (ASCII_HYPH != word[i] && + ! isgraph((unsigned char)word[i])) { p->buf[p->col++] = word[i]; continue; } if (TERMFONT_UNDER == f) p->buf[p->col++] = '_'; + else if (ASCII_HYPH == word[i]) + p->buf[p->col++] = '-'; else p->buf[p->col++] = word[i]; -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv