version 1.12, 2007/01/26 11:19:44 |
version 1.13, 2007/01/31 21:07:35 |
|
|
void |
void |
cvs_remote_send_file(const char *path) |
cvs_remote_send_file(const char *path) |
{ |
{ |
int l, fd; |
int fd; |
FILE *out, *in; |
FILE *out, *in; |
size_t ret, rw; |
size_t ret, rw; |
off_t total; |
off_t total; |
|
|
cvs_modetostr(st.st_mode, buf, sizeof(buf)); |
cvs_modetostr(st.st_mode, buf, sizeof(buf)); |
cvs_remote_output(buf); |
cvs_remote_output(buf); |
|
|
l = snprintf(buf, sizeof(buf), "%lld", st.st_size); |
(void)xsnprintf(buf, sizeof(buf), "%lld", st.st_size); |
if (l == -1 || l >= (int)sizeof(buf)) |
|
fatal("cvs_remote_send_file: overflow"); |
|
cvs_remote_output(buf); |
cvs_remote_output(buf); |
|
|
if ((in = fdopen(fd, "r")) == NULL) |
if ((in = fdopen(fd, "r")) == NULL) |