summaryrefslogtreecommitdiff
path: root/pcre_printint.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-09-23 16:50:00 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-09-23 16:50:00 +0000
commit05d03818ae1cf4196b9316714f0fd199dfb1b1e2 (patch)
tree63b12f728462a7a07d2a2f31d1631048a0de1137 /pcre_printint.c
parent515816cae335b59b2d784ae9bb13711455a7c192 (diff)
downloadpcre-05d03818ae1cf4196b9316714f0fd199dfb1b1e2.tar.gz
Update character class handling to use new character case information; rework
\h, \H, \v, and \V to use the same apparatus with centrally defined lists. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1045 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_printint.c')
-rw-r--r--pcre_printint.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pcre_printint.c b/pcre_printint.c
index b6f720d..1767172 100644
--- a/pcre_printint.c
+++ b/pcre_printint.c
@@ -130,7 +130,9 @@ return 0;
if (!utf || (c & 0xc0) != 0xc0)
{
- if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x%02x", c);
+ if (PRINTABLE(c)) fprintf(f, "%c", c);
+ else if (c < 0x80) fprintf(f, "\\x%02x", c);
+ else fprintf(f, "\\x{%02x}", c);
return 0;
}
else
@@ -167,8 +169,8 @@ else
if (!utf || (c & 0xfc00) != 0xd800)
{
if (PRINTABLE(c)) fprintf(f, "%c", c);
- else if (c <= 0xff) fprintf(f, "\\x%02x", c);
- else fprintf(f, "\\x{%x}", c);
+ else if (c <= 0x80) fprintf(f, "\\x%02x", c);
+ else fprintf(f, "\\x{%02x}", c);
return 0;
}
else