[Clfs-commits] commit: r4396 - in /trunk: BOOK/patches.ent patches/coreutils-6.12-i18n-1.patch
svn at cross-lfs.org
svn at cross-lfs.org
Thu Jan 8 20:16:39 PST 2009
Author: jim
Date: Fri Jan 9 04:16:38 2009
New Revision: 4396
Log:
Put in Correct i18n patch for coreutils
Modified:
trunk/BOOK/patches.ent
trunk/patches/coreutils-6.12-i18n-1.patch
Modified: trunk/BOOK/patches.ent
==============================================================================
--- trunk/BOOK/patches.ent (original)
+++ trunk/BOOK/patches.ent Fri Jan 9 04:16:38 2009
@@ -25,7 +25,7 @@
<!ENTITY coreutils-uname-patch-size "8 KB">
<!ENTITY coreutils-i18n-patch "coreutils-&coreutils-version;-i18n-1.patch">
-<!ENTITY coreutils-i18n-patch-md5 "e50af44aea772a6ad3e16938cc03f74c">
+<!ENTITY coreutils-i18n-patch-md5 "cc19ae40783df5015893bebcffbd398b">
<!ENTITY coreutils-i18n-patch-size "108 KB">
<!ENTITY diffutils-i18n-patch "diffutils-&diffutils-version;-i18n-1.patch">
Modified: trunk/patches/coreutils-6.12-i18n-1.patch
==============================================================================
--- trunk/patches/coreutils-6.12-i18n-1.patch (original)
+++ trunk/patches/coreutils-6.12-i18n-1.patch Fri Jan 9 04:16:38 2009
@@ -2,12 +2,12 @@
Date: 2009-01-08
Initial Package Version: 6.12
Upstream Status: Unkown
-Origin: Fedora and Bryan Kadzban
+Origin: Mandriva
Description: i18n Updates
diff -Naur coreutils-6.12.orig/lib/linebuffer.h coreutils-6.12/lib/linebuffer.h
--- coreutils-6.12.orig/lib/linebuffer.h 2007-10-17 06:47:26.000000000 -0700
-+++ coreutils-6.12/lib/linebuffer.h 2009-01-08 12:56:49.000000000 -0800
++++ coreutils-6.12/lib/linebuffer.h 2009-01-08 20:14:37.000000000 -0800
@@ -21,6 +21,11 @@
# include <stdio.h>
@@ -32,7 +32,7 @@
/* Initialize linebuffer LINEBUFFER for use. */
diff -Naur coreutils-6.12.orig/src/cut.c coreutils-6.12/src/cut.c
--- coreutils-6.12.orig/src/cut.c 2008-05-25 23:40:33.000000000 -0700
-+++ coreutils-6.12/src/cut.c 2009-01-08 12:56:49.000000000 -0800
++++ coreutils-6.12/src/cut.c 2009-01-08 20:14:37.000000000 -0800
@@ -28,6 +28,11 @@
#include <assert.h>
#include <getopt.h>
@@ -626,7 +626,7 @@
if (optind == argc)
diff -Naur coreutils-6.12.orig/src/expand.c coreutils-6.12/src/expand.c
--- coreutils-6.12.orig/src/expand.c 2008-05-25 23:40:33.000000000 -0700
-+++ coreutils-6.12/src/expand.c 2009-01-08 12:56:49.000000000 -0800
++++ coreutils-6.12/src/expand.c 2009-01-08 20:14:37.000000000 -0800
@@ -37,11 +37,28 @@
#include <stdio.h>
#include <getopt.h>
@@ -823,7 +823,7 @@
error (EXIT_FAILURE, errno, "-");
diff -Naur coreutils-6.12.orig/src/fold.c coreutils-6.12/src/fold.c
--- coreutils-6.12.orig/src/fold.c 2008-05-25 23:40:33.000000000 -0700
-+++ coreutils-6.12/src/fold.c 2009-01-08 12:56:49.000000000 -0800
++++ coreutils-6.12/src/fold.c 2009-01-08 20:14:37.000000000 -0800
@@ -22,11 +22,33 @@
#include <getopt.h>
#include <sys/types.h>
@@ -1229,7 +1229,7 @@
case 's': /* Break at word boundaries. */
diff -Naur coreutils-6.12.orig/src/join.c coreutils-6.12/src/join.c
--- coreutils-6.12.orig/src/join.c 2008-05-25 23:40:32.000000000 -0700
-+++ coreutils-6.12/src/join.c 2009-01-08 12:56:49.000000000 -0800
++++ coreutils-6.12/src/join.c 2009-01-08 20:14:37.000000000 -0800
@@ -22,17 +22,31 @@
#include <sys/types.h>
#include <getopt.h>
@@ -1280,7 +1280,16 @@
/* If nonzero, check that the input is correctly ordered. */
static enum
-@@ -230,10 +246,11 @@
+@@ -221,6 +237,8 @@
+
+ /* Fill in the `fields' structure in LINE. */
+
++/* Fill in the `fields' structure in LINE. */
++
+ static void
+ xfields (struct line *line)
+ {
+@@ -230,10 +248,11 @@
if (ptr == lim)
return;
@@ -1294,156 +1303,7 @@
extract_field (line, ptr, sep - ptr);
}
else
-@@ -260,6 +277,148 @@
- extract_field (line, ptr, lim - ptr);
- }
-
-+#if HAVE_MBRTOWC
-+static void
-+xfields_multibyte (struct line *line)
-+{
-+ char *ptr = line->buf.buffer;
-+ char const *lim = ptr + line->buf.length - 1;
-+ wchar_t wc = 0;
-+ size_t mblength = 1;
-+ mbstate_t state, state_bak;
-+
-+ memset (&state, 0, sizeof (mbstate_t));
-+
-+ if (ptr == lim)
-+ return;
-+
-+ if (tab != NULL)
-+ {
-+ unsigned char t = tab[0];
-+ char *sep = ptr;
-+ for (; ptr < lim; ptr = sep + mblength)
-+ {
-+ sep = ptr;
-+ while (sep < lim)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
-+
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ if (mblength == tablen && !memcmp (sep, tab, mblength))
-+ break;
-+ else
-+ {
-+ sep += mblength;
-+ continue;
-+ }
-+ }
-+
-+ if (sep == lim)
-+ break;
-+
-+ extract_field (line, ptr, sep - ptr);
-+ }
-+ }
-+ else
-+ {
-+ /* Skip leading blanks before the first field. */
-+ while(ptr < lim)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
-+
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ if (!iswblank(wc))
-+ break;
-+ ptr += mblength;
-+ }
-+
-+ do
-+ {
-+ char *sep;
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ sep = ptr + mblength;
-+ while (sep != lim)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ if (iswblank (wc))
-+ break;
-+
-+ sep += mblength;
-+ }
-+
-+ extract_field (line, ptr, sep - ptr);
-+ if (sep == lim)
-+ return;
-+
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ ptr = sep + mblength;
-+ while (ptr != lim)
-+ {
-+ state_bak = state;
-+ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
-+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
-+ {
-+ mblength = 1;
-+ state = state_bak;
-+ break;
-+ }
-+ mblength = (mblength < 1) ? 1 : mblength;
-+
-+ if (!iswblank (wc))
-+ break;
-+
-+ ptr += mblength;
-+ }
-+ }
-+ while (ptr != lim);
-+ }
-+
-+ extract_field (line, ptr, lim - ptr);
-+}
-+#endif
-+
- static struct line *
- dup_line (const struct line *old)
- {
-@@ -305,56 +464,115 @@
+@@ -305,56 +324,115 @@
size_t jf_1, size_t jf_2)
{
/* Start of field to compare in each file. */
@@ -1454,7 +1314,7 @@
- size_t len2; /* Length of fields to compare. */
+ char *beg[2];
+ char *copy[2];
-+ size_t len[2]; /* Length of fields to compare. */
++ size_t len[2]; /* Length of fields to compare. */
int diff;
+ int i, j;
@@ -1582,7 +1442,156 @@
}
/* Check that successive input lines PREV and CURRENT from input file
-@@ -413,6 +631,11 @@
+@@ -393,6 +471,148 @@
+ }
+ }
+
++#if HAVE_MBRTOWC
++static void
++xfields_multibyte (struct line *line)
++{
++ char *ptr = line->buf.buffer;
++ char const *lim = ptr + line->buf.length - 1;
++ wchar_t wc = 0;
++ size_t mblength = 1;
++ mbstate_t state, state_bak;
++
++ memset (&state, 0, sizeof (mbstate_t));
++
++ if (ptr == lim)
++ return;
++
++ if (tab != NULL)
++ {
++ unsigned char t = tab[0];
++ char *sep = ptr;
++ for (; ptr < lim; ptr = sep + mblength)
++ {
++ sep = ptr;
++ while (sep < lim)
++ {
++ state_bak = state;
++ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
++
++ if (mblength == (size_t)-1 || mblength == (size_t)-2)
++ {
++ mblength = 1;
++ state = state_bak;
++ }
++ mblength = (mblength < 1) ? 1 : mblength;
++
++ if (mblength == tablen && !memcmp (sep, tab, mblength))
++ break;
++ else
++ {
++ sep += mblength;
++ continue;
++ }
++ }
++
++ if (sep == lim)
++ break;
++
++ extract_field (line, ptr, sep - ptr);
++ }
++ }
++ else
++ {
++ /* Skip leading blanks before the first field. */
++ while(ptr < lim)
++ {
++ state_bak = state;
++ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
++
++ if (mblength == (size_t)-1 || mblength == (size_t)-2)
++ {
++ mblength = 1;
++ state = state_bak;
++ break;
++ }
++ mblength = (mblength < 1) ? 1 : mblength;
++
++ if (!iswblank(wc))
++ break;
++ ptr += mblength;
++ }
++
++ do
++ {
++ char *sep;
++ state_bak = state;
++ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
++ if (mblength == (size_t)-1 || mblength == (size_t)-2)
++ {
++ mblength = 1;
++ state = state_bak;
++ break;
++ }
++ mblength = (mblength < 1) ? 1 : mblength;
++
++ sep = ptr + mblength;
++ while (sep != lim)
++ {
++ state_bak = state;
++ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
++ if (mblength == (size_t)-1 || mblength == (size_t)-2)
++ {
++ mblength = 1;
++ state = state_bak;
++ break;
++ }
++ mblength = (mblength < 1) ? 1 : mblength;
++
++ if (iswblank (wc))
++ break;
++
++ sep += mblength;
++ }
++
++ extract_field (line, ptr, sep - ptr);
++ if (sep == lim)
++ return;
++
++ state_bak = state;
++ mblength = mbrtowc (&wc, sep, lim - sep + 1, &state);
++ if (mblength == (size_t)-1 || mblength == (size_t)-2)
++ {
++ mblength = 1;
++ state = state_bak;
++ break;
++ }
++ mblength = (mblength < 1) ? 1 : mblength;
++
++ ptr = sep + mblength;
++ while (ptr != lim)
++ {
++ state_bak = state;
++ mblength = mbrtowc (&wc, ptr, lim - ptr + 1, &state);
++ if (mblength == (size_t)-1 || mblength == (size_t)-2)
++ {
++ mblength = 1;
++ state = state_bak;
++ break;
++ }
++ mblength = (mblength < 1) ? 1 : mblength;
++
++ if (!iswblank (wc))
++ break;
++
++ ptr += mblength;
++ }
++ }
++ while (ptr != lim);
++ }
++
++ extract_field (line, ptr, lim - ptr);
++}
++#endif
++
+ /* Read a line from FP into LINE and split it into fields.
+ Return true if successful. */
+
+@@ -413,6 +633,11 @@
line->nfields_allocated = 0;
line->nfields = 0;
line->fields = NULL;
@@ -1594,7 +1603,7 @@
xfields (line);
if (prevline[which - 1])
-@@ -509,11 +732,18 @@
+@@ -509,11 +734,18 @@
/* Print the join of LINE1 and LINE2. */
@@ -1614,7 +1623,7 @@
outlist = outlist_head.next;
if (outlist)
-@@ -529,12 +759,12 @@
+@@ -529,12 +761,12 @@
if (o->file == 0)
{
if (line1 == &uni_blank)
@@ -1629,7 +1638,7 @@
line = line1;
field = join_field_1;
}
-@@ -548,7 +778,7 @@
+@@ -548,7 +780,7 @@
o = o->next;
if (o == NULL)
break;
@@ -1638,7 +1647,7 @@
}
putchar ('\n');
}
-@@ -566,23 +796,23 @@
+@@ -566,23 +798,23 @@
prfield (join_field_1, line1);
for (i = 0; i < join_field_1 && i < line1->nfields; ++i)
{
@@ -1666,7 +1675,7 @@
prfield (i, line2);
}
putchar ('\n');
-@@ -1016,20 +1246,41 @@
+@@ -1016,20 +1248,41 @@
case 't':
{
@@ -1720,7 +1729,7 @@
diff -Naur coreutils-6.12.orig/src/pr.c coreutils-6.12/src/pr.c
--- coreutils-6.12.orig/src/pr.c 2008-05-25 23:40:32.000000000 -0700
-+++ coreutils-6.12/src/pr.c 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/src/pr.c 2009-01-08 20:14:37.000000000 -0800
@@ -312,6 +312,32 @@
#include <getopt.h>
@@ -2445,7 +2454,7 @@
diff -Naur coreutils-6.12.orig/src/sort.c coreutils-6.12/src/sort.c
--- coreutils-6.12.orig/src/sort.c 2008-05-25 23:40:32.000000000 -0700
-+++ coreutils-6.12/src/sort.c 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/src/sort.c 2009-01-08 20:14:37.000000000 -0800
@@ -22,10 +22,19 @@
#include <config.h>
@@ -3314,7 +3323,7 @@
diff -Naur coreutils-6.12.orig/src/unexpand.c coreutils-6.12/src/unexpand.c
--- coreutils-6.12.orig/src/unexpand.c 2008-05-25 23:40:33.000000000 -0700
-+++ coreutils-6.12/src/unexpand.c 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/src/unexpand.c 2009-01-08 20:14:37.000000000 -0800
@@ -38,11 +38,28 @@
#include <stdio.h>
#include <getopt.h>
@@ -3569,7 +3578,7 @@
error (EXIT_FAILURE, errno, "-");
diff -Naur coreutils-6.12.orig/src/uniq.c coreutils-6.12/src/uniq.c
--- coreutils-6.12.orig/src/uniq.c 2008-05-25 23:40:32.000000000 -0700
-+++ coreutils-6.12/src/uniq.c 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/src/uniq.c 2009-01-08 20:14:37.000000000 -0800
@@ -22,6 +22,16 @@
#include <getopt.h>
#include <sys/types.h>
@@ -3938,7 +3947,7 @@
check_chars = SIZE_MAX;
diff -Naur coreutils-6.12.orig/tests/Makefile.am coreutils-6.12/tests/Makefile.am
--- coreutils-6.12.orig/tests/Makefile.am 2008-05-27 04:47:53.000000000 -0700
-+++ coreutils-6.12/tests/Makefile.am 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/tests/Makefile.am 2009-01-08 20:14:37.000000000 -0800
@@ -191,6 +191,7 @@
misc/shuf \
misc/sort \
@@ -3958,62 +3967,41 @@
pr/0F \
pr/0FF \
pr/0FFnt \
-diff -Naur coreutils-6.12.orig/tests/misc/cut coreutils-6.12/tests/misc/cut
---- coreutils-6.12.orig/tests/misc/cut 2008-05-16 23:41:11.000000000 -0700
-+++ coreutils-6.12/tests/misc/cut 2009-01-08 12:56:50.000000000 -0800
-@@ -26,7 +26,7 @@
- my $prog = 'cut';
- my $try = "Try \`$prog --help' for more information.\n";
- my $from_1 = "$prog: fields and positions are numbered from 1\n$try";
--my $inval = "$prog: invalid byte or field list\n$try";
-+my $inval = "$prog: invalid byte, character or field list\n$try";
- my $no_endpoint = "$prog: invalid range with no endpoint: -\n$try";
-
- my @Tests =
-@@ -141,7 +141,7 @@
-
- # None of the following invalid ranges provoked an error up to coreutils-6.9.
- ['inval1', qw(-f 2-0), {IN=>''}, {OUT=>''}, {EXIT=>1},
-- {ERR=>"$prog: invalid decreasing range\n$try"}],
-+ {ERR=>"$inval"}],
- ['inval2', qw(-f -), {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
- ['inval3', '-f', '4,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
- ['inval4', '-f', '1-2,-', {IN=>''}, {OUT=>''}, {EXIT=>1}, {ERR=>$no_endpoint}],
diff -Naur coreutils-6.12.orig/tests/misc/mb1.I coreutils-6.12/tests/misc/mb1.I
--- coreutils-6.12.orig/tests/misc/mb1.I 1969-12-31 16:00:00.000000000 -0800
-+++ coreutils-6.12/tests/misc/mb1.I 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/tests/misc/mb1.I 2009-01-08 20:14:37.000000000 -0800
@@ -0,0 +1,4 @@
-+Appleï¼ 10
-+Bananaï¼ 5
-+Citrusï¼ 20
-+Cherryï¼ 30
++Appleï¼ 10
++Bananaï¼ 5
++Citrusï¼ 20
++Cherryï¼ 30
diff -Naur coreutils-6.12.orig/tests/misc/mb1.X coreutils-6.12/tests/misc/mb1.X
--- coreutils-6.12.orig/tests/misc/mb1.X 1969-12-31 16:00:00.000000000 -0800
-+++ coreutils-6.12/tests/misc/mb1.X 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/tests/misc/mb1.X 2009-01-08 20:14:37.000000000 -0800
@@ -0,0 +1,4 @@
-+Bananaï¼ 5
-+Appleï¼ 10
-+Citrusï¼ 20
-+Cherryï¼ 30
++Bananaï¼ 5
++Appleï¼ 10
++Citrusï¼ 20
++Cherryï¼ 30
diff -Naur coreutils-6.12.orig/tests/misc/mb2.I coreutils-6.12/tests/misc/mb2.I
--- coreutils-6.12.orig/tests/misc/mb2.I 1969-12-31 16:00:00.000000000 -0800
-+++ coreutils-6.12/tests/misc/mb2.I 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/tests/misc/mb2.I 2009-01-08 20:14:37.000000000 -0800
@@ -0,0 +1,4 @@
-+Appleï¼ ï¼¡ï¼¡10ï¼ ï¼ 20
-+Bananaï¼ ï¼¡ï¼¡5ï¼ ï¼ 30
-+Citrusï¼ ï¼¡ï¼¡20ï¼ ï¼ 5
-+Cherryï¼ ï¼¡ï¼¡30ï¼ ï¼ 10
++Appleï¼ ï¼¡ï¼¡10ï¼ ï¼ 20
++Bananaï¼ ï¼¡ï¼¡5ï¼ ï¼ 30
++Citrusï¼ ï¼¡ï¼¡20ï¼ ï¼ 5
++Cherryï¼ ï¼¡ï¼¡30ï¼ ï¼ 10
diff -Naur coreutils-6.12.orig/tests/misc/mb2.X coreutils-6.12/tests/misc/mb2.X
--- coreutils-6.12.orig/tests/misc/mb2.X 1969-12-31 16:00:00.000000000 -0800
-+++ coreutils-6.12/tests/misc/mb2.X 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/tests/misc/mb2.X 2009-01-08 20:14:37.000000000 -0800
@@ -0,0 +1,4 @@
-+Citrusï¼ ï¼¡ï¼¡20ï¼ ï¼ 5
-+Cherryï¼ ï¼¡ï¼¡30ï¼ ï¼ 10
-+Appleï¼ ï¼¡ï¼¡10ï¼ ï¼ 20
-+Bananaï¼ ï¼¡ï¼¡5ï¼ ï¼ 30
++Citrusï¼ ï¼¡ï¼¡20ï¼ ï¼ 5
++Cherryï¼ ï¼¡ï¼¡30ï¼ ï¼ 10
++Appleï¼ ï¼¡ï¼¡10ï¼ ï¼ 20
++Bananaï¼ ï¼¡ï¼¡5ï¼ ï¼ 30
diff -Naur coreutils-6.12.orig/tests/misc/sort-mb-tests coreutils-6.12/tests/misc/sort-mb-tests
--- coreutils-6.12.orig/tests/misc/sort-mb-tests 1969-12-31 16:00:00.000000000 -0800
-+++ coreutils-6.12/tests/misc/sort-mb-tests 2009-01-08 12:56:50.000000000 -0800
++++ coreutils-6.12/tests/misc/sort-mb-tests 2009-01-08 20:14:37.000000000 -0800
@@ -0,0 +1,58 @@
+#! /bin/sh
+case $# in
@@ -4030,7 +4018,7 @@
+locale -k LC_CTYPE 2>&1 | grep -q charmap.*UTF-8 || exit 77
+errors=0
+
-+$xx -t ï¼ -k2 -n misc/mb1.I > misc/mb1.O
++$xx -t ï¼ -k2 -n misc/mb1.I > misc/mb1.O
+code=$?
+if test $code != 0; then
+ $echo "Test mb1 failed: $xx return code $code differs from expected value 0" 1>&2
@@ -4048,7 +4036,7 @@
+ esac
+fi
+
-+$xx -t ï¼ -k4 -n misc/mb2.I > misc/mb2.O
++$xx -t ï¼ -k4 -n misc/mb2.I > misc/mb2.O
+code=$?
+if test $code != 0; then
+ $echo "Test mb2 failed: $xx return code $code differs from expected value 0" 1>&2
More information about the Clfs-commits
mailing list