diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | localedata/ChangeLog | 5 | ||||
-rw-r--r-- | localedata/locales/hne_IN | 180 | ||||
-rw-r--r-- | scripts/firstversions.awk | 31 | ||||
-rw-r--r-- | scripts/versions.awk | 8 |
5 files changed, 223 insertions, 9 deletions
@@ -1,3 +1,11 @@ +2008-12-05 Joseph Myers <joseph@codesourcery.com> + Ulrich Drepper <drepper@redhat.com> + + * scripts/firstversion.awk: Use custom comparison function to compare + version numbers. + * scripts/versions.awk: Use sort invocation which can handle + multi-digit sub-version numbers. + 2008-12-04 Ulrich Drepper <drepper@redhat.com> * locale/programs/ld-address.c (DEFINE_LANGUAGE_CODE2): Define. diff --git a/localedata/ChangeLog b/localedata/ChangeLog index bc339ff..754d880 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2008-12-05 Ulrich Drepper <drepper@redhat.com> + + * locales/hne_IN: New file. + Contributed by Pravin Satpute <psatpute@redhat.com>. + 2008-10-31 Ulrich Drepper <drepper@redhat.com> [BZ #6920] diff --git a/localedata/locales/hne_IN b/localedata/locales/hne_IN new file mode 100644 index 0000000..b32398a --- /dev/null +++ b/localedata/locales/hne_IN @@ -0,0 +1,180 @@ +comment_char % +escape_char / +% Chhattisgarhi language locale for India. +% Contributed by Pravin Satpute <psatpute@redhat.com> and +% Ravishankar Shrivastava <raviratlami@gmail.com>. + +LC_IDENTIFICATION +title "Chhattisgarhi language locale for India" +source "Red Hat, Pune" +address "Marisfot III, Marigold Premises, East-Wing, Kalyaninagar, Pune, India-411014" +contact "" +email "bug-glibc-locales@gnu.org" +tel "" +fax "" +language "Chhattisgarhi" +territory "India" +revision "1.0" +date "2008-12-03" +% +category "hne_IN:2008";LC_IDENTIFICATION +category "hne_IN:2008";LC_CTYPE +category "hne_IN:2008";LC_COLLATE +category "hne_IN:2008";LC_TIME +category "hne_IN:2008";LC_NUMERIC +category "hne_IN:2008";LC_MONETARY +category "hne_IN:2008";LC_MESSAGES +category "hne_IN:2008";LC_PAPER +category "hne_IN:2008";LC_NAME +category "hne_IN:2008";LC_ADDRESS +category "hne_IN:2008";LC_TELEPHONE + +END LC_IDENTIFICATION + +LC_CTYPE +copy "hi_IN" +END LC_CTYPE + +LC_COLLATE +copy "hi_IN" +END LC_COLLATE + +LC_MONETARY +copy "hi_IN" +END LC_MONETARY + + +LC_NUMERIC +copy "hi_IN" +END LC_NUMERIC + + +LC_TIME +% This is the POSIX Locale definition for the LC_TIME category. +% These are generated based on XML base Locale difintion file +% for IBM Class for Unicode/Java +% +% Abbreviated weekday names (%a) +abday "<U0907><U0924><U0020>";/ + "<U0938><U094B><U092E><U0020>";/ + "<U092E><U0902><U0917><U0020>";/ + "<U092C><U0941><U0927><U0020>";/ + "<U092C><U093F><U0930><U0020>";/ + "<U0938><U0941><U0915>";/ + "<U0938><U0928><U093F>" +% +% Full weekday names (%A) +day "<U0907><U0924><U0935><U093E><U0930><U0020>";/ + "<U0938><U094B><U092E><U0935><U093E><U0930><U0020>";/ + "<U092E><U0902><U0917><U0932><U0935><U093E><U0930><U0020>";/ + "<U092C><U0941><U0927><U0935><U093E><U0930><U0020>";/ + "<U092C><U093F><U0930><U0938><U092A><U0924><U0020>";/ + "<U0938><U0941><U0915><U0930><U0935><U093E><U0930><U0020>";/ + "<U0938><U0928><U093F><U0935><U093E><U0930><U0020>" +% +% Abbreviated month names (%b) +abmon "<U091C><U0928>";/ + "<U092B><U0930>";/ + "<U092E><U093E><U0930><U094D><U091A>";/ + "<U0905><U092A>";/ + "<U092E><U0908>";"<U091C><U0942><U0928>";/ + "<U091C><U0941><U0932><U093E>";/ + "<U0905><U0917>";/ + "<U0938><U093F><U0924>";/ + "<U0905><U0915><U091F><U0942>";/ + "<U0928><U0935>";/ + "<U0926><U093F><U0938>" +% +% Full month names (%B) +mon "<U091C><U0928><U0935><U0930><U0940>";/ + "<U092B><U0930><U0935><U0930><U0940>";/ + "<U092E><U093E><U0930><U094D><U091A>";/ + "<U0905><U092A><U0930><U0947><U0932>";/ + "<U092E><U0908>";"<U091C><U0942><U0928>";/ + "<U091C><U0941><U0932><U093E><U0908>";/ + "<U0905><U0917><U0938><U094D><U0924>";/ + "<U0938><U093F><U0924><U092E><U092C><U0930>";/ + "<U0905><U0915><U091F><U0942><U092C><U0930>";/ + "<U0928><U0935><U092E><U092C><U0930>";/ + "<U0926><U093F><U0938><U092E><U092C><U0930>" +% +% Equivalent of AM PM +am_pm "<U092C><U093F><U0939><U093F><U0928><U093F><U092F><U093E><U0901>";/ + "<U092E><U0902><U091D><U0928><U093F><U092F><U093E><U0901>" +% +% Appropriate date and time representation +% %A %d %b %Y%I:%M:%S %Z +d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/ +<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/ +<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>" +% +% Appropriate date representation +% %A %d %b %Y +d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/ +<U0020><U0025><U0059>" +% +% Appropriate time representation +% %I:%M:%S %Z +t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/ +<U0020><U0020><U0025><U005A>" +% +% Appropriate 12 h time representation (%r) +t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/ +<U0020><U0025><U0070><U0020><U0025><U005A>" +% +date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/ +<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/ +<U0025><U005A><U0020><U0025><U0059>" +END LC_TIME + + +LC_MESSAGES +yesexpr "<U005E><U005B><U0939><U0935><U0079><U0059><U005D>" +noexpr "<U005E><U005B><U0928><U0907><U006E><U004E><U005D>" +yesstr "<U0939><U0935>" +nostr "<U0928><U0907>" +END LC_MESSAGES + + +LC_PAPER +copy "hi_IN" +END LC_PAPER + + +LC_NAME +% This is the ISO_IEC TR14652 Locale definition for the +% LC_NAME category. +% +name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/ +<U0025><U0067>" +name_gen "" +name_mr "<U0938><U093F><U0930><U0940><U092E><U093E><U0928>" +name_mrs "<U0938><U093F><U0930><U0940><U092E><U0924><U0940>" +name_miss "<U0915><U0941><U0902><U0935><U093E><U0930><U0940>" +name_ms "<U0915><U0941><U0902>" + +END LC_NAME + + +LC_ADDRESS +% This is the ISO_IEC TR14652 Locale definition for the +% LC_ADDRESS +postal_fmt "<U0025><U007A><U0025><U0063><U0025><U0054><U0025><U0073>/ +<U0025><U0062><U0025><U0065><U0025><U0072>" + +country_ab2 "<U0049><U004E>" +country_ab3 "<U0049><U004E><U0044>" +country_num 356 +lang_term "<U0068><U006E><U0065>" + +END LC_ADDRESS + + +LC_TELEPHONE +copy "hi_IN" +END LC_TELEPHONE + + +LC_MEASUREMENT +copy "hi_IN" +END LC_MEASUREMENT diff --git a/scripts/firstversions.awk b/scripts/firstversions.awk index 8da92ae..4a20fc0 100644 --- a/scripts/firstversions.awk +++ b/scripts/firstversions.awk @@ -1,6 +1,31 @@ # Script to preprocess Versions.all lists based on "earliest version" # specifications in the shlib-versions file. +# Return -1, 0 or 1 according to whether v1 is less than, equal to or +# greater than v2 as a version string. Simplified from GNU Autoconf +# version; this one does not need to handle .0x fraction-style versions. +function vers_compare (v1, v2) +{ + while (length(v1) && length(v2)) { + if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { + for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue; + for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue; + d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1); + d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1); + d1 += 0; + d2 += 0; + } else { + d1 = substr(v1, 1, 1); v1 = substr(v1, 2); + d2 = substr(v2, 1, 1); v2 = substr(v2, 2); + } + if (d1 < d2) return -1; + if (d1 > d2) return 1; + } + if (length(v2)) return -1; + if (length(v1)) return 1; + return 0; +} + NF > 2 && $2 == ":" { for (i = 0; i <= NF - 3; ++i) firstversion[$1, i] = $(3 + i); @@ -25,10 +50,8 @@ $1 == "}" { { if ((thislib, idx[thislib]) in firstversion) { - # XXX relative string comparison loses if we ever have multiple digits - # between dots in GLIBC_x.y[.z] names. f = v = firstversion[thislib, idx[thislib]]; - while ($1 >= v) { + while (vers_compare($1, v) >= 0) { delete firstversion[thislib, idx[thislib]]; idx[thislib]++; if ((thislib, idx[thislib]) in firstversion) @@ -39,7 +62,7 @@ $1 == "}" { if ($1 == v || $1 == f) # This version was the specified earliest version itself. print; - else if ($1 < v) { + else if (vers_compare($1, v) < 0) { # This version is older than the specified earliest version. print " " $1, "=", v; # Record that V has been referred to, so we will be sure to emit it diff --git a/scripts/versions.awk b/scripts/versions.awk index e642b3d..22b1c8e 100644 --- a/scripts/versions.awk +++ b/scripts/versions.awk @@ -28,10 +28,8 @@ BEGIN { close(defsfile); tmpfile = buildroot "Versions.tmp"; - # Note this sorting presumes only single digits between dots for proper - # numeric ordering. sort -n doesn't do quite the right thing either, - # and in some non-GNU sort implementations does not sort at all. - sort = "sort > " tmpfile; + # POSIX sort needed. + sort = "sort -t. -k 1,1 -k 2n,2n -k 3 > " tmpfile; } # Remove comment lines. @@ -135,5 +133,5 @@ END { printf("\n"); closeversion(oldver, veryoldver); close_and_move(outfile, real_outfile); - system("rm -f " tmpfile); + #system("rm -f " tmpfile); } |