2018-01-01 01:32:25 +01:00
|
|
|
/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
1997-02-15 05:31:36 +01:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 06:58:11 +02:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
1997-02-15 05:31:36 +01:00
|
|
|
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 06:58:11 +02:00
|
|
|
Lesser General Public License for more details.
|
1997-02-15 05:31:36 +01:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-10 00:18:22 +01:00
|
|
|
License along with the GNU C Library; if not, see
|
|
|
|
<http://www.gnu.org/licenses/>. */
|
1997-02-15 05:31:36 +01:00
|
|
|
|
2005-10-17 17:48:30 +02:00
|
|
|
#include <ctype.h>
|
1997-02-15 05:31:36 +01:00
|
|
|
#include <wctype.h>
|
2000-02-13 08:40:16 +01:00
|
|
|
#include <stdint.h>
|
2001-01-26 14:42:50 +01:00
|
|
|
#include <locale.h>
|
Update.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* wctype/wcfuncs.c (iswblank): New function.
* wctype/wcfuncs_l.c (__iswblank_l): New function.
* wctype/wcextra.c: Remove file.
* wctype/wcextra_l.c: Remove file.
* wctype/Makefile (distribute): Remove wcextra and wcextra_l.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (collate_output): Remove redundant
assert call.
* string/strcoll.c: Likewise.
* string/strxfrm.c: Include assert.h. Add assert calls like in
string/strcoll.c.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/categories.def (_NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_NAMES, _NL_CTYPE_NAMES,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Remove definitions.
* locale/langinfo.h (_NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS,
_NL_COLLATE_NAMES): Rename to _NL_COLLATE_GAP1/2/3 respectively.
(_NL_CTYPE_NAMES): Rename to _NL_CTYPE_GAP3.
(_NL_CTYPE_GAP3): Rename to _NL_CTYPE_GAP4.
(_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Rename to
_NL_CTYPE_GAP5/6 respectively.
* locale/C-ctype.c (_nl_C_LC_CTYPE): Update.
* ctype/ctype-info.c (__ctype_names, __ctype_width): Remove variables.
* locale/lc-ctype.c (_nl_postload_ctype): Assume new locale format.
Don't initialize __ctype_names and __ctype_width.
* wctype/cname-lookup.h: Remove file.
* wctype/Makefile (distribute): Remove cname-lookup.h.
* wctype/wchar-lookup.h: Include stdint.h.
* wctype/wctype.c (__wctype): Assume new locale format.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/iswctype.c: Don't include cname-lookup.h.
(__iswctype): Assume new locale format.
* wctype/iswctype_l.c: Don't include cname-lookup.h.
(__iswctype_l): Assume new locale format.
* wctype/wctrans.c: Don't include ctype.h.
(wctrans): Assume new locale format.
* wctype/wctrans_l.c (__wctrans_l): Likewise.
* wctype/towctrans.c: Don't include cname-lookup.h.
(__towctrans): Assume new locale format.
* wctype/towctrans_l.c: Don't include cname-lookup.h.
(__towctrans_l): Assume new locale format.
* wctype/wcfuncs.c: Don't include ctype.h and cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__ctype32_b, __ctype32_toupper, __ctype32_tolower): Remove
declarations.
(iswalnum, iswalpha, iswcntrl, iswdigit, iswlower, iswgraph, iswprint,
iswpunct, iswspace, iswupper, iswxdigit): Assume new locale format.
(towlower, towupper): Likewise.
* wctype/wcfuncs_l.c: Don't include cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l): Assume new locale format.
(__towlower_l, __towupper_l): Likewise.
* wcsmbs/wcwidth.h: Don't include cname-lookup.h.
(__ctype32_b): Remove declaration.
(internal_wcwidth): Assume new locale format.
* locale/programs/ld-ctype.c (struct locale_ctype_t): Remove fields
plane_size, plane_cnt, names, width. Rename map to map_b, rename map32
to map32_b, rename width_3level to width.
(ctype_output): Always create new locale format. Don't emit
_NL_CTYPE_NAMES, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS any more.
(allocate_arrays): Always create new locale format.
* locale/C-collate.c (_nl_C_LC_COLLATE): Update.
* locale/weightwc.h (findidx): Assume new locale format.
* string/strcoll.c (wcscoll): Remove local variables size, layers,
names.
* string/strxfrm.c (wcsxfrm): Likewise.
* posix/fnmatch_loop.c (internal_fnwmatch): Likewise. Change type of
local variable collseq to 'const char *'.
(SUFFIX): Don't use, don't undefine.
* posix/fnmatch.c: Remove SUFFIX definition.
* locale/programs/ld-collate.c (struct locale_collate_t): Remove
fields plane_size, plane_cnt, wcheads, wcseqorder. Rename
wcheads_3level to wcheads, rename wcseqorder_3level to wcseqorder.
(collate_finish): Always create new locale format. Remove local
variables min_total, act_size.
(collate_output): Always create new locale format. Remove local
variables table_size, names, tablewc. Rename tablewc_3level to
tablewc.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (obstack_int32_grow,
obstack_int32_grow_fast): New inline functions.
(output_weightwc, collate_output): Use them where possible.
2000-09-01 21:36:44 +02:00
|
|
|
#include <locale/localeinfo.h>
|
2000-02-13 08:40:16 +01:00
|
|
|
|
|
|
|
#define USE_IN_EXTENDED_LOCALE_MODEL
|
Update.
2000-07-23 Bruno Haible <haible@clisp.cons.org>
* wctype/wchar-lookup.h: New file.
* wctype/iswctype.c: Include "wchar-lookup.h".
(__iswctype): Support alternate locale format with 3-level tables.
* wctype/iswctype_l.c (__iswctype_l): Likewise.
* wctype/towctrans.c (__towctrans): Likewise.
* wctype/towctrans_l.c (__towctrans_l): Likewise.
* wctype/wcfuncs.c: Include "wchar-lookup.h".
(__ctype32_wctype, __ctype32_wctrans): Declare external.
(__iswalnum, __iswalpha, __iswcntrl, __iswdigit, __iswlower,
__iswgraph, __iswprint, __iswpunct, __iswspace, __iswupper,
__iswxdigit, towlower, towupper): Support alternate locale format
with 3-level tables.
* wctype/wcextra.c (iswblank): Likewise.
* wctype/wcfuncs_l.c: Include "wchar-lookup.h".
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l, __towlower_l, __towupper_l): Support alternate locale
format with 3-level tables.
* wctype/wcextra_l.c (__iswblank_l): Likewise.
* wctype/wctype.c (__wctype): Likewise. In the alternate locale
format, return a 3-level table pointer.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/wctrans.c (wctrans): Likewise.
* wctype/wctype.h (__ISwupper, __ISwlower, __ISwalpha, __ISwdigit,
__ISwxdigit, __ISwspace, __ISwprint, __ISwgraph, __ISwblank,
__ISwcntrl, __ISwpunct, __ISwalnum): New enum values.
(iswctype): Remove macro definition.
* wcsmbs/wcwidth.h: Include "wchar-lookup.h".
(internal_wcwidth): Support alternate locale format with 3-level
tables.
* locale/langinfo.h (_NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET):
New nl_items.
* locale/categories.def (_NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET):
Define them as being type "word".
* locale/C-ctype.c (_nl_C_LC_CTYPE): Add initializers for them.
* ctype/ctype-info.c (__ctype32_wctype, __ctype32_wctrans,
__ctype32_width): New exported variables.
* locale/lc-ctype.c (_nl_postload_ctype): Initialize them in the
alternate locale format. Don't initialize __ctype_names and
__ctype_width in the alternate locale format.
* locale/programs/localedef.h (oldstyle_tables): New declaration.
* locale/programs/localedef.c (oldstyle_tables): New variable.
(OPT_OLDSTYLE): New macro.
(options): Add --old-style option.
(parse_opt): Handle --old-style option.
* locale/programs/ld-ctype.c (locale_ctype_t): Add class_offset,
map_offset, class_3level, map_3level, width_3level members.
(ctype_output): Support for alternate locale format: Computation of
nelems changes. _NL_CTYPE_TOUPPER32, _NL_CTYPE_TOLOWER32 and
_NL_CTYPE_CLASS32 only 256 characters. _NL_CTYPE_NAMES empty.
New fields _NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET. Field
_NL_CTYPE_WIDTH now contains the three-level table. Extra elems
now contain both class and map tables.
(struct wctype_table): New type.
(wctype_table_init, wctype_table_add, wctype_table_finalize): New
functions.
(struct wcwidth_table): New type.
(wcwidth_table_init, wcwidth_table_add, wcwidth_table_finalize): New
functions.
(struct wctrans_table): New type.
(wctrans_table_init, wctrans_table_add, wctrans_table_finalize): New
functions.
(allocate_arrays): Support for alternate locale format: Set
plane_size and plane_cnt to 0. Restrict ctype->ctype32_b to the first
256 characters. Compute ctype->class_3level. Restrict ctype->map32[idx]
to the first 256 characters. Compute ctype->map_3level. Set
ctype->class_offset and ctype->map_offset. Compute ctype->width_3level
instead of ctype->width.
2000-07-25 06:37:22 +02:00
|
|
|
#include "wchar-lookup.h"
|
1997-02-15 05:31:36 +01:00
|
|
|
|
|
|
|
/* Provide real-function versions of all the wctype macros. */
|
|
|
|
|
|
|
|
#define func(name, type) \
|
Use locale_t, not __locale_t, throughout glibc
<locale.h> is specified to define locale_t in POSIX.1-2008, and so are
all of the headers that define functions that take locale_t arguments.
Under _GNU_SOURCE, the additional headers that define such functions
have also always defined locale_t. Therefore, there is no need to use
__locale_t in public function prototypes, nor in any internal code.
* ctype/ctype-c99_l.c, ctype/ctype.h, ctype/ctype_l.c
* include/monetary.h, include/stdlib.h, include/time.h
* include/wchar.h, locale/duplocale.c, locale/freelocale.c
* locale/global-locale.c, locale/langinfo.h, locale/locale.h
* locale/localeinfo.h, locale/newlocale.c
* locale/nl_langinfo_l.c, locale/uselocale.c
* localedata/bug-usesetlocale.c, localedata/tst-xlocale2.c
* stdio-common/vfscanf.c, stdlib/monetary.h, stdlib/stdlib.h
* stdlib/strfmon_l.c, stdlib/strtod_l.c, stdlib/strtof_l.c
* stdlib/strtol.c, stdlib/strtol_l.c, stdlib/strtold_l.c
* stdlib/strtoll_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
* string/strcasecmp.c, string/strcoll_l.c, string/string.h
* string/strings.h, string/strncase.c, string/strxfrm_l.c
* sysdeps/ieee754/float128/strtof128_l.c
* sysdeps/ieee754/float128/wcstof128.c
* sysdeps/ieee754/float128/wcstof128_l.c
* sysdeps/ieee754/ldbl-128ibm/strtold_l.c
* sysdeps/ieee754/ldbl-64-128/strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
* sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c
* sysdeps/powerpc/powerpc32/power7/strcasecmp.S
* sysdeps/powerpc/powerpc64/power7/strcasecmp.S
* sysdeps/x86_64/strcasecmp_l-nonascii.c
* sysdeps/x86_64/strncase_l-nonascii.c, time/strftime_l.c
* time/strptime_l.c, time/time.h, wcsmbs/mbsrtowcs_l.c
* wcsmbs/wchar.h, wcsmbs/wcscasecmp.c, wcsmbs/wcsncase.c
* wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
* wcsmbs/wcstof_l.c, wcsmbs/wcstol_l.c, wcsmbs/wcstold.c
* wcsmbs/wcstold_l.c, wcsmbs/wcstoll_l.c, wcsmbs/wcstoul_l.c
* wcsmbs/wcstoull_l.c, wctype/iswctype_l.c
* wctype/towctrans_l.c, wctype/wcfuncs_l.c
* wctype/wctrans_l.c, wctype/wctype.h, wctype/wctype_l.c:
Change all uses of __locale_t to locale_t.
2017-06-20 15:26:43 +02:00
|
|
|
int __isw##name (wint_t wc, locale_t locale) \
|
Update.
2000-07-23 Bruno Haible <haible@clisp.cons.org>
* wctype/wchar-lookup.h: New file.
* wctype/iswctype.c: Include "wchar-lookup.h".
(__iswctype): Support alternate locale format with 3-level tables.
* wctype/iswctype_l.c (__iswctype_l): Likewise.
* wctype/towctrans.c (__towctrans): Likewise.
* wctype/towctrans_l.c (__towctrans_l): Likewise.
* wctype/wcfuncs.c: Include "wchar-lookup.h".
(__ctype32_wctype, __ctype32_wctrans): Declare external.
(__iswalnum, __iswalpha, __iswcntrl, __iswdigit, __iswlower,
__iswgraph, __iswprint, __iswpunct, __iswspace, __iswupper,
__iswxdigit, towlower, towupper): Support alternate locale format
with 3-level tables.
* wctype/wcextra.c (iswblank): Likewise.
* wctype/wcfuncs_l.c: Include "wchar-lookup.h".
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l, __towlower_l, __towupper_l): Support alternate locale
format with 3-level tables.
* wctype/wcextra_l.c (__iswblank_l): Likewise.
* wctype/wctype.c (__wctype): Likewise. In the alternate locale
format, return a 3-level table pointer.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/wctrans.c (wctrans): Likewise.
* wctype/wctype.h (__ISwupper, __ISwlower, __ISwalpha, __ISwdigit,
__ISwxdigit, __ISwspace, __ISwprint, __ISwgraph, __ISwblank,
__ISwcntrl, __ISwpunct, __ISwalnum): New enum values.
(iswctype): Remove macro definition.
* wcsmbs/wcwidth.h: Include "wchar-lookup.h".
(internal_wcwidth): Support alternate locale format with 3-level
tables.
* locale/langinfo.h (_NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET):
New nl_items.
* locale/categories.def (_NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET):
Define them as being type "word".
* locale/C-ctype.c (_nl_C_LC_CTYPE): Add initializers for them.
* ctype/ctype-info.c (__ctype32_wctype, __ctype32_wctrans,
__ctype32_width): New exported variables.
* locale/lc-ctype.c (_nl_postload_ctype): Initialize them in the
alternate locale format. Don't initialize __ctype_names and
__ctype_width in the alternate locale format.
* locale/programs/localedef.h (oldstyle_tables): New declaration.
* locale/programs/localedef.c (oldstyle_tables): New variable.
(OPT_OLDSTYLE): New macro.
(options): Add --old-style option.
(parse_opt): Handle --old-style option.
* locale/programs/ld-ctype.c (locale_ctype_t): Add class_offset,
map_offset, class_3level, map_3level, width_3level members.
(ctype_output): Support for alternate locale format: Computation of
nelems changes. _NL_CTYPE_TOUPPER32, _NL_CTYPE_TOLOWER32 and
_NL_CTYPE_CLASS32 only 256 characters. _NL_CTYPE_NAMES empty.
New fields _NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET. Field
_NL_CTYPE_WIDTH now contains the three-level table. Extra elems
now contain both class and map tables.
(struct wctype_table): New type.
(wctype_table_init, wctype_table_add, wctype_table_finalize): New
functions.
(struct wcwidth_table): New type.
(wcwidth_table_init, wcwidth_table_add, wcwidth_table_finalize): New
functions.
(struct wctrans_table): New type.
(wctrans_table_init, wctrans_table_add, wctrans_table_finalize): New
functions.
(allocate_arrays): Support for alternate locale format: Set
plane_size and plane_cnt to 0. Restrict ctype->ctype32_b to the first
256 characters. Compute ctype->class_3level. Restrict ctype->map32[idx]
to the first 256 characters. Compute ctype->map_3level. Set
ctype->class_offset and ctype->map_offset. Compute ctype->width_3level
instead of ctype->width.
2000-07-25 06:37:22 +02:00
|
|
|
{ \
|
2005-10-17 17:48:30 +02:00
|
|
|
if (isascii (wc)) \
|
|
|
|
return is##name ((int) wc, locale); \
|
Update.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* wctype/wcfuncs.c (iswblank): New function.
* wctype/wcfuncs_l.c (__iswblank_l): New function.
* wctype/wcextra.c: Remove file.
* wctype/wcextra_l.c: Remove file.
* wctype/Makefile (distribute): Remove wcextra and wcextra_l.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (collate_output): Remove redundant
assert call.
* string/strcoll.c: Likewise.
* string/strxfrm.c: Include assert.h. Add assert calls like in
string/strcoll.c.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/categories.def (_NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_NAMES, _NL_CTYPE_NAMES,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Remove definitions.
* locale/langinfo.h (_NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS,
_NL_COLLATE_NAMES): Rename to _NL_COLLATE_GAP1/2/3 respectively.
(_NL_CTYPE_NAMES): Rename to _NL_CTYPE_GAP3.
(_NL_CTYPE_GAP3): Rename to _NL_CTYPE_GAP4.
(_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Rename to
_NL_CTYPE_GAP5/6 respectively.
* locale/C-ctype.c (_nl_C_LC_CTYPE): Update.
* ctype/ctype-info.c (__ctype_names, __ctype_width): Remove variables.
* locale/lc-ctype.c (_nl_postload_ctype): Assume new locale format.
Don't initialize __ctype_names and __ctype_width.
* wctype/cname-lookup.h: Remove file.
* wctype/Makefile (distribute): Remove cname-lookup.h.
* wctype/wchar-lookup.h: Include stdint.h.
* wctype/wctype.c (__wctype): Assume new locale format.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/iswctype.c: Don't include cname-lookup.h.
(__iswctype): Assume new locale format.
* wctype/iswctype_l.c: Don't include cname-lookup.h.
(__iswctype_l): Assume new locale format.
* wctype/wctrans.c: Don't include ctype.h.
(wctrans): Assume new locale format.
* wctype/wctrans_l.c (__wctrans_l): Likewise.
* wctype/towctrans.c: Don't include cname-lookup.h.
(__towctrans): Assume new locale format.
* wctype/towctrans_l.c: Don't include cname-lookup.h.
(__towctrans_l): Assume new locale format.
* wctype/wcfuncs.c: Don't include ctype.h and cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__ctype32_b, __ctype32_toupper, __ctype32_tolower): Remove
declarations.
(iswalnum, iswalpha, iswcntrl, iswdigit, iswlower, iswgraph, iswprint,
iswpunct, iswspace, iswupper, iswxdigit): Assume new locale format.
(towlower, towupper): Likewise.
* wctype/wcfuncs_l.c: Don't include cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l): Assume new locale format.
(__towlower_l, __towupper_l): Likewise.
* wcsmbs/wcwidth.h: Don't include cname-lookup.h.
(__ctype32_b): Remove declaration.
(internal_wcwidth): Assume new locale format.
* locale/programs/ld-ctype.c (struct locale_ctype_t): Remove fields
plane_size, plane_cnt, names, width. Rename map to map_b, rename map32
to map32_b, rename width_3level to width.
(ctype_output): Always create new locale format. Don't emit
_NL_CTYPE_NAMES, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS any more.
(allocate_arrays): Always create new locale format.
* locale/C-collate.c (_nl_C_LC_COLLATE): Update.
* locale/weightwc.h (findidx): Assume new locale format.
* string/strcoll.c (wcscoll): Remove local variables size, layers,
names.
* string/strxfrm.c (wcsxfrm): Likewise.
* posix/fnmatch_loop.c (internal_fnwmatch): Likewise. Change type of
local variable collseq to 'const char *'.
(SUFFIX): Don't use, don't undefine.
* posix/fnmatch.c: Remove SUFFIX definition.
* locale/programs/ld-collate.c (struct locale_collate_t): Remove
fields plane_size, plane_cnt, wcheads, wcseqorder. Rename
wcheads_3level to wcheads, rename wcseqorder_3level to wcseqorder.
(collate_finish): Always create new locale format. Remove local
variables min_total, act_size.
(collate_output): Always create new locale format. Remove local
variables table_size, names, tablewc. Rename tablewc_3level to
tablewc.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (obstack_int32_grow,
obstack_int32_grow_fast): New inline functions.
(output_weightwc, collate_output): Use them where possible.
2000-09-01 21:36:44 +02:00
|
|
|
size_t i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS_OFFSET)].word + type; \
|
|
|
|
const char *desc = locale->__locales[LC_CTYPE]->values[i].string; \
|
|
|
|
return wctype_table_lookup (desc, wc); \
|
2002-04-14 22:15:40 +02:00
|
|
|
} \
|
2005-10-17 17:48:30 +02:00
|
|
|
libc_hidden_def (__isw##name) \
|
|
|
|
weak_alias (__isw##name, isw##name)
|
Update.
2000-07-23 Bruno Haible <haible@clisp.cons.org>
* wctype/wchar-lookup.h: New file.
* wctype/iswctype.c: Include "wchar-lookup.h".
(__iswctype): Support alternate locale format with 3-level tables.
* wctype/iswctype_l.c (__iswctype_l): Likewise.
* wctype/towctrans.c (__towctrans): Likewise.
* wctype/towctrans_l.c (__towctrans_l): Likewise.
* wctype/wcfuncs.c: Include "wchar-lookup.h".
(__ctype32_wctype, __ctype32_wctrans): Declare external.
(__iswalnum, __iswalpha, __iswcntrl, __iswdigit, __iswlower,
__iswgraph, __iswprint, __iswpunct, __iswspace, __iswupper,
__iswxdigit, towlower, towupper): Support alternate locale format
with 3-level tables.
* wctype/wcextra.c (iswblank): Likewise.
* wctype/wcfuncs_l.c: Include "wchar-lookup.h".
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l, __towlower_l, __towupper_l): Support alternate locale
format with 3-level tables.
* wctype/wcextra_l.c (__iswblank_l): Likewise.
* wctype/wctype.c (__wctype): Likewise. In the alternate locale
format, return a 3-level table pointer.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/wctrans.c (wctrans): Likewise.
* wctype/wctype.h (__ISwupper, __ISwlower, __ISwalpha, __ISwdigit,
__ISwxdigit, __ISwspace, __ISwprint, __ISwgraph, __ISwblank,
__ISwcntrl, __ISwpunct, __ISwalnum): New enum values.
(iswctype): Remove macro definition.
* wcsmbs/wcwidth.h: Include "wchar-lookup.h".
(internal_wcwidth): Support alternate locale format with 3-level
tables.
* locale/langinfo.h (_NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET):
New nl_items.
* locale/categories.def (_NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET):
Define them as being type "word".
* locale/C-ctype.c (_nl_C_LC_CTYPE): Add initializers for them.
* ctype/ctype-info.c (__ctype32_wctype, __ctype32_wctrans,
__ctype32_width): New exported variables.
* locale/lc-ctype.c (_nl_postload_ctype): Initialize them in the
alternate locale format. Don't initialize __ctype_names and
__ctype_width in the alternate locale format.
* locale/programs/localedef.h (oldstyle_tables): New declaration.
* locale/programs/localedef.c (oldstyle_tables): New variable.
(OPT_OLDSTYLE): New macro.
(options): Add --old-style option.
(parse_opt): Handle --old-style option.
* locale/programs/ld-ctype.c (locale_ctype_t): Add class_offset,
map_offset, class_3level, map_3level, width_3level members.
(ctype_output): Support for alternate locale format: Computation of
nelems changes. _NL_CTYPE_TOUPPER32, _NL_CTYPE_TOLOWER32 and
_NL_CTYPE_CLASS32 only 256 characters. _NL_CTYPE_NAMES empty.
New fields _NL_CTYPE_CLASS_OFFSET, _NL_CTYPE_MAP_OFFSET. Field
_NL_CTYPE_WIDTH now contains the three-level table. Extra elems
now contain both class and map tables.
(struct wctype_table): New type.
(wctype_table_init, wctype_table_add, wctype_table_finalize): New
functions.
(struct wcwidth_table): New type.
(wcwidth_table_init, wcwidth_table_add, wcwidth_table_finalize): New
functions.
(struct wctrans_table): New type.
(wctrans_table_init, wctrans_table_add, wctrans_table_finalize): New
functions.
(allocate_arrays): Support for alternate locale format: Set
plane_size and plane_cnt to 0. Restrict ctype->ctype32_b to the first
256 characters. Compute ctype->class_3level. Restrict ctype->map32[idx]
to the first 256 characters. Compute ctype->map_3level. Set
ctype->class_offset and ctype->map_offset. Compute ctype->width_3level
instead of ctype->width.
2000-07-25 06:37:22 +02:00
|
|
|
|
2005-10-17 17:48:30 +02:00
|
|
|
func (alnum_l, __ISwalnum)
|
|
|
|
func (alpha_l, __ISwalpha)
|
|
|
|
func (blank_l, __ISwblank)
|
|
|
|
func (cntrl_l, __ISwcntrl)
|
2004-03-16 11:10:13 +01:00
|
|
|
#undef iswdigit_l
|
|
|
|
#undef __iswdigit_l
|
2005-10-17 17:48:30 +02:00
|
|
|
func (digit_l, __ISwdigit)
|
|
|
|
func (lower_l, __ISwlower)
|
|
|
|
func (graph_l, __ISwgraph)
|
|
|
|
func (print_l, __ISwprint)
|
|
|
|
func (punct_l, __ISwpunct)
|
|
|
|
func (space_l, __ISwspace)
|
|
|
|
func (upper_l, __ISwupper)
|
|
|
|
func (xdigit_l, __ISwxdigit)
|
1997-02-15 05:31:36 +01:00
|
|
|
|
|
|
|
wint_t
|
Use locale_t, not __locale_t, throughout glibc
<locale.h> is specified to define locale_t in POSIX.1-2008, and so are
all of the headers that define functions that take locale_t arguments.
Under _GNU_SOURCE, the additional headers that define such functions
have also always defined locale_t. Therefore, there is no need to use
__locale_t in public function prototypes, nor in any internal code.
* ctype/ctype-c99_l.c, ctype/ctype.h, ctype/ctype_l.c
* include/monetary.h, include/stdlib.h, include/time.h
* include/wchar.h, locale/duplocale.c, locale/freelocale.c
* locale/global-locale.c, locale/langinfo.h, locale/locale.h
* locale/localeinfo.h, locale/newlocale.c
* locale/nl_langinfo_l.c, locale/uselocale.c
* localedata/bug-usesetlocale.c, localedata/tst-xlocale2.c
* stdio-common/vfscanf.c, stdlib/monetary.h, stdlib/stdlib.h
* stdlib/strfmon_l.c, stdlib/strtod_l.c, stdlib/strtof_l.c
* stdlib/strtol.c, stdlib/strtol_l.c, stdlib/strtold_l.c
* stdlib/strtoll_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
* string/strcasecmp.c, string/strcoll_l.c, string/string.h
* string/strings.h, string/strncase.c, string/strxfrm_l.c
* sysdeps/ieee754/float128/strtof128_l.c
* sysdeps/ieee754/float128/wcstof128.c
* sysdeps/ieee754/float128/wcstof128_l.c
* sysdeps/ieee754/ldbl-128ibm/strtold_l.c
* sysdeps/ieee754/ldbl-64-128/strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
* sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c
* sysdeps/powerpc/powerpc32/power7/strcasecmp.S
* sysdeps/powerpc/powerpc64/power7/strcasecmp.S
* sysdeps/x86_64/strcasecmp_l-nonascii.c
* sysdeps/x86_64/strncase_l-nonascii.c, time/strftime_l.c
* time/strptime_l.c, time/time.h, wcsmbs/mbsrtowcs_l.c
* wcsmbs/wchar.h, wcsmbs/wcscasecmp.c, wcsmbs/wcsncase.c
* wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
* wcsmbs/wcstof_l.c, wcsmbs/wcstol_l.c, wcsmbs/wcstold.c
* wcsmbs/wcstold_l.c, wcsmbs/wcstoll_l.c, wcsmbs/wcstoul_l.c
* wcsmbs/wcstoull_l.c, wctype/iswctype_l.c
* wctype/towctrans_l.c, wctype/wcfuncs_l.c
* wctype/wctrans_l.c, wctype/wctype.h, wctype/wctype_l.c:
Change all uses of __locale_t to locale_t.
2017-06-20 15:26:43 +02:00
|
|
|
(__towlower_l) (wint_t wc, locale_t locale)
|
1997-02-15 05:31:36 +01:00
|
|
|
{
|
Update.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* wctype/wcfuncs.c (iswblank): New function.
* wctype/wcfuncs_l.c (__iswblank_l): New function.
* wctype/wcextra.c: Remove file.
* wctype/wcextra_l.c: Remove file.
* wctype/Makefile (distribute): Remove wcextra and wcextra_l.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (collate_output): Remove redundant
assert call.
* string/strcoll.c: Likewise.
* string/strxfrm.c: Include assert.h. Add assert calls like in
string/strcoll.c.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/categories.def (_NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_NAMES, _NL_CTYPE_NAMES,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Remove definitions.
* locale/langinfo.h (_NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS,
_NL_COLLATE_NAMES): Rename to _NL_COLLATE_GAP1/2/3 respectively.
(_NL_CTYPE_NAMES): Rename to _NL_CTYPE_GAP3.
(_NL_CTYPE_GAP3): Rename to _NL_CTYPE_GAP4.
(_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Rename to
_NL_CTYPE_GAP5/6 respectively.
* locale/C-ctype.c (_nl_C_LC_CTYPE): Update.
* ctype/ctype-info.c (__ctype_names, __ctype_width): Remove variables.
* locale/lc-ctype.c (_nl_postload_ctype): Assume new locale format.
Don't initialize __ctype_names and __ctype_width.
* wctype/cname-lookup.h: Remove file.
* wctype/Makefile (distribute): Remove cname-lookup.h.
* wctype/wchar-lookup.h: Include stdint.h.
* wctype/wctype.c (__wctype): Assume new locale format.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/iswctype.c: Don't include cname-lookup.h.
(__iswctype): Assume new locale format.
* wctype/iswctype_l.c: Don't include cname-lookup.h.
(__iswctype_l): Assume new locale format.
* wctype/wctrans.c: Don't include ctype.h.
(wctrans): Assume new locale format.
* wctype/wctrans_l.c (__wctrans_l): Likewise.
* wctype/towctrans.c: Don't include cname-lookup.h.
(__towctrans): Assume new locale format.
* wctype/towctrans_l.c: Don't include cname-lookup.h.
(__towctrans_l): Assume new locale format.
* wctype/wcfuncs.c: Don't include ctype.h and cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__ctype32_b, __ctype32_toupper, __ctype32_tolower): Remove
declarations.
(iswalnum, iswalpha, iswcntrl, iswdigit, iswlower, iswgraph, iswprint,
iswpunct, iswspace, iswupper, iswxdigit): Assume new locale format.
(towlower, towupper): Likewise.
* wctype/wcfuncs_l.c: Don't include cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l): Assume new locale format.
(__towlower_l, __towupper_l): Likewise.
* wcsmbs/wcwidth.h: Don't include cname-lookup.h.
(__ctype32_b): Remove declaration.
(internal_wcwidth): Assume new locale format.
* locale/programs/ld-ctype.c (struct locale_ctype_t): Remove fields
plane_size, plane_cnt, names, width. Rename map to map_b, rename map32
to map32_b, rename width_3level to width.
(ctype_output): Always create new locale format. Don't emit
_NL_CTYPE_NAMES, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS any more.
(allocate_arrays): Always create new locale format.
* locale/C-collate.c (_nl_C_LC_COLLATE): Update.
* locale/weightwc.h (findidx): Assume new locale format.
* string/strcoll.c (wcscoll): Remove local variables size, layers,
names.
* string/strxfrm.c (wcsxfrm): Likewise.
* posix/fnmatch_loop.c (internal_fnwmatch): Likewise. Change type of
local variable collseq to 'const char *'.
(SUFFIX): Don't use, don't undefine.
* posix/fnmatch.c: Remove SUFFIX definition.
* locale/programs/ld-collate.c (struct locale_collate_t): Remove
fields plane_size, plane_cnt, wcheads, wcseqorder. Rename
wcheads_3level to wcheads, rename wcseqorder_3level to wcseqorder.
(collate_finish): Always create new locale format. Remove local
variables min_total, act_size.
(collate_output): Always create new locale format. Remove local
variables table_size, names, tablewc. Rename tablewc_3level to
tablewc.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (obstack_int32_grow,
obstack_int32_grow_fast): New inline functions.
(output_weightwc, collate_output): Use them where possible.
2000-09-01 21:36:44 +02:00
|
|
|
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);
|
1997-02-15 05:31:36 +01:00
|
|
|
}
|
Update.
2002-08-04 Ulrich Drepper <drepper@redhat.com>
* elf/dl-addr.c (_dl_addr): Add libc_hidden_def.
* elf/dl-close.c (_dl_close): Add libc_hidden_def.
* elf/dl-open.c (_dl_open): Add libc_hidden_def.
* include/dlfcn.h: Add libc_hidden_proto for _dl_addr, _dl_open,
_dl_close.
* include/libio.h: Add libc_hidden_proto for __underflow, __wuflow,
__wunderflow.
* libio/genops.c (__underflow): Add libc_hidden_def.
* libio/wgenops.c (__wuflow): Likewise.
(__wunderflow): Likewise.
* include/obstack.h: Add libc_hidden_proto for _obstack_newchunk.
* malloc/obstack.c (_obstack_newchunk): Add libc_hidden_def.
* include/stdio.h: Add libc_hidden_proto for __vfscanf.
* stdio-common/vfscanf.c (__vfscanf): Add libc_hidden_def.
* include/string.h: Add libc_hidden_proto for __strverscmp.
* string/strverscmp.c (__strverscmp): Add libc_hidden_def.
* include/unistd.h: Add libc_hidden_proto for __sysconf.
* sysdeps/generic/sysconf.c (__sysconf): Add libc_hidden_def.
* sysdeps/posix/sysconf.c: Likewise.
* sysdeps/unix/sysv/irix4/sysconf.c: Likewise.
* sysdeps/unix/sysv/sysv4/sysconf.c: Likewise.
* include/wctype.h: Use libc_hidden_proto for __iswctype, __iswalnum_l,
__iswalpha_l, __iswblank_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l, __towlower_l, __towupper_l.
* wcsmbs/wcstype.c (__iswctype): Use libc_hidden_def.
* wcsmbs/wcfuncs_l.c: Use libc_hidden_def for all functions.
* include/sys/wait.h: Add libc_hidden_proto for __xmknod.
* sysdeps/generic/xmknod.c (__xmknod): Add libc_hidden_def.
* sysdeps/mach/hurd/xmknod.c: Likewise.
* sysdeps/unix/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/mips/xmknod.c: Likewise.
* sunrpc/svc.c: Add missing INTUSE for _authenticate.
2002-08-04 11:27:27 +02:00
|
|
|
libc_hidden_def (__towlower_l)
|
2002-08-06 10:40:20 +02:00
|
|
|
weak_alias (__towlower_l, towlower_l)
|
1997-02-15 05:31:36 +01:00
|
|
|
|
|
|
|
wint_t
|
Use locale_t, not __locale_t, throughout glibc
<locale.h> is specified to define locale_t in POSIX.1-2008, and so are
all of the headers that define functions that take locale_t arguments.
Under _GNU_SOURCE, the additional headers that define such functions
have also always defined locale_t. Therefore, there is no need to use
__locale_t in public function prototypes, nor in any internal code.
* ctype/ctype-c99_l.c, ctype/ctype.h, ctype/ctype_l.c
* include/monetary.h, include/stdlib.h, include/time.h
* include/wchar.h, locale/duplocale.c, locale/freelocale.c
* locale/global-locale.c, locale/langinfo.h, locale/locale.h
* locale/localeinfo.h, locale/newlocale.c
* locale/nl_langinfo_l.c, locale/uselocale.c
* localedata/bug-usesetlocale.c, localedata/tst-xlocale2.c
* stdio-common/vfscanf.c, stdlib/monetary.h, stdlib/stdlib.h
* stdlib/strfmon_l.c, stdlib/strtod_l.c, stdlib/strtof_l.c
* stdlib/strtol.c, stdlib/strtol_l.c, stdlib/strtold_l.c
* stdlib/strtoll_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
* string/strcasecmp.c, string/strcoll_l.c, string/string.h
* string/strings.h, string/strncase.c, string/strxfrm_l.c
* sysdeps/ieee754/float128/strtof128_l.c
* sysdeps/ieee754/float128/wcstof128.c
* sysdeps/ieee754/float128/wcstof128_l.c
* sysdeps/ieee754/ldbl-128ibm/strtold_l.c
* sysdeps/ieee754/ldbl-64-128/strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
* sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c
* sysdeps/powerpc/powerpc32/power7/strcasecmp.S
* sysdeps/powerpc/powerpc64/power7/strcasecmp.S
* sysdeps/x86_64/strcasecmp_l-nonascii.c
* sysdeps/x86_64/strncase_l-nonascii.c, time/strftime_l.c
* time/strptime_l.c, time/time.h, wcsmbs/mbsrtowcs_l.c
* wcsmbs/wchar.h, wcsmbs/wcscasecmp.c, wcsmbs/wcsncase.c
* wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
* wcsmbs/wcstof_l.c, wcsmbs/wcstol_l.c, wcsmbs/wcstold.c
* wcsmbs/wcstold_l.c, wcsmbs/wcstoll_l.c, wcsmbs/wcstoul_l.c
* wcsmbs/wcstoull_l.c, wctype/iswctype_l.c
* wctype/towctrans_l.c, wctype/wcfuncs_l.c
* wctype/wctrans_l.c, wctype/wctype.h, wctype/wctype_l.c:
Change all uses of __locale_t to locale_t.
2017-06-20 15:26:43 +02:00
|
|
|
(__towupper_l) (wint_t wc, locale_t locale)
|
1997-02-15 05:31:36 +01:00
|
|
|
{
|
Update.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* wctype/wcfuncs.c (iswblank): New function.
* wctype/wcfuncs_l.c (__iswblank_l): New function.
* wctype/wcextra.c: Remove file.
* wctype/wcextra_l.c: Remove file.
* wctype/Makefile (distribute): Remove wcextra and wcextra_l.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (collate_output): Remove redundant
assert call.
* string/strcoll.c: Likewise.
* string/strxfrm.c: Include assert.h. Add assert calls like in
string/strcoll.c.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/categories.def (_NL_COLLATE_HASH_SIZE,
_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_NAMES, _NL_CTYPE_NAMES,
_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Remove definitions.
* locale/langinfo.h (_NL_COLLATE_HASH_SIZE, _NL_COLLATE_HASH_LAYERS,
_NL_COLLATE_NAMES): Rename to _NL_COLLATE_GAP1/2/3 respectively.
(_NL_CTYPE_NAMES): Rename to _NL_CTYPE_GAP3.
(_NL_CTYPE_GAP3): Rename to _NL_CTYPE_GAP4.
(_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS): Rename to
_NL_CTYPE_GAP5/6 respectively.
* locale/C-ctype.c (_nl_C_LC_CTYPE): Update.
* ctype/ctype-info.c (__ctype_names, __ctype_width): Remove variables.
* locale/lc-ctype.c (_nl_postload_ctype): Assume new locale format.
Don't initialize __ctype_names and __ctype_width.
* wctype/cname-lookup.h: Remove file.
* wctype/Makefile (distribute): Remove cname-lookup.h.
* wctype/wchar-lookup.h: Include stdint.h.
* wctype/wctype.c (__wctype): Assume new locale format.
* wctype/wctype_l.c (__wctype_l): Likewise.
* wctype/iswctype.c: Don't include cname-lookup.h.
(__iswctype): Assume new locale format.
* wctype/iswctype_l.c: Don't include cname-lookup.h.
(__iswctype_l): Assume new locale format.
* wctype/wctrans.c: Don't include ctype.h.
(wctrans): Assume new locale format.
* wctype/wctrans_l.c (__wctrans_l): Likewise.
* wctype/towctrans.c: Don't include cname-lookup.h.
(__towctrans): Assume new locale format.
* wctype/towctrans_l.c: Don't include cname-lookup.h.
(__towctrans_l): Assume new locale format.
* wctype/wcfuncs.c: Don't include ctype.h and cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__ctype32_b, __ctype32_toupper, __ctype32_tolower): Remove
declarations.
(iswalnum, iswalpha, iswcntrl, iswdigit, iswlower, iswgraph, iswprint,
iswpunct, iswspace, iswupper, iswxdigit): Assume new locale format.
(towlower, towupper): Likewise.
* wctype/wcfuncs_l.c: Don't include cname-lookup.h. Include
localeinfo.h instead.
(__NO_WCTYPE): Remove unused macro.
(__iswalnum_l, __iswalpha_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l): Assume new locale format.
(__towlower_l, __towupper_l): Likewise.
* wcsmbs/wcwidth.h: Don't include cname-lookup.h.
(__ctype32_b): Remove declaration.
(internal_wcwidth): Assume new locale format.
* locale/programs/ld-ctype.c (struct locale_ctype_t): Remove fields
plane_size, plane_cnt, names, width. Rename map to map_b, rename map32
to map32_b, rename width_3level to width.
(ctype_output): Always create new locale format. Don't emit
_NL_CTYPE_NAMES, _NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS any more.
(allocate_arrays): Always create new locale format.
* locale/C-collate.c (_nl_C_LC_COLLATE): Update.
* locale/weightwc.h (findidx): Assume new locale format.
* string/strcoll.c (wcscoll): Remove local variables size, layers,
names.
* string/strxfrm.c (wcsxfrm): Likewise.
* posix/fnmatch_loop.c (internal_fnwmatch): Likewise. Change type of
local variable collseq to 'const char *'.
(SUFFIX): Don't use, don't undefine.
* posix/fnmatch.c: Remove SUFFIX definition.
* locale/programs/ld-collate.c (struct locale_collate_t): Remove
fields plane_size, plane_cnt, wcheads, wcseqorder. Rename
wcheads_3level to wcheads, rename wcseqorder_3level to wcseqorder.
(collate_finish): Always create new locale format. Remove local
variables min_total, act_size.
(collate_output): Always create new locale format. Remove local
variables table_size, names, tablewc. Rename tablewc_3level to
tablewc.
2000-08-31 Bruno Haible <haible@clisp.cons.org>
* locale/programs/ld-collate.c (obstack_int32_grow,
obstack_int32_grow_fast): New inline functions.
(output_weightwc, collate_output): Use them where possible.
2000-09-01 21:36:44 +02:00
|
|
|
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);
|
1997-02-15 05:31:36 +01:00
|
|
|
}
|
Update.
2002-08-04 Ulrich Drepper <drepper@redhat.com>
* elf/dl-addr.c (_dl_addr): Add libc_hidden_def.
* elf/dl-close.c (_dl_close): Add libc_hidden_def.
* elf/dl-open.c (_dl_open): Add libc_hidden_def.
* include/dlfcn.h: Add libc_hidden_proto for _dl_addr, _dl_open,
_dl_close.
* include/libio.h: Add libc_hidden_proto for __underflow, __wuflow,
__wunderflow.
* libio/genops.c (__underflow): Add libc_hidden_def.
* libio/wgenops.c (__wuflow): Likewise.
(__wunderflow): Likewise.
* include/obstack.h: Add libc_hidden_proto for _obstack_newchunk.
* malloc/obstack.c (_obstack_newchunk): Add libc_hidden_def.
* include/stdio.h: Add libc_hidden_proto for __vfscanf.
* stdio-common/vfscanf.c (__vfscanf): Add libc_hidden_def.
* include/string.h: Add libc_hidden_proto for __strverscmp.
* string/strverscmp.c (__strverscmp): Add libc_hidden_def.
* include/unistd.h: Add libc_hidden_proto for __sysconf.
* sysdeps/generic/sysconf.c (__sysconf): Add libc_hidden_def.
* sysdeps/posix/sysconf.c: Likewise.
* sysdeps/unix/sysv/irix4/sysconf.c: Likewise.
* sysdeps/unix/sysv/sysv4/sysconf.c: Likewise.
* include/wctype.h: Use libc_hidden_proto for __iswctype, __iswalnum_l,
__iswalpha_l, __iswblank_l, __iswcntrl_l, __iswdigit_l, __iswlower_l,
__iswgraph_l, __iswprint_l, __iswpunct_l, __iswspace_l, __iswupper_l,
__iswxdigit_l, __towlower_l, __towupper_l.
* wcsmbs/wcstype.c (__iswctype): Use libc_hidden_def.
* wcsmbs/wcfuncs_l.c: Use libc_hidden_def for all functions.
* include/sys/wait.h: Add libc_hidden_proto for __xmknod.
* sysdeps/generic/xmknod.c (__xmknod): Add libc_hidden_def.
* sysdeps/mach/hurd/xmknod.c: Likewise.
* sysdeps/unix/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/xmknod.c: Likewise.
* sysdeps/unix/sysv/linux/mips/xmknod.c: Likewise.
* sunrpc/svc.c: Add missing INTUSE for _authenticate.
2002-08-04 11:27:27 +02:00
|
|
|
libc_hidden_def (__towupper_l)
|
2002-08-06 10:40:20 +02:00
|
|
|
weak_alias (__towupper_l, towupper_l)
|