/[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 435 by ph10, Sat Sep 5 10:20:44 2009 UTC revision 442 by ph10, Fri Sep 11 10:21:02 2009 UTC
# Line 930  for (;;) Line 930  for (;;)
930        break;        break;
931        }        }
932    
933      /* Otherwise, if PCRE_NOTEMPTY is set, fail if we have matched an empty      /* Otherwise, if we have matched an empty string, fail if PCRE_NOTEMPTY is
934      string - backtracking will then try other alternatives, if any. */      set, or if PCRE_NOTEMPTY_ATSTART is set and we have matched at the start of
935        the subject. In both cases, backtracking will then try other alternatives,
936        if any. */
937    
938        if (eptr == mstart &&
939            (md->notempty ||
940              (md->notempty_atstart &&
941                mstart == md->start_subject + md->start_offset)))
942          RRETURN(MATCH_NOMATCH);
943    
944        /* Otherwise, we have a match. */
945    
     if (md->notempty && eptr == mstart) RRETURN(MATCH_NOMATCH);  
946      md->end_match_ptr = eptr;           /* Record where we ended */      md->end_match_ptr = eptr;           /* Record where we ended */
947      md->end_offset_top = offset_top;    /* and how many extracts were taken */      md->end_offset_top = offset_top;    /* and how many extracts were taken */
948      md->start_match_ptr = mstart;       /* and the start (\K can modify) */      md->start_match_ptr = mstart;       /* and the start (\K can modify) */
# Line 4920  md->jscript_compat = (re->options & PCRE Line 4929  md->jscript_compat = (re->options & PCRE
4929  md->notbol = (options & PCRE_NOTBOL) != 0;  md->notbol = (options & PCRE_NOTBOL) != 0;
4930  md->noteol = (options & PCRE_NOTEOL) != 0;  md->noteol = (options & PCRE_NOTEOL) != 0;
4931  md->notempty = (options & PCRE_NOTEMPTY) != 0;  md->notempty = (options & PCRE_NOTEMPTY) != 0;
4932    md->notempty_atstart = (options & PCRE_NOTEMPTY_ATSTART) != 0;
4933  md->partial = ((options & PCRE_PARTIAL_HARD) != 0)? 2 :  md->partial = ((options & PCRE_PARTIAL_HARD) != 0)? 2 :
4934                ((options & PCRE_PARTIAL_SOFT) != 0)? 1 : 0;                ((options & PCRE_PARTIAL_SOFT) != 0)? 1 : 0;
4935  md->hitend = FALSE;  md->hitend = FALSE;

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

  ViewVC Help
Powered by ViewVC 1.1.5