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

Diff for /src/usr.bin/rcs/rcsdiff.c between version 1.60 and 1.61

version 1.60, 2006/05/04 07:06:58 version 1.61, 2006/05/05 15:47:36
Line 45 
Line 45 
   
         rev1 = rev2 = NULL;          rev1 = rev2 = NULL;
         rev_str1 = rev_str2 = NULL;          rev_str1 = rev_str2 = NULL;
         status = 0;          status = D_SAME;
   
         if (strlcpy(diffargs, "diff", sizeof(diffargs)) >= sizeof(diffargs))          if (strlcpy(diffargs, "diff", sizeof(diffargs)) >= sizeof(diffargs))
                 errx(1, "diffargs too long");                  errx(1, "diffargs too long");
Line 143 
Line 143 
                 diff_file = argv[i];                  diff_file = argv[i];
   
                 /* No revisions given. */                  /* No revisions given. */
                 if (rev_str1 == NULL) {                  if (rev_str1 == NULL)
                         if (rcsdiff_file(file, file->rf_head, argv[i]) < 0)                          status = rcsdiff_file(file, file->rf_head, argv[i]);
                                 status = 2;  
                 /* One revision given. */                  /* One revision given. */
                 } else if (rev_str2 == NULL) {                  else if (rev_str2 == NULL)
                         if (rcsdiff_file(file, rev1, argv[i]) < 0)                          status = rcsdiff_file(file, rev1, argv[i]);
                                 status = 2;  
                 /* Two revisions given. */                  /* Two revisions given. */
                 } else {                  else
                         if (rcsdiff_rev(file, rev1, rev2) < 0)                          status = rcsdiff_rev(file, rev1, rev2);
                                 status = 2;  
                 }  
   
                 rcs_close(file);                  rcs_close(file);
   
Line 194 
Line 190 
         memset(&tv, 0, sizeof(tv));          memset(&tv, 0, sizeof(tv));
         memset(&tv2, 0, sizeof(tv2));          memset(&tv2, 0, sizeof(tv2));
   
         ret = -1;          ret = D_ERROR;
         b1 = b2 = NULL;          b1 = b2 = NULL;
   
         diff_rev1 = rev;          diff_rev1 = rev;
Line 253 
Line 249 
         if (utimes(path2, (const struct timeval *)&tv2) < 0)          if (utimes(path2, (const struct timeval *)&tv2) < 0)
                 warn("utimes");                  warn("utimes");
   
         rcs_diffreg(path1, path2, NULL);          ret = rcs_diffreg(path1, path2, NULL);
         ret = 0;  
   
 out:  out:
         if (fd != -1)          if (fd != -1)
Line 280 
Line 275 
         char rbuf1[64], rbuf2[64];          char rbuf1[64], rbuf2[64];
         struct timeval tv[2], tv2[2];          struct timeval tv[2], tv2[2];
   
         ret = -1;          ret = D_ERROR;
         b1 = b2 = NULL;          b1 = b2 = NULL;
         memset(&tv, 0, sizeof(tv));          memset(&tv, 0, sizeof(tv));
         memset(&tv2, 0, sizeof(tv2));          memset(&tv2, 0, sizeof(tv2));
Line 335 
Line 330 
         if (utimes(path2, (const struct timeval *)&tv2) < 0)          if (utimes(path2, (const struct timeval *)&tv2) < 0)
                 warn("utimes");                  warn("utimes");
   
         rcs_diffreg(path1, path2, NULL);          ret = rcs_diffreg(path1, path2, NULL);
         ret = 0;  
   
 out:  out:
         if (b1 != NULL)          if (b1 != NULL)

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61