diff options
author | 2008-02-04 15:08:44 +0000 | |
---|---|---|
committer | 2008-02-04 15:08:44 +0000 | |
commit | d2442498516f1abb709a0dad4bd715df4f47f3e2 (patch) | |
tree | bdc1b712b13074ec91d2b53073ec7f395ea97837 | |
parent | Added -k flag support for all commands which support it. (diff) | |
download | wireguard-openbsd-d2442498516f1abb709a0dad4bd715df4f47f3e2.tar.xz wireguard-openbsd-d2442498516f1abb709a0dad4bd715df4f47f3e2.zip |
Make CVS/Entries.Log look the same as GNU cvs'. This way interoperability
is possible.
OK joris@
-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); |