summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-07-16 03:08:27 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-07-16 03:08:27 +0000
commita6ebb030f4670cdeae6cc724ffdfadf11942074a (patch)
tree5ca6cdd30833c0f7b6d4947028115111302f0971 /usr.bin
parentcc15901768d11e8bf8832a6024ac39c4f275b82d (diff)
* add prototypes for cvs_getargv() and cvs_freeargv()
* remove cvs_file_free(), cvs_freeargv() does exactly the same
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/cvs.h5
-rw-r--r--usr.bin/cvs/file.c22
2 files changed, 6 insertions, 21 deletions
diff --git a/usr.bin/cvs/cvs.h b/usr.bin/cvs/cvs.h
index f080e5e1046..54778b82833 100644
--- a/usr.bin/cvs/cvs.h
+++ b/usr.bin/cvs/cvs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cvs.h,v 1.5 2004/07/14 19:08:48 jfb Exp $ */
+/* $OpenBSD: cvs.h,v 1.6 2004/07/16 03:08:26 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -350,7 +350,6 @@ int cvs_file_init (void);
int cvs_file_ignore (const char *);
int cvs_file_isignored (const char *);
char** cvs_file_getv (const char *, int *);
-void cvs_file_free (char **, int);
/* Entries API */
@@ -378,6 +377,8 @@ int cvs_modetostr (mode_t, char *, size_t);
int cvs_strtomode (const char *, mode_t *);
int cvs_cksum (const char *, char *, size_t);
int cvs_exec (int, char **, int []);
+int cvs_getargv (const char *, char **, int);
+void cvs_freeargv (char **, int);
#endif /* CVS_H */
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 0e01d971d12..f34b86f9028 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.1 2004/07/14 03:33:09 jfb Exp $ */
+/* $OpenBSD: file.c,v 1.2 2004/07/16 03:08:26 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -207,7 +207,8 @@ cvs_file_isignored(const char *file)
* matching any of the ignore patterns. The number of files found is
* returned in <nfiles>.
* Returns a pointer to a dynamically-allocated string vector on success,
- * or NULL on failure.
+ * or NULL on failure. The returned vector should be freed with
+ * cvs_freeargv().
*/
char**
@@ -259,20 +260,3 @@ cvs_file_getv(const char *dir, int *nfiles)
return (fvec);
}
-
-
-/*
- * cvs_file_freev()
- *
- * Free a file vector obtained with cvs_file_getv().
- */
-
-void
-cvs_file_freev(char **fvec, int nfiles)
-{
- int i;
-
- for (i = 0; i < nfiles; i++)
- free(fvec[i]);
- free(fvec);
-}