svn commit: r310641 - user/bapt/diff
Baptiste Daroussin
bapt at FreeBSD.org
Tue Dec 27 21:16:09 UTC 2016
Author: bapt
Date: Tue Dec 27 21:16:08 2016
New Revision: 310641
URL: https://svnweb.freebsd.org/changeset/base/310641
Log:
Backout diff -B implementation for SoC is too broken
Modified:
user/bapt/diff/diff.c
user/bapt/diff/diff.h
user/bapt/diff/diffreg.c
Modified: user/bapt/diff/diff.c
==============================================================================
--- user/bapt/diff/diff.c Tue Dec 27 21:11:54 2016 (r310640)
+++ user/bapt/diff/diff.c Tue Dec 27 21:16:08 2016 (r310641)
@@ -55,7 +55,6 @@ enum {
static struct option longopts[] = {
{ "text", no_argument, 0, 'a' },
{ "ignore-space-change", no_argument, 0, 'b' },
- { "ignore-blank-lines", no_argument, NULL, 'B' },
{ "context", optional_argument, 0, 'C' },
{ "ifdef", required_argument, 0, 'D' },
{ "minimal", no_argument, 0, 'd' },
@@ -123,9 +122,6 @@ main(int argc, char **argv)
case 'b':
dflags |= D_FOLDBLANKS;
break;
- case 'B':
- dflags |= D_IGNOREBLANKLINES;
- break;
case 'C':
case 'c':
diff_format = D_CONTEXT;
Modified: user/bapt/diff/diff.h
==============================================================================
--- user/bapt/diff/diff.h Tue Dec 27 21:11:54 2016 (r310640)
+++ user/bapt/diff/diff.h Tue Dec 27 21:16:08 2016 (r310641)
@@ -65,7 +65,6 @@
#define D_PROTOTYPE 0x080 /* Display C function prototype */
#define D_EXPANDTABS 0x100 /* Expand tabs to spaces */
#define D_IGNOREBLANKS 0x200 /* Ignore white space changes */
-#define D_IGNOREBLANKLINES 0x400 /* Ignore blank lines changes */
/*
* Status values for print_status() and diffreg() return values
Modified: user/bapt/diff/diffreg.c
==============================================================================
--- user/bapt/diff/diffreg.c Tue Dec 27 21:11:54 2016 (r310640)
+++ user/bapt/diff/diffreg.c Tue Dec 27 21:16:08 2016 (r310641)
@@ -770,7 +770,7 @@ check(FILE *f1, FILE *f2, int flags)
ixnew[j] = ctnew += skipline(f2);
j++;
}
- if (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE|D_IGNOREBLANKLINES)) {
+ if (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNORECASE)) {
for (;;) {
c = getc(f1);
d = getc(f2);
@@ -778,7 +778,7 @@ check(FILE *f1, FILE *f2, int flags)
* GNU diff ignores a missing newline
* in one file for -b or -w.
*/
- if (flags & (D_FOLDBLANKS|D_IGNOREBLANKS|D_IGNOREBLANKLINES)) {
+ if (flags & (D_FOLDBLANKS|D_IGNOREBLANKS)) {
if (c == EOF && d == '\n') {
ctnew++;
break;
@@ -810,15 +810,6 @@ check(FILE *f1, FILE *f2, int flags)
d = getc(f2);
ctnew++;
}
- } else if (flags & D_IGNOREBLANKLINES) {
- while (isspace(c) && c == '\n') {
- c = getc(f1);
- ctold++;
- }
- while (isspace(d) && d == '\n') {
- d = getc(f2);
- ctnew++;
- }
}
if (chrtran[c] != chrtran[d]) {
jackpot++;
More information about the svn-src-user
mailing list