/[pcre]/code/trunk/pcre_compile.c
ViewVC logotype

Diff of /code/trunk/pcre_compile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 207 by ph10, Fri Aug 3 14:53:04 2007 UTC revision 208 by ph10, Mon Aug 6 15:23:29 2007 UTC
# Line 2454  for (;; ptr++) Line 2454  for (;; ptr++)
2454        }        }
2455    
2456      /* If the first character is '^', set the negation flag and skip it. Also,      /* If the first character is '^', set the negation flag and skip it. Also,
2457      if the first few characters (either before or after ^) are \Q\E or \E we      if the first few characters (either before or after ^) are \Q\E or \E we
2458      skip them too. This makes for compatibility with Perl. */      skip them too. This makes for compatibility with Perl. */
2459    
2460      negate_class = FALSE;      negate_class = FALSE;
2461      for (;;)      for (;;)
2462        {        {
2463        c = *(++ptr);        c = *(++ptr);
2464        if (c == '\\')        if (c == '\\')
2465          {          {
2466          if (ptr[1] == 'E') ptr++;          if (ptr[1] == 'E') ptr++;
2467            else if (strncmp((const char *)ptr+1, "Q\\E", 3) == 0) ptr += 3;            else if (strncmp((const char *)ptr+1, "Q\\E", 3) == 0) ptr += 3;
2468              else break;              else break;
2469          }          }
2470        else if (!negate_class && c == '^')        else if (!negate_class && c == '^')
2471          negate_class = TRUE;          negate_class = TRUE;
2472        else break;        else break;
2473        }        }
2474    
2475      /* Keep a count of chars with values < 256 so that we can optimize the case      /* Keep a count of chars with values < 256 so that we can optimize the case
2476      of just a single character (as long as it's < 256). However, For higher      of just a single character (as long as it's < 256). However, For higher
# Line 3075  for (;; ptr++) Line 3075  for (;; ptr++)
3075        *errorcodeptr = ERR6;        *errorcodeptr = ERR6;
3076        goto FAILED;        goto FAILED;
3077        }        }
3078    
3079      /* If class_charcount is 1, we saw precisely one character whose value is      /* If class_charcount is 1, we saw precisely one character whose value is
3080      less than 256. In non-UTF-8 mode we can always optimize. In UTF-8 mode, we      less than 256. In non-UTF-8 mode we can always optimize. In UTF-8 mode, we
3081      can optimize the negative case only if there were no characters >= 128      can optimize the negative case only if there were no characters >= 128

Legend:
Removed from v.207  
changed lines
  Added in v.208

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12