Guest User

Untitled

a guest
Dec 24th, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.19 KB | None | 0 0
  1.     for (;;)
  2.       {
  3.       uint32_t options = 0;                   /* Normally no options */
  4.       PCRE2_SIZE start_offset = ovector[1];   /* Start at end of previous match */
  5.  
  6.       /* If the previous match was for an empty string, we are finished if we are
  7.       at the end of the subject. Otherwise, arrange to run another match at the
  8.       same point to see if a non-empty match can be found. */
  9.  
  10.       if (ovector[0] == ovector[1])
  11.         {
  12.         if (ovector[0] == subject_length) break;
  13.         options = PCRE2_NOTEMPTY_ATSTART | PCRE2_ANCHORED;
  14.         }
  15.        
  16. /* modified: */
  17.  
  18.     PCRE2_SIZE start_offset = 0;
  19.  
  20.     for (;;)
  21.       {
  22.      
  23.       uint32_t options = 0;                         /* Normally no options */
  24.       PCRE2_SIZE old_start_offset = start_offset;   /* Save old start offset for later comparison */
  25.       start_offset = ovector[1];                    /* Start at end of previous match */
  26.  
  27.       /* If the previous match was for an empty string, we are finished if we are
  28.       at the end of the subject. Otherwise, arrange to run another match at the
  29.       same point to see if a non-empty match can be found. */
  30.  
  31.       if (old_start_offset == ovector[1])
  32.         {
  33.         if (ovector[1] == subject_length) break;
  34.         options = PCRE2_NOTEMPTY_ATSTART | PCRE2_ANCHORED;
  35.         }
Add Comment
Please, Sign In to add comment