/[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 1233 by ph10, Sat Dec 8 12:43:37 2012 UTC revision 1251 by ph10, Wed Feb 20 17:42:03 2013 UTC
# Line 7  and semantics are as close as possible t Line 7  and semantics are as close as possible t
7  below for why this module is different).  below for why this module is different).
8    
9                         Written by Philip Hazel                         Written by Philip Hazel
10             Copyright (c) 1997-2012 University of Cambridge             Copyright (c) 1997-2013 University of Cambridge
11    
12  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
13  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 3023  for (;;) Line 3023  for (;;)
3023            ptr > md->start_used_ptr)            /* Inspected non-empty string */            ptr > md->start_used_ptr)            /* Inspected non-empty string */
3024            )            )
3025          )          )
       {  
       if (offsetcount >= 2)  
         {  
         offsets[0] = (int)(md->start_used_ptr - start_subject);  
         offsets[1] = (int)(end_subject - start_subject);  
         }  
3026        match_count = PCRE_ERROR_PARTIAL;        match_count = PCRE_ERROR_PARTIAL;
       }  
   
3027      DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n"      DPRINTF(("%.*sEnd of internal_dfa_exec %d: returning %d\n"
3028        "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel, match_count,        "%.*s---------------------\n\n", rlevel*2-2, SP, rlevel, match_count,
3029        rlevel*2-2, SP));        rlevel*2-2, SP));
# Line 3545  for (;;) Line 3537  for (;;)
3537    /* Anything other than "no match" means we are done, always; otherwise, carry    /* Anything other than "no match" means we are done, always; otherwise, carry
3538    on only if not anchored. */    on only if not anchored. */
3539    
3540    if (rc != PCRE_ERROR_NOMATCH || anchored) return rc;    if (rc != PCRE_ERROR_NOMATCH || anchored)
3541        {
3542        if (rc == PCRE_ERROR_PARTIAL && offsetcount >= 2)
3543          {
3544          offsets[0] = (int)(md->start_used_ptr - (PCRE_PUCHAR)subject);
3545          offsets[1] = (int)(end_subject - (PCRE_PUCHAR)subject);
3546          if (offsetcount > 2)
3547            offsets[2] = (int)(current_subject - (PCRE_PUCHAR)subject);
3548          }
3549        return rc;
3550        }
3551    
3552    /* Advance to the next subject character unless we are at the end of a line    /* Advance to the next subject character unless we are at the end of a line
3553    and firstline is set. */    and firstline is set. */

Legend:
Removed from v.1233  
changed lines
  Added in v.1251

  ViewVC Help
Powered by ViewVC 1.1.5