/[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 439 by ph10, Tue Sep 8 17:27:24 2009 UTC revision 442 by ph10, Fri Sep 11 10:21:02 2009 UTC
# Line 647  for (;;) Line 647  for (;;)
647  /* ========================================================================== */  /* ========================================================================== */
648        /* Reached a closing bracket. If not at the end of the pattern, carry        /* Reached a closing bracket. If not at the end of the pattern, carry
649        on with the next opcode. Otherwise, unless we have an empty string and        on with the next opcode. Otherwise, unless we have an empty string and
650        PCRE_NOTEMPTY is set, save the match data, shifting up all previous        PCRE_NOTEMPTY is set, or PCRE_NOTEMPTY_ATSTART is set and we are at the
651          start of the subject, save the match data, shifting up all previous
652        matches so we always have the longest first. */        matches so we always have the longest first. */
653    
654        case OP_KET:        case OP_KET:
# Line 664  for (;;) Line 665  for (;;)
665        else        else
666          {          {
667          reached_end++;    /* Count branches that reach the end */          reached_end++;    /* Count branches that reach the end */
668          if (ptr > current_subject || (md->moptions & PCRE_NOTEMPTY) == 0)          if (ptr > current_subject ||
669                ((md->moptions & PCRE_NOTEMPTY) == 0 &&
670                  ((md->moptions & PCRE_NOTEMPTY_ATSTART) == 0 ||
671                    current_subject > start_subject + md->start_offset)))
672            {            {
673            if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0;            if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0;
674              else if (match_count > 0 && ++match_count * 2 >= offsetcount)              else if (match_count > 0 && ++match_count * 2 >= offsetcount)
# Line 2681  md->start_code = (const uschar *)argumen Line 2685  md->start_code = (const uschar *)argumen
2685      re->name_table_offset + re->name_count * re->name_entry_size;      re->name_table_offset + re->name_count * re->name_entry_size;
2686  md->start_subject = (const unsigned char *)subject;  md->start_subject = (const unsigned char *)subject;
2687  md->end_subject = end_subject;  md->end_subject = end_subject;
2688    md->start_offset = start_offset;
2689  md->moptions = options;  md->moptions = options;
2690  md->poptions = re->options;  md->poptions = re->options;
2691    

Legend:
Removed from v.439  
changed lines
  Added in v.442

  ViewVC Help
Powered by ViewVC 1.1.5