version 1.52, 2005/12/03 15:02:55 |
version 1.53, 2005/12/10 20:27:45 |
|
|
return (NULL); |
return (NULL); |
} |
} |
|
|
ep = (CVSENTRIES *)malloc(sizeof(CVSENTRIES)); |
ep = (CVSENTRIES *)xmalloc(sizeof(CVSENTRIES)); |
if (ep == NULL) { |
|
cvs_log(LP_ERRNO, "failed to allocate Entries data"); |
|
(void)fclose(fp); |
|
return (NULL); |
|
} |
|
memset(ep, 0, sizeof(*ep)); |
memset(ep, 0, sizeof(*ep)); |
|
|
ep->cef_path = strdup(entpath); |
ep->cef_path = xstrdup(entpath); |
if (ep->cef_path == NULL) { |
ep->cef_bpath = xstrdup(bpath); |
cvs_log(LP_ERRNO, "failed to copy Entries path"); |
|
free(ep); |
|
(void)fclose(fp); |
|
return (NULL); |
|
} |
|
|
|
ep->cef_bpath = strdup(bpath); |
|
if (ep->cef_bpath == NULL) { |
|
cvs_ent_close(ep); |
|
(void)fclose(fp); |
|
return (NULL); |
|
} |
|
|
|
ep->cef_cur = NULL; |
ep->cef_cur = NULL; |
TAILQ_INIT(&(ep->cef_ent)); |
TAILQ_INIT(&(ep->cef_ent)); |
|
|
|
|
} |
} |
|
|
if (ep->cef_path != NULL) |
if (ep->cef_path != NULL) |
free(ep->cef_path); |
xfree(ep->cef_path); |
|
|
if (ep->cef_bpath != NULL) |
if (ep->cef_bpath != NULL) |
free(ep->cef_bpath); |
xfree(ep->cef_bpath); |
|
|
while (!TAILQ_EMPTY(&(ep->cef_ent))) { |
while (!TAILQ_EMPTY(&(ep->cef_ent))) { |
ent = TAILQ_FIRST(&(ep->cef_ent)); |
ent = TAILQ_FIRST(&(ep->cef_ent)); |
|
|
cvs_ent_free(ent); |
cvs_ent_free(ent); |
} |
} |
|
|
free(ep); |
xfree(ep); |
} |
} |
|
|
|
|
|
|
char *fields[CVS_ENTRIES_NFIELDS], *buf, *sp, *dp; |
char *fields[CVS_ENTRIES_NFIELDS], *buf, *sp, *dp; |
struct cvs_ent *ent; |
struct cvs_ent *ent; |
|
|
buf = strdup(entry); |
buf = xstrdup(entry); |
if (buf == NULL) { |
|
cvs_log(LP_ERRNO, "failed to allocate entry copy"); |
|
return (NULL); |
|
} |
|
|
|
sp = buf; |
sp = buf; |
i = 0; |
i = 0; |
do { |
do { |
|
|
return (NULL); |
return (NULL); |
} |
} |
|
|
ent = (struct cvs_ent *)malloc(sizeof(*ent)); |
ent = (struct cvs_ent *)xmalloc(sizeof(*ent)); |
if (ent == NULL) { |
|
cvs_log(LP_ERRNO, "failed to allocate CVS entry"); |
|
return (NULL); |
|
} |
|
memset(ent, 0, sizeof(*ent)); |
memset(ent, 0, sizeof(*ent)); |
ent->ce_buf = buf; |
ent->ce_buf = buf; |
|
|
|
|
if (ent->ce_rev != NULL) |
if (ent->ce_rev != NULL) |
rcsnum_free(ent->ce_rev); |
rcsnum_free(ent->ce_rev); |
if (ent->ce_buf != NULL) |
if (ent->ce_buf != NULL) |
free(ent->ce_buf); |
xfree(ent->ce_buf); |
free(ent); |
xfree(ent); |
} |
} |
|
|
/* |
/* |