summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorXavier Santolaria <xsa@cvs.openbsd.org>2007-05-09 21:19:29 +0000
committerXavier Santolaria <xsa@cvs.openbsd.org>2007-05-09 21:19:29 +0000
commitea708212383a84c08c92aca30bc53d76f220e7b3 (patch)
tree87c8dda165c83829c07034c7829415f27cab4ba3 /usr.bin/cvs
parentb140702815ee91db8d972a987e1f58b054b5bdc3 (diff)
cvs_splitpath() isn't used anymore; from Tobias Stoeckmann.
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/util.c41
-rw-r--r--usr.bin/cvs/util.h3
2 files changed, 2 insertions, 42 deletions
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c
index 3603f718e5f..084f5470f83 100644
--- a/usr.bin/cvs/util.c
+++ b/usr.bin/cvs/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.108 2007/04/20 08:36:00 xsa Exp $ */
+/* $OpenBSD: util.c,v 1.109 2007/05/09 21:19:28 xsa Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
@@ -213,45 +213,6 @@ cvs_cksum(const char *file, char *dst, size_t len)
}
/*
- * cvs_splitpath()
- *
- * Split a path <path> into the base portion and the filename portion.
- * The path is copied in <base> and the last delimiter is replaced by a NUL
- * byte. The <file> pointer is set to point to the first character after
- * that delimiter.
- * Returns 0 on success, or -1 on failure.
- */
-void
-cvs_splitpath(const char *path, char *base, size_t blen, char **file)
-{
- size_t rlen;
- char *sp;
-
- if ((rlen = strlcpy(base, path, blen)) >= blen)
- fatal("cvs_splitpath: path truncation");
-
- while (rlen > 0 && base[rlen - 1] == '/')
- base[--rlen] = '\0';
-
- sp = strrchr(base, '/');
- if (sp == NULL) {
- rlen = strlcpy(base, "./", blen);
- if (rlen >= blen)
- fatal("cvs_splitpath: path truncation");
-
- rlen = strlcat(base, path, blen);
- if (rlen >= blen)
- fatal("cvs_splitpath: path truncation");
-
- sp = base + 1;
- }
-
- *sp = '\0';
- if (file != NULL)
- *file = sp + 1;
-}
-
-/*
* cvs_getargv()
*
* Parse a line contained in <line> and generate an argument vector by
diff --git a/usr.bin/cvs/util.h b/usr.bin/cvs/util.h
index fa4e063d955..3584aabb9b5 100644
--- a/usr.bin/cvs/util.h
+++ b/usr.bin/cvs/util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.h,v 1.18 2007/04/20 08:36:00 xsa Exp $ */
+/* $OpenBSD: util.h,v 1.19 2007/05/09 21:19:28 xsa Exp $ */
/*
* Copyright (c) 2006 Niall O'Higgins <niallo@openbsd.org>
* All rights reserved.
@@ -31,7 +31,6 @@ void cvs_get_repository_path(const char *, char *, size_t);
void cvs_get_repository_name(const char *, char *, size_t);
void cvs_modetostr(mode_t, char *, size_t);
void cvs_strtomode(const char *, mode_t *);
-void cvs_splitpath(const char *, char *, size_t, char **);
void cvs_mkadmin(const char *, const char *, const char *,
char *, char *, int);
void cvs_mkpath(const char *);