aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2004-04-15 01:41:05 +0000
committerPeter Wemm <peter@FreeBSD.org>2004-04-15 01:41:05 +0000
commit9dc16a5e25ab568213c3e52e142efd6098a14ac8 (patch)
tree23742f01b9a56cc1fb86dcb5b3ec19bcfcb1a0d4 /contrib
parent091764700c2d16a07a4b4ece752d46a13a87b1a6 (diff)
downloadsrc-9dc16a5e25ab568213c3e52e142efd6098a14ac8.tar.gz
src-9dc16a5e25ab568213c3e52e142efd6098a14ac8.zip
Change WriteTemplate to take const char * args.
The Name_Root() call seems to be defunct, remove it because it was causing compile problems. The real magic seems to be in the Parse_Info() callback (which was also updated for const char * args).
Notes
Notes: svn path=/head/; revision=128273
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cvs/src/cvs.h2
-rw-r--r--contrib/cvs/src/entries.c10
2 files changed, 4 insertions, 8 deletions
diff --git a/contrib/cvs/src/cvs.h b/contrib/cvs/src/cvs.h
index 68d46cc3cbe6..f59a9ca0f171 100644
--- a/contrib/cvs/src/cvs.h
+++ b/contrib/cvs/src/cvs.h
@@ -580,7 +580,7 @@ void ParseTag PROTO((char **tagp, char **datep, int *nonbranchp));
void WriteTag PROTO ((const char *dir, const char *tag, const char *date,
int nonbranch, const char *update_dir,
const char *repository));
-void WriteTemplate PROTO ((char *dir, char *update_dir));
+void WriteTemplate PROTO ((const char *dir, const char *update_dir));
void cat_module PROTO((int status));
void check_entries PROTO((char *dir));
void close_module PROTO((DBM * db));
diff --git a/contrib/cvs/src/entries.c b/contrib/cvs/src/entries.c
index 98cb0068cd9e..1ab7c7e5a5d9 100644
--- a/contrib/cvs/src/entries.c
+++ b/contrib/cvs/src/entries.c
@@ -641,7 +641,7 @@ AddEntryNode (list, entdata)
static char *root_template;
static int
-get_root_template(char *repository, char *path)
+get_root_template(const char *repository, const char *path)
{
if (root_template) {
if (strcmp(path, root_template) == 0)
@@ -658,19 +658,16 @@ get_root_template(char *repository, char *path)
*/
void
WriteTemplate (dir, update_dir)
- char *dir;
- char *update_dir;
+ const char *dir;
+ const char *update_dir;
{
char *tmp = NULL;
- char *root = NULL;
struct stat st1;
struct stat st2;
if (Parse_Info(CVSROOTADM_RCSINFO, "cvs", get_root_template, 1) < 0)
return;
- if ((root = Name_Root(dir, update_dir)) == NULL)
- error (1, errno, "unable to locate cvs root");
if (asprintf(&tmp, "%s/%s", dir, CVSADM_TEMPLATE) < 0)
error (1, errno, "out of memory");
@@ -705,7 +702,6 @@ WriteTemplate (dir, update_dir)
}
}
free(tmp);
- free(root);
}
/*