version 1.84, 2007/10/05 19:28:23 |
version 1.85, 2007/11/11 10:06:52 |
|
|
{ |
{ |
FILE *fp; |
FILE *fp; |
struct cvs_ent_line *l; |
struct cvs_ent_line *l; |
|
int dflag; |
|
|
|
dflag = 1; |
|
|
if (writefile) { |
if (writefile) { |
if ((fp = fopen(ep->cef_bpath, "w")) == NULL) |
if ((fp = fopen(ep->cef_bpath, "w")) == NULL) |
fatal("cvs_ent_close: fopen: `%s': %s", |
fatal("cvs_ent_close: fopen: `%s': %s", |
|
|
|
|
while ((l = TAILQ_FIRST(&(ep->cef_ent))) != NULL) { |
while ((l = TAILQ_FIRST(&(ep->cef_ent))) != NULL) { |
if (writefile) { |
if (writefile) { |
|
if (l->buf[0] == 'D') |
|
dflag = 0; |
|
|
fputs(l->buf, fp); |
fputs(l->buf, fp); |
fputc('\n', fp); |
fputc('\n', fp); |
} |
} |
|
|
} |
} |
|
|
if (writefile) { |
if (writefile) { |
fputc('D', fp); |
if (dflag) { |
fputc('\n', fp); |
fputc('D', fp); |
|
fputc('\n', fp); |
|
} |
(void)fclose(fp); |
(void)fclose(fp); |
|
|
if (rename(ep->cef_bpath, ep->cef_path) == -1) |
if (rename(ep->cef_bpath, ep->cef_path) == -1) |