summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-06-19 05:05:18 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-06-19 05:05:18 +0000
commit215d3a82d2125515ff4319b928ee9941847c8272 (patch)
treece8e169c30526ce6cb7b54f27ab64af235950590
parente7f1f343497e8e081891ccb40c0fa9e2894ba412 (diff)
kill local and remote callback and just have one called fileproc.
we let the commands pass the correct function. all in preparation for remote.
-rw-r--r--usr.bin/cvs/add.c5
-rw-r--r--usr.bin/cvs/checkout.c5
-rw-r--r--usr.bin/cvs/commit.c7
-rw-r--r--usr.bin/cvs/cvs.h5
-rw-r--r--usr.bin/cvs/diff.c5
-rw-r--r--usr.bin/cvs/file.c10
-rw-r--r--usr.bin/cvs/getlog.c5
-rw-r--r--usr.bin/cvs/import.c5
-rw-r--r--usr.bin/cvs/remove.c5
-rw-r--r--usr.bin/cvs/status.c5
-rw-r--r--usr.bin/cvs/tag.c5
-rw-r--r--usr.bin/cvs/update.c5
12 files changed, 28 insertions, 39 deletions
diff --git a/usr.bin/cvs/add.c b/usr.bin/cvs/add.c
index eb8755d8f58..813cad1216a 100644
--- a/usr.bin/cvs/add.c
+++ b/usr.bin/cvs/add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: add.c,v 1.57 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: add.c,v 1.58 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -70,8 +70,7 @@ cvs_add(int argc, char **argv)
cr.enterdir = NULL;
cr.leavedir = NULL;
- cr.local = cvs_add_local;
- cr.remote = NULL;
+ cr.fileproc = cvs_add_local;
cr.flags = flags;
cvs_file_run(argc, argv, &cr);
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index e54bc3282f1..e86bd49de4c 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.63 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: checkout.c,v 1.64 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -144,8 +144,7 @@ checkout_repository(const char *repobase, const char *wdbase)
build_dirs = 1;
cr.enterdir = cvs_update_enterdir;
cr.leavedir = cvs_update_leavedir;
- cr.local = cvs_update_local;
- cr.remote = NULL;
+ cr.fileproc = cvs_update_local;
cr.flags = CR_REPO | CR_RECURSE_DIRS;
cvs_repository_lock(repobase);
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c
index 0c32ef3fd0a..b237be90963 100644
--- a/usr.bin/cvs/commit.c
+++ b/usr.bin/cvs/commit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commit.c,v 1.74 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: commit.c,v 1.75 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -92,8 +92,7 @@ cvs_commit(int argc, char **argv)
cr.enterdir = NULL;
cr.leavedir = NULL;
- cr.local = cvs_commit_check_conflicts;
- cr.remote = NULL;
+ cr.fileproc = cvs_commit_check_conflicts;
cr.flags = flags;
if (argc > 0)
@@ -105,7 +104,7 @@ cvs_commit(int argc, char **argv)
fatal("%d conflicts found, please correct these first",
conflicts_found);
- cr.local = cvs_commit_local;
+ cr.fileproc = cvs_commit_local;
cvs_file_walklist(&files_affected, &cr);
cvs_file_freelist(&files_affected);
diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h
index a7f00dce3f6..fd14180dbae 100644
--- a/usr.bin/cvs/cvs.h
+++ b/usr.bin/cvs/cvs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.h,v 1.113 2006/06/14 15:14:47 xsa Exp $ */
+/* $OpenBSD: cvs.h,v 1.114 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -161,8 +161,7 @@ struct cvsroot;
struct cvs_recursion {
void (*enterdir)(struct cvs_file *);
void (*leavedir)(struct cvs_file *);
- void (*local)(struct cvs_file *);
- void (*remote)(struct cvs_file *, struct cvsroot *);
+ void (*fileproc)(struct cvs_file *);
int flags;
};
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c
index a1943bf3a20..4e29819f2b2 100644
--- a/usr.bin/cvs/diff.c
+++ b/usr.bin/cvs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.105 2006/06/16 20:01:10 joris Exp $ */
+/* $OpenBSD: diff.c,v 1.106 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -95,8 +95,7 @@ cvs_diff(int argc, char **argv)
cr.enterdir = NULL;
cr.leavedir = NULL;
- cr.local = cvs_diff_local;
- cr.remote = NULL;
+ cr.fileproc = cvs_diff_local;
cr.flags = flags;
diff_rev1 = diff_rev2 = NULL;
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index dd772024e0d..d2755fac3f9 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.160 2006/06/14 20:28:53 joris Exp $ */
+/* $OpenBSD: file.c,v 1.161 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -323,8 +323,8 @@ cvs_file_walklist(struct cvs_flisthead *fl, struct cvs_recursion *cr)
if (cf->file_type == CVS_DIR) {
cvs_file_walkdir(cf, cr);
} else {
- if (cr->local != NULL)
- cr->local(cf);
+ if (cr->fileproc != NULL)
+ cr->fileproc(cf);
}
cvs_file_free(cf);
@@ -364,8 +364,8 @@ cvs_file_walkdir(struct cvs_file *cf, struct cvs_recursion *cr)
if (cr->enterdir != NULL)
cr->enterdir(cf);
- if (cr->local != NULL)
- cr->local(cf);
+ if (cr->fileproc != NULL)
+ cr->fileproc(cf);
if (cf->file_status == FILE_SKIP)
return;
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c
index 14b916e13af..2dc516f7a6b 100644
--- a/usr.bin/cvs/getlog.c
+++ b/usr.bin/cvs/getlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getlog.c,v 1.63 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: getlog.c,v 1.64 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -71,8 +71,7 @@ cvs_getlog(int argc, char **argv)
cr.enterdir = NULL;
cr.leavedir = NULL;
- cr.remote = NULL;
- cr.local = cvs_log_local;
+ cr.fileproc = cvs_log_local;
cr.flags = flags;
if (argc > 0)
diff --git a/usr.bin/cvs/import.c b/usr.bin/cvs/import.c
index 10e58f72828..5448825c521 100644
--- a/usr.bin/cvs/import.c
+++ b/usr.bin/cvs/import.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: import.c,v 1.52 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: import.c,v 1.53 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -100,8 +100,7 @@ cvs_import(int argc, char **argv)
cr.enterdir = NULL;
cr.leavedir = NULL;
- cr.remote = NULL;
- cr.local = cvs_import_local;
+ cr.fileproc = cvs_import_local;
cr.flags = CR_RECURSE_DIRS;
cvs_file_run(1, &arg, &cr);
diff --git a/usr.bin/cvs/remove.c b/usr.bin/cvs/remove.c
index 7ad7712b256..6fcf934797f 100644
--- a/usr.bin/cvs/remove.c
+++ b/usr.bin/cvs/remove.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: remove.c,v 1.53 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: remove.c,v 1.54 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
*
@@ -68,8 +68,7 @@ cvs_remove(int argc, char **argv)
cr.enterdir = NULL;
cr.leavedir = NULL;
- cr.local = cvs_remove_local;
- cr.remote = NULL;
+ cr.fileproc = cvs_remove_local;
cr.flags = flags;
if (argc > 0)
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c
index bf8a6e7cc23..068d43f4f74 100644
--- a/usr.bin/cvs/status.c
+++ b/usr.bin/cvs/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.65 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: status.c,v 1.66 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -83,8 +83,7 @@ cvs_status(int argc, char **argv)
cr.enterdir = NULL;
cr.leavedir = NULL;
- cr.local = cvs_status_local;
- cr.remote = NULL;
+ cr.fileproc = cvs_status_local;
cr.flags = flags;
if (argc > 0)
diff --git a/usr.bin/cvs/tag.c b/usr.bin/cvs/tag.c
index d4305e58577..a9d9349c065 100644
--- a/usr.bin/cvs/tag.c
+++ b/usr.bin/cvs/tag.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tag.c,v 1.47 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: tag.c,v 1.48 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Xavier Santolaria <xsa@openbsd.org>
*
@@ -108,8 +108,7 @@ cvs_tag(int argc, char **argv)
cr.enterdir = NULL;
cr.leavedir = NULL;
- cr.local = cvs_tag_local;
- cr.remote = NULL;
+ cr.fileproc = cvs_tag_local;
cr.flags = flags;
cvs_file_run(argc, argv, &cr);
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c
index 2d1ae75b0b3..b0ceafc04ac 100644
--- a/usr.bin/cvs/update.c
+++ b/usr.bin/cvs/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.74 2006/06/16 14:07:42 joris Exp $ */
+/* $OpenBSD: update.c,v 1.75 2006/06/19 05:05:17 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -96,8 +96,7 @@ cvs_update(int argc, char **argv)
cr.enterdir = cvs_update_enterdir;
cr.leavedir = cvs_update_leavedir;
- cr.local = cvs_update_local;
- cr.remote = NULL;
+ cr.fileproc = cvs_update_local;
cr.flags = flags;
if (argc > 0)