/[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 1055 by chpe, Tue Oct 16 15:53:30 2012 UTC revision 1056 by chpe, Tue Oct 16 15:53:41 2012 UTC
# Line 3421  Returns:        the number of < 256 char Line 3421  Returns:        the number of < 256 char
3421    
3422  static int  static int
3423  add_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr, int options,  add_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr, int options,
3424    compile_data *cd, unsigned int start, unsigned int end)    compile_data *cd, pcre_uint32 start, pcre_uint32 end)
3425  {  {
3426  unsigned int c;  pcre_uint32 c;
3427  int n8 = 0;  int n8 = 0;
3428    
3429  /* If caseless matching is required, scan the range and process alternate  /* If caseless matching is required, scan the range and process alternate
# Line 3437  if ((options & PCRE_CASELESS) != 0) Line 3437  if ((options & PCRE_CASELESS) != 0)
3437    if ((options & PCRE_UTF8) != 0)    if ((options & PCRE_UTF8) != 0)
3438      {      {
3439      int rc;      int rc;
3440      unsigned int oc, od;      pcre_uint32 oc, od;
3441    
3442      options &= ~PCRE_CASELESS;   /* Remove for recursive calls */      options &= ~PCRE_CASELESS;   /* Remove for recursive calls */
3443      c = start;      c = start;
# Line 3490  in all cases. */ Line 3490  in all cases. */
3490  #endif  #endif
3491    if (end > 0xffff) end = 0xffff;    if (end > 0xffff) end = 0xffff;
3492    
3493  #elif defined COMPILE_PCRE32  #endif /* COMPILE_PCRE[8|16] */
 #ifdef SUPPORT_UTF  
   if ((options & PCRE_UTF32) == 0)  
     if (end > 0xffffu) end = 0xffffu; // FIXMEchpe rebase fix this  
 #endif  
 #endif /* COMPILE_PCRE[8|16|32] */  
3494    
3495  /* If all characters are less than 256, use the bit map. Otherwise use extra  /* If all characters are less than 256, use the bit map. Otherwise use extra
3496  data. */  data. */
# Line 3625  static int Line 3620  static int
3620  add_not_list_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr,  add_not_list_to_class(pcre_uint8 *classbits, pcre_uchar **uchardptr,
3621    int options, compile_data *cd, const pcre_uint32 *p)    int options, compile_data *cd, const pcre_uint32 *p)
3622  {  {
3623    BOOL utf = (options & PCRE_UTF8) != 0;
3624  int n8 = 0;  int n8 = 0;
3625  if (p[0] > 0)  if (p[0] > 0)
3626    n8 += add_to_class(classbits, uchardptr, options, cd, 0, p[0] - 1);    n8 += add_to_class(classbits, uchardptr, options, cd, 0, p[0] - 1);
3627  while (p[0] < NOTACHAR)  while (p[0] < NOTACHAR)
3628    {    {
3629    while (p[1] == p[0] + 1) p++;    while (p[1] == p[0] + 1) p++;
3630    n8 += add_to_class(classbits, uchardptr, options, cd, p[0] + 1,    n8 += add_to_class(classbits, uchardptr, options, cd, p[0] + 1,
3631      (p[1] == NOTACHAR)? 0x10ffff : p[1] - 1);      (p[1] == NOTACHAR) ? (utf ? 0x10ffffu : 0xffffffffu) : p[1] - 1);
3632    p++;    p++;
3633    }    }
3634  return n8;  return n8;

Legend:
Removed from v.1055  
changed lines
  Added in v.1056

  ViewVC Help
Powered by ViewVC 1.1.5