aboutsummaryrefslogtreecommitdiff
path: root/wctype
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-28 19:52:40 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-28 19:52:40 +0000
commit5e4633932782f08412e8cee75236f4f458591a3d (patch)
tree692ccf39058d6d1df8ac1067462731b8b7d8dfb1 /wctype
parenteac4282fa6325e5633bdfee7a6afd9f943b34b1a (diff)
downloadglibc-5e4633932782f08412e8cee75236f4f458591a3d.tar
glibc-5e4633932782f08412e8cee75236f4f458591a3d.tar.gz
glibc-5e4633932782f08412e8cee75236f4f458591a3d.tar.bz2
glibc-5e4633932782f08412e8cee75236f4f458591a3d.zip
Update.
2000-07-27 Bruno Haible <haible@clisp.cons.org> * locale/C-ctype.c (_nl_C_LC_CTYPE): Swap the two names in _NL_CTYPE_MAP_NAMES. * locale/localeinfo.h (__TOW_toupper, __TOW_tolower): New enum values. * wctype/wcfuncs.c (towlower, towupper): Use them. * wctype/wcfuncs_l.c (__towlower_l, __towupper_l): Likewise. * wctype/wctrans.c (wctrans): Likewise. * wctype/wctrans_l.c (__wctrans_l): Likewise. 2000-07-27 Bruno Haible <haible@clisp.cons.org> * posix/fnmatch.c (is_char_class): Fix logic. Avoid buffer overrun. Use the optimized version of this function outside glibc as well.
Diffstat (limited to 'wctype')
-rw-r--r--wctype/wcfuncs.c4
-rw-r--r--wctype/wcfuncs_l.c4
-rw-r--r--wctype/wctrans.c4
-rw-r--r--wctype/wctrans_l.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/wctype/wcfuncs.c b/wctype/wcfuncs.c
index f241ed5587..ea697c2729 100644
--- a/wctype/wcfuncs.c
+++ b/wctype/wcfuncs.c
@@ -100,7 +100,7 @@ wint_t
else
{
/* New locale format. */
- return wctrans_table_lookup (__ctype32_wctrans[1], wc);
+ return wctrans_table_lookup (__ctype32_wctrans[__TOW_tolower], wc);
}
}
@@ -123,6 +123,6 @@ wint_t
else
{
/* New locale format. */
- return wctrans_table_lookup (__ctype32_wctrans[0], wc);
+ return wctrans_table_lookup (__ctype32_wctrans[__TOW_toupper], wc);
}
}
diff --git a/wctype/wcfuncs_l.c b/wctype/wcfuncs_l.c
index 7b8eb96ce6..5ef543cc47 100644
--- a/wctype/wcfuncs_l.c
+++ b/wctype/wcfuncs_l.c
@@ -86,7 +86,7 @@ wint_t
else
{
/* New locale format. */
- size_t i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_MAP_OFFSET)].word + 1;
+ size_t i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_MAP_OFFSET)].word + __TOW_tolower;
const char *desc = locale->__locales[LC_CTYPE]->values[i].string;
return wctrans_table_lookup (desc, wc);
}
@@ -113,7 +113,7 @@ wint_t
else
{
/* New locale format. */
- size_t i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_MAP_OFFSET)].word + 0;
+ size_t i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_MAP_OFFSET)].word + __TOW_toupper;
const char *desc = locale->__locales[LC_CTYPE]->values[i].string;
return wctrans_table_lookup (desc, wc);
}
diff --git a/wctype/wctrans.c b/wctype/wctrans.c
index 3dd72231cd..6c61c0b630 100644
--- a/wctype/wctrans.c
+++ b/wctype/wctrans.c
@@ -50,9 +50,9 @@ wctrans (const char *property)
if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_HASH_SIZE) != 0)
{
/* Old locale format. */
- if (cnt == 0)
+ if (cnt == __TOW_toupper)
return (wctrans_t) __ctype32_toupper;
- else if (cnt == 1)
+ else if (cnt == __TOW_tolower)
return (wctrans_t) __ctype32_tolower;
/* We have to search the table. */
diff --git a/wctype/wctrans_l.c b/wctype/wctrans_l.c
index acd22ea556..3b8b6050b5 100644
--- a/wctype/wctrans_l.c
+++ b/wctype/wctrans_l.c
@@ -43,9 +43,9 @@ __wctrans_l (const char *property, __locale_t locale)
if (locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_HASH_SIZE)].word == 0)
{
/* Old locale format. */
- if (cnt == 0)
+ if (cnt == __TOW_toupper)
return (wctrans_t) locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_TOUPPER32)].string;
- else if (cnt == 1)
+ else if (cnt == __TOW_tolower)
return (wctrans_t) locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_TOLOWER32)].string;
/* We have to search the table. */