version 1.95, 2006/06/03 03:05:10 |
version 1.96, 2006/08/01 05:14:17 |
|
|
struct stat st; |
struct stat st; |
struct rcs_delta *rdp; |
struct rcs_delta *rdp; |
struct rcs_lock *lkp; |
struct rcs_lock *lkp; |
char *content, msg[128], *fdate; |
char msg[128], *fdate; |
time_t rcsdate, givendate; |
time_t rcsdate, givendate; |
RCSNUM *rev; |
RCSNUM *rev; |
|
|
|
|
} |
} |
} |
} |
|
|
if (flags & PIPEOUT) { |
if (flags & PIPEOUT) |
rcs_buf_putc(bp, '\0'); |
rcs_buf_write_fd(bp, STDOUT_FILENO); |
content = rcs_buf_release(bp); |
else { |
printf("%s", content); |
|
xfree(content); |
|
} else { |
|
(void)unlink(dst); |
(void)unlink(dst); |
|
|
if ((fd = open(dst, O_WRONLY|O_CREAT|O_TRUNC, mode)) < 0) |
if ((fd = open(dst, O_WRONLY|O_CREAT|O_TRUNC, mode)) < 0) |
|
|
if (fchmod(fd, mode) == -1) |
if (fchmod(fd, mode) == -1) |
warn("%s", dst); |
warn("%s", dst); |
|
|
rcs_buf_free(bp); |
|
|
|
if (flags & CO_REVDATE) { |
if (flags & CO_REVDATE) { |
struct timeval tv[2]; |
struct timeval tv[2]; |
memset(&tv, 0, sizeof(tv)); |
memset(&tv, 0, sizeof(tv)); |
|
|
|
|
(void)close(fd); |
(void)close(fd); |
} |
} |
|
|
|
rcs_buf_free(bp); |
|
|
return (0); |
return (0); |
} |
} |