[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.29 and 1.30

version 1.29, 2004/10/03 19:23:02 version 1.30, 2005/04/03 19:12:40
Line 302 
Line 302 
         }          }
   
         /* Remove enclosing [[:<:]] and [[:>:]] (word match). */          /* Remove enclosing [[:<:]] and [[:>:]] (word match). */
         if (fg->patternLen >= 14 &&          if (wflag) {
                   /* basic re's use \( \), extended re's ( ) */
                   int extra = Eflag ? 1 : 2;
                   fg->patternLen -= 14 + 2 * extra;
                   fg->wmatch = 7 + extra;
           } else if (fg->patternLen >= 14 &&
             strncmp(pattern + fg->bol, "[[:<:]]", 7) == 0 &&              strncmp(pattern + fg->bol, "[[:<:]]", 7) == 0 &&
             strncmp(pattern + fg->bol + fg->patternLen - 7, "[[:>:]]", 7) == 0) {              strncmp(pattern + fg->bol + fg->patternLen - 7, "[[:>:]]", 7) == 0) {
                 fg->patternLen -= 14;                  fg->patternLen -= 14;

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30