socsvn commit: r237336 - in soc2012/jhagewood/diff3: . diff3

jhagewood at FreeBSD.org jhagewood at FreeBSD.org
Sat Jun 9 04:18:18 UTC 2012


Author: jhagewood
Date: Sat Jun  9 04:18:15 2012
New Revision: 237336
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237336

Log:

Modified:
  soc2012/jhagewood/diff3/diff3/diff3prog.c
  soc2012/jhagewood/diff3/hagewood-diff3.patch

Modified: soc2012/jhagewood/diff3/diff3/diff3prog.c
==============================================================================
--- soc2012/jhagewood/diff3/diff3/diff3prog.c	Sat Jun  9 03:34:34 2012	(r237335)
+++ soc2012/jhagewood/diff3/diff3/diff3prog.c	Sat Jun  9 04:18:15 2012	(r237336)
@@ -231,7 +231,7 @@
 			oflag = eflag = 1;
 			break;
 		case 'v':
-			printf("FreeBSD diff3 %s\n" __version);
+			printf("FreeBSD diff3 %s\n", __version);
 			exit(0);
 		case 'x':
 			eflag = 1;
@@ -255,8 +255,7 @@
 	/* XXX - argc usage seems wrong here */
 	if (argc < 5) {
 		usage();
-		try_help();
-	}
+	} 
 
 	if (oflag) {
 		(void)snprintf(f1mark, sizeof(f1mark), "<<<<<<< %s",
@@ -534,9 +533,7 @@
 	(void)skip(i, rold->to, "  ");
 }
 
-/*
- * print the range of line numbers, rold.from thru rold.to, as n1,n2 or n1
- */
+/* print the range of line numbers, rold.from thru rold.to, as n1,n2 or n1 */
 void
 prange(struct range *rold)
 {
@@ -630,9 +627,7 @@
 		(void)fseek(fp[i], (long)-nchar, SEEK_CUR);
 }
 
-/* 
- * If file has trailing carriage return, remove it. 
- */
+/* If file has trailing carriage return, remove it. */
 void
 remove_cr(FILE *f) {
 	
@@ -649,7 +644,7 @@
 		}
 	}
 	
-	if (tcr_pos != NULL) {
+	if (&tcr_pos != NULL) {
 		fsetpos(f, &tcr_pos);
 		fputc((int)'\0', f);
 	}

Modified: soc2012/jhagewood/diff3/hagewood-diff3.patch
==============================================================================
--- soc2012/jhagewood/diff3/hagewood-diff3.patch	Sat Jun  9 03:34:34 2012	(r237335)
+++ soc2012/jhagewood/diff3/hagewood-diff3.patch	Sat Jun  9 04:18:15 2012	(r237336)
@@ -11,7 +11,7 @@
  .include <bsd.prog.mk>
 diff -rupN jhagewood/diff3/diff3-orig/diff3prog.c jhagewood/diff3/diff3/diff3prog.c
 --- jhagewood/diff3/diff3-orig/diff3prog.c	2012-06-07 05:12:54.000000000 -0400
-+++ jhagewood/diff3/diff3/diff3prog.c	2012-06-09 03:49:17.000000000 -0400
++++ jhagewood/diff3/diff3/diff3prog.c	2012-06-09 04:18:03.000000000 -0400
 @@ -64,24 +64,34 @@
   *	@(#)diff3.c	8.1 (Berkeley) 6/6/93
   */
@@ -104,7 +104,7 @@
  			oflag = eflag = 1;
  			break;
 +		case 'v':
-+			printf("FreeBSD diff3 %s\n" __version);
++			printf("FreeBSD diff3 %s\n", __version);
 +			exit(0);
  		case 'x':
  			eflag = 1;
@@ -118,19 +118,18 @@
  		case STRIPCR_OPT:
  			strip_cr = 1;
  			break;
-@@ -233,8 +253,10 @@ main(int argc, char **argv)
+@@ -233,8 +253,9 @@ main(int argc, char **argv)
  	argc -= optind;
  	argv += optind;
  	/* XXX - argc usage seems wrong here */
 -	if (argc < 5)
 +	if (argc < 5) {
  		usage();
-+		try_help();
-+	}
++	} 
  
  	if (oflag) {
  		(void)snprintf(f1mark, sizeof(f1mark), "<<<<<<< %s",
-@@ -254,6 +276,8 @@ main(int argc, char **argv)
+@@ -254,6 +275,8 @@ main(int argc, char **argv)
  	for (i = 0; i <= 2; i++) {
  		if ((fp[i] = fopen(argv[i + 2], "r")) == NULL)
  			err(EXIT_FAILURE, "can't open %s", argv[i + 2]);
@@ -139,13 +138,22 @@
  	}
  	merge(m, n);
  	exit(EXIT_SUCCESS);
-@@ -606,6 +630,32 @@ repos(int nchar)
+@@ -510,9 +533,7 @@ change(int i, struct range *rold, int du
+ 	(void)skip(i, rold->to, "  ");
+ }
+ 
+-/*
+- * print the range of line numbers, rold.from thru rold.to, as n1,n2 or n1
+- */
++/* print the range of line numbers, rold.from thru rold.to, as n1,n2 or n1 */
+ void
+ prange(struct range *rold)
+ {
+@@ -606,6 +627,30 @@ repos(int nchar)
  		(void)fseek(fp[i], (long)-nchar, SEEK_CUR);
  }
  
-+/* 
-+ * If file has trailing carriage return, remove it. 
-+ */
++/* If file has trailing carriage return, remove it. */
 +void
 +remove_cr(FILE *f) {
 +	
@@ -162,7 +170,7 @@
 +		}
 +	}
 +	
-+	if (tcr_pos != NULL) {
++	if (&tcr_pos != NULL) {
 +		fsetpos(f, &tcr_pos);
 +		fputc((int)'\0', f);
 +	}
@@ -172,7 +180,7 @@
  __dead void
  trouble(void)
  {
-@@ -698,13 +748,30 @@ increase(void)
+@@ -698,13 +743,30 @@ increase(void)
  	szchanges = newsz;
  }
  


More information about the svn-soc-all mailing list