summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-06-12 17:06:18 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-06-12 17:06:18 +0000
commit1ec93f997c6492cd03286a1e6ef628f6f375e10d (patch)
tree10238297f13426037ada9386ce4305a0fd631a45 /usr.bin
parent6abbe975b9cdbd9654e2e38d59321845b6cf5cfd (diff)
we should be able to handle symbol names that are also RCS tokens,
gnu cvs supports this and we should too really. allows opencvs to properly checkout netbsd trees. spotted & tested by rivo nurges ok tobias@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/rcs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 62da76238c9..f6355ea3018 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.270 2008/06/12 07:16:14 joris Exp $ */
+/* $OpenBSD: rcs.c,v 1.271 2008/06/12 17:06:17 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -237,6 +237,8 @@ static void rcs_strprint(const u_char *, size_t, FILE *);
static void rcs_kwexp_line(char *, struct rcs_delta *, struct cvs_lines *,
struct cvs_line *, int mode);
+static int rcs_ignore_keys = 0;
+
RCSFILE *
rcs_open(const char *path, int fd, int flags, ...)
{
@@ -1721,6 +1723,7 @@ rcs_parse_admin(RCSFILE *rfp)
goto fail;
break;
case RCS_TOK_SYMBOLS:
+ rcs_ignore_keys = 1;
if (rcs_parse_symbols(rfp) < 0)
goto fail;
break;
@@ -1734,6 +1737,9 @@ rcs_parse_admin(RCSFILE *rfp)
RCS_TOKSTR(rfp));
goto fail;
}
+
+ rcs_ignore_keys = 0;
+
}
fail:
@@ -2302,7 +2308,7 @@ rcs_gettok(RCSFILE *rfp)
}
*bp = '\0';
- if (type != RCS_TOK_ERR) {
+ if (type != RCS_TOK_ERR && rcs_ignore_keys != 1) {
for (i = 0; i < RCS_NKEYS; i++) {
if (strcmp(rcs_keys[i].rk_str,
pdp->rp_buf) == 0) {