summaryrefslogtreecommitdiff
path: root/wctype
diff options
context:
space:
mode:
Diffstat (limited to 'wctype')
-rw-r--r--wctype/Makefile3
-rw-r--r--wctype/cname-lookup.h55
-rw-r--r--wctype/iswctype_l.c41
-rw-r--r--wctype/test_wctype.c28
-rw-r--r--wctype/towctrans.c36
-rw-r--r--wctype/towctrans_l.c37
-rw-r--r--wctype/wcextra.c35
-rw-r--r--wctype/wcfuncs.c34
-rw-r--r--wctype/wcfuncs_l.c50
-rw-r--r--wctype/wctrans.c36
-rw-r--r--wctype/wctype.c36
-rw-r--r--wctype/wctype.h105
12 files changed, 391 insertions, 105 deletions
diff --git a/wctype/Makefile b/wctype/Makefile
index 0523e11e7c..731b43abe5 100644
--- a/wctype/Makefile
+++ b/wctype/Makefile
@@ -23,7 +23,8 @@ subdir := wctype
headers := wctype.h
distribute := cname-lookup.h
-routines := wcfuncs wctype iswctype wctrans towctrans
+routines := wcfuncs wctype iswctype wctrans towctrans wcextra \
+ wcfuncs_l iswctype_l towctrans_l
tests := test_wctype
diff --git a/wctype/cname-lookup.h b/wctype/cname-lookup.h
index b3c1cdbede..77186d4aa4 100644
--- a/wctype/cname-lookup.h
+++ b/wctype/cname-lookup.h
@@ -1,37 +1,60 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
-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
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-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
-Library General Public License for more details.
+ 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
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+#include <endian.h>
#include "../locale/localeinfo.h"
/* Some words on the runtime of this functions. Although there is a
loop in the function the runtime is asymptotically quasi constant.
The reason is that even for the largest character sets HASH_LAYERS
will not grow beyond 15 (a guess!). */
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
static __inline size_t
cname_lookup (wint_t wc)
+#else
+static __inline size_t
+cname_lookup (wint_t wc, __locale_t locale)
+#endif
{
- extern unsigned int *__ctype_names;
unsigned int hash_size, hash_layers;
size_t result, cnt;
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
+ extern unsigned int *__ctype_names;
hash_size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_HASH_SIZE);
hash_layers = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_HASH_LAYERS);
+#else
+ struct locale_data *current = locale->__locales[LC_CTYPE];
+#if BYTE_ORDER == BIG_ENDIAN
+ unsigned int *__ctype_names =
+ (unsigned int *) current->values[_NL_ITEM_INDEX (_NL_CTYPE_NAMES_EB)].string;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+ unsigned int *__ctype_names =
+ (unsigned int *) current->values[_NL_ITEM_INDEX (_NL_CTYPE_NAMES_EL)].string;
+#else
+# error bizarre byte order
+#endif
+ hash_size =
+ current->values[_NL_ITEM_INDEX (_NL_CTYPE_HASH_SIZE)].word;
+ hash_layers =
+ current->values[_NL_ITEM_INDEX (_NL_CTYPE_HASH_LAYERS)].word;
+#endif
result = wc % hash_size;
for (cnt = 0; cnt < hash_layers; ++cnt)
diff --git a/wctype/iswctype_l.c b/wctype/iswctype_l.c
new file mode 100644
index 0000000000..75fb41c4c8
--- /dev/null
+++ b/wctype/iswctype_l.c
@@ -0,0 +1,41 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
+
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <ctype.h>
+#include <wctype.h>
+
+#define USE_IN_EXTENDED_LOCALE_MODEL 1
+#include "cname-lookup.h"
+
+
+int
+__iswctype_l (wint_t wc, wctype_t desc, __locale_t locale)
+{
+ const unsigned int *class32_b;
+ size_t idx;
+
+ idx = cname_lookup (wc, locale);
+ if (idx == ~((size_t) 0))
+ return 0;
+
+ class32_b = (u_int32_t *)
+ locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS32)].string;
+
+ return class32_b[idx] & desc;
+}
diff --git a/wctype/test_wctype.c b/wctype/test_wctype.c
index bc2c7e9d18..350d02cb0c 100644
--- a/wctype/test_wctype.c
+++ b/wctype/test_wctype.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
-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
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
-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
-Library General Public License for more details.
+ 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
+ Library General Public License for more details.
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <ctype.h>
#include <stdio.h>
diff --git a/wctype/towctrans.c b/wctype/towctrans.c
index fd15599a6e..91e591dbb3 100644
--- a/wctype/towctrans.c
+++ b/wctype/towctrans.c
@@ -1,21 +1,21 @@
-/* towctrans - map wide character using given mapping.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-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
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+/* Map wide character using given mapping.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <wctype.h>
diff --git a/wctype/towctrans_l.c b/wctype/towctrans_l.c
new file mode 100644
index 0000000000..09596b9685
--- /dev/null
+++ b/wctype/towctrans_l.c
@@ -0,0 +1,37 @@
+/* Map wide character using given mapping and locale.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <wctype.h>
+
+/* Define the lookup function. */
+#define USE_IN_EXTENDED_LOCALE_MODEL 1
+#include "cname-lookup.h"
+
+wint_t
+__towctrans_l (wint_t wc, wctrans_t desc, __locale_t locale)
+{
+ size_t idx;
+
+ idx = cname_lookup (wc, locale);
+ if (idx == ~((size_t) 0))
+ /* Character is not known. Default action is to simply return it. */
+ return wc;
+
+ return (wint_t) desc[idx];
+}
diff --git a/wctype/wcextra.c b/wctype/wcextra.c
new file mode 100644
index 0000000000..add8db4455
--- /dev/null
+++ b/wctype/wcextra.c
@@ -0,0 +1,35 @@
+/* Additional non standardized wide character classification functions.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __NO_WCTYPE 1
+#include <wctype.h>
+
+int
+iswblank (wint_t wc)
+{
+ return __iswctype (wc, _ISblank);
+}
+
+
+int
+(__iswblank_l) (wint_t wc, __locale_t locale)
+{
+ return __iswctype_l (wc, _ISblank, locale);
+}
diff --git a/wctype/wcfuncs.c b/wctype/wcfuncs.c
index b5ac890609..e040fd5e7f 100644
--- a/wctype/wcfuncs.c
+++ b/wctype/wcfuncs.c
@@ -1,20 +1,20 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-
-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
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#define __NO_WCTYPE
#include <wctype.h>
diff --git a/wctype/wcfuncs_l.c b/wctype/wcfuncs_l.c
new file mode 100644
index 0000000000..f73b93d594
--- /dev/null
+++ b/wctype/wcfuncs_l.c
@@ -0,0 +1,50 @@
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#define __NO_WCTYPE
+#include <wctype.h>
+
+/* Provide real-function versions of all the wctype macros. */
+
+#define func(name, type) \
+ int name (wint_t wc, __locale_t locale) \
+ { return __iswctype_l (wc, type, locale); }
+
+func (__iswalnum_l, _ISalnum)
+func (__iswalpha_l, _ISalpha)
+func (__iswcntrl_l, _IScntrl)
+func (__iswdigit_l, _ISdigit)
+func (__iswlower_l, _ISlower)
+func (__iswgraph_l, _ISgraph)
+func (__iswprint_l, _ISprint)
+func (__iswpunct_l, _ISpunct)
+func (__iswspace_l, _ISspace)
+func (__iswupper_l, _ISupper)
+func (__iswxdigit_l, _ISxdigit)
+
+wint_t
+(__towlower_l) (wint_t wc, __locale_t locale)
+{
+ return __towctrans_l (wc, locale->__ctype_tolower, locale);
+}
+
+wint_t
+(__towupper_l) (wint_t wc, __locale_t locale)
+{
+ return __towctrans_l (wc, locale->__ctype_toupper, locale);
+}
diff --git a/wctype/wctrans.c b/wctype/wctrans.c
index 5c855d0b9b..3f823e56a8 100644
--- a/wctype/wctrans.c
+++ b/wctype/wctrans.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-
-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
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
+
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <ctype.h>
#include <string.h>
diff --git a/wctype/wctype.c b/wctype/wctype.c
index c3bb1d9c6a..01746be03b 100644
--- a/wctype/wctype.c
+++ b/wctype/wctype.c
@@ -1,21 +1,21 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
-
-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
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
+
+ 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
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <endian.h>
#include <string.h>
diff --git a/wctype/wctype.h b/wctype/wctype.h
index 3ba8ae7614..b67995918d 100644
--- a/wctype/wctype.h
+++ b/wctype/wctype.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -200,11 +200,110 @@ extern wint_t towctrans __P ((wint_t __wc, wctrans_t __desc));
extern __const int *__ctype_tolower; /* Case conversions. */
extern __const int *__ctype_toupper; /* Case conversions. */
-#define towlower(wc) towctrans (wc, __ctype_tolower)
-#define towupper(wc) towctrans (wc, __ctype_toupper)
+#define towlower(wc) towctrans ((wc), __ctype_tolower)
+#define towupper(wc) towctrans ((wc), __ctype_toupper)
#endif /* Not __NO_WCTYPE. */
+#ifdef __USE_GNU
+/* Declare the interface to extended locale model. */
+# include <xlocale.h>
+
+/* Test for any wide character for which `iswalpha' or `iswdigit' is
+ true. */
+extern int __iswalnum_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character for which `iswupper' or 'iswlower' is
+ true, or any wide character that is one of a locale-specific set of
+ wide-characters for which none of `iswcntrl', `iswdigit',
+ `iswpunct', or `iswspace' is true. */
+extern int __iswalpha_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any control wide character. */
+extern int __iswcntrl_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to a decimal-digit
+ character. */
+extern int __iswdigit_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character for which `iswprint' is true and
+ `iswspace' is false. */
+extern int __iswgraph_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to a lowercase letter
+ or is one of a locale-specific set of wide characters for which
+ none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */
+extern int __iswlower_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any printing wide character. */
+extern int __iswprint_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any printing wide character that is one of a
+ locale-specific et of wide characters for which neither `iswspace'
+ nor `iswalnum' is true. */
+extern int __iswpunct_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to a locale-specific
+ set of wide characters for which none of `iswalnum', `iswgraph', or
+ `iswpunct' is true. */
+extern int __iswspace_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to an uppercase letter
+ or is one of a locale-specific set of wide character for which none
+ of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true. */
+extern int __iswupper_l __P ((wint_t __wc, __locale_t __locale));
+
+/* Test for any wide character that corresponds to a hexadecimal-digit
+ character equivalent to that performed be the functions described
+ in the previous subclause. */
+extern int __iswxdigit_l __P ((wint_t __wc, __locale_t __locale));
+
+
+/* Determine whether the wide-character WC has the property described by
+ DESC. */
+extern int __iswctype_l __P ((wint_t __wc, wctype_t __desc,
+ __locale_t locale));
+
+
+/*
+ * Wide-character case-mapping functions: 7.15.3.1.
+ */
+
+/* Converts an uppercase letter to the corresponding lowercase letter. */
+extern wint_t __towlower_l __P ((wint_t __wc, __locale_t locale));
+
+/* Converts an lowercase letter to the corresponding uppercase letter. */
+extern wint_t __towupper_l __P ((wint_t __wc, __locale_t locale));
+
+/* Map the wide character WC using the mapping described by DESC. */
+extern wint_t __towctrans_l __P ((wint_t __wc, wctrans_t __desc,
+ __locale_t locale));
+
+
+#ifndef __NO_WCTYPE
+#define __iswalnum_l(wc, loc) __iswctype_l ((wc), _ISalnum, (loc))
+#define __iswalpha_l(wc, loc) __iswctype_l ((wc), _ISalpha, (loc))
+#define __iswcntrl_l(wc, loc) __iswctype_l ((wc), _IScntrl, (loc))
+#define __iswdigit_l(wc, loc) __iswctype_l ((wc), _ISdigit, (loc))
+#define __iswlower_l(wc, loc) __iswctype_l ((wc), _ISlower, (loc))
+#define __iswgraph_l(wc, loc) __iswctype_l ((wc), _ISgraph, (loc))
+#define __iswprint_l(wc, loc) __iswctype_l ((wc), _ISprint, (loc))
+#define __iswpunct_l(wc, loc) __iswctype_l ((wc), _ISpunct, (loc))
+#define __iswspace_l(wc, loc) __iswctype_l ((wc), _ISspace, (loc))
+#define __iswupper_l(wc, loc) __iswctype_l ((wc), _ISupper, (loc))
+#define __iswxdigit_l(wc, loc) __iswctype_l ((wc), _ISxdigit, (loc))
+
+#define __iswblank_l(wc, loc) __iswctype_l ((wc), _ISblank, (loc))
+
+#define __towlower_l(wc, loc) __towctrans_l ((wc), (loc)->__ctype_tolower, \
+ (loc))
+#define __towupper_l(wc, loc) __towctrans_l ((wc), (loc)->__ctype_toupper, \
+ (loc))
+
+#endif /* Not __NO_WCTYPE. */
+
+#endif /* Use GNU. */
+
__END_DECLS
#endif /* wctype.h */