Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2009 17:26:59 +0000 (UTC)
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r186741 - projects/csup_cvsmode/contrib/csup
Message-ID:  <200901041726.n04HQxHj063796@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lulf
Date: Sun Jan  4 17:26:59 2009
New Revision: 186741
URL: http://svn.freebsd.org/changeset/base/186741

Log:
  - Try to match style(9).
  - Remove old comments.

Modified:
  projects/csup_cvsmode/contrib/csup/detailer.c
  projects/csup_cvsmode/contrib/csup/rcsfile.c
  projects/csup_cvsmode/contrib/csup/updater.c

Modified: projects/csup_cvsmode/contrib/csup/detailer.c
==============================================================================
--- projects/csup_cvsmode/contrib/csup/detailer.c	Sun Jan  4 15:56:49 2009	(r186740)
+++ projects/csup_cvsmode/contrib/csup/detailer.c	Sun Jan  4 17:26:59 2009	(r186741)
@@ -532,7 +532,7 @@ detailer_checkrcsattr(struct detailer *d
 	char *attr, *path;
 	int error;
 
-	/* 
+	/*
 	 * I don't think we can use the status file, since it only records file
 	 * attributes in cvsmode.
 	 */
@@ -572,7 +572,7 @@ detailer_send_details(struct detailer *d
 	int error;
 	size_t len;
 
-       /* 
+       /*
         * Try to check if the file exists either live or dead to see if we can
         * edit it and put it live or dead, rather than receiving the entire
         * file.

Modified: projects/csup_cvsmode/contrib/csup/rcsfile.c
==============================================================================
--- projects/csup_cvsmode/contrib/csup/rcsfile.c	Sun Jan  4 15:56:49 2009	(r186740)
+++ projects/csup_cvsmode/contrib/csup/rcsfile.c	Sun Jan  4 17:26:59 2009	(r186741)
@@ -123,7 +123,6 @@ struct rcsfile {
 	struct branch *trunk; /* The tip delta. */
 
 	LIST_HEAD(, delta) deltatable;
-	LIST_HEAD(, delta) deltatable_dates;
 
 	char *desc;
 };
@@ -144,7 +143,6 @@ static struct stream 	*rcsfile_getdeltat
 static void		 rcsdelta_writestring(char *, size_t, struct stream *);
 static void		 rcsdelta_insertbranch(struct delta *, struct branch *);
 
-
 /* Space formatting of RCS file. */
 const char *head_space = "\t";
 const char *branch_space = "\t";
@@ -408,12 +406,6 @@ rcsfile_write(struct rcsfile *rf, struct
 	stream_printf(dest, "desc\n@@");
 	d = LIST_FIRST(&rf->trunk->deltalist);
 
-	/* 
-	 * XXX: We do not take as much care as cvsup to cope with hand-hacked
-	 * RCS-files, and therefore we'll just let them be updated. If having
-	 * them correct is important, it will be catched by the checksum anyway.
-	 */
-
 	/* Write out deltatexts. */
 	error = rcsfile_write_deltatext(rf, dest);
 	stream_printf(dest, "\n");
@@ -815,10 +807,6 @@ rcsfile_freedelta(struct delta *d)
 		buf_free(d->text);
 
 	/* Free all subbranches of a delta. */
-	/* XXX: Is this ok? Since the branchpoint is removed, there is no good
-	 * reason for the branch to exists, but we might still have deltas in
-	 * these branches.
-	 */
 	while (!LIST_EMPTY(&d->branchlist)) {
 		b = LIST_FIRST(&d->branchlist);
 		LIST_REMOVE(b, branch_next);
@@ -903,7 +891,7 @@ rcsfile_deletetag(struct rcsfile *rf, ch
 	}
 }
 
-/* 
+/*
  * Searches the global deltalist for a delta.
  */
 struct delta *
@@ -925,38 +913,38 @@ rcsfile_setval(struct rcsfile *rf, int f
 	size_t len;
 
 	switch (field) {
-		case RCSFILE_HEAD:
-			if (rf->head != NULL)
-				free(rf->head);
-			rf->head = xstrdup(val);
+	case RCSFILE_HEAD:
+		if (rf->head != NULL)
+			free(rf->head);
+		rf->head = xstrdup(val);
 		break;
-		case RCSFILE_BRANCH:
-			if (rf->branch != NULL)
-				free(rf->branch);
-			rf->branch = (val == NULL) ? NULL : xstrdup(val);
+	case RCSFILE_BRANCH:
+		if (rf->branch != NULL)
+			free(rf->branch);
+		rf->branch = (val == NULL) ? NULL : xstrdup(val);
 		break;
-		case RCSFILE_STRICT:
-			if (val != NULL)
-				rf->strictlock = 1;
+	case RCSFILE_STRICT:
+		if (val != NULL)
+			rf->strictlock = 1;
 		break;
-		case RCSFILE_COMMENT:
-			if (rf->comment != NULL)
-				free(rf->comment);
-			rf->comment = xstrdup(val);
+	case RCSFILE_COMMENT:
+		if (rf->comment != NULL)
+			free(rf->comment);
+		rf->comment = xstrdup(val);
 		break;
-		case RCSFILE_EXPAND:
-			len = strlen(val) - 1;
-			val++;
-			val[len - 1] = '\0';
-			rf->expand = keyword_decode_expand(val);
+	case RCSFILE_EXPAND:
+		len = strlen(val) - 1;
+		val++;
+		val[len - 1] = '\0';
+		rf->expand = keyword_decode_expand(val);
 		break;
-		case RCSFILE_DESC:
-			if (rf->desc != NULL)
-				free(rf->desc);
-			rf->desc = xstrdup(val);
+	case RCSFILE_DESC:
+		if (rf->desc != NULL)
+			free(rf->desc);
+		rf->desc = xstrdup(val);
 		break;
-		default:
-			lprintf(-1, "Setting invalid RCSfile value.\n");
+	default:
+		lprintf(-1, "Setting invalid RCSfile value.\n");
 		break;
 	}
 }
@@ -1123,10 +1111,9 @@ rcsfile_importdelta(struct rcsfile *rf, 
 			rcsfile_insertdelta(b, d, 1);
 		else {
 			rcsfile_insertdelta(b, d, 0);
-			/* 
+			/*
 			 * On import we need to set the diffbase to our
 			 * branchpoint for writing out later.
-			 * XXX: this could perhaps be done at a better time.
 			 */
 			if (LIST_FIRST(&b->deltalist) == d) {
 				brev = rcsrev_prefix(d->revnum);

Modified: projects/csup_cvsmode/contrib/csup/updater.c
==============================================================================
--- projects/csup_cvsmode/contrib/csup/updater.c	Sun Jan  4 15:56:49 2009	(r186740)
+++ projects/csup_cvsmode/contrib/csup/updater.c	Sun Jan  4 17:26:59 2009	(r186741)
@@ -613,7 +613,7 @@ updater_docoll(struct updater *up, struc
 				return (error);
 			break;
 		case 'I':
-			/* 
+			/*
 			 * Create directory and add DirDown entry in status
 			 * file.
 			 */
@@ -661,7 +661,7 @@ updater_docoll(struct updater *up, struc
 			}
 			break;
 		case 'J':
-			/* 
+			/*
 			 * Set attributes of directory and update DirUp entry in
 			 * status file.
 			 */
@@ -802,7 +802,8 @@ updater_docoll(struct updater *up, struc
 			name = proto_get_ascii(&line);
 			attr = proto_get_ascii(&line);
 			pos  = proto_get_ascii(&line);
-			if (name == NULL || attr == NULL || pos == NULL || line != NULL)
+			if (name == NULL || attr == NULL || pos == NULL ||
+			    line != NULL)
 				return (UPDATER_ERR_PROTO);
 			error = fup_prepare(fup, name, 0);
 			fup->temppath = tempname(fup->destpath);
@@ -1050,7 +1051,7 @@ updater_setdirattrs(struct updater *up, 
 		    fup->temppath, fup->destpath, strerror(errno));
 		return (UPDATER_ERR_MSG);
 	}
-	/* 
+	/*
 	 * Now, make sure they were set and record what was set in the status
 	 * file.
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901041726.n04HQxHj063796>