[diffutils/f18] Fixed i18n handling of 'diff -E' (bug #914666).
Tim Waugh
twaugh at fedoraproject.org
Fri Feb 22 14:27:30 UTC 2013
commit 3f1ab3a398eb0d57745ca647432806617688d4bb
Author: Tim Waugh <twaugh at redhat.com>
Date: Fri Feb 22 14:11:11 2013 +0000
Fixed i18n handling of 'diff -E' (bug #914666).
Resolves: rhbz#914666
diffutils-3.2-i18n.patch | 18 +++++++++++-------
diffutils.spec | 5 ++++-
2 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/diffutils-3.2-i18n.patch b/diffutils-3.2-i18n.patch
index 07bbd47..2d1eeb2 100644
--- a/diffutils-3.2-i18n.patch
+++ b/diffutils-3.2-i18n.patch
@@ -1,6 +1,6 @@
diff -up diffutils-3.2/src/diff.c.i18n diffutils-3.2/src/diff.c
--- diffutils-3.2/src/diff.c.i18n 2011-08-15 06:24:38.000000000 +0100
-+++ diffutils-3.2/src/diff.c 2012-10-26 18:14:22.112521391 +0100
++++ diffutils-3.2/src/diff.c 2012-10-26 18:23:47.495735160 +0100
@@ -73,6 +73,8 @@ static void try_help (char const *, char
static void check_stdout (void);
static void usage (void);
@@ -26,7 +26,7 @@ diff -up diffutils-3.2/src/diff.c.i18n diffutils-3.2/src/diff.c
while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
diff -up diffutils-3.2/src/diff.h.i18n diffutils-3.2/src/diff.h
--- diffutils-3.2/src/diff.h.i18n 2011-08-15 06:25:26.000000000 +0100
-+++ diffutils-3.2/src/diff.h 2012-10-26 18:14:22.112521391 +0100
++++ diffutils-3.2/src/diff.h 2012-10-26 18:23:47.495735160 +0100
@@ -23,6 +23,17 @@
#include <stdio.h>
#include <unlocked-io.h>
@@ -60,7 +60,7 @@ diff -up diffutils-3.2/src/diff.h.i18n diffutils-3.2/src/diff.h
extern struct change *find_reverse_change (struct change *);
diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
--- diffutils-3.2/src/io.c.i18n 2011-08-15 06:24:38.000000000 +0100
-+++ diffutils-3.2/src/io.c 2012-10-26 18:14:22.113521396 +0100
++++ diffutils-3.2/src/io.c 2013-02-22 14:05:48.700990339 +0000
@@ -22,6 +22,7 @@
#include <cmpbuf.h>
#include <file-type.h>
@@ -98,7 +98,7 @@ diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
static void
find_and_hash_each_line (struct file_data *current)
-@@ -220,12 +243,298 @@ find_and_hash_each_line (struct file_dat
+@@ -220,12 +243,302 @@ find_and_hash_each_line (struct file_dat
bool same_length_diff_contents_compare_anyway =
diff_length_compare_anyway | ig_case;
@@ -295,7 +295,11 @@ diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
+ break;
+
+ case L'\t':
-+ wc = L' ';
++ mbc[0] = ' ';
++ mblength = 1;
++ flag = 1;
++ p++;
++ assert(mblength == 1);
+ repetitions = tabsize - column % tabsize;
+ column = (column + repetitions < column
+ ? 0
@@ -397,7 +401,7 @@ diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
/* Hash this line until we find a newline. */
switch (ig_white_space)
{
-@@ -376,7 +685,7 @@ find_and_hash_each_line (struct file_dat
+@@ -376,7 +689,7 @@ find_and_hash_each_line (struct file_dat
else if (!diff_length_compare_anyway)
continue;
@@ -408,7 +412,7 @@ diff -up diffutils-3.2/src/io.c.i18n diffutils-3.2/src/io.c
diff -up diffutils-3.2/src/util.c.i18n diffutils-3.2/src/util.c
--- diffutils-3.2/src/util.c.i18n 2011-08-15 06:24:38.000000000 +0100
-+++ diffutils-3.2/src/util.c 2012-10-26 18:22:32.911448447 +0100
++++ diffutils-3.2/src/util.c 2012-10-26 18:23:47.496735164 +0100
@@ -317,7 +317,8 @@ finish_output (void)
Return nonzero if the lines differ. */
diff --git a/diffutils.spec b/diffutils.spec
index 68c2de9..998d3c0 100644
--- a/diffutils.spec
+++ b/diffutils.spec
@@ -1,7 +1,7 @@
Summary: A GNU collection of diff utilities
Name: diffutils
Version: 3.2
-Release: 11%{?dist}
+Release: 12%{?dist}
Group: Applications/Text
URL: http://www.gnu.org/software/diffutils/diffutils.html
Source: ftp://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz
@@ -75,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
%{_infodir}/diffutils.info*gz
%changelog
+* Fri Feb 22 2013 Tim Waugh <twaugh at redhat.com> 3.2-12
+- Fixed i18n handling of 'diff -E' (bug #914666).
+
* Fri Oct 26 2012 Tim Waugh <twaugh at redhat.com> 3.2-11
- Ported i18n patch and reinstated it (bug #870460).
More information about the scm-commits
mailing list