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

Diff for /src/usr.bin/rcs/diff.c between version 1.5 and 1.6

version 1.5, 2006/05/10 01:10:23 version 1.6, 2006/05/11 08:40:34
Line 313 
Line 313 
                 goto closem;                  goto closem;
         }          }
   
         if (stat(file1, &stb1) < 0) {          if (fstat(fileno(f1), &stb1) < 0) {
                 warn("%s", file1);                  warn("%s", file1);
                 goto closem;                  goto closem;
         }          }
   
         if (stat(file2, &stb2) < 0) {          if (fstat(fileno(f2), &stb2) < 0) {
                 warn("%s", file2);                  warn("%s", file2);
                 goto closem;                  goto closem;
         }          }
   
         switch (files_differ(f1, f2)) {          if (files_differ(f1, f2) != 1)
         case 0:  
                 goto closem;                  goto closem;
         case 1:  
                 break;  
         default:  
                 /* error */  
                 goto closem;  
         }  
   
         if (!asciifile(f1) || !asciifile(f2)) {          if (!asciifile(f1) || !asciifile(f2)) {
                 rval = D_ERROR;                  rval = D_ERROR;
Line 829 
Line 822 
         }          }
 }  }
   
 static __inline void  static void
 range(int a, int b, char *separator)  range(int a, int b, char *separator)
 {  {
         diff_output("%d", a > b ? b : a);          diff_output("%d", a > b ? b : a);
Line 837 
Line 830 
                 diff_output("%s%d", separator, b);                  diff_output("%s%d", separator, b);
 }  }
   
 static __inline void  static void
 uni_range(int a, int b)  uni_range(int a, int b)
 {  {
         if (a < b)          if (a < b)

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6