From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: merge back 1.11.3 regression fixes from OpenBSD
Date: Sat, 11 Jun 2011 17:26:23 +0200 [thread overview]
Message-ID: <20110611152623.GG4597@iris.usta.de> (raw)
Hi Kristaps,
here are the fixes i committed to OpenBSD after merging 1.11.3.
chars.c (OpenBSD rev. 1.20):
* Do not pass integers outside the ASCII range to isprint().
* Make sure escaped characters are really printed verbatim
when the escape sequence has no special meaning.
predefs.in (OpenBSD rev. 1.2):
Some predefined strings got changed in -Tascii mode.
With this fix, they change in other output modes, but -Tascii is what matters.
OK to merge those back to bsd.lv?
Yours,
Ingo
Index: chars.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/chars.c,v
retrieving revision 1.46
diff -u -p -r1.46 chars.c
--- chars.c 24 May 2011 21:31:23 -0000 1.46
+++ chars.c 11 Jun 2011 15:19:00 -0000
@@ -127,7 +127,7 @@ mchars_num2char(const char *p, size_t sz
if ((i = mandoc_strntou(p, sz, 10)) < 0)
return('\0');
- return(isprint(i) ? i : '\0');
+ return(i > 0 && i < 256 && isprint(i) ? i : '\0');
}
/*
@@ -154,8 +154,10 @@ mchars_spec2str(struct mchars *arg, cons
const struct ln *ln;
ln = find(arg, p, sz);
- if (NULL == ln)
+ if (NULL == ln) {
+ *rsz = 1;
return(NULL);
+ }
*rsz = strlen(ln->ascii);
return(ln->ascii);
Index: predefs.in
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/predefs.in,v
retrieving revision 1.2
diff -u -p -r1.2 predefs.in
--- predefs.in 26 May 2011 14:30:28 -0000 1.2
+++ predefs.in 11 Jun 2011 15:19:00 -0000
@@ -29,13 +29,13 @@ PREDEF("Am", "&")
PREDEF("Ba", "|")
PREDEF("Ge", "\\(>=")
PREDEF("Gt", ">")
-PREDEF("If", "\\(if")
+PREDEF("If", "infinity")
PREDEF("Le", "\\(<=")
PREDEF("Lq", "\\(lq")
PREDEF("Lt", "<")
PREDEF("Na", "NaN")
PREDEF("Ne", "\\(!=")
-PREDEF("Pi", "\\(*p")
+PREDEF("Pi", "pi")
PREDEF("Pm", "\\(+-")
PREDEF("Rq", "\\(rq")
PREDEF("left-bracket", "[")
@@ -50,7 +50,7 @@ PREDEF("right-bracket", "]")
PREDEF("right-parenthesis", ")")
PREDEF("rp", ")")
PREDEF("right-singlequote", "\\(cq")
-PREDEF("Tm", "\\(tm")
+PREDEF("Tm", "(Tm)")
PREDEF("Px", "POSIX")
PREDEF("Ai", "ANSI")
PREDEF("\'", "\\\'")
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
reply other threads:[~2011-06-11 15:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20110611152623.GG4597@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).