[BACK]Return to gnum4.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / m4

Diff for /src/usr.bin/m4/gnum4.c between version 1.12 and 1.13

version 1.12, 2001/09/18 13:52:58 version 1.13, 2001/09/27 12:35:20
Line 337 
Line 337 
         const char *last_match = NULL;          const char *last_match = NULL;
   
         while ((error = regexec(re, string, re->re_nsub+1, pm, flags)) == 0) {          while ((error = regexec(re, string, re->re_nsub+1, pm, flags)) == 0) {
                 flags = REG_NOTBOL;                  if (pm[0].rm_eo != 0) {
                           if (string[pm[0].rm_eo-1] == '\n')
                                   flags = 0;
                           else
                                   flags = REG_NOTBOL;
                   }
   
                 /* NULL length matches are special... We use the `vi-mode'                  /* NULL length matches are special... We use the `vi-mode'
                  * rule: don't allow a NULL-match at the last match                   * rule: don't allow a NULL-match at the last match
Line 348 
Line 353 
                         if (*string == '\0')                          if (*string == '\0')
                                 return;                                  return;
                         addchar(*string);                          addchar(*string);
                         string++;                          if (*string++ == '\n')
                                   flags = 0;
                           else
                                   flags = REG_NOTBOL;
                         continue;                          continue;
                 }                  }
                 last_match = string + pm[0].rm_so;                  last_match = string + pm[0].rm_so;

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13