[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.75 and 1.76

version 1.75, 2007/07/03 00:56:23 version 1.76, 2010/07/23 21:46:05
Line 316 
Line 316 
         tv[0].tv_sec = (long)rcs_rev_getdate(file, rev);          tv[0].tv_sec = (long)rcs_rev_getdate(file, rev);
         tv[1].tv_sec = tv[0].tv_sec;          tv[1].tv_sec = tv[0].tv_sec;
   
         if ((b2 = rcs_buf_load(filename, BUF_AUTOEXT)) == NULL) {          if ((b2 = buf_load(filename, BUF_AUTOEXT)) == NULL) {
                 warnx("failed to load file: `%s'", filename);                  warnx("failed to load file: `%s'", filename);
                 goto out;                  goto out;
         }          }
Line 332 
Line 332 
         tv2[1].tv_sec = t;          tv2[1].tv_sec = t;
   
         (void)xasprintf(&path1, "%s/diff1.XXXXXXXXXX", rcs_tmpdir);          (void)xasprintf(&path1, "%s/diff1.XXXXXXXXXX", rcs_tmpdir);
         rcs_buf_write_stmp(b1, path1);          buf_write_stmp(b1, path1);
   
         rcs_buf_free(b1);          buf_free(b1);
         b1 = NULL;          b1 = NULL;
   
         if (utimes(path1, (const struct timeval *)&tv) < 0)          if (utimes(path1, (const struct timeval *)&tv) < 0)
                 warn("utimes");                  warn("utimes");
   
         (void)xasprintf(&path2, "%s/diff2.XXXXXXXXXX", rcs_tmpdir);          (void)xasprintf(&path2, "%s/diff2.XXXXXXXXXX", rcs_tmpdir);
         rcs_buf_write_stmp(b2, path2);          buf_write_stmp(b2, path2);
   
         rcs_buf_free(b2);          buf_free(b2);
         b2 = NULL;          b2 = NULL;
   
         if (utimes(path2, (const struct timeval *)&tv2) < 0)          if (utimes(path2, (const struct timeval *)&tv2) < 0)
Line 355 
Line 355 
         if (fd != -1)          if (fd != -1)
                 (void)close(fd);                  (void)close(fd);
         if (b1 != NULL)          if (b1 != NULL)
                 rcs_buf_free(b1);                  buf_free(b1);
         if (b2 != NULL)          if (b2 != NULL)
                 rcs_buf_free(b2);                  buf_free(b2);
         if (path1 != NULL)          if (path1 != NULL)
                 xfree(path1);                  xfree(path1);
         if (path2 != NULL)          if (path2 != NULL)
Line 413 
Line 413 
                 fprintf(stderr, "%s -r%s -r%s\n", diffargs, rbuf1, rbuf2);                  fprintf(stderr, "%s -r%s -r%s\n", diffargs, rbuf1, rbuf2);
   
         (void)xasprintf(&path1, "%s/diff1.XXXXXXXXXX", rcs_tmpdir);          (void)xasprintf(&path1, "%s/diff1.XXXXXXXXXX", rcs_tmpdir);
         rcs_buf_write_stmp(b1, path1);          buf_write_stmp(b1, path1);
   
         rcs_buf_free(b1);          buf_free(b1);
         b1 = NULL;          b1 = NULL;
   
         if (utimes(path1, (const struct timeval *)&tv) < 0)          if (utimes(path1, (const struct timeval *)&tv) < 0)
                 warn("utimes");                  warn("utimes");
   
         (void)xasprintf(&path2, "%s/diff2.XXXXXXXXXX", rcs_tmpdir);          (void)xasprintf(&path2, "%s/diff2.XXXXXXXXXX", rcs_tmpdir);
         rcs_buf_write_stmp(b2, path2);          buf_write_stmp(b2, path2);
   
         rcs_buf_free(b2);          buf_free(b2);
         b2 = NULL;          b2 = NULL;
   
         if (utimes(path2, (const struct timeval *)&tv2) < 0)          if (utimes(path2, (const struct timeval *)&tv2) < 0)
Line 434 
Line 434 
   
 out:  out:
         if (b1 != NULL)          if (b1 != NULL)
                 rcs_buf_free(b1);                  buf_free(b1);
         if (b2 != NULL)          if (b2 != NULL)
                 rcs_buf_free(b2);                  buf_free(b2);
         if (path1 != NULL)          if (path1 != NULL)
                 xfree(path1);                  xfree(path1);
         if (path2 != NULL)          if (path2 != NULL)

Legend:
Removed from v.1.75  
changed lines
  Added in v.1.76