SHA256
1
0
forked from pool/coreutils

Accepting request 994133 from Base:System

- refresh coreutils-i18n.patch from Fedora to make expand and unexpand
  more similar 

- Remove python2 from buildrequires - appears to be a left over

OBS-URL: https://build.opensuse.org/request/show/994133
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=147
This commit is contained in:
Dominique Leuenberger 2022-08-18 14:48:40 +00:00 committed by Git OBS Bridge
commit b72efe7b13
3 changed files with 21 additions and 14 deletions

View File

@ -19,7 +19,7 @@ Subject: [PATCH] coreutils-i18n.patch
src/local.mk | 4 +- src/local.mk | 4 +-
src/pr.c | 443 ++++++++++++++++++-- src/pr.c | 443 ++++++++++++++++++--
src/sort.c | 792 +++++++++++++++++++++++++++++++++--- src/sort.c | 792 +++++++++++++++++++++++++++++++++---
src/unexpand.c | 103 ++++- src/unexpand.c | 102 ++++-
src/uniq.c | 119 +++++- src/uniq.c | 119 +++++-
tests/Coreutils.pm | 3 + tests/Coreutils.pm | 3 +
tests/expand/mb.sh | 183 +++++++++ tests/expand/mb.sh | 183 +++++++++
@ -35,7 +35,7 @@ Subject: [PATCH] coreutils-i18n.patch
tests/misc/uniq.pl | 55 +++ tests/misc/uniq.pl | 55 +++
tests/pr/pr-tests.pl | 49 +++ tests/pr/pr-tests.pl | 49 +++
tests/unexpand/mb.sh | 172 ++++++++ tests/unexpand/mb.sh | 172 ++++++++
31 files changed, 3700 insertions(+), 242 deletions(-) 31 files changed, 3699 insertions(+), 242 deletions(-)
create mode 100644 lib/mbfile.c create mode 100644 lib/mbfile.c
create mode 100644 lib/mbfile.h create mode 100644 lib/mbfile.h
create mode 100644 m4/mbfile.m4 create mode 100644 m4/mbfile.m4
@ -4273,21 +4273,18 @@ index 7d6100f..04cd646 100644
{ {
/* Go back one column, and force recalculation of the /* Go back one column, and force recalculation of the
next tab stop. */ next tab stop. */
@@ -218,9 +277,11 @@ unexpand (void) @@ -220,16 +279,20 @@ unexpand (void)
next_tab_column = column;
tab_index -= !!tab_index;
} }
- else else
+ else if (!mb_iseq (c, '\n'))
{ {
- column++; - column++;
+ /* mb_width() returns 0 for control characters */ - if (!column)
+ const int width = mb_width (c); + const uintmax_t orig_column = column;
+ column += (width) ? width : 1; + column += mb_width (c);
if (!column) + if (column < orig_column)
die (EXIT_FAILURE, 0, _("input line is too long")); die (EXIT_FAILURE, 0, _("input line is too long"));
} }
@@ -228,8 +289,11 @@ unexpand (void)
if (pending) if (pending)
{ {
if (pending > 1 && one_blank_before_tab_stop) if (pending > 1 && one_blank_before_tab_stop)
@ -4301,7 +4298,7 @@ index 7d6100f..04cd646 100644
die (EXIT_FAILURE, errno, _("write error")); die (EXIT_FAILURE, errno, _("write error"));
pending = 0; pending = 0;
one_blank_before_tab_stop = false; one_blank_before_tab_stop = false;
@@ -239,16 +303,17 @@ unexpand (void) @@ -239,16 +302,17 @@ unexpand (void)
convert &= convert_entire_line || blank; convert &= convert_entire_line || blank;
} }

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Aug 9 12:13:00 UTC 2022 - Dirk Müller <dmueller@suse.com>
- refresh coreutils-i18n.patch from Fedora to make expand and unexpand
more similar
-------------------------------------------------------------------
Mon Aug 8 12:19:30 UTC 2022 - Stephan Kulow <coolo@suse.com>
- Remove python2 from buildrequires - appears to be a left over
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Aug 2 11:05:45 UTC 2022 - Dirk Müller <dmueller@suse.com> Tue Aug 2 11:05:45 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

@ -81,7 +81,6 @@ BuildRequires: gcc-PIE
BuildRequires: acl BuildRequires: acl
BuildRequires: gdb BuildRequires: gdb
BuildRequires: perl-Expect BuildRequires: perl-Expect
BuildRequires: python
BuildRequires: python3 BuildRequires: python3
BuildRequires: python3-pyinotify BuildRequires: python3-pyinotify
BuildRequires: strace BuildRequires: strace