Fix the i18n path in cut.c
This commit is contained in:
parent
bb33bc40ad
commit
a1f9baa6b8
@ -9,22 +9,3 @@ diff -urNp coreutils-8.22-orig/tests/df/df-symlink.sh coreutils-8.22/tests/df/df
|
|||||||
|
|
||||||
disk=$(df --out=source '.' | tail -n1) ||
|
disk=$(df --out=source '.' | tail -n1) ||
|
||||||
skip_ "cannot determine '.' file system"
|
skip_ "cannot determine '.' file system"
|
||||||
diff -urNp coreutils-8.22-orig/tests/misc/cut.pl coreutils-8.22/tests/misc/cut.pl
|
|
||||||
--- coreutils-8.22-orig/tests/misc/cut.pl 2013-12-14 18:18:58.707172051 +0100
|
|
||||||
+++ coreutils-8.22/tests/misc/cut.pl 2013-12-14 18:22:14.931010910 +0100
|
|
||||||
@@ -23,11 +23,11 @@ use strict;
|
|
||||||
# Turn off localization of executable's output.
|
|
||||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
|
||||||
|
|
||||||
-my $mb_locale;
|
|
||||||
+my $mb_locale = 'C';
|
|
||||||
# uncommented enable multibyte paths
|
|
||||||
-$mb_locale = $ENV{LOCALE_FR_UTF8};
|
|
||||||
-! defined $mb_locale || $mb_locale eq 'none'
|
|
||||||
- and $mb_locale = 'C';
|
|
||||||
+#$mb_locale = $ENV{LOCALE_FR_UTF8};
|
|
||||||
+#! defined $mb_locale || $mb_locale eq 'none'
|
|
||||||
+# and $mb_locale = 'C';
|
|
||||||
|
|
||||||
my $prog = 'cut';
|
|
||||||
my $try = "Try '$prog --help' for more information.\n";
|
|
||||||
|
@ -219,17 +219,17 @@ diff -urNp coreutils-8.21-orig/src/cut.c coreutils-8.21/src/cut.c
|
|||||||
+ putchar ('\n');
|
+ putchar ('\n');
|
||||||
+ idx = 0;
|
+ idx = 0;
|
||||||
+ print_delimiter = false;
|
+ print_delimiter = false;
|
||||||
|
+ current_rp = rp;
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+ {
|
+ {
|
||||||
+ next_item (&idx);
|
+ next_item (&idx);
|
||||||
+ bool range_start;
|
+ //idx += (operating_mode == byte_mode) ? mblength : 1;
|
||||||
+ bool *rs = output_delimiter_specified ? &range_start : NULL;
|
|
||||||
+ idx += (operating_mode == byte_mode) ? mblength : 1;
|
|
||||||
+ if (print_kth (idx))
|
+ if (print_kth (idx))
|
||||||
+ {
|
+ {
|
||||||
+ if (rs && *rs && print_delimiter)
|
+ if (output_delimiter_specified)
|
||||||
+ {
|
+ {
|
||||||
|
+ if (print_delimiter && is_range_start_index (idx))
|
||||||
+ fwrite (output_delimiter_string, sizeof (char),
|
+ fwrite (output_delimiter_string, sizeof (char),
|
||||||
+ output_delimiter_length, stdout);
|
+ output_delimiter_length, stdout);
|
||||||
+ }
|
+ }
|
||||||
@ -247,7 +247,7 @@ diff -urNp coreutils-8.21-orig/src/cut.c coreutils-8.21/src/cut.c
|
|||||||
/* Read from stream STREAM, printing to standard output any selected fields. */
|
/* Read from stream STREAM, printing to standard output any selected fields. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -629,13 +782,197 @@ cut_fields (FILE *stream)
|
@@ -629,13 +782,198 @@ cut_fields (FILE *stream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,6 +401,7 @@ diff -urNp coreutils-8.21-orig/src/cut.c coreutils-8.21/src/cut.c
|
|||||||
+ if (wc == WEOF)
|
+ if (wc == WEOF)
|
||||||
+ break;
|
+ break;
|
||||||
+ field_idx = 1;
|
+ field_idx = 1;
|
||||||
|
+ current_rp = rp;
|
||||||
+ found_any_selected_field = 0;
|
+ found_any_selected_field = 0;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
|
Loading…
Reference in New Issue
Block a user