diff options
author | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-02-04 15:08:45 +0000 |
---|---|---|
committer | Tobias Stoeckmann <tobias@cvs.openbsd.org> | 2008-02-04 15:08:45 +0000 |
commit | 9391b3a6f3d329743b9880318ba9631a6ff9cf9a (patch) | |
tree | c044a1304555810b5f2846fd3b51c541f0fa1942 /usr.bin | |
parent | 411b75fbdfa56ff0a00aa9ce3c23e4674c30bcfd (diff) |
Make CVS/Entries.Log look the same as GNU cvs'. This way interoperability
is possible.
OK joris@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/entries.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/cvs/entries.c b/usr.bin/cvs/entries.c index c5550672303..3592ac20585 100644 --- a/usr.bin/cvs/entries.c +++ b/usr.bin/cvs/entries.c @@ -1,4 +1,4 @@ -/* $OpenBSD: entries.c,v 1.86 2008/01/10 10:09:27 tobias Exp $ */ +/* $OpenBSD: entries.c,v 1.87 2008/02/04 15:08:44 tobias Exp $ */ /* * Copyright (c) 2006 Joris Vink <joris@openbsd.org> * @@ -73,7 +73,11 @@ cvs_ent_open(const char *dir) while (fgets(buf, sizeof(buf), fp)) { buf[strcspn(buf, "\n")] = '\0'; - p = &buf[1]; + if (strlen(buf) < 2) + fatal("cvs_ent_open: %s: malformed line %s", + ep->cef_lpath, buf); + + p = &buf[2]; if (buf[0] == 'A') { line = xmalloc(sizeof(*line)); @@ -274,7 +278,7 @@ cvs_ent_add(CVSENTRIES *ep, const char *line) fatal("cvs_ent_add: fopen: `%s': %s", ep->cef_lpath, strerror(errno)); - fputc('A', fp); + fputs("A ", fp); fputs(line, fp); fputc('\n', fp); @@ -302,7 +306,7 @@ cvs_ent_remove(CVSENTRIES *ep, const char *name) fatal("cvs_ent_remove: fopen: `%s': %s", ep->cef_lpath, strerror(errno)); - fputc('R', fp); + fputs("R ", fp); fputs(l->buf, fp); fputc('\n', fp); |