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

Diff of /code/trunk/pcre_exec.c

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

revision 667 by ph10, Mon Aug 22 14:57:32 2011 UTC revision 699 by ph10, Tue Sep 20 10:46:54 2011 UTC
# Line 1275  for (;;) Line 1275  for (;;)
1275        {        {
1276        if (op == OP_SCOND) md->match_function_type = MATCH_CBEGROUP;        if (op == OP_SCOND) md->match_function_type = MATCH_CBEGROUP;
1277        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM49);        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM49);
1278        if (rrc == MATCH_THEN && md->start_match_ptr == ecode)  
1279          rrc = MATCH_NOMATCH;        /* If the result is THEN from within the "true" branch of the condition,
1280          md->start_match_ptr will point to the original OP_COND, not to the start
1281          of the branch, so we have do work to see if it matches. If THEN comes
1282          from the "false" branch, md->start_match_ptr does point to OP_ALT. */
1283    
1284          if (rrc == MATCH_THEN)
1285            {
1286            if (*ecode != OP_ALT)
1287              {
1288              do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
1289              ecode -= GET(ecode, 1);
1290              }
1291            if (md->start_match_ptr == ecode) rrc = MATCH_NOMATCH;
1292            }
1293        RRETURN(rrc);        RRETURN(rrc);
1294        }        }
1295      else                         /* Condition false & no alternative */      else                         /* Condition false & no alternative */
# Line 1556  for (;;) Line 1569  for (;;)
1569            md, eptrb, RM6);            md, eptrb, RM6);
1570          memcpy(md->offset_vector, new_recursive.offset_save,          memcpy(md->offset_vector, new_recursive.offset_save,
1571              new_recursive.saved_max * sizeof(int));              new_recursive.saved_max * sizeof(int));
1572            md->recursive = new_recursive.prevrec;
1573          if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)          if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
1574            {            {
1575            DPRINTF(("Recursion matched\n"));            DPRINTF(("Recursion matched\n"));
           md->recursive = new_recursive.prevrec;  
1576            if (new_recursive.offset_save != stacksave)            if (new_recursive.offset_save != stacksave)
1577              (pcre_free)(new_recursive.offset_save);              (pcre_free)(new_recursive.offset_save);
1578    
# Line 5844  if (extra_data != NULL Line 5857  if (extra_data != NULL
5857      && extra_data->executable_jit != NULL      && extra_data->executable_jit != NULL
5858      && (options & ~(PCRE_NO_UTF8_CHECK | PCRE_NOTBOL | PCRE_NOTEOL |      && (options & ~(PCRE_NO_UTF8_CHECK | PCRE_NOTBOL | PCRE_NOTEOL |
5859                      PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART)) == 0)                      PCRE_NOTEMPTY | PCRE_NOTEMPTY_ATSTART)) == 0)
5860    return _pcre_jit_exec(re, extra_data->executable_jit, subject, length,    return _pcre_jit_exec(re, extra_data->executable_jit, subject, length,
5861      start_offset, options, offsets, offsetcount);      start_offset, options, ((extra_data->flags & PCRE_EXTRA_MATCH_LIMIT) == 0)
5862        ? MATCH_LIMIT : extra_data->match_limit, offsets, offsetcount);
5863  #endif  #endif
5864    
5865  /* Carry on with non-JIT matching. This information is for finding all the  /* Carry on with non-JIT matching. This information is for finding all the
# Line 6402  if (rc == MATCH_MATCH || rc == MATCH_ACC Line 6416  if (rc == MATCH_MATCH || rc == MATCH_ACC
6416    
6417    /* Set the return code to the number of captured strings, or 0 if there were    /* Set the return code to the number of captured strings, or 0 if there were
6418    too many to fit into the vector. */    too many to fit into the vector. */
6419    
6420    rc = (md->offset_overflow && md->end_offset_top >= arg_offset_max)?    rc = (md->offset_overflow && md->end_offset_top >= arg_offset_max)?
6421      0 : md->end_offset_top/2;      0 : md->end_offset_top/2;
6422    

Legend:
Removed from v.667  
changed lines
  Added in v.699

  ViewVC Help
Powered by ViewVC 1.1.5