summaryrefslogtreecommitdiff
path: root/pcre_dfa_exec.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-09-25 16:27:58 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-09-25 16:27:58 +0000
commit4ae7d6630c0ef594c40cd99e2edce450077a2a87 (patch)
treeefcca2fb9b988a34cda732381965fbb31c54048e /pcre_dfa_exec.c
parent05d03818ae1cf4196b9316714f0fd199dfb1b1e2 (diff)
downloadpcre-4ae7d6630c0ef594c40cd99e2edce450077a2a87.tar.gz
All the remaining changes for handling characters with more than one other
case. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1046 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_dfa_exec.c')
-rw-r--r--pcre_dfa_exec.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c
index d772384..5ffa750 100644
--- a/pcre_dfa_exec.c
+++ b/pcre_dfa_exec.c
@@ -1060,6 +1060,7 @@ for (;;)
if (clen > 0)
{
BOOL OK;
+ const pcre_uint32 *cp;
const ucd_record * prop = GET_UCD(c);
switch(code[1])
{
@@ -1107,6 +1108,15 @@ for (;;)
PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
c == CHAR_UNDERSCORE;
break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + prop->caseset;
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
/* Should never occur, but keep compilers from grumbling. */
@@ -1294,6 +1304,7 @@ for (;;)
if (clen > 0)
{
BOOL OK;
+ const pcre_uint32 *cp;
const ucd_record * prop = GET_UCD(c);
switch(code[2])
{
@@ -1342,6 +1353,15 @@ for (;;)
c == CHAR_UNDERSCORE;
break;
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + prop->caseset;
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
/* Should never occur, but keep compilers from grumbling. */
default:
@@ -1522,6 +1542,7 @@ for (;;)
if (clen > 0)
{
BOOL OK;
+ const pcre_uint32 *cp;
const ucd_record * prop = GET_UCD(c);
switch(code[2])
{
@@ -1570,6 +1591,15 @@ for (;;)
c == CHAR_UNDERSCORE;
break;
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + prop->caseset;
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
/* Should never occur, but keep compilers from grumbling. */
default:
@@ -1775,6 +1805,7 @@ for (;;)
if (clen > 0)
{
BOOL OK;
+ const pcre_uint32 *cp;
const ucd_record * prop = GET_UCD(c);
switch(code[1 + IMM2_SIZE + 1])
{
@@ -1823,6 +1854,15 @@ for (;;)
c == CHAR_UNDERSCORE;
break;
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + prop->caseset;
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
/* Should never occur, but keep compilers from grumbling. */
default: