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

Diff for /src/usr.bin/patch/patch.c between version 1.17 and 1.18

version 1.17, 2003/07/02 00:21:16 version 1.18, 2003/07/16 16:06:53
Line 881 
Line 881 
     Reg1 char *s;      Reg1 char *s;
     Reg2 char R_newline = '\n';      Reg2 char R_newline = '\n';
   
       s = ifetch(line, 0);
       if (s == NULL)
           return;
     /* Note: string is not null terminated. */      /* Note: string is not null terminated. */
     for (s=ifetch(line, 0); putc(*s, ofp) != R_newline; s++) ;      for (; putc(*s, ofp) != R_newline; s++) ;
 }  }
   
 /* Does the patch pattern match at line base+offset? */  /* Does the patch pattern match at line base+offset? */
Line 920 
Line 923 
 Reg2 char *b;  Reg2 char *b;
 Reg3 int len;  Reg3 int len;
 {  {
       if (a == NULL || b == NULL)
           return FALSE;
     while (len) {      while (len) {
         if (isspace(*b)) {              /* whitespace (or \n) to match? */          if (isspace(*b)) {              /* whitespace (or \n) to match? */
             if (!isspace(*a))           /* no corresponding whitespace? */              if (!isspace(*a))           /* no corresponding whitespace? */

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18