version 1.75, 2007/07/03 00:56:23 |
version 1.76, 2010/07/23 21:46:05 |
|
|
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; |
} |
} |
|
|
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) |
|
|
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) |
|
|
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) |
|
|
|
|
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) |