summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2005-07-22 16:27:30 +0000
committerJoris Vink <joris@cvs.openbsd.org>2005-07-22 16:27:30 +0000
commitc42f88311255a9164d43bb105e4b64f906c5dfd3 (patch)
treecffa8e7827f203b766092b77ab25702eee9a8c0b
parent9350b78deaab34094bda1ca9586d15b14f26325b (diff)
use the cf_name field of the CVSFILE struct instead of using the old
CVS_FILE_NAME macro. This macro used to be nifty because of all the referencing for the names, but since we don't do that anymore and use cf_name directly... byebye CVS_FILE_NAME() okay xsa@
-rw-r--r--usr.bin/cvs/commit.c8
-rw-r--r--usr.bin/cvs/diff.c7
-rw-r--r--usr.bin/cvs/file.c10
-rw-r--r--usr.bin/cvs/file.h4
-rw-r--r--usr.bin/cvs/getlog.c4
-rw-r--r--usr.bin/cvs/release.c4
-rw-r--r--usr.bin/cvs/resp.c7
-rw-r--r--usr.bin/cvs/status.c4
8 files changed, 21 insertions, 27 deletions
diff --git a/usr.bin/cvs/commit.c b/usr.bin/cvs/commit.c
index f837ecdf442..24e47e91efa 100644
--- a/usr.bin/cvs/commit.c
+++ b/usr.bin/cvs/commit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: commit.c,v 1.41 2005/07/19 00:32:26 joris Exp $ */
+/* $OpenBSD: commit.c,v 1.42 2005/07/22 16:27:29 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -146,7 +146,7 @@ cvs_commit_pre_exec(struct cvsroot *root)
}
if (cvs_msg == NULL)
- cvs_msg = cvs_logmsg_get(CVS_FILE_NAME(tmp),
+ cvs_msg = cvs_logmsg_get(tmp->cf_name,
NULL, &cl, NULL);
cvs_file_free(tmp);
@@ -245,10 +245,8 @@ cvs_commit_remote(CVSFILE *cf, void *arg)
if (cf->cf_cvstat == CVS_FST_REMOVED)
return (0);
- if (cvs_sendreq(root, CVS_REQ_MODIFIED,
- CVS_FILE_NAME(cf)) < 0) {
+ if (cvs_sendreq(root, CVS_REQ_MODIFIED, cf->cf_name) < 0)
return (CVS_EX_PROTO);
- }
if (cvs_sendfile(root, fpath) < 0) {
return (CVS_EX_PROTO);
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c
index a0f71fe1188..46e985e250f 100644
--- a/usr.bin/cvs/diff.c
+++ b/usr.bin/cvs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.51 2005/07/21 11:42:24 xsa Exp $ */
+/* $OpenBSD: diff.c,v 1.52 2005/07/22 16:27:29 joris Exp $ */
/*
* Copyright (C) Caldera International Inc. 2001-2002.
* All rights reserved.
@@ -521,8 +521,7 @@ cvs_diff_remote(struct cvs_file *cfp, void *arg)
if (cfp->cf_type == DT_DIR) {
if (cfp->cf_cvstat == CVS_FST_UNKNOWN) {
root = cfp->cf_parent->cf_root;
- cvs_sendreq(root, CVS_REQ_QUESTIONABLE,
- CVS_FILE_NAME(cfp));
+ cvs_sendreq(root, CVS_REQ_QUESTIONABLE, cfp->cf_name);
} else {
root = cfp->cf_root;
#if 0
@@ -540,7 +539,7 @@ cvs_diff_remote(struct cvs_file *cfp, void *arg)
}
if (cfp->cf_cvstat == CVS_FST_LOST) {
- cvs_log(LP_WARN, "cannot find file %s", CVS_FILE_NAME(cfp));
+ cvs_log(LP_WARN, "cannot find file %s", cfp->cf_name);
return (0);
}
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index c38095c2949..caa58fee658 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.98 2005/07/18 01:02:20 joris Exp $ */
+/* $OpenBSD: file.c,v 1.99 2005/07/22 16:27:29 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -550,7 +550,7 @@ cvs_file_find(CVSFILE *hier, const char *path)
}
SIMPLEQ_FOREACH(sf, &(cf->cf_files), cf_list)
- if (cvs_file_cmpname(pp, CVS_FILE_NAME(sf)) == 0)
+ if (cvs_file_cmpname(pp, sf->cf_name) == 0)
break;
if (sf == NULL)
return (NULL);
@@ -584,7 +584,7 @@ cvs_file_getpath(CVSFILE *file, char *buf, size_t len)
/* find the top node */
for (top = file; (top != NULL) && (i > 0); top = top->cf_parent) {
- fp = CVS_FILE_NAME(top);
+ fp = top->cf_name;
/* skip self-references */
if ((fp[0] == '.') && (fp[1] == '\0'))
@@ -886,7 +886,7 @@ cvs_file_getdir(CVSFILE *cf, int flags, char *path, int (*cb)(CVSFILE *, void *)
cfp->cf_flags &= ~CVS_GDIR_IGNORE;
if (cvs_file_getdir(cfp, flags, np, cb, arg) < 0) {
- cvs_log(LP_ERR, "failed to get %s", CVS_FILE_NAME(cfp));
+ cvs_log(LP_ERR, "failed to get %s", cfp->cf_name);
continue;
}
}
@@ -1020,7 +1020,7 @@ cvs_file_cmp(const void *f1, const void *f2)
const CVSFILE *cf1, *cf2;
cf1 = *(CVSFILE * const *)f1;
cf2 = *(CVSFILE * const *)f2;
- return cvs_file_cmpname(CVS_FILE_NAME(cf1), CVS_FILE_NAME(cf2));
+ return cvs_file_cmpname(cf1->cf_name, cf2->cf_name);
}
diff --git a/usr.bin/cvs/file.h b/usr.bin/cvs/file.h
index 6f2b7d9af1f..adbe72005d8 100644
--- a/usr.bin/cvs/file.h
+++ b/usr.bin/cvs/file.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.h,v 1.23 2005/07/07 19:06:12 joris Exp $ */
+/* $OpenBSD: file.h,v 1.24 2005/07/22 16:27:29 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -111,8 +111,6 @@ typedef struct cvs_file {
#define cf_repo cf_td.cf_dir.cd_repo
#define cf_root cf_td.cf_dir.cd_root
-#define CVS_FILE_NAME(cf) (cf->cf_name)
-
#define CVS_DIRF_STATIC 0x01
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c
index 17f4c1a1a9d..ca49e535997 100644
--- a/usr.bin/cvs/getlog.c
+++ b/usr.bin/cvs/getlog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getlog.c,v 1.41 2005/07/21 11:42:24 xsa Exp $ */
+/* $OpenBSD: getlog.c,v 1.42 2005/07/22 16:27:29 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -165,7 +165,7 @@ cvs_getlog_remote(CVSFILE *cf, void *arg)
if (cf->cf_type == DT_DIR) {
if (cf->cf_cvstat == CVS_FST_UNKNOWN)
ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE,
- CVS_FILE_NAME(cf));
+ cf->cf_name);
else
ret = cvs_senddir(root, cf);
return (ret);
diff --git a/usr.bin/cvs/release.c b/usr.bin/cvs/release.c
index f28f1355902..9bc8ee0eb10 100644
--- a/usr.bin/cvs/release.c
+++ b/usr.bin/cvs/release.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: release.c,v 1.15 2005/07/22 15:34:05 xsa Exp $ */
+/* $OpenBSD: release.c,v 1.16 2005/07/22 16:27:29 joris Exp $ */
/*
* Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
* All rights reserved.
@@ -156,7 +156,7 @@ cvs_release_dir(CVSFILE *cf, void *arg)
return (CVS_EX_DATA);
if (cf->cf_type == DT_DIR) {
- if (!strcmp(CVS_FILE_NAME(cf), "."))
+ if (!strcmp(cf->cf_name, "."))
return (0);
else {
/* test if dir has CVS/ directory */
diff --git a/usr.bin/cvs/resp.c b/usr.bin/cvs/resp.c
index b5684c6209b..debc20ff21f 100644
--- a/usr.bin/cvs/resp.c
+++ b/usr.bin/cvs/resp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resp.c,v 1.45 2005/07/14 07:38:35 xsa Exp $ */
+/* $OpenBSD: resp.c,v 1.46 2005/07/22 16:27:29 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -452,10 +452,9 @@ cvs_resp_sticky(struct cvsroot *root, int type, char *line)
/* add a directory entry to the parent */
if (entf != NULL) {
- if ((ent = cvs_ent_get(entf,
- CVS_FILE_NAME(cf))) == NULL) {
+ if ((ent = cvs_ent_get(entf, cf->cf_name)) == NULL) {
snprintf(buf, sizeof(buf), "D/%s////",
- CVS_FILE_NAME(cf));
+ cf->cf_name);
ent = cvs_ent_parse(buf);
if (ent == NULL)
cvs_log(LP_ERR,
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c
index 0aa39de4f86..c5cd1d4d3f6 100644
--- a/usr.bin/cvs/status.c
+++ b/usr.bin/cvs/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.41 2005/07/19 15:48:52 xsa Exp $ */
+/* $OpenBSD: status.c,v 1.42 2005/07/22 16:27:29 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2005 Xavier Santolaria <xsa@openbsd.org>
@@ -137,7 +137,7 @@ cvs_status_remote(CVSFILE *cfp, void *arg)
if (cfp->cf_type == DT_DIR) {
if (cfp->cf_cvstat == CVS_FST_UNKNOWN)
ret = cvs_sendreq(root, CVS_REQ_QUESTIONABLE,
- CVS_FILE_NAME(cfp));
+ cfp->cf_name);
else
ret = cvs_senddir(root, cfp);