aboutsummaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-06 17:49:18 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-06 17:49:18 +0000
commite7f21fa6fbbad55ff2654e39732f54bf147cbfce (patch)
tree9797799d8e0cc2e33746ec176d611cac4571916e /locale
parentee62473f2bd030dc42b601c06dae78e69b6cdaec (diff)
downloadglibc-e7f21fa6fbbad55ff2654e39732f54bf147cbfce.tar.xz
glibc-e7f21fa6fbbad55ff2654e39732f54bf147cbfce.zip
Update.
2001-04-06 Ulrich Drepper <drepper@redhat.com> * iconv/iconv_open.c: Move strip and upstr definitions... * iconv/gconv_charset.h: ...here. New file. * iconv/gconv_db.c (once): Move to file level. (do_lookup_alias): Split out from __gconv_find_transform. (__gconv_find_transform): Call do_lookup_alias. (__gconv_loopup_alias): New function. * locale/langinfo.h: Define _NL_*_CODESET values for all categories but LC_CTYPE. * locale/categories.def: Add entries for new _NL_*_CODESET values. * locale/C-ctype.c: Use _nl_C_codeset to initialize CODESET entry. * locale/C-address.c: Initialize _NL_*_CODESET element. * locale/C-collate.c: Likewise. * locale/C-identification.c: Likewise. * locale/C-measurement.c: Likewise. * locale/C-messages.c: Likewise. * locale/C-monetary.c: Likewise. * locale/C-name.c: Likewise. * locale/C-numeric.c: Likewise. * locale/C-paper.c: Likewise. * locale/C-telephone.c: Likewise. * locale/C-time.c: Likewise. * locale/localeinfo.h: Declare _nl_C_codeset. * locale/C_name.c: Define _nl_C_codeset. * locale/findlocale.c: Before accepting locale check that the used charset does not conflict with what the locale name said. * locale/programs/ld-address.c: Emit codeset information. * locale/programs/ld-collate.c: Likewise. * locale/programs/ld-identification.c: Likewise. * locale/programs/ld-measurement.c: Likewise. * locale/programs/ld-messages.c: Likewise. * locale/programs/ld-monetary.c: Likewise. * locale/programs/ld-name.c: Likewise. * locale/programs/ld-numeric.c: Likewise. * locale/programs/ld-paper.c: Likewise. * locale/programs/ld-telephone.c: Likewise. * locale/programs/ld-time.c: Likewise. * localedata/tests-mbwc/tst_funcs.h (TST_HEAD_LOCALE): It is an error if the locale data couldn't be found. * string/Makefile: Define tst-strxfrm-ENV. * ysdeps/unix/sysv/linux/ia64/getcontext.S: Fix comment.
Diffstat (limited to 'locale')
-rw-r--r--locale/C-address.c7
-rw-r--r--locale/C-collate.c8
-rw-r--r--locale/C-ctype.c4
-rw-r--r--locale/C-identification.c7
-rw-r--r--locale/C-measurement.c7
-rw-r--r--locale/C-messages.c7
-rw-r--r--locale/C-monetary.c7
-rw-r--r--locale/C-name.c7
-rw-r--r--locale/C-numeric.c7
-rw-r--r--locale/C-paper.c7
-rw-r--r--locale/C-telephone.c7
-rw-r--r--locale/C-time.c7
-rw-r--r--locale/C_name.c3
-rw-r--r--locale/categories.def15
-rw-r--r--locale/findlocale.c52
-rw-r--r--locale/langinfo.h12
-rw-r--r--locale/localeinfo.h3
-rw-r--r--locale/programs/ld-address.c5
-rw-r--r--locale/programs/ld-collate.c6
-rw-r--r--locale/programs/ld-identification.c12
-rw-r--r--locale/programs/ld-measurement.c5
-rw-r--r--locale/programs/ld-messages.c5
-rw-r--r--locale/programs/ld-monetary.c5
-rw-r--r--locale/programs/ld-name.c5
-rw-r--r--locale/programs/ld-numeric.c5
-rw-r--r--locale/programs/ld-paper.c5
-rw-r--r--locale/programs/ld-telephone.c5
-rw-r--r--locale/programs/ld-time.c6
28 files changed, 191 insertions, 40 deletions
diff --git a/locale/C-address.c b/locale/C-address.c
index 75a51d276b..0d93cb9f95 100644
--- a/locale/C-address.c
+++ b/locale/C-address.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -31,7 +31,7 @@ const struct locale_data _nl_C_LC_ADDRESS =
UNDELETABLE,
0,
NULL,
- 12,
+ 13,
{
{ string: "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N" },
{ string: "" },
@@ -44,6 +44,7 @@ const struct locale_data _nl_C_LC_ADDRESS =
{ string: "" },
{ string: "" },
{ string: "" },
- { string: "" }
+ { string: "" },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-collate.c b/locale/C-collate.c
index 964ea50113..575dda7206 100644
--- a/locale/C-collate.c
+++ b/locale/C-collate.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
@@ -105,7 +105,7 @@ const struct locale_data _nl_C_LC_COLLATE =
UNDELETABLE,
0,
NULL,
- 18,
+ 19,
{
/* _NL_COLLATE_NRULES */
{ word: 0 },
@@ -142,6 +142,8 @@ const struct locale_data _nl_C_LC_COLLATE =
/* _NL_COLLATE_COLLSEQMB */
{ string: collseqmb },
/* _NL_COLLATE_COLLSEQWC */
- { string: (const char *) collseqwc }
+ { string: (const char *) collseqwc },
+ /* _NL_COLLATE_CODESET */
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-ctype.c b/locale/C-ctype.c
index 6e036f6266..12ac7c1490 100644
--- a/locale/C-ctype.c
+++ b/locale/C-ctype.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
@@ -590,7 +590,7 @@ const struct locale_data _nl_C_LC_CTYPE =
/* _NL_CTYPE_MB_CUR_MAX */
{ word: 1 },
/* _NL_CTYPE_CODESET_NAME */
- { string: "ANSI_X3.4-1968" },
+ { string: _nl_C_codeset },
/* _NL_CTYPE_TOUPPER32 */
{ string: (const char *) &_nl_C_LC_CTYPE_toupper[128] },
/* _NL_CTYPE_TOLOWER32 */
diff --git a/locale/C-identification.c b/locale/C-identification.c
index 89ebf3149e..6eef07d30b 100644
--- a/locale/C-identification.c
+++ b/locale/C-identification.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -31,7 +31,7 @@ const struct locale_data _nl_C_LC_IDENTIFICATION =
UNDELETABLE,
0,
NULL,
- 15,
+ 16,
{
{ string: "ISO/IEC 14652 i18n FDCC-set" },
{ string: "ISO/IEC JTC1/SC22/WG20 - internationalization" },
@@ -51,6 +51,7 @@ const struct locale_data _nl_C_LC_IDENTIFICATION =
"i18n:1999\0" "i18n:1999\0" "\0" "i18n:1999\0"
"i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0"
"i18n:1999\0" "i18n:1999\0" "i18n:1999\0" "i18n:1999\0"
- "i18n:1999" }
+ "i18n:1999" },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-measurement.c b/locale/C-measurement.c
index 92de2a9eb5..eddd549408 100644
--- a/locale/C-measurement.c
+++ b/locale/C-measurement.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -31,8 +31,9 @@ const struct locale_data _nl_C_LC_MEASUREMENT =
UNDELETABLE,
0,
NULL,
- 1,
+ 2,
{
- { string: "\1" }
+ { string: "\1" },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-messages.c b/locale/C-messages.c
index 3f96bb0f2f..c2d7cbe59d 100644
--- a/locale/C-messages.c
+++ b/locale/C-messages.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -31,11 +31,12 @@ const struct locale_data _nl_C_LC_MESSAGES =
UNDELETABLE,
0,
NULL,
- 4,
+ 5,
{
{ string: "^[yY]" },
{ string: "^[nN]" },
{ string: "" },
- { string: "" }
+ { string: "" },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-monetary.c b/locale/C-monetary.c
index e04b2de4f0..6704aa1aa1 100644
--- a/locale/C-monetary.c
+++ b/locale/C-monetary.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
@@ -35,7 +35,7 @@ const struct locale_data _nl_C_LC_MONETARY =
UNDELETABLE,
0,
NULL,
- 45,
+ 46,
{
{ string: "" },
{ string: "" },
@@ -81,6 +81,7 @@ const struct locale_data _nl_C_LC_MONETARY =
{ word: 99991231 },
{ word: 1 },
{ word: (unsigned int) L'\0' },
- { word: (unsigned int) L'\0' }
+ { word: (unsigned int) L'\0' },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-name.c b/locale/C-name.c
index fdce4cb3cc..a34f7dc4aa 100644
--- a/locale/C-name.c
+++ b/locale/C-name.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -31,13 +31,14 @@ const struct locale_data _nl_C_LC_NAME =
UNDELETABLE,
0,
NULL,
- 6,
+ 7,
{
{ string: "%p%t%g%t%m%t%f" },
{ string: "" },
{ string: "" },
{ string: "" },
{ string: "" },
- { string: "" }
+ { string: "" },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-numeric.c b/locale/C-numeric.c
index 822780dcdd..6afcd68d83 100644
--- a/locale/C-numeric.c
+++ b/locale/C-numeric.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1995.
@@ -28,12 +28,13 @@ const struct locale_data _nl_C_LC_NUMERIC =
UNDELETABLE,
0,
NULL,
- 5,
+ 6,
{
{ string: "." },
{ string: "" },
{ string: "" },
{ word: (unsigned int) L'.' },
- { word: (unsigned int) L'\0' }
+ { word: (unsigned int) L'\0' },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-paper.c b/locale/C-paper.c
index 19f847c22f..21f9c99ec0 100644
--- a/locale/C-paper.c
+++ b/locale/C-paper.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -31,9 +31,10 @@ const struct locale_data _nl_C_LC_PAPER =
UNDELETABLE,
0,
NULL,
- 2,
+ 3,
{
{ word: 297 },
- { word: 210 }
+ { word: 210 },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-telephone.c b/locale/C-telephone.c
index adf407db2c..6d40b6f0b8 100644
--- a/locale/C-telephone.c
+++ b/locale/C-telephone.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -31,11 +31,12 @@ const struct locale_data _nl_C_LC_TELEPHONE =
UNDELETABLE,
0,
NULL,
- 4,
+ 5,
{
{ string: "+%c %a %l" },
{ string: "" },
{ string: "" },
- { string: "" }
+ { string: "" },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C-time.c b/locale/C-time.c
index 17eed63ae1..184dde1fc2 100644
--- a/locale/C-time.c
+++ b/locale/C-time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -30,7 +30,7 @@ const struct locale_data _nl_C_LC_TIME =
UNDELETABLE,
0,
NULL,
- 110,
+ 111,
{
{ string: "Sun" },
{ string: "Mon" },
@@ -141,6 +141,7 @@ const struct locale_data _nl_C_LC_TIME =
{ string: "\1" },
{ string: "" },
{ string: "%a %b %e %H:%M:%S %Z %Y" },
- { wstr: (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y" }
+ { wstr: (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y" },
+ { string: _nl_C_codeset }
}
};
diff --git a/locale/C_name.c b/locale/C_name.c
index fa2ac0539c..7612544f2f 100644
--- a/locale/C_name.c
+++ b/locale/C_name.c
@@ -6,3 +6,6 @@
/* Name of our standard locale. */
const char _nl_C_name[] = "C";
const char _nl_POSIX_name[] = "POSIX";
+
+/* The standard codeset. */
+const char _nl_C_codeset[] = "ANSI_X3.4-1968";
diff --git a/locale/categories.def b/locale/categories.def
index 14b02dfb02..24e5dad1f2 100644
--- a/locale/categories.def
+++ b/locale/categories.def
@@ -1,5 +1,5 @@
/* Definition of all available locale categories and their items. -*- C -*-
- Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -57,6 +57,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_COLLATE_SYMB_EXTRAMB, "collate-symb-extramb", std, wstring)
DEFINE_ELEMENT (_NL_COLLATE_COLLSEQMB, "collate-collseqmb", std, wstring)
DEFINE_ELEMENT (_NL_COLLATE_COLLSEQWC, "collate-collseqwc", std, wstring)
+ DEFINE_ELEMENT (_NL_COLLATE_CODESET, "collate-codeset", std, string)
), NO_POSTLOAD)
@@ -182,6 +183,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_MONETARY_CONVERSION_RATE, "conversion_rate", std, wordarray, 2, 2)
DEFINE_ELEMENT (_NL_MONETARY_DECIMAL_POINT_WC, "monetary-decimal-point-wc", std, word)
DEFINE_ELEMENT (_NL_MONETARY_THOUSANDS_SEP_WC, "monetary-thousands-sep-wc", std, word)
+ DEFINE_ELEMENT (_NL_MONETARY_CODESET, "monetary-codeset", std, string)
), NO_POSTLOAD)
@@ -194,6 +196,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (GROUPING, "grouping", std, bytearray)
DEFINE_ELEMENT (_NL_NUMERIC_DECIMAL_POINT_WC, "numeric-decimal-point-wc", std, word)
DEFINE_ELEMENT (_NL_NUMERIC_THOUSANDS_SEP_WC, "numeric-thousands-sep-wc", std, word)
+ DEFINE_ELEMENT (_NL_NUMERIC_CODESET, "numeric-codeset", std, string)
), NO_POSTLOAD)
@@ -242,6 +245,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_TIME_TIMEZONE, "timezone", std, string)
DEFINE_ELEMENT (_DATE_FMT, "date_fmt", opt, string)
DEFINE_ELEMENT (_NL_W_DATE_FMT, "wide-date_fmt", opt, wstring)
+ DEFINE_ELEMENT (_NL_TIME_CODESET, "time-codeset", std, string)
), _nl_postload_time)
@@ -253,6 +257,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (NOEXPR, "noexpr", std, string)
DEFINE_ELEMENT (YESSTR, "yesstr", opt, string)
DEFINE_ELEMENT (NOSTR, "nostr", opt, string)
+ DEFINE_ELEMENT (_NL_MESSAGES_CODESET, "messages-codeset", std, string)
), NO_POSTLOAD)
DEFINE_CATEGORY
@@ -261,6 +266,7 @@ DEFINE_CATEGORY
(
DEFINE_ELEMENT (_NL_PAPER_HEIGHT, "height", std, word)
DEFINE_ELEMENT (_NL_PAPER_WIDTH, "width", std, word)
+ DEFINE_ELEMENT (_NL_PAPER_CODESET, "paper-codeset", std, string)
), NO_POSTLOAD)
DEFINE_CATEGORY
@@ -273,6 +279,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_NAME_NAME_MRS, "name_mrs", std, string)
DEFINE_ELEMENT (_NL_NAME_NAME_MISS, "name_miss", std, string)
DEFINE_ELEMENT (_NL_NAME_NAME_MS, "name_ms", std, string)
+ DEFINE_ELEMENT (_NL_NAME_CODESET, "name-codeset", std, string)
), NO_POSTLOAD)
DEFINE_CATEGORY
@@ -291,6 +298,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_ADDRESS_LANG_AB, "lang_ab", std, string)
DEFINE_ELEMENT (_NL_ADDRESS_LANG_TERM, "lang_term", std, string)
DEFINE_ELEMENT (_NL_ADDRESS_LANG_LIB, "lang_lib", std, string)
+ DEFINE_ELEMENT (_NL_ADDRESS_CODESET, "address-codeset", std, string)
), NO_POSTLOAD)
DEFINE_CATEGORY
@@ -301,6 +309,7 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_TELEPHONE_TEL_DOM_FMT, "tel_dom_fmt", std, string)
DEFINE_ELEMENT (_NL_TELEPHONE_INT_SELECT, "int_select", std, string)
DEFINE_ELEMENT (_NL_TELEPHONE_INT_PREFIX, "int_prefix", std, string)
+ DEFINE_ELEMENT (_NL_TELEPHONE_CODESET, "telephone-codeset", std, string)
), NO_POSTLOAD)
DEFINE_CATEGORY
@@ -308,6 +317,7 @@ DEFINE_CATEGORY
LC_MEASUREMENT, "LC_MEASUREMENT",
(
DEFINE_ELEMENT (_NL_MEASUREMENT_MEASUREMENT, "measurement", std, byte)
+ DEFINE_ELEMENT (_NL_MEASUREMENT_CODESET, "measurement-codeset", std, string)
), NO_POSTLOAD)
DEFINE_CATEGORY
@@ -328,5 +338,6 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_IDENTIFICATION_ABBREVIATION, "abbreviation", std, string)
DEFINE_ELEMENT (_NL_IDENTIFICATION_REVISION, "revision", std, string)
DEFINE_ELEMENT (_NL_IDENTIFICATION_DATE, "date", std, string)
- DEFINE_ELEMENT (_NL_IDENTIFICATION_CATEGORY, "category", std, stringarray, 13, 13)
+ DEFINE_ELEMENT (_NL_IDENTIFICATION_CATEGORY, "category", std, stringarray, 13, 13)
+ DEFINE_ELEMENT (_NL_IDENTIFICATION_CODESET, "identification-codeset", std, string)
), NO_POSTLOAD)
diff --git a/locale/findlocale.c b/locale/findlocale.c
index 948dee2a46..de2dc2ea66 100644
--- a/locale/findlocale.c
+++ b/locale/findlocale.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <assert.h>
#include <locale.h>
#includ