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

Diff of /code/trunk/pcre_dfa_exec.c

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

revision 1379 by ph10, Mon Oct 14 13:54:07 2013 UTC revision 1425 by ph10, Tue Dec 31 17:44:40 2013 UTC
# Line 1473  for (;;) Line 1473  for (;;)
1473            goto ANYNL01;            goto ANYNL01;
1474    
1475            case CHAR_CR:            case CHAR_CR:
1476            if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1;            if (ptr + 1 < end_subject && ptr[1] == CHAR_LF) ncount = 1;
1477            /* Fall through */            /* Fall through */
1478    
1479            ANYNL01:            ANYNL01:
# Line 1742  for (;;) Line 1742  for (;;)
1742            goto ANYNL02;            goto ANYNL02;
1743    
1744            case CHAR_CR:            case CHAR_CR:
1745            if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1;            if (ptr + 1 < end_subject && ptr[1] == CHAR_LF) ncount = 1;
1746            /* Fall through */            /* Fall through */
1747    
1748            ANYNL02:            ANYNL02:
# Line 2012  for (;;) Line 2012  for (;;)
2012            goto ANYNL03;            goto ANYNL03;
2013    
2014            case CHAR_CR:            case CHAR_CR:
2015            if (ptr + 1 < end_subject && RAWUCHARTEST(ptr + 1) == CHAR_LF) ncount = 1;            if (ptr + 1 < end_subject && ptr[1] == CHAR_LF) ncount = 1;
2016            /* Fall through */            /* Fall through */
2017    
2018            ANYNL03:            ANYNL03:
# Line 2210  for (;;) Line 2210  for (;;)
2210            if ((md->moptions & PCRE_PARTIAL_HARD) != 0)            if ((md->moptions & PCRE_PARTIAL_HARD) != 0)
2211              reset_could_continue = TRUE;              reset_could_continue = TRUE;
2212            }            }
2213          else if (RAWUCHARTEST(ptr + 1) == CHAR_LF)          else if (ptr[1] == CHAR_LF)
2214            {            {
2215            ADD_NEW_DATA(-(state_offset + 1), 0, 1);            ADD_NEW_DATA(-(state_offset + 1), 0, 1);
2216            }            }
# Line 2618  for (;;) Line 2618  for (;;)
2618    
2619            case OP_CRRANGE:            case OP_CRRANGE:
2620            case OP_CRMINRANGE:            case OP_CRMINRANGE:
2621            case OP_CRPOSRANGE:            case OP_CRPOSRANGE:
2622            count = current_state->count;  /* Already matched */            count = current_state->count;  /* Already matched */
2623            if (count >= (int)GET2(ecode, 1))            if (count >= (int)GET2(ecode, 1))
2624              { ADD_ACTIVE(next_state_offset + 1 + 2 * IMM2_SIZE, 0); }              { ADD_ACTIVE(next_state_offset + 1 + 2 * IMM2_SIZE, 0); }
# Line 2629  for (;;) Line 2629  for (;;)
2629                {                {
2630                active_count--;           /* Remove non-match possibility */                active_count--;           /* Remove non-match possibility */
2631                next_active_state--;                next_active_state--;
2632                }                }
2633              if (++count >= max && max != 0)   /* Max 0 => no limit */              if (++count >= max && max != 0)   /* Max 0 => no limit */
2634                { ADD_NEW(next_state_offset + 1 + 2 * IMM2_SIZE, 0); }                { ADD_NEW(next_state_offset + 1 + 2 * IMM2_SIZE, 0); }
2635              else              else
# Line 3474  for (;;) Line 3474  for (;;)
3474            {            {
3475            pcre_uchar csc;            pcre_uchar csc;
3476            while (current_subject < end_subject &&            while (current_subject < end_subject &&
3477                   (csc = RAWUCHARTEST(current_subject)) != first_char && csc != first_char2)                   (csc = *current_subject) != first_char && csc != first_char2)
3478              current_subject++;              current_subject++;
3479            }            }
3480          else          else
3481            while (current_subject < end_subject &&            while (current_subject < end_subject &&
3482                   RAWUCHARTEST(current_subject) != first_char)                   *current_subject != first_char)
3483              current_subject++;              current_subject++;
3484          }          }
3485    
# Line 3509  for (;;) Line 3509  for (;;)
3509            ANYCRLF, and we are now at a LF, advance the match position by one            ANYCRLF, and we are now at a LF, advance the match position by one
3510            more character. */            more character. */
3511    
3512            if (RAWUCHARTEST(current_subject - 1) == CHAR_CR &&            if (current_subject[-1] == CHAR_CR &&
3513                 (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&                 (md->nltype == NLTYPE_ANY || md->nltype == NLTYPE_ANYCRLF) &&
3514                 current_subject < end_subject &&                 current_subject < end_subject && *current_subject == CHAR_NL)
                RAWUCHARTEST(current_subject) == CHAR_NL)  
3515              current_subject++;              current_subject++;
3516            }            }
3517          }          }
# Line 3523  for (;;) Line 3522  for (;;)
3522          {          {
3523          while (current_subject < end_subject)          while (current_subject < end_subject)
3524            {            {
3525            register pcre_uint32 c = RAWUCHARTEST(current_subject);            register pcre_uint32 c = *current_subject;
3526  #ifndef COMPILE_PCRE8  #ifndef COMPILE_PCRE8
3527            if (c > 255) c = 255;            if (c > 255) c = 255;
3528  #endif  #endif
# Line 3589  for (;;) Line 3588  for (;;)
3588              {              {
3589              while (p < end_subject)              while (p < end_subject)
3590                {                {
3591                register pcre_uint32 pp = RAWUCHARINCTEST(p);                register pcre_uint32 pp = *p++;
3592                if (pp == req_char || pp == req_char2) { p--; break; }                if (pp == req_char || pp == req_char2) { p--; break; }
3593                }                }
3594              }              }
# Line 3597  for (;;) Line 3596  for (;;)
3596              {              {
3597              while (p < end_subject)              while (p < end_subject)
3598                {                {
3599                if (RAWUCHARINCTEST(p) == req_char) { p--; break; }                if (*p++ == req_char) { p--; break; }
3600                }                }
3601              }              }
3602    
# Line 3665  for (;;) Line 3664  for (;;)
3664    not contain any explicit matches for \r or \n, and the newline option is CRLF    not contain any explicit matches for \r or \n, and the newline option is CRLF
3665    or ANY or ANYCRLF, advance the match position by one more character. */    or ANY or ANYCRLF, advance the match position by one more character. */
3666    
3667    if (RAWUCHARTEST(current_subject - 1) == CHAR_CR &&    if (current_subject[-1] == CHAR_CR &&
3668        current_subject < end_subject &&        current_subject < end_subject &&
3669        RAWUCHARTEST(current_subject) == CHAR_NL &&        *current_subject == CHAR_NL &&
3670        (re->flags & PCRE_HASCRORLF) == 0 &&        (re->flags & PCRE_HASCRORLF) == 0 &&
3671          (md->nltype == NLTYPE_ANY ||          (md->nltype == NLTYPE_ANY ||
3672           md->nltype == NLTYPE_ANYCRLF ||           md->nltype == NLTYPE_ANYCRLF ||

Legend:
Removed from v.1379  
changed lines
  Added in v.1425

  ViewVC Help
Powered by ViewVC 1.1.5