From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: 1.11.7 regression: bold and underlined hyphens
Date: Sun, 18 Sep 2011 22:34:36 +0200 [thread overview]
Message-ID: <20110918203436.GH29692@iris.usta.de> (raw)
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
next reply other threads:[~2011-09-18 20:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-18 20:34 Ingo Schwarze [this message]
2011-09-18 20:47 ` 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=20110918203436.GH29692@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).