/[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 1047 by zherczeg, Fri Sep 28 15:06:38 2012 UTC revision 1048 by ph10, Fri Sep 28 16:03:14 2012 UTC
# Line 3036  static BOOL Line 3036  static BOOL
3036  check_auto_possessive(const pcre_uchar *previous, BOOL utf,  check_auto_possessive(const pcre_uchar *previous, BOOL utf,
3037    const pcre_uchar *ptr, int options, compile_data *cd)    const pcre_uchar *ptr, int options, compile_data *cd)
3038  {  {
3039  pcre_int32 c, next;  pcre_int32 c = NOTACHAR;
3040    pcre_int32 next;
3041  int op_code = *previous++;  int op_code = *previous++;
3042    
3043  /* Skip whitespace and comments in extended mode */  /* Skip whitespace and comments in extended mode */
# Line 3123  if (op_code == OP_CHAR || op_code == OP_ Line 3124  if (op_code == OP_CHAR || op_code == OP_
3124    }    }
3125    
3126  /* Now compare the next item with the previous opcode. First, handle cases when  /* Now compare the next item with the previous opcode. First, handle cases when
3127  the next item is a character. For a caseless UTF match, the next character may  the next item is a character. */
 have more than one other case; convert this to a special property. */  
3128    
3129  if (next >= 0)  if (next >= 0)
3130    {    {
3131      /* For a caseless UTF match, the next character may have more than one other
3132      case, which maps to the special PT_CLIST property. Check this first. */
3133    
3134  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
3135    if (utf && (options & PCRE_CASELESS) != 0)    if (utf && (unsigned int)c != NOTACHAR && (options & PCRE_CASELESS) != 0)
3136      {      {
3137      int ocs = UCD_CASESET(next);      int ocs = UCD_CASESET(next);
3138      if (ocs > 0) return check_char_prop(c, PT_CLIST, ocs, FALSE);      if (ocs > 0) return check_char_prop(c, PT_CLIST, ocs, op_code >= OP_NOT);
3139      }      }
3140  #endif  #endif
3141    

Legend:
Removed from v.1047  
changed lines
  Added in v.1048

  ViewVC Help
Powered by ViewVC 1.1.5