/[pcre]/code/tags/pcre-8.33/pcre_compile.c
ViewVC logotype

Diff of /code/tags/pcre-8.33/pcre_compile.c

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

revision 1062 by chpe, Tue Oct 16 15:54:05 2012 UTC revision 1063 by chpe, Tue Oct 16 15:54:09 2012 UTC
# Line 2962  Returns:       TRUE if auto-possessifyin Line 2962  Returns:       TRUE if auto-possessifyin
2962  */  */
2963    
2964  static BOOL  static BOOL
2965  check_char_prop(int c, int ptype, int pdata, BOOL negated)  check_char_prop(pcre_uint32 c, int ptype, int pdata, BOOL negated)
2966  {  {
2967  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
2968  const pcre_uint32 *p;  const pcre_uint32 *p;
# Line 3048  static BOOL Line 3048  static BOOL
3048  check_auto_possessive(const pcre_uchar *previous, BOOL utf,  check_auto_possessive(const pcre_uchar *previous, BOOL utf,
3049    const pcre_uchar *ptr, int options, compile_data *cd)    const pcre_uchar *ptr, int options, compile_data *cd)
3050  {  {
3051  pcre_int32 c = NOTACHAR; // FIXMEchpe pcre_uint32  pcre_uint32 c = NOTACHAR;
3052  pcre_int32 next;  pcre_uint32 next;
3053  int escape;  int escape;
3054  int op_code = *previous++;  int op_code = *previous++;
3055    
# Line 3147  if (escape == 0) Line 3147  if (escape == 0)
3147    case, which maps to the special PT_CLIST property. Check this first. */    case, which maps to the special PT_CLIST property. Check this first. */
3148    
3149  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
3150    if (utf && (unsigned int)c != NOTACHAR && (options & PCRE_CASELESS) != 0)    if (utf && c != NOTACHAR && (options & PCRE_CASELESS) != 0)
3151      {      {
3152      int ocs = UCD_CASESET(next);      int ocs = UCD_CASESET(next);
3153      if (ocs > 0) return check_char_prop(c, PT_CLIST, ocs, op_code >= OP_NOT);      if (ocs > 0) return check_char_prop(c, PT_CLIST, ocs, op_code >= OP_NOT);
# Line 3169  if (escape == 0) Line 3169  if (escape == 0)
3169  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
3170      if (utf)      if (utf)
3171        {        {
3172        unsigned int othercase;        pcre_uint32 othercase;
3173        if (next < 128) othercase = cd->fcc[next]; else        if (next < 128) othercase = cd->fcc[next]; else
3174  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
3175        othercase = UCD_OTHERCASE((unsigned int)next);        othercase = UCD_OTHERCASE(next);
3176  #else  #else
3177        othercase = NOTACHAR;        othercase = NOTACHAR;
3178  #endif  #endif
3179        return (unsigned int)c != othercase;        return c != othercase;
3180        }        }
3181      else      else
3182  #endif  /* SUPPORT_UTF */  #endif  /* SUPPORT_UTF */
3183      return (c != TABLE_GET((unsigned int)next, cd->fcc, next));  /* Not UTF */      return (c != TABLE_GET(next, cd->fcc, next));  /* Not UTF */
3184    
3185      case OP_NOT:      case OP_NOT:
3186      return c == next;      return c == next;
# Line 3190  if (escape == 0) Line 3190  if (escape == 0)
3190  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
3191      if (utf)      if (utf)
3192        {        {
3193        unsigned int othercase;        pcre_uint32 othercase;
3194        if (next < 128) othercase = cd->fcc[next]; else        if (next < 128) othercase = cd->fcc[next]; else
3195  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
3196        othercase = UCD_OTHERCASE((unsigned int)next);        othercase = UCD_OTHERCASE(next);
3197  #else  #else
3198        othercase = NOTACHAR;        othercase = NOTACHAR;
3199  #endif  #endif
3200        return (unsigned int)c == othercase;        return c == othercase;
3201        }        }
3202      else      else
3203  #endif  /* SUPPORT_UTF */  #endif  /* SUPPORT_UTF */
3204      return (c == TABLE_GET((unsigned int)next, cd->fcc, next));  /* Not UTF */      return (c == TABLE_GET(next, cd->fcc, next));  /* Not UTF */
3205    
3206      /* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not* set.      /* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not* set.
3207      When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */      When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */

Legend:
Removed from v.1062  
changed lines
  Added in v.1063

  ViewVC Help
Powered by ViewVC 1.1.5