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

Diff for /src/usr.bin/grep/util.c between version 1.67 and 1.68

version 1.67, 2022/07/12 18:09:31 version 1.68, 2023/11/15 00:50:43
Line 197 
Line 197 
 procline(str_t *l, int nottext)  procline(str_t *l, int nottext)
 {  {
         regmatch_t      pmatch = { 0 };          regmatch_t      pmatch = { 0 };
         int             c, i, r;          int             c, i, r, counted;
         regoff_t        offset;          regoff_t        offset;
   
         /* size_t will be converted to regoff_t. ssize_t is guaranteed to fit          /* size_t will be converted to regoff_t. ssize_t is guaranteed to fit
Line 208 
Line 208 
   
         c = 0;          c = 0;
         i = 0;          i = 0;
           counted = 0;
         if (matchall) {          if (matchall) {
                 c = 1;                  c = 1;
                 goto print;                  goto print;
Line 251 
Line 252 
         if (vflag)          if (vflag)
                 c = !c;                  c = !c;
   
         /* Count the matches if we have a match limit */          /* Count the matches if there is a match limit (but only once). */
         if (mflag)          if (mflag && !counted) {
                 mcount -= c;                  mcount -= c;
                   counted = 1;
           }
   
         if (c && binbehave == BIN_FILE_BIN && nottext)          if (c && binbehave == BIN_FILE_BIN && nottext)
                 return c; /* Binary file */                  return c; /* Binary file */

Legend:
Removed from v.1.67  
changed lines
  Added in v.1.68