socsvn commit: r237921 - in soc2012/jhagewood/diff: . diff
jhagewood at FreeBSD.org
jhagewood at FreeBSD.org
Tue Jun 19 03:47:28 UTC 2012
Author: jhagewood
Date: Tue Jun 19 03:47:25 2012
New Revision: 237921
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=237921
Log:
Modified:
soc2012/jhagewood/diff/diff/diffreg.c
soc2012/jhagewood/diff/hagewood-diff.patch
Modified: soc2012/jhagewood/diff/diff/diffreg.c
==============================================================================
--- soc2012/jhagewood/diff/diff/diffreg.c Tue Jun 19 03:09:41 2012 (r237920)
+++ soc2012/jhagewood/diff/diff/diffreg.c Tue Jun 19 03:47:25 2012 (r237921)
@@ -786,6 +786,7 @@
}
ctold++;
ctnew++;
+ /* ignore-space-change */
if (bflag && isspace(c) && isspace(d)) {
do {
if (c == '\n')
@@ -797,6 +798,7 @@
break;
ctnew++;
} while (isspace(d = getc(f2)));
+ /* ignore-all-space */
} else if (wflag) {
while (isspace(c) && c != '\n') {
c = getc(f1);
@@ -806,7 +808,7 @@
d = getc(f2);
ctnew++;
}
-
+ /* ignore-blank-lines */
} else if (Bflag) {
if (c == '\n' && d != '\n') {
do {
@@ -827,21 +829,19 @@
break;
/* ignore-tab-expansion */
} else if (Eflag) {
- if (isspace(c) && isspace(d)) {
- if (d == '\t') {
- do {
- if (c != ' ')
- break;
- ctold++;
- } while (isspace(c = getc(f1)));
- }
- }
- if (c == '\t') {
- do {
- if (d != ' ')
- break;
- ctnew++;
- } while (isspace(d = getc(f2)));
+ if (isspace(c) && isspace(d)) {
+ if (d == '\t') {
+ while (c == ' ') {
+ c = getc(f1);
+ ctold++;
+ }
+ }
+ if (c == '\t') {
+ while (d == ' ') {
+ d = getc(f2);
+ ctnew++;
+ }
+ }
}
}
if (chrtran[c] != chrtran[d]) {
Modified: soc2012/jhagewood/diff/hagewood-diff.patch
==============================================================================
--- soc2012/jhagewood/diff/hagewood-diff.patch Tue Jun 19 03:09:41 2012 (r237920)
+++ soc2012/jhagewood/diff/hagewood-diff.patch Tue Jun 19 03:47:25 2012 (r237921)
@@ -123,7 +123,7 @@
extern int format, context, status;
diff -rupN jhagewood/diff/diff-orig/diffreg.c jhagewood/diff/diff/diffreg.c
--- jhagewood/diff/diff-orig/diffreg.c 2012-06-18 03:07:38.000000000 -0400
-+++ jhagewood/diff/diff/diffreg.c 2012-06-19 03:08:39.000000000 -0400
++++ jhagewood/diff/diff/diffreg.c 2012-06-19 03:46:25.000000000 -0400
@@ -90,6 +90,12 @@ __FBSDID("$FreeBSD");
#include "diff.h"
#include "pathnames.h"
@@ -165,9 +165,28 @@
for (;;) {
c = getc(f1);
d = getc(f2);
-@@ -803,29 +808,42 @@ check(char *file1, FILE *f1, char *file2
+@@ -781,6 +786,7 @@ check(char *file1, FILE *f1, char *file2
+ }
+ ctold++;
+ ctnew++;
++ /* ignore-space-change */
+ if (bflag && isspace(c) && isspace(d)) {
+ do {
+ if (c == '\n')
+@@ -792,6 +798,7 @@ check(char *file1, FILE *f1, char *file2
+ break;
+ ctnew++;
+ } while (isspace(d = getc(f2)));
++ /* ignore-all-space */
+ } else if (wflag) {
+ while (isspace(c) && c != '\n') {
+ c = getc(f1);
+@@ -801,31 +808,42 @@ check(char *file1, FILE *f1, char *file2
+ d = getc(f2);
+ ctnew++;
}
-
+-
++ /* ignore-blank-lines */
} else if (Bflag) {
- if( c == '\n' && d != '\n') {
-
@@ -193,23 +212,22 @@
}
-
break;
+- }
+ /* ignore-tab-expansion */
+ } else if (Eflag) {
-+ if (isspace(c) && isspace(d)) {
-+ if (d == '\t') {
-+ do {
-+ if (c != ' ')
-+ break;
-+ ctold++;
-+ } while (isspace(c = getc(f1)));
-+ }
- }
-+ if (c == '\t') {
-+ do {
-+ if (d != ' ')
-+ break;
-+ ctnew++;
-+ } while (isspace(d = getc(f2)));
++ if (isspace(c) && isspace(d)) {
++ if (d == '\t') {
++ while (c == ' ') {
++ c = getc(f1);
++ ctold++;
++ }
++ }
++ if (c == '\t') {
++ while (d == ' ') {
++ d = getc(f2);
++ ctnew++;
++ }
++ }
+ }
+ }
if (chrtran[c] != chrtran[d]) {
More information about the svn-soc-all
mailing list