[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.21 and 1.22

version 1.21, 2003/07/21 14:32:21 version 1.22, 2003/07/21 21:01:45
Line 838 
Line 838 
 {  {
         char    *s, R_newline = '\n';          char    *s, R_newline = '\n';
   
         s = ifetch(line, 0);  
         if (s == NULL)  
                 return;  
         /* Note: string is not null terminated. */          /* Note: string is not null terminated. */
         for (; putc(*s, ofp) != R_newline; s++)          for (s=ifetch(line, 0); putc(*s, ofp) != R_newline; s++)
                 ;                  ;
 }  }
   
Line 874 
Line 871 
 bool  bool
 similar(char *a, char *b, int len)  similar(char *a, char *b, 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.21  
changed lines
  Added in v.1.22