[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/src ChangeLog recurse.c
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/src ChangeLog recurse.c |
Date: |
Wed, 10 Sep 2008 17:14:06 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Changes by: Derek Robert Price <dprice> 08/09/10 17:14:06
Modified files:
src : ChangeLog recurse.c
Log message:
* recurse.c (do_file_proc): Simplify via dir_append.
(do_dir_proc): Ditto. Some cleanup.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3570&r2=1.3571
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/recurse.c?cvsroot=cvs&r1=1.131&r2=1.132
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3570
retrieving revision 1.3571
diff -u -b -r1.3570 -r1.3571
--- ChangeLog 10 Sep 2008 16:43:53 -0000 1.3570
+++ ChangeLog 10 Sep 2008 17:14:05 -0000 1.3571
@@ -1,5 +1,8 @@
2008-09-10 Derek R. Price <address@hidden>
+ * recurse.c (do_file_proc): Simplify via dir_append.
+ (do_dir_proc): Ditto. Some cleanup.
+
* root.c (Name_Root): Remove unneeded article from error message.
* sanity.sh: Update to compensate.
(dirs-4): Improve FIXCVS comment.
Index: recurse.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/recurse.c,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -b -r1.131 -r1.132
--- recurse.c 10 Sep 2008 16:29:19 -0000 1.131
+++ recurse.c 10 Sep 2008 17:14:05 -0000 1.132
@@ -936,10 +936,7 @@
char *tmp;
finfo->file = p->key;
- if (finfo->update_dir[0] != '\0')
- tmp = Xasprintf ("%s/%s", finfo->update_dir, finfo->file);
- else
- tmp = xstrdup (finfo->file);
+ tmp = dir_append (finfo->update_dir, finfo->file);
if (frfile->frame->dosrcs && repository)
{
@@ -1038,38 +1035,29 @@
strcpy (update_dir, saved_update_dir);
/* set up update_dir - skip dots if not at start */
- if (!STREQ (dir, "."))
+ if (STREQ (dir, "."))
+ {
+ if (update_dir[0] == '\0')
+ strcpy (update_dir, dir);
+ }
+ else
{
if (update_dir[0])
{
- (void) strcat (update_dir, "/");
- (void) strcat (update_dir, dir);
+ strcat (update_dir, "/");
+ strcat (update_dir, dir);
}
else
- (void) strcpy (update_dir, dir);
-
- /*
- * Here we need a plausible repository name for the sub-directory. We
- * create one by concatenating the new directory name onto the
- * previous repository name. The only case where the name should be
- * used is in the case where we are creating a new sub-directory for
- * update -d and in that case the generated name will be correct.
- */
- if (repository == NULL)
- newrepos = xstrdup ("");
- else
- newrepos = Xasprintf ("%s/%s", repository, dir);
+ strcpy (update_dir, dir);
}
- else
- {
- if (update_dir[0] == '\0')
- (void) strcpy (update_dir, dir);
- if (repository == NULL)
- newrepos = xstrdup ("");
- else
- newrepos = xstrdup (repository);
- }
+ /* Here we need a plausible repository name for the sub-directory. We
+ * create one by concatenating the new directory name onto the previous
+ * repository name. The only case where the name should be used is in
+ * the case where we are creating a new sub-directory for update -d and
+ * in that case the generated name will be correct.
+ */
+ newrepos = dir_append (repository, dir);
/* Check to see that the CVSADM directory, if it exists, seems to be
well-formed. It can be missing files if the user hit ^C in the
- [Cvs-cvs] ccvs/src ChangeLog recurse.c,
Derek Robert Price <=