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

Diff for /src/usr.bin/diff/diffdir.c between version 1.44 and 1.45

version 1.44, 2015/09/25 16:16:26 version 1.45, 2015/10/05 20:15:00
Line 132 
Line 132 
                         if (Nflag)                          if (Nflag)
                                 diffit(dent1, path1, dirlen1, path2, dirlen2,                                  diffit(dent1, path1, dirlen1, path2, dirlen2,
                                     flags);                                      flags);
                         else if (lflag)  
                                 dent1->d_status |= D_ONLY;  
                         else                          else
                                 print_only(path1, dirlen1, dent1->d_name);                                  print_only(path1, dirlen1, dent1->d_name);
                         dp1++;                          dp1++;
Line 142 
Line 140 
                         if (Nflag || Pflag)                          if (Nflag || Pflag)
                                 diffit(dent2, path1, dirlen1, path2, dirlen2,                                  diffit(dent2, path1, dirlen1, path2, dirlen2,
                                     flags);                                      flags);
                         else if (lflag)  
                                 dent2->d_status |= D_ONLY;  
                         else                          else
                                 print_only(path2, dirlen2, dent2->d_name);                                  print_only(path2, dirlen2, dent2->d_name);
                         dp2++;                          dp2++;
                 }                  }
         }          }
         if (lflag) {  
                 path1[dirlen1] = '\0';  
                 path2[dirlen2] = '\0';  
                 for (dp1 = dirp1; (dent1 = *dp1) != NULL; dp1++) {  
                         print_status(dent1->d_status, path1, path2,  
                             dent1->d_name);  
                 }  
                 for (dp2 = dirp2; (dent2 = *dp2) != NULL; dp2++) {  
                         if (dent2->d_status == D_ONLY)  
                                 print_status(dent2->d_status, path2, NULL,  
                                     dent2->d_name);  
                 }  
         }  
   
 closem:  closem:
         if (dirp1 != NULL) {          if (dirp1 != NULL) {
Line 210 
Line 193 
         if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) {          if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) {
                 if (rflag)                  if (rflag)
                         diffdir(path1, path2, flags);                          diffdir(path1, path2, flags);
                 else if (lflag)  
                         dp->d_status |= D_COMMON;  
                 else                  else
                         printf("Common subdirectories: %s and %s\n",                          printf("Common subdirectories: %s and %s\n",
                             path1, path2);                              path1, path2);
Line 223 
Line 204 
                 dp->d_status = D_SKIPPED2;                  dp->d_status = D_SKIPPED2;
         else          else
                 dp->d_status = diffreg(path1, path2, flags);                  dp->d_status = diffreg(path1, path2, flags);
         if (!lflag)          print_status(dp->d_status, path1, path2, "");
                 print_status(dp->d_status, path1, path2, "");  
 }  }
   
 /*  /*

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45