[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r5732 - in /fsf/trunk/libc: ChangeLog localedata/ChangeLog localedata/locales/iso14651_t1_common string/strfry.c
- To: commits@xxxxxxxxxx
- Subject: [commits] r5732 - in /fsf/trunk/libc: ChangeLog localedata/ChangeLog localedata/locales/iso14651_t1_common string/strfry.c
- From: eglibc@xxxxxxxxxx
- Date: Tue, 01 Apr 2008 07:05:10 -0000
Author: eglibc
Date: Tue Apr 1 00:05:05 2008
New Revision: 5732
Log:
Import glibc-mainline for 2008-04-01
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/localedata/ChangeLog
fsf/trunk/libc/localedata/locales/iso14651_t1_common
fsf/trunk/libc/string/strfry.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue Apr 1 00:05:05 2008
@@ -1,3 +1,8 @@
+2008-03-31 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #6007]
+ * string/strfry.c: Handle empty strings again.
+
2008-03-30 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #5443]
Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Tue Apr 1 00:05:05 2008
@@ -1,3 +1,8 @@
+2008-03-31 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * locales/iso14651_t1_common: Add support for Gujarati script.
+ Patch by Pravin Satpute <psatpute@xxxxxxxxxx>.
+
2008-03-30 Jakub Jelinek <jakub@xxxxxxxxxx>
* Makefile (LOCALES): Add ja_JP.UTF-8.
Modified: fsf/trunk/libc/localedata/locales/iso14651_t1_common
==============================================================================
--- fsf/trunk/libc/localedata/locales/iso14651_t1_common (original)
+++ fsf/trunk/libc/localedata/locales/iso14651_t1_common Tue Apr 1 00:05:05 2008
@@ -61,6 +61,7 @@
script <ARMENIAN>
script <GEORGIAN>
script <DEVANAGARI>
+script <GUJARATI>
# Déclaration des symboles internes / Declaration of internal symbols
#
@@ -560,6 +561,96 @@
collating-symbol <dv-grave>
collating-symbol <dv-acute>
+#<GUJARATI>
+#
+# Added Akhand Characters in sorting as per requirement of mr_IN
+# gvd- denotes vowel modifier
+# gm- denotes matras
+# gvw- denotes vowels
+# <GNKT> denotes Nukta characters
+
+collating-element <gu-ksha> from "<U0A95><U0ACD><U0AB7>"
+collating-element <gu-dnya> from "<U0A9C><U0ACD><U0A9E>"
+collating-element <gu-shra> from "<U0AB6><U0ACD><U0AB0>"
+collating-element <gu-tra> from "<U0AA4><U0ACD><U0AB0>"
+
+# defning symbols
+collating-symbol <GNKT>
+collating-symbol <gom>
+collating-symbol <gvw-a>
+collating-symbol <gvw-aa>
+collating-symbol <gvw-i>
+collating-symbol <gvw-ii>
+collating-symbol <gvw-u>
+collating-symbol <gvw-uu>
+collating-symbol <gvw-vocalicr>
+collating-symbol <gvw-vocalicrr>
+collating-symbol <gvw-vocalicl>
+collating-symbol <gvw-vocalicll>
+collating-symbol <gvw-candrae>
+collating-symbol <gvw-e>
+collating-symbol <gvw-ai>
+collating-symbol <gvw-candrao>
+collating-symbol <gvw-o>
+collating-symbol <gvw-au>
+collating-symbol <g-ka>
+collating-symbol <g-kha>
+collating-symbol <g-ga>
+collating-symbol <g-gha>
+collating-symbol <g-nga>
+collating-symbol <g-ca>
+collating-symbol <g-cha>
+collating-symbol <g-ja>
+collating-symbol <g-jha>
+collating-symbol <g-nya>
+collating-symbol <g-tta>
+collating-symbol <g-ttha>
+collating-symbol <g-dda>
+collating-symbol <g-ddha>
+collating-symbol <g-nna>
+collating-symbol <g-ta>
+collating-symbol <g-tha>
+collating-symbol <g-da>
+collating-symbol <g-dha>
+collating-symbol <g-na>
+collating-symbol <g-pa>
+collating-symbol <g-pha>
+collating-symbol <g-ba>
+collating-symbol <g-bha>
+collating-symbol <g-ma>
+collating-symbol <g-ya>
+collating-symbol <g-ra>
+collating-symbol <g-la>
+collating-symbol <g-lla>
+collating-symbol <g-va>
+collating-symbol <g-sha>
+collating-symbol <g-ssa>
+collating-symbol <g-sa>
+collating-symbol <g-ha>
+collating-symbol <g-ksha>
+collating-symbol <g-dnya>
+collating-symbol <g-shra>
+collating-symbol <g-tra>
+collating-symbol <g-avagrah>
+collating-symbol <gm-aa>
+collating-symbol <gm-i>
+collating-symbol <gm-ii>
+collating-symbol <gm-u>
+collating-symbol <gm-uu>
+collating-symbol <gm-vocalicr>
+collating-symbol <gm-vocalicrr>
+collating-symbol <gm-vocalicl>
+collating-symbol <gm-vocalicll>
+collating-symbol <gm-candrae>
+collating-symbol <gm-e>
+collating-symbol <gm-ai>
+collating-symbol <gm-candrao>
+collating-symbol <gm-o>
+collating-symbol <gm-au>
+collating-symbol <gvd-anuswara>
+collating-symbol <gvd-chandrabindu>
+collating-symbol <gvd-visarg>
+collating-symbol <g-halant>
# Ordre des symboles internes / Order of internal symbols
#
@@ -1064,6 +1155,87 @@
<dvd-chandrabindu>
<dvd-visarg>
<d_halant>
+#
+# <GUJARATI>
+#
+# collation weights in order
+
+<GNKT>
+<gom>
+<gvw-a>
+<gvw-aa>
+<gvw-i>
+<gvw-ii>
+<gvw-u>
+<gvw-uu>
+<gvw-vocalicr>
+<gvw-vocalicrr>
+<gvw-vocalicl>
+<gvw-vocalicll>
+<gvw-candrae>
+<gvw-e>
+<gvw-ai>
+<gvw-candrao>
+<gvw-o>
+<gvw-au>
+<g-ka>
+<g-kha>
+<g-ga>
+<g-gha>
+<g-nga>
+<g-ca>
+<g-cha>
+<g-ja>
+<g-jha>
+<g-nya>
+<g-tta>
+<g-ttha>
+<g-dda>
+<g-ddha>
+<g-nna>
+<g-ta>
+<g-tha>
+<g-da>
+<g-dha>
+<g-na>
+<g-pa>
+<g-pha>
+<g-ba>
+<g-bha>
+<g-ma>
+<g-ya>
+<g-ra>
+<g-la>
+<g-lla>
+<g-va>
+<g-sha>
+<g-ssa>
+<g-sa>
+<g-ha>
+<g-ksha>
+<g-dnya>
+<g-shra>
+<g-tra>
+<g-avagrah>
+<gm-aa>
+<gm-i>
+<gm-ii>
+<gm-u>
+<gm-uu>
+<gm-vocalicr>
+<gm-vocalicrr>
+<gm-vocalicl>
+<gm-vocalicll>
+<gm-candrae>
+<gm-e>
+<gm-ai>
+<gm-candrao>
+<gm-o>
+<gm-au>
+<gvd-anuswara>
+<gvd-chandrabindu>
+<gvd-visarg>
+<g-halant>
order_start <SPECIAL>;forward;backward;forward;forward,position
#
@@ -2941,6 +3113,94 @@
<U0953> IGNORE;<dv-grave>;<MIN>;IGNORE
<U0954> IGNORE;<dv-acute>;<MIN>;IGNORE
+order_start <GUJARATI>;forward;forward;forward;forward,position
+<U0AE6> <0>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AE7> <1>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AE8> <2>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AE9> <3>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AEA> <4>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AEB> <5>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AEC> <6>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AED> <7>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AEE> <8>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AEF> <9>;"<BAS><NUM>";"<MIN><MIN>";IGNORE
+<U0AD0> <gom> ;<BAS>;<MIN>;IGNORE
+<U0A85> <gvw-a> ;<BAS>;<MIN>;IGNORE
+<U0A86> <gvw-aa> ;<BAS>;<MIN>;IGNORE
+<U0A87> <gvw-i> ;<BAS>;<MIN>;IGNORE
+<U0A88> <gvw-ii> ;<BAS>;<MIN>;IGNORE
+<U0A89> <gvw-u> ;<BAS>;<MIN>;IGNORE
+<U0A8A> <gvw-uu>;<BAS>;<MIN>;IGNORE
+<U0A8B> <gvw-vocalicr>;<BAS>;<MIN>;IGNORE
+<U0AE0> <gvw-vocalicrr>;<BAS>;<MIN>;IGNORE
+<U0A8C> <gvw-vocalicl>;<BAS>;<MIN>;IGNORE
+<U0AE1> <gvw-vocalicll>;<BAS>;<MIN>;IGNORE
+<U0A8D> <gvw-candrae>;<BAS>;<MIN>;IGNORE
+<U0A8F> <gvw-e>;<BAS>;<MIN>;IGNORE
+<U0A90> <gvw-ai>;<BAS>;<MIN>;IGNORE
+<U0A91> <gvw-candrao>;<BAS>;<MIN>;IGNORE
+<U0A93> <gvw-o>;<BAS>;<MIN>;IGNORE
+<U0A94> <gvw-au>;<BAS>;<MIN>;IGNORE
+<U0A95> <g-ka>;<BAS>;<MIN>;IGNORE
+<U0A96> <g-kha>;<BAS>;<MIN>;IGNORE
+<U0A97> <g-ga>;<BAS>;<MIN>;IGNORE
+<U0A98> <g-gha>;<BAS>;<MIN>;IGNORE
+<U0A99> <g-nga>;<BAS>;<MIN>;IGNORE
+<U0A9A> <g-ca>;<BAS>;<MIN>;IGNORE
+<U0A9B> <g-cha>;<BAS>;<MIN>;IGNORE
+<U0A9C> <g-ja>;<BAS>;<MIN>;IGNORE
+<U0A9D> <g-jha>;<BAS>;<MIN>;IGNORE
+<U0A9E> <g-nya>;<BAS>;<MIN>;IGNORE
+<U0A9F> <g-tta>;<BAS>;<MIN>;IGNORE
+<U0AA0> <g-ttha>;<BAS>;<MIN>;IGNORE
+<U0AA1> <g-dda>;<BAS>;<MIN>;IGNORE
+<U0AA2> <g-ddha>;<BAS>;<MIN>;IGNORE
+<U0AA3> <g-nna>;<BAS>;<MIN>;IGNORE
+<U0AA4> <g-ta>;<BAS>;<MIN>;IGNORE
+<U0AA5> <g-tha>;<BAS>;<MIN>;IGNORE
+<U0AA6> <g-da>;<BAS>;<MIN>;IGNORE
+<U0AA7> <g-dha>;<BAS>;<MIN>;IGNORE
+<U0AA8> <g-na>;<BAS>;<MIN>;IGNORE
+<U0AAA> <g-pa>;<BAS>;<M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NORE
+<U0AC9> <gm-candrao>;<BAS>;<MIN>;IGNORE
+<U0ACB> <gm-o>;<BAS>;<MIN>;IGNORE
+<U0ACC> <gm-au>;<BAS>;<MIN>;IGNORE
+<U0A82> <gvd-anuswara>;<BAS>;<MIN>;IGNORE
+<U0A81> <gvd-chandrabindu>;<BAS>;<MIN>;IGNORE
+<U0A83> <gvd-visarg>;<BAS>;<MIN>;IGNORE
+<U0ACD> <g-halant>;<BAS>;<MIN>;IGNORE
+<U0ABC> IGNORE;<GNKT>;<MIN>;IGNORE
+
order_end
END LC_COLLATE
Modified: fsf/trunk/libc/string/strfry.c
==============================================================================
--- fsf/trunk/libc/string/strfry.c (original)
+++ fsf/trunk/libc/string/strfry.c Tue Apr 1 00:05:05 2008
@@ -26,7 +26,6 @@
{
static int init;
static struct random_data rdata;
- size_t len, i;
if (!init)
{
@@ -37,17 +36,18 @@
init = 1;
}
- len = strlen (string) - 1;
- for (i = 0; i < len; ++i)
- {
- int32_t j;
- __random_r (&rdata, &j);
- j = j % (len - i) + i;
+ size_t len = strlen (string);
+ if (len > 0)
+ for (size_t i = 0; i < len - 1; ++i)
+ {
+ int32_t j;
+ __random_r (&rdata, &j);
+ j = j % (len - i) + i;
- char c = string[i];
- string[i] = string[j];
- string[j] = c;
- }
+ char c = string[i];
+ string[i] = string[j];
+ string[j] = c;
+ }
return string;
}