/[pcre]/code/branches/pcre16/pcre_exec.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_exec.c

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

revision 782 by zherczeg, Sat Dec 3 23:58:37 2011 UTC revision 785 by zherczeg, Mon Dec 5 20:12:24 2011 UTC
# Line 2069  for (;;) Line 2069  for (;;)
2069        be "non-word" characters. Remember the earliest consulted character for        be "non-word" characters. Remember the earliest consulted character for
2070        partial matching. */        partial matching. */
2071    
2072  #ifdef SUPPORT_UTF8  #ifdef SUPPORT_UTF
2073        if (utf)        if (utf)
2074          {          {
2075          /* Get status of previous character */          /* Get status of previous character */
# Line 2190  for (;;) Line 2190  for (;;)
2190        }        }
2191      eptr++;      eptr++;
2192  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
2193      if (utf) INTERNALCHAR(eptr < md->end_subject, *eptr, eptr++);      if (utf) ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
2194  #endif  #endif
2195      ecode++;      ecode++;
2196      break;      break;
# Line 3066  for (;;) Line 3066  for (;;)
3066      /* Match a single character, caselessly */      /* Match a single character, caselessly */
3067    
3068      case OP_CHARI:      case OP_CHARI:
3069  #ifdef SUPPORT_UTF8  #ifdef SUPPORT_UTF
3070      if (utf)      if (utf)
3071        {        {
3072        length = 1;        length = 1;
# Line 4089  for (;;) Line 4089  for (;;)
4089              }              }
4090            if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH);            if (IS_NEWLINE(eptr)) MRRETURN(MATCH_NOMATCH);
4091            eptr++;            eptr++;
4092            INTERNALCHAR(eptr < md->end_subject, *eptr, eptr++);            ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
4093            }            }
4094          break;          break;
4095    
# Line 4102  for (;;) Line 4102  for (;;)
4102              MRRETURN(MATCH_NOMATCH);              MRRETURN(MATCH_NOMATCH);
4103              }              }
4104            eptr++;            eptr++;
4105            INTERNALCHAR(eptr < md->end_subject, *eptr, eptr++);            ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
4106            }            }
4107          break;          break;
4108    
# Line 4301  for (;;) Line 4301  for (;;)
4301            if (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0)            if (*eptr < 128 && (md->ctypes[*eptr] & ctype_space) != 0)
4302              MRRETURN(MATCH_NOMATCH);              MRRETURN(MATCH_NOMATCH);
4303            eptr++;            eptr++;
4304            INTERNALCHAR(eptr < md->end_subject, *eptr, eptr++);            ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
4305            }            }
4306          break;          break;
4307    
# Line 4330  for (;;) Line 4330  for (;;)
4330            if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0)            if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0)
4331              MRRETURN(MATCH_NOMATCH);              MRRETURN(MATCH_NOMATCH);
4332            eptr++;            eptr++;
4333            INTERNALCHAR(eptr < md->end_subject, *eptr, eptr++);            ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
4334            }            }
4335          break;          break;
4336    
# Line 5330  for (;;) Line 5330  for (;;)
5330                  }                  }
5331                if (IS_NEWLINE(eptr)) break;                if (IS_NEWLINE(eptr)) break;
5332                eptr++;                eptr++;
5333                INTERNALCHAR(eptr < md->end_subject, *eptr, eptr++);                ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
5334                }                }
5335              }              }
5336    
# Line 5347  for (;;) Line 5347  for (;;)
5347                  }                  }
5348                if (IS_NEWLINE(eptr)) break;                if (IS_NEWLINE(eptr)) break;
5349                eptr++;                eptr++;
5350                INTERNALCHAR(eptr < md->end_subject, *eptr, eptr++);                ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
5351                }                }
5352              }              }
5353            break;            break;
# Line 5363  for (;;) Line 5363  for (;;)
5363                  break;                  break;
5364                  }                  }
5365                eptr++;                eptr++;
5366                INTERNALCHAR(eptr < md->end_subject, *eptr, eptr++);                ACROSSCHAR(eptr < md->end_subject, *eptr, eptr++);
5367                }                }
5368              }              }
5369            else            else
# Line 6264  if (!anchored) Line 6264  if (!anchored)
6264      has_first_char = TRUE;      has_first_char = TRUE;
6265      first_char = first_char2 = re->first_char;      first_char = first_char2 = re->first_char;
6266      if ((re->flags & PCRE_FCH_CASELESS) != 0)      if ((re->flags & PCRE_FCH_CASELESS) != 0)
6267          {
6268        first_char2 = TABLE_GET(first_char, tables + fcc_offset, first_char);        first_char2 = TABLE_GET(first_char, tables + fcc_offset, first_char);
6269    #if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
6270          if (first_char > 127 && utf && md->use_ucp)
6271            first_char2 = UCD_OTHERCASE(first_char);
6272    #endif
6273          }
6274      }      }
6275    else    else
6276      if (!startline && study != NULL &&      if (!startline && study != NULL &&
# Line 6280  if ((re->flags & PCRE_REQCHSET) != 0) Line 6286  if ((re->flags & PCRE_REQCHSET) != 0)
6286    has_req_char = TRUE;    has_req_char = TRUE;
6287    req_char = req_char2 = re->req_char;    req_char = req_char2 = re->req_char;
6288    if ((re->flags & PCRE_RCH_CASELESS) != 0)    if ((re->flags & PCRE_RCH_CASELESS) != 0)
6289        {
6290      req_char2 = TABLE_GET(req_char, tables + fcc_offset, req_char);      req_char2 = TABLE_GET(req_char, tables + fcc_offset, req_char);
6291    #if defined SUPPORT_UCP && !(defined COMPILE_PCRE8)
6292        if (req_char > 127 && utf && md->use_ucp)
6293          req_char2 = UCD_OTHERCASE(req_char);
6294    #endif
6295        }
6296    }    }
6297    
6298    
# Line 6309  for(;;) Line 6321  for(;;)
6321        while (t < md->end_subject && !IS_NEWLINE(t))        while (t < md->end_subject && !IS_NEWLINE(t))
6322          {          {
6323          t++;          t++;
6324          INTERNALCHAR(t < end_subject, *t, t++);          ACROSSCHAR(t < end_subject, *t, t++);
6325          }          }
6326        }        }
6327      else      else
# Line 6351  for(;;) Line 6363  for(;;)
6363            while (start_match < end_subject && !WAS_NEWLINE(start_match))            while (start_match < end_subject && !WAS_NEWLINE(start_match))
6364              {              {
6365              start_match++;              start_match++;
6366              INTERNALCHAR(start_match < end_subject, *start_match,              ACROSSCHAR(start_match < end_subject, *start_match,
6367                start_match++);                start_match++);
6368              }              }
6369            }            }
# Line 6378  for(;;) Line 6390  for(;;)
6390        {        {
6391        while (start_match < end_subject)        while (start_match < end_subject)
6392          {          {
 #ifdef COMPILE_PCRE  
6393          register unsigned int c = *start_match;          register unsigned int c = *start_match;
6394  #else  #ifndef COMPILE_PCRE8
6395          register unsigned int c = *start_match & 0xff;          if (c > 255) c = 255;
6396  #endif  #endif
6397          if ((start_bits[c/8] & (1 << (c&7))) == 0)          if ((start_bits[c/8] & (1 << (c&7))) == 0)
6398            {            {
6399            start_match++;            start_match++;
6400  #ifdef SUPPORT_UTF  #if defined SUPPORT_UTF && defined COMPILE_PCRE8
6401              /* In non 8-bit mode, the iteration will stop for
6402              characters > 255 at the beginning or not stop at all. */
6403            if (utf)            if (utf)
6404              INTERNALCHAR(start_match < end_subject, *start_match,              ACROSSCHAR(start_match < end_subject, *start_match,
6405                start_match++);                start_match++);
6406  #endif  #endif
6407            }            }
# Line 6520  for(;;) Line 6533  for(;;)
6533      new_start_match = start_match + 1;      new_start_match = start_match + 1;
6534  #ifdef SUPPORT_UTF  #ifdef SUPPORT_UTF
6535      if (utf)      if (utf)
6536        INTERNALCHAR(new_start_match < end_subject, *new_start_match,        ACROSSCHAR(new_start_match < end_subject, *new_start_match,
6537          new_start_match++);          new_start_match++);
6538  #endif  #endif
6539      break;      break;

Legend:
Removed from v.782  
changed lines
  Added in v.785

  ViewVC Help
Powered by ViewVC 1.1.5