Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jun 2012 22:18:56 +0000
From:      jhagewood@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r238293 - in soc2012/jhagewood/diff: . diff
Message-ID:  <20120625221856.811B8106566C@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhagewood
Date: Mon Jun 25 22:18:55 2012
New Revision: 238293
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238293

Log:

Modified:
  soc2012/jhagewood/diff/TODO
  soc2012/jhagewood/diff/diff/diff.c
  soc2012/jhagewood/diff/hagewood-diff.patch

Modified: soc2012/jhagewood/diff/TODO
==============================================================================
--- soc2012/jhagewood/diff/TODO	Mon Jun 25 21:56:36 2012	(r238292)
+++ soc2012/jhagewood/diff/TODO	Mon Jun 25 22:18:55 2012	(r238293)
@@ -3,7 +3,7 @@
 --unified GNU compatibility		COMPLETE		Fixed timestamp.		
 --context GNU compatibility		COMPLETE		Fixed timestamp, will test more.
 --ignore-blank-lines			IN PROGRESS		Was already implemented in check(), but has weird outputs.
---left-column				INCOMPLETE
+--left-column				COMPLETE		Because side-by-side mode is executed by sdiff, option is simply passed to sdiff.
 --show-function-line			INCOMPLETE
 --unidirectional-new-file		INCOMPLETE
 --normal				COMPLETE		Sets format to D_NORMAL in getopt_long().

Modified: soc2012/jhagewood/diff/diff/diff.c
==============================================================================
--- soc2012/jhagewood/diff/diff/diff.c	Mon Jun 25 21:56:36 2012	(r238292)
+++ soc2012/jhagewood/diff/diff/diff.c	Mon Jun 25 22:18:55 2012	(r238293)
@@ -110,7 +110,7 @@
 	{ "ignore-tab-expansion",	no_argument,		NULL,	'E' },
 	{ "initial-tab",		no_argument,		NULL,	'T' },
 	{ "label",			required_argument,	NULL,	'L' },
-	/*{ "left-column",		no_argument,		NULL,	OPT_LEFTC },*/
+	{ "left-column",		no_argument,		NULL,	OPT_LEFTC },
 	{ "line-format",		required_argument,	NULL,	OPT_LF },
 	/*{ "LTYPE-line-format",		required_argument,	NULL,	OPT_LLF },*/
 	{ "minimal",			no_argument,		NULL,	'd' },
@@ -311,6 +311,9 @@
 		case OPT_NORMAL:
 			format = D_NORMAL;
 			break;
+		case OPT_LEFTC:
+			/* Do nothing, passes option to sdiff. */
+			break;
 		case OPT_SUPCL:
 			/* Do nothing, passes option to sdiff. */
 			break;

Modified: soc2012/jhagewood/diff/hagewood-diff.patch
==============================================================================
--- soc2012/jhagewood/diff/hagewood-diff.patch	Mon Jun 25 21:56:36 2012	(r238292)
+++ soc2012/jhagewood/diff/hagewood-diff.patch	Mon Jun 25 22:18:55 2012	(r238293)
@@ -1,6 +1,6 @@
 diff -rupN jhagewood/diff/diff-orig/diff.c jhagewood/diff/diff/diff.c
 --- jhagewood/diff/diff-orig/diff.c	2012-06-25 16:05:53.000000000 -0400
-+++ jhagewood/diff/diff/diff.c	2012-06-25 21:52:27.000000000 -0400
++++ jhagewood/diff/diff/diff.c	2012-06-25 22:18:49.000000000 -0400
 @@ -1,4 +1,4 @@
 -/*-
 +/*
@@ -135,7 +135,7 @@
 +	{ "initial-tab",		no_argument,		NULL,	'T' },
  	{ "label",			required_argument,	NULL,	'L' },
 -	{ "paginate",			no_argument,		NULL,	'l' },
-+	/*{ "left-column",		no_argument,		NULL,	OPT_LEFTC },*/
++	{ "left-column",		no_argument,		NULL,	OPT_LEFTC },
 +	{ "line-format",		required_argument,	NULL,	OPT_LF },
 +	/*{ "LTYPE-line-format",		required_argument,	NULL,	OPT_LLF },*/
 +	{ "minimal",			no_argument,		NULL,	'd' },
@@ -213,7 +213,7 @@
  		case 'e':
  			format = D_EDIT;
  			break;
-@@ -296,15 +300,29 @@ main(int argc, char **argv)
+@@ -296,15 +300,32 @@ main(int argc, char **argv)
  		case 'y':
  			yflag = 1;
  			break;
@@ -228,6 +228,9 @@
 +		case OPT_NORMAL:
 +			format = D_NORMAL;
 +			break;
++		case OPT_LEFTC:
++			/* Do nothing, passes option to sdiff. */
++			break;
 +		case OPT_SUPCL:
 +			/* Do nothing, passes option to sdiff. */
 +			break;
@@ -251,7 +254,7 @@
  		case OPT_STRIPCR:
  			strip_cr=1;
  			break;
-@@ -332,16 +350,15 @@ main(int argc, char **argv)
+@@ -332,16 +353,15 @@ main(int argc, char **argv)
  	argc -= optind;
  	argv += optind;
  
@@ -271,7 +274,7 @@
  		execv(_PATH_SDIFF, oargv);
  		_exit(127);
  	}
-@@ -380,7 +397,10 @@ main(int argc, char **argv)
+@@ -380,7 +400,10 @@ main(int argc, char **argv)
  	set_argstr(oargv, argv);
  	if (S_ISDIR(stb1.st_mode) && S_ISDIR(stb2.st_mode)) {
  		if (format == D_IFDEF)
@@ -283,7 +286,7 @@
  		diffdir(argv[0], argv[1]);
  	} else {
  		if (S_ISDIR(stb1.st_mode)) {
-@@ -402,11 +422,10 @@ main(int argc, char **argv)
+@@ -402,11 +425,10 @@ main(int argc, char **argv)
  void *
  emalloc(size_t n)
  {
@@ -296,7 +299,7 @@
  	if ((p = malloc(n)) == NULL)
  		errx(2, NULL);
  	return (p);
-@@ -415,7 +434,7 @@ emalloc(size_t n)
+@@ -415,7 +437,7 @@ emalloc(size_t n)
  void *
  erealloc(void *p, size_t n)
  {
@@ -305,7 +308,7 @@
  
  	if (n == 0)
  		errx(2, NULL);
-@@ -431,13 +450,12 @@ erealloc(void *p, size_t n)
+@@ -431,13 +453,12 @@ erealloc(void *p, size_t n)
  int
  easprintf(char **ret, const char *fmt, ...)
  {
@@ -321,7 +324,7 @@
  	if (len < 0 || *ret == NULL)
  		errx(2, NULL);
  	return (len);
-@@ -446,11 +464,12 @@ easprintf(char **ret, const char *fmt, .
+@@ -446,11 +467,12 @@ easprintf(char **ret, const char *fmt, .
  char *
  estrdup(const char *str)
  {
@@ -336,7 +339,7 @@
  	strlcpy(cp, str, len);
  	return (cp);
  }
-@@ -531,6 +550,7 @@ push_ignore_pats(char *pattern)
+@@ -531,6 +553,7 @@ push_ignore_pats(char *pattern)
  void
  print_only(const char *path, size_t dirlen, const char *entry)
  {
@@ -344,7 +347,7 @@
  	if (dirlen > 1)
  		dirlen--;
  	printf("Only in %.*s: %s\n", (int)dirlen, path, entry);
-@@ -539,45 +559,46 @@ print_only(const char *path, size_t dirl
+@@ -539,45 +562,46 @@ print_only(const char *path, size_t dirl
  void
  print_status(int val, char *path1, char *path2, char *entry)
  {
@@ -402,7 +405,7 @@
  		break;
  	}
  }
-@@ -585,6 +606,7 @@ print_status(int val, char *path1, char 
+@@ -585,6 +609,7 @@ print_status(int val, char *path1, char 
  void
  usage(void)
  {



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