Fix output of "diff -l -y" for non-ASCII input files
This commit is contained in:
parent
2b29d95c6c
commit
96115b78aa
@ -0,0 +1,27 @@
|
||||
From cb52fa88d5f2d9bc4894a7eccd90fdc2e03f5af4 Mon Sep 17 00:00:00 2001
|
||||
From: Bruno Haible <bruno@clisp.org>
|
||||
Date: Tue, 4 Jul 2023 18:45:33 +0200
|
||||
Subject: [PATCH] diff: Fix output of "diff -l -y" for non-ASCII input files
|
||||
|
||||
* src/side.c (print_half_line): Output the multibyte character to out,
|
||||
not stdout.
|
||||
---
|
||||
src/side.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/side.c b/src/side.c
|
||||
index 2f566f8..46ef095 100644
|
||||
--- a/src/side.c
|
||||
+++ b/src/side.c
|
||||
@@ -146,7 +146,7 @@ print_half_line (char const *const *line, intmax_t indent, intmax_t out_bound)
|
||||
if (in_position <= out_bound)
|
||||
{
|
||||
out_position = in_position;
|
||||
- fwrite (tp0, 1, bytes, stdout);
|
||||
+ fwrite (tp0, 1, bytes, out);
|
||||
}
|
||||
text_pointer = tp0 + bytes;
|
||||
break;
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,10 +1,11 @@
|
||||
Summary: GNU collection of diff utilities
|
||||
Name: diffutils
|
||||
Version: 3.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
URL: https://www.gnu.org/software/diffutils/diffutils.html
|
||||
Source: https://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz
|
||||
Patch0: diffutils-i18n.patch
|
||||
Patch1: 0001-diff-Fix-output-of-diff-l-y-for-non-ASCII-input-file.patch
|
||||
License: GPL-3.0-or-later
|
||||
Provides: bundled(gnulib)
|
||||
BuildRequires: gcc
|
||||
@ -29,6 +30,7 @@ Install diffutils if you need to compare text files.
|
||||
%setup -q
|
||||
# Multibyte
|
||||
%patch -P0 -p1 -b .i18n
|
||||
%patch -P1 -p1 -b .fix-output-of-diff-l-y-for-non-ASCII-input-file
|
||||
|
||||
# Run autoreconf for aarch64 support (bug #925256).
|
||||
autoreconf
|
||||
@ -56,6 +58,9 @@ make check
|
||||
%{_infodir}/diffutils.info*
|
||||
|
||||
%changelog
|
||||
* Wed Jul 05 2023 Than Ngo <than@redhat.com> - 3.10-2
|
||||
- Fix output of "diff -l -y" for non-ASCII input files
|
||||
|
||||
* Thu Jun 29 2023 Than Ngo <than@redhat.com> - 3.10-1
|
||||
- Fix bz#2208831, update to 3.10
|
||||
- Fix bz#2196671, diff -D no longer fails to output #ifndef lines introduced in 3.9
|
||||
|
Loading…
Reference in New Issue
Block a user