[coreutils: 2/2] fix the SUSE fix for cut output-delimiter
Ondrej Vasik
ovasik at fedoraproject.org
Fri Sep 9 12:54:26 UTC 2011
commit fbca36cbd7f7134109e8413e7bf4ac1437397c4a
Merge: b5f9200 a68f226
Author: Ondřej Vašík <ovasik at redhat.com>
Date: Fri Sep 9 14:53:00 2011 +0200
fix the SUSE fix for cut output-delimiter
coreutils-i18n.patch | 49 ++++++++++++++++++++++++++++++++++---------------
coreutils.spec | 7 +++++++
2 files changed, 41 insertions(+), 15 deletions(-)
---
diff --cc coreutils-i18n.patch
index e8803ae,7a4657e..9ba6bb4
--- a/coreutils-i18n.patch
+++ b/coreutils-i18n.patch
@@@ -226,7 -226,7 +226,7 @@@ diff -urNp coreutils-8.13-orig/src/cut.
}
max_range_endpoint = 0;
- @@ -582,6 +664,63 @@ cut_bytes (FILE *stream)
-@@ -580,6 +662,77 @@ cut_bytes (FILE *stream)
++@@ -582,6 +664,77 @@ cut_bytes (FILE *stream)
}
}
@@@ -251,6 -251,9 +251,9 @@@
+ as same character as WC. */
+ mbstate_t state; /* State of the stream. */
+ int convfail = 0; /* 1, when conversion is failed. Otherwise 0. */
+ + /* Whether to begin printing delimiters between ranges for the current line.
+ + Set after we've begun printing data corresponding to the first range. */
-+ bool print_delimiter;
+++ bool print_delimiter = false;
+
+ idx = 0;
+ buflen = 0;
@@@ -276,9 -280,19 +280,19 @@@
+ }
+ else
+ {
+ + bool range_start;
+ + bool *rs = output_delimiter_specified ? &range_start : NULL;
+ idx += (operating_mode == byte_mode) ? mblength : 1;
- + if (print_kth (idx, NULL))
- + fwrite (bufpos, mblength, sizeof(char), stdout);
+ + if (print_kth (idx, rs))
+ + {
-+ fwrite (bufpos, mblength, sizeof(char), stdout);
-+
+ + if (rs && *rs && print_delimiter)
+ + {
+ + fwrite (output_delimiter_string, sizeof (char),
+ + output_delimiter_length, stdout);
+ + }
+++ print_delimiter = true;
+++ fwrite (bufpos, mblength, sizeof(char), stdout);
+ + }
+ }
+
+ buflen -= mblength;
@@@ -290,7 -304,7 +304,7 @@@
/* Read from stream STREAM, printing to standard output any selected fields. */
static void
- @@ -704,13 +843,192 @@ cut_fields (FILE *stream)
-@@ -702,13 +855,195 @@ cut_fields (FILE *stream)
++@@ -704,13 +843,195 @@ cut_fields (FILE *stream)
}
}
@@@ -310,7 -324,7 +324,7 @@@
+ size_t mblength; /* The byte size of a multibyte character which shows
+ as same character as WC. */
+ mbstate_t state; /* State of the stream. */
--+ int convfail; /* 1, when conversion is failed. Otherwise 0. */
+++ int convfail = 0; /* 1, when conversion is failed. Otherwise 0. */
+
+ found_any_selected_field = 0;
+ field_idx = 1;
@@@ -3085,7 -3103,7 +3103,7 @@@ diff -urNp coreutils-8.13-orig/src/sort
else if (key->random)
diff = compare_random (ta, tlena, tb, tlenb);
else if (key->version)
- @@ -2632,6 +3066,179 @@ keycompare (struct line const *a, struct
-@@ -2624,6 +3058,180 @@ keycompare (struct line const *a, struct
++@@ -2632,6 +3066,180 @@ keycompare (struct line const *a, struct
return key->reverse ? -diff : diff;
}
diff --cc coreutils.spec
index 9fc1d6a,906fd98..5558b2e
--- a/coreutils.spec
+++ b/coreutils.spec
@@@ -312,20 -324,23 +312,27 @@@ f
/bin/true
/bin/uname
/bin/unlink
-%_bindir/*
-%_infodir/coreutils*
-%_mandir/man*/*
-%_sbindir/chroot
+%{_bindir}/*
+%{_infodir}/coreutils*
+%{_libexecdir}/coreutils*
+%{_mandir}/man*/*
+%{_sbindir}/chroot
%{?!norunuser:/sbin/runuser}
-%files libs
-%defattr(-, root, root, -)
-%{_libdir}/coreutils
-
%changelog
+* Fri Sep 09 2011 Ondrej Vasik <ovasik at redhat.com> - 8.13-1
+- new upstream release 8.13
+- temporarily disable recently added multibyte checks in
+ misc/cut test
++- fix the SUSE fix for cut output-delimiter
+- drop coreutils-libs subpackage, no longer needed
+
+ * Mon Sep 05 2011 Ondrej Vasik <ovasik at redhat.com> - 8.12-7
+ - incorporate some i18n patch fixes from OpenSUSE:
+ - fix cut output-delimiter option
+ - prevent infinite loop in sort when ignoring chars
+ - prevent using unitialized variable in cut
+
* Tue Aug 23 2011 Ondrej Vasik <ovasik at redhat.com> - 8.12-6
- su: fix shell suspend in tcsh (#597928)
More information about the scm-commits
mailing list