version 1.2, 2004/07/14 04:32:42 |
version 1.3, 2004/07/14 05:16:04 |
|
|
cvs_resp_newentry(int type, char *line) |
cvs_resp_newentry(int type, char *line) |
{ |
{ |
char entbuf[128], path[MAXPATHLEN]; |
char entbuf[128], path[MAXPATHLEN]; |
struct cvs_ent *entp; |
|
CVSENTRIES *entfile; |
CVSENTRIES *entfile; |
|
|
snprintf(path, sizeof(path), "%s/" CVS_PATH_ENTRIES, line); |
snprintf(path, sizeof(path), "%s/" CVS_PATH_ENTRIES, line); |
|
|
if (cvs_client_getln(entbuf, sizeof(entbuf)) < 0) |
if (cvs_client_getln(entbuf, sizeof(entbuf)) < 0) |
return (-1); |
return (-1); |
|
|
entp = cvs_ent_parse(entbuf); |
|
if (entp == NULL) |
|
return (-1); |
|
|
|
entfile = cvs_ent_open(path, O_WRONLY); |
entfile = cvs_ent_open(path, O_WRONLY); |
if (entfile == NULL) |
if (entfile == NULL) |
return (-1); |
return (-1); |
|
cvs_ent_addln(entfile, entbuf); |
cvs_ent_add(entfile, entp); |
|
|
|
cvs_ent_close(entfile); |
cvs_ent_close(entfile); |
|
|
return (0); |
return (0); |