summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/cvs/admin.c6
-rw-r--r--usr.bin/cvs/rcs.c9
-rw-r--r--usr.bin/cvs/rcs.h4
-rw-r--r--usr.bin/cvs/update.c5
-rw-r--r--usr.bin/rcs/co.c5
-rw-r--r--usr.bin/rcs/rcsclean.c5
-rw-r--r--usr.bin/rcs/rcsdiff.c5
-rw-r--r--usr.bin/rcs/rcsprog.c8
8 files changed, 20 insertions, 27 deletions
diff --git a/usr.bin/cvs/admin.c b/usr.bin/cvs/admin.c
index 35a3af24df1..86272c17ca4 100644
--- a/usr.bin/cvs/admin.c
+++ b/usr.bin/cvs/admin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: admin.c,v 1.32 2006/04/01 20:11:25 joris Exp $ */
+/* $OpenBSD: admin.c,v 1.33 2006/04/10 08:08:00 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
@@ -365,8 +365,8 @@ cvs_admin_local(CVSFILE *cf, void *arg)
if (!(runflags & FLAG_QUIET))
cvs_printf("RCS file: %s\n", rcspath);
- if (!RCS_KWEXP_INVAL(kflag))
- rcs_kwexp_set(rf, kflag);
+ rcs_kwexp_set(rf, kflag);
+
if (lkmode != RCS_LOCK_INVAL)
rcs_lock_setmode(rf, lkmode);
diff --git a/usr.bin/cvs/rcs.c b/usr.bin/cvs/rcs.c
index 90497032d26..97ccfdefa76 100644
--- a/usr.bin/cvs/rcs.c
+++ b/usr.bin/cvs/rcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.c,v 1.161 2006/04/05 01:38:55 ray Exp $ */
+/* $OpenBSD: rcs.c,v 1.162 2006/04/10 08:08:00 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -1470,16 +1470,15 @@ rcs_findrev(RCSFILE *rfp, RCSNUM *rev)
* rcs_kwexp_set()
*
* Set the keyword expansion mode to use on the RCS file <file> to <mode>.
- * Returns 0 on success, or -1 on failure.
*/
-int
+void
rcs_kwexp_set(RCSFILE *file, int mode)
{
int i;
char *tmp, buf[8] = "";
if (RCS_KWEXP_INVAL(mode))
- return (-1);
+ return;
i = 0;
if (mode == RCS_KWEXP_NONE)
@@ -1501,8 +1500,6 @@ rcs_kwexp_set(RCSFILE *file, int mode)
file->rf_expand = tmp;
/* not synced anymore */
file->rf_flags &= ~RCS_SYNCED;
-
- return (0);
}
/*
diff --git a/usr.bin/cvs/rcs.h b/usr.bin/cvs/rcs.h
index 9e65cc9ebab..1e17701cd0a 100644
--- a/usr.bin/cvs/rcs.h
+++ b/usr.bin/cvs/rcs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcs.h,v 1.57 2006/03/30 23:06:25 joris Exp $ */
+/* $OpenBSD: rcs.h,v 1.58 2006/04/10 08:08:00 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -238,7 +238,7 @@ const char *rcs_comment_lookup(const char *);
const char *rcs_comment_get(RCSFILE *);
void rcs_comment_set(RCSFILE *, const char *);
BUF *rcs_kwexp_buf(BUF *, RCSFILE *, RCSNUM *);
-int rcs_kwexp_set(RCSFILE *, int);
+void rcs_kwexp_set(RCSFILE *, int);
int rcs_kwexp_get(RCSFILE *);
int rcs_rev_add(RCSFILE *, RCSNUM *, const char *, time_t,
const char *);
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c
index 13c2ebf0f99..b9b0ec397e5 100644
--- a/usr.bin/cvs/update.c
+++ b/usr.bin/cvs/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.56 2006/03/16 09:06:19 xsa Exp $ */
+/* $OpenBSD: update.c,v 1.57 2006/04/10 08:08:00 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -257,8 +257,7 @@ cvs_update_local(CVSFILE *cf, void *arg)
/* set keyword expansion */
/* XXX look at cf->cf_opts as well for this */
- if (rcs_kwexp_set(rf, kflag) < 0)
- fatal("cvs_update_local: rcs_kwexp_set failed");
+ rcs_kwexp_set(rf, kflag);
/* fill in the correct revision */
if (rev != NULL) {
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c
index 9ddc0bcd8c0..0a335b1f2bf 100644
--- a/usr.bin/rcs/co.c
+++ b/usr.bin/rcs/co.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: co.c,v 1.71 2006/04/09 19:22:23 niallo Exp $ */
+/* $OpenBSD: co.c,v 1.72 2006/04/10 08:08:00 xsa Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -173,8 +173,7 @@ checkout_main(int argc, char **argv)
if (flags & PRESERVETIME)
rcs_mtime = rcs_get_mtime(file->rf_path);
- if (kflag != RCS_KWEXP_ERR)
- rcs_kwexp_set(file, kflag);
+ rcs_kwexp_set(file, kflag);
if (rev == RCS_HEAD_REV)
frev = file->rf_head;
diff --git a/usr.bin/rcs/rcsclean.c b/usr.bin/rcs/rcsclean.c
index f3e782049d8..bd17fc11522 100644
--- a/usr.bin/rcs/rcsclean.c
+++ b/usr.bin/rcs/rcsclean.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsclean.c,v 1.28 2006/03/24 15:57:29 xsa Exp $ */
+/* $OpenBSD: rcsclean.c,v 1.29 2006/04/10 08:08:00 xsa Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -151,8 +151,7 @@ rcsclean_file(char *fname, RCSNUM *rev)
if (flags & PRESERVETIME)
rcs_mtime = rcs_get_mtime(file->rf_path);
- if (!RCS_KWEXP_INVAL(kflag))
- rcs_kwexp_set(file, kflag);
+ rcs_kwexp_set(file, kflag);
if (rev == RCS_HEAD_REV)
frev = file->rf_head;
diff --git a/usr.bin/rcs/rcsdiff.c b/usr.bin/rcs/rcsdiff.c
index 2e3fa3d56ea..0a1c60d6120 100644
--- a/usr.bin/rcs/rcsdiff.c
+++ b/usr.bin/rcs/rcsdiff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsdiff.c,v 1.43 2006/04/06 10:13:00 xsa Exp $ */
+/* $OpenBSD: rcsdiff.c,v 1.44 2006/04/10 08:08:00 xsa Exp $ */
/*
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
* All rights reserved.
@@ -121,8 +121,7 @@ rcsdiff_main(int argc, char **argv)
if ((file = rcs_open(fpath, RCS_READ|RCS_PARSE_FULLY)) == NULL)
continue;
- if (kflag != RCS_KWEXP_ERR)
- rcs_kwexp_set(file, kflag);
+ rcs_kwexp_set(file, kflag);
if (rev == RCS_HEAD_REV)
frev = file->rf_head;
diff --git a/usr.bin/rcs/rcsprog.c b/usr.bin/rcs/rcsprog.c
index 245fc38ecc2..a421be6ecc3 100644
--- a/usr.bin/rcs/rcsprog.c
+++ b/usr.bin/rcs/rcsprog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcsprog.c,v 1.94 2006/04/07 12:54:40 xsa Exp $ */
+/* $OpenBSD: rcsprog.c,v 1.95 2006/04/10 08:08:00 xsa Exp $ */
/*
* Copyright (c) 2005 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -440,7 +440,8 @@ rcs_main(int argc, char **argv)
struct rcs_access *acp;
time_t rcs_mtime = -1;
- kflag = lkmode = -1;
+ kflag = RCS_KWEXP_ERR;
+ lkmode = -1;
fmode = S_IRUSR|S_IRGRP|S_IROTH;
flags = RCS_RDWR|RCS_PARSE_FULLY;
lrev = urev = descfile = nflag = NULL;
@@ -646,8 +647,7 @@ rcs_main(int argc, char **argv)
file->rf_flags &= ~RCS_SYNCED;
}
- if (kflag != -1)
- rcs_kwexp_set(file, kflag);
+ rcs_kwexp_set(file, kflag);
if (lkmode != -1)
(void)rcs_lock_setmode(file, lkmode);