cut: be MB for ALL archs

This commit is contained in:
Ondrej Oprala 2016-01-15 11:02:13 +01:00
parent 01067b2813
commit 11e5aa1d55
2 changed files with 10 additions and 5 deletions

View File

@ -536,7 +536,7 @@
case 'f': case 'f':
/* Build the field list. */ /* Build the field list. */
if (operating_mode != undefined_mode) if (operating_mode != undefined_mode)
@@ -747,9 +986,15 @@ main (int argc, char **argv) @@ -747,9 +986,17 @@ main (int argc, char **argv)
case 'd': case 'd':
/* New delimiter. */ /* New delimiter. */
/* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */ /* Interpret -d '' to mean 'use the NUL byte as the delimiter.' */
@ -545,11 +545,13 @@
+ if (!mbi_avail (iter)) + if (!mbi_avail (iter))
+ mb_setascii (&delim, '\0'); + mb_setascii (&delim, '\0');
+ else + else
+ {
+ mb_copy (&delim, &mbi_cur (iter)); + mb_copy (&delim, &mbi_cur (iter));
+ +
+ mbi_advance (iter); + mbi_advance (iter);
+ if (mbi_avail (iter)) + if (mbi_avail (iter))
FATAL_ERROR (_("the delimiter must be a single character")); FATAL_ERROR (_("the delimiter must be a single character"));
+ }
- delim = optarg[0]; - delim = optarg[0];
delim_specified = true; delim_specified = true;
break; break;

View File

@ -1,7 +1,7 @@
Summary: A set of basic GNU tools commonly used in shell scripts Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils Name: coreutils
Version: 8.24 Version: 8.24
Release: 107%{?dist} Release: 108%{?dist}
License: GPLv3+ License: GPLv3+
Group: System Environment/Base Group: System Environment/Base
Url: http://www.gnu.org/software/coreutils/ Url: http://www.gnu.org/software/coreutils/
@ -359,6 +359,9 @@ fi
%license COPYING %license COPYING
%changelog %changelog
* Fri Jan 15 2016 Ondrej Oprala <ooprala@redhat.com> - 8.24-108
- cut: be MB for ALL archs
* Fri Jan 15 2016 Ondrej Oprala <ooprala@redhat.com> - 8.24-107 * Fri Jan 15 2016 Ondrej Oprala <ooprala@redhat.com> - 8.24-107
- Use the new i18n implementation for the cut utility - Use the new i18n implementation for the cut utility