From MAILER-DAEMON Wed Dec 14 08:28:25 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Raosj-0004fU-7V
	for mharc-bug-diffutils@gnu.org; Wed, 14 Dec 2011 08:28:25 -0500
Received: from eggs.gnu.org ([140.186.70.92]:44020)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1Raosc-0004ea-4W
	for bug-diffutils@gnu.org; Wed, 14 Dec 2011 08:28:23 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RaosW-0005WT-Sd
	for bug-diffutils@gnu.org; Wed, 14 Dec 2011 08:28:17 -0500
Received: from mx.meyering.net ([88.168.87.75]:59770)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RaosW-0005WK-Lf
	for bug-diffutils@gnu.org; Wed, 14 Dec 2011 08:28:12 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id 71AA860075
	for <bug-diffutils@gnu.org>; Wed, 14 Dec 2011 14:28:11 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: bug-diffutils@gnu.org
Date: Wed, 14 Dec 2011 14:28:11 +0100
Message-ID: <87r507p9jo.fsf@rho.meyering.net>
Lines: 27
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Subject: [bug-diffutils] [PATCH] build: stop distributing gzip'd releases;
	xz is enough
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Dec 2011 13:28:23 -0000

FYI,

>From 439286a937c2ae02374e0389ed2ccd91240a8bd8 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 14 Dec 2011 14:27:28 +0100
Subject: [PATCH] build: stop distributing gzip'd releases;  xz is enough

* configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip.
---
 configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index a92d950..93aa791 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,7 +26,7 @@ AC_CONFIG_SRCDIR([src/diff.c])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])

-AM_INIT_AUTOMAKE([1.11 dist-xz color-tests parallel-tests])
+AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip color-tests parallel-tests])
 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.

 AC_CONFIG_HEADER([lib/config.h:lib/config.hin])
--
1.7.8.163.g9859a


From MAILER-DAEMON Wed Dec 14 09:57:16 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RaqGi-0003oX-Eg
	for mharc-bug-diffutils@gnu.org; Wed, 14 Dec 2011 09:57:16 -0500
Received: from eggs.gnu.org ([140.186.70.92]:46136)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RaqGX-0003mt-9U
	for bug-diffutils@gnu.org; Wed, 14 Dec 2011 09:57:14 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RaqGV-0002qK-HK
	for bug-diffutils@gnu.org; Wed, 14 Dec 2011 09:57:05 -0500
Received: from mx.meyering.net ([88.168.87.75]:60014)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jim@meyering.net>) id 1RaqGU-0002q8-TD
	for bug-diffutils@gnu.org; Wed, 14 Dec 2011 09:57:03 -0500
Received: from rho.meyering.net (localhost.localdomain [127.0.0.1])
	by rho.meyering.net (Acme Bit-Twister) with ESMTP id BB186600A3
	for <bug-diffutils@gnu.org>; Wed, 14 Dec 2011 15:57:01 +0100 (CET)
From: Jim Meyering <jim@meyering.net>
To: bug-diffutils@gnu.org
Date: Wed, 14 Dec 2011 15:57:01 +0100
Message-ID: <874nx3p5fm.fsf@rho.meyering.net>
Lines: 175
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 88.168.87.75
Subject: [bug-diffutils] [PATCH] build: update to latest gnulib and adapt
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 14 Dec 2011 14:57:14 -0000

I've updated to the latest gnulib and adapted to
the resulting increase in gcc warnings that are enabled
as well as to the addition of a syntax-check rule that
caught a reversed use of compare in one of the test scripts:

>From c88c3b6b2ae94bf5d72a04dd4fb797cb386fcb07 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 14 Dec 2011 14:28:47 +0100
Subject: [PATCH] build: update to latest gnulib and adapt

* tests/binary: Reverse arguments to compare to avoid failure of
new syntax-check rule.
* configure.ac: Use -Wno-format-nonliteral.
Mark functions as pure of const, per recommendations enabled by
new gcc -W options.  Use _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST.
* lib/cmpbuf.h (buffer_lcm, block_compare):
Apply pure and/or const attributes.
* src/cmp.c (block_compare): Likewise.
* src/context.c (find_hunk): Likewise.
* src/diff.h (lines_differ): Likewise.
* src/diff3.c (skipwhite): Likewise.
* src/dir.c (dir_loop): Likewise.
* src/util.c (find_change, find_reverse_change): Likewise.
(translate_line_number): Likewise.
---
 configure.ac  |    1 +
 gnulib        |    2 +-
 lib/cmpbuf.h  |    2 +-
 src/cmp.c     |    2 +-
 src/context.c |    2 +-
 src/diff.h    |    2 +-
 src/diff3.c   |    2 +-
 src/dir.c     |    2 +-
 src/util.c    |    6 +++---
 tests/binary  |    2 +-
 10 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index 93aa791..37fa430 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,6 +96,7 @@ if test "$gl_gcc_warnings" = yes; then
   gl_WARN_ADD([-Wno-sign-compare])     # Too many warnings for now
   gl_WARN_ADD([-Wno-pointer-sign])     # Too many warnings for now
   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
+  gl_WARN_ADD([-Wno-format-nonliteral])

   # In spite of excluding -Wlogical-op above, it is enabled, as of
   # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
diff --git a/gnulib b/gnulib
index 996ce97..443bc5f 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 996ce97a8f8572ae9bade6c7df1aa364bd0e259f
+Subproject commit 443bc5ffcf7429e557f4a371b0661abe98ddbc13
diff --git a/lib/cmpbuf.h b/lib/cmpbuf.h
index 2296766..c19c2bb 100644
--- a/lib/cmpbuf.h
+++ b/lib/cmpbuf.h
@@ -16,4 +16,4 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

 size_t block_read (int, char *, size_t);
-size_t buffer_lcm (size_t, size_t, size_t);
+size_t buffer_lcm (size_t, size_t, size_t) _GL_ATTRIBUTE_CONST;
diff --git a/src/cmp.c b/src/cmp.c
index 2620b0f..2aba127 100644
--- a/src/cmp.c
+++ b/src/cmp.c
@@ -51,7 +51,7 @@

 static int cmp (void);
 static off_t file_position (int);
-static size_t block_compare (word const *, word const *);
+static size_t block_compare (word const *, word const *) _GL_ATTRIBUTE_PURE;
 static size_t block_compare_and_count (word const *, word const *, off_t *);
 static void sprintc (char *, unsigned char);

diff --git a/src/context.c b/src/context.c
index 690506b..812e373 100644
--- a/src/context.c
+++ b/src/context.c
@@ -394,7 +394,7 @@ pr_unidiff_hunk (struct change *hunk)
    2*CONTEXT unchanged lines appear, and return a pointer
    to the `struct change' for the last change before those lines.  */

-static struct change *
+static struct change * _GL_ATTRIBUTE_PURE
 find_hunk (struct change *start)
 {
   struct change *prev;
diff --git a/src/diff.h b/src/diff.h
index 578c4ea..a64f0d3 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -361,7 +361,7 @@ extern void print_sdiff_script (struct change *);
 extern char const change_letter[4];
 extern char const pr_program[];
 extern char *concat (char const *, char const *, char const *);
-extern bool lines_differ (char const *, char const *);
+extern bool lines_differ (char const *, char const *) _GL_ATTRIBUTE_PURE;
 extern lin translate_line_number (struct file_data const *, lin);
 extern struct change *find_change (struct change *);
 extern struct change *find_reverse_change (struct change *);
diff --git a/src/diff3.c b/src/diff3.c
index 343c055..3f51fb9 100644
--- a/src/diff3.c
+++ b/src/diff3.c
@@ -1045,7 +1045,7 @@ process_diff (char const *filea,

 /* Skip tabs and spaces, and return the first character after them.  */

-static char *
+static char * _GL_ATTRIBUTE_PURE
 skipwhite (char *s)
 {
   while (*s == ' ' || *s == '\t')
diff --git a/src/dir.c b/src/dir.c
index 20626d1..45f2992 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -308,7 +308,7 @@ diff_dirs (struct comparison const *cmp,

 /* Return nonzero if CMP is looping recursively in argument I.  */

-static bool
+static bool _GL_ATTRIBUTE_PURE
 dir_loop (struct comparison const *cmp, int i)
 {
   struct comparison const *p = cmp;
diff --git a/src/util.c b/src/util.c
index 5808434..2e15cdb 100644
--- a/src/util.c
+++ b/src/util.c
@@ -477,13 +477,13 @@ lines_differ (char const *s1, char const *s2)
 /* Find the consecutive changes at the start of the script START.
    Return the last link before the first gap.  */

-struct change *
+struct change * _GL_ATTRIBUTE_CONST
 find_change (struct change *start)
 {
   return start;
 }

-struct change *
+struct change * _GL_ATTRIBUTE_CONST
 find_reverse_change (struct change *start)
 {
   return start;
@@ -635,7 +635,7 @@ char const change_letter[] = { 0, 'd', 'a', 'c' };
    Internal line numbers count from 0 starting after the prefix.
    Actual line numbers count from 1 within the entire file.  */

-lin
+lin _GL_ATTRIBUTE_PURE
 translate_line_number (struct file_data const *file, lin i)
 {
   return i + file->prefix_lines + 1;
diff --git a/tests/binary b/tests/binary
index 02c71a3..d7b3943 100755
--- a/tests/binary
+++ b/tests/binary
@@ -11,7 +11,7 @@ printf '\0'|diff - /dev/null > out 2> err

 # diff must exit with status 2, stdout as above, and no stderr.
 test $? = 2 || fail=1
-compare out out-exp || fail=1
+compare out-exp out || fail=1
 compare /dev/null err || fail=1

 Exit $fail
--
1.7.8.163.g9859a


From MAILER-DAEMON Fri Dec 16 02:17:43 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RbS35-0006zL-9b
	for mharc-bug-diffutils@gnu.org; Fri, 16 Dec 2011 02:17:43 -0500
Received: from eggs.gnu.org ([140.186.70.92]:58010)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <starlight@binnacle.cx>) id 1RbGBI-0000EJ-Md
	for bug-diffutils@gnu.org; Thu, 15 Dec 2011 13:37:25 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <starlight@binnacle.cx>) id 1RbGBH-0004LN-J0
	for bug-diffutils@gnu.org; Thu, 15 Dec 2011 13:37:24 -0500
Received: from mx.binnacle.cx ([74.95.187.105]:17505)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <starlight@binnacle.cx>) id 1RbGBH-0004L2-FW
	for bug-diffutils@gnu.org; Thu, 15 Dec 2011 13:37:23 -0500
Received: from CIANNAIT.binnacle.cx (ciannait [172.29.87.10])
	by mx.binnacle.cx (envelope-from <starlight@binnacle.cx>)
	(8.14.4/8.14.4) with ESMTP id pBFIbJc9028141
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <bug-diffutils@gnu.org>; Thu, 15 Dec 2011 13:37:22 -0500
Message-Id: <6.2.5.6.2.20111215131709.03a1fda0@flumedata.com>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.5.6
Date: Thu, 15 Dec 2011 13:27:40 -0500
To: bug-diffutils@gnu.org
From: starlight@binnacle.cx
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Received-SPF: pass (mx.binnacle.cx: 172.29.87.10 is whitelisted by SPF-milter
	whitelist entry)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.95.187.105
X-Mailman-Approved-At: Fri, 16 Dec 2011 02:17:41 -0500
Subject: [bug-diffutils] "detuning" diff
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Dec 2011 18:37:25 -0000

Hello,

Have a request for a feature or direction on
a possible local hack for 'diff'.

Years ago an ancient minicomputer utility
'scmp' had an excellent feature that I sorely
miss.

One could specify the minimum size block of
text in lines to be considered when comparing
two file.  It was something like

   scmp --minimum-block=15 <file1> <file2>

What this did was cause the comparison to show
less granular differences.  It was great for
seeing a clearer picture of changes.  In
particular a major reworking of a function
could be made to show up as just a single
delete and replace.  I compare source code
changes while working and often have to resort
to side-by-side viewing with 'emacs' because
'diff' generates output that is unintelligible.

Is such an enhancement conceivable with the
present algorithm?  If so would it be simple
enough for a quick-n-dirty local hack?  The
--minimal option vaguely implies the possibility,
but the code is not trivial to understand and
perusing it briefly was unilluminating.

Please note that I am familiar with the
--context option and this is definitely
not what I'm talking about.

Thanks



From MAILER-DAEMON Fri Dec 16 02:17:43 2011
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1RbS35-0006zk-Cq
	for mharc-bug-diffutils@gnu.org; Fri, 16 Dec 2011 02:17:43 -0500
Received: from eggs.gnu.org ([140.186.70.92]:36460)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <starlight@binnacle.cx>) id 1RbIkK-0005R9-H7
	for bug-diffutils@gnu.org; Thu, 15 Dec 2011 16:21:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <starlight@binnacle.cx>) id 1RbIkI-0006Dq-Vo
	for bug-diffutils@gnu.org; Thu, 15 Dec 2011 16:21:44 -0500
Received: from mx.binnacle.cx ([74.95.187.105]:48565)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <starlight@binnacle.cx>) id 1RbIkI-0006DZ-SV
	for bug-diffutils@gnu.org; Thu, 15 Dec 2011 16:21:42 -0500
Received: from CIANNAIT.binnacle.cx (ciannait [172.29.87.10])
	by mx.binnacle.cx (envelope-from <starlight@binnacle.cx>)
	(8.14.4/8.14.4) with ESMTP id pBFLLeYD029060
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <bug-diffutils@gnu.org>; Thu, 15 Dec 2011 16:21:41 -0500
Message-Id: <6.2.5.6.2.20111215162137.03a21da8@binnacle.cx>
X-Mailer: QUALCOMM Windows Eudora Version 6.2.5.6
Date: Thu, 15 Dec 2011 16:21:39 -0500
To: bug-diffutils@gnu.org
From: starlight@binnacle.cx
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Received-SPF: pass (mx.binnacle.cx: 172.29.87.10 is whitelisted by SPF-milter
	whitelist entry)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 74.95.187.105
X-Mailman-Approved-At: Fri, 16 Dec 2011 02:17:42 -0500
Subject: [bug-diffutils] "detuning" diff
X-BeenThere: bug-diffutils@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
	<mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Dec 2011 21:21:46 -0000

Hello,

Have a request for a feature or direction on
a possible local hack for 'diff'.

Years ago an ancient minicomputer utility
'scmp' had an excellent feature that I sorely
miss.

One could specify the minimum size block of
text in lines to be considered when comparing
two file.  It was something like

   scmp --minimum-block=15 <file1> <file2>

What this did was cause the comparison to show
less granular differences.  It was great for
seeing a clearer picture of changes.  In
particular a major reworking of a function
could be made to show up as just a single
delete and replace.  I compare source code
changes while working and often have to resort
to side-by-side viewing with 'emacs' because
'diff' generates output that is unintelligible.

Is such an enhancement conceivable with the
present algorithm?  If so would it be simple
enough for a quick-n-dirty local hack?  The
--minimal option vaguely implies the possibility,
but the code is not trivial to understand and
perusing it briefly was unilluminating.

Please note that I am familiar with the
--context option and this is definitely
not what I'm talking about.

Thanks



