From owner-svn-src-user@freebsd.org Tue Dec 27 21:16:09 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4CE0C9366F for ; Tue, 27 Dec 2016 21:16:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 95C1A177F; Tue, 27 Dec 2016 21:16:09 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBRLG8HC001475; Tue, 27 Dec 2016 21:16:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBRLG81i001472; Tue, 27 Dec 2016 21:16:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201612272116.uBRLG81i001472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Tue, 27 Dec 2016 21:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r310641 - user/bapt/diff X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2016 21:16:09 -0000 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++;