summaryrefslogtreecommitdiff
path: root/pcre_xclass.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-10-12 18:02:11 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2013-10-12 18:02:11 +0000
commitd588bf144394bc85610f20333985554b9919d735 (patch)
tree8bae0bea9f9079050cb6b429b95c3a09f2e899f8 /pcre_xclass.c
parentdfde99fb13ffbdac43d4c284cd91114d962c5978 (diff)
downloadpcre-d588bf144394bc85610f20333985554b9919d735.tar.gz
Add U+0085 and U+180E to what \s matches in UCP mode, to match Perl.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1376 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_xclass.c')
-rw-r--r--pcre_xclass.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/pcre_xclass.c b/pcre_xclass.c
index 335b6aa..9b85166 100644
--- a/pcre_xclass.c
+++ b/pcre_xclass.c
@@ -165,10 +165,18 @@ while ((t = *data++) != XCL_END)
case PT_SPACE: /* Perl space */
case PT_PXSPACE: /* POSIX space */
- if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z ||
- c == CHAR_HT || c == CHAR_NL || c == CHAR_VT ||
- c == CHAR_FF || c == CHAR_CR) == (t == XCL_PROP))
- return !negated;
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ if (t == XCL_PROP) return !negated;
+ break;
+
+ default:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == (t == XCL_PROP))
+ return !negated;
+ break;
+ }
break;
case PT_WORD: