]> sourceware.org Git - glibc.git/blame - wctype/wcfuncs.c
* config.make.in (fno-unit-at-a-time): Define.
[glibc.git] / wctype / wcfuncs.c
CommitLineData
20febd6a 1/* Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
c84142e8
UD
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
c84142e8
UD
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
c84142e8 13
41bdb6e2
AJ
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
19bc17a9 18
19bc17a9 19#include <wctype.h>
4c7d276e 20#include <locale/localeinfo.h>
19bc17a9 21
ef446144 22#include "wchar-lookup.h"
390955cb 23
19bc17a9
RM
24/* Provide real-function versions of all the wctype macros. */
25
0f283ffc
RM
26#define func(name, type) \
27 extern int __##name (wint_t __wc); \
28 int \
29 __##name (wint_t wc) \
30 { \
31 size_t i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_CLASS_OFFSET) + type; \
32 const char *desc = _NL_CURRENT (LC_CTYPE, i); \
33 return wctype_table_lookup (desc, wc); \
34 } \
390955cb 35 weak_alias (__##name, name)
19bc17a9 36
390955cb 37#undef iswalnum
ef446144 38func (iswalnum, __ISwalnum)
85d1401f 39libc_hidden_weak (iswalnum)
390955cb 40#undef iswalpha
ef446144 41func (iswalpha, __ISwalpha)
0752d008 42libc_hidden_weak (iswalpha)
4c7d276e
UD
43#undef iswblank
44func (iswblank, __ISwblank)
390955cb 45#undef iswcntrl
ef446144 46func (iswcntrl, __ISwcntrl)
390955cb 47#undef iswdigit
ef446144 48func (iswdigit, __ISwdigit)
0752d008 49libc_hidden_weak (iswdigit)
390955cb 50#undef iswlower
ef446144 51func (iswlower, __ISwlower)
0752d008 52libc_hidden_weak (iswlower)
390955cb 53#undef iswgraph
ef446144 54func (iswgraph, __ISwgraph)
390955cb 55#undef iswprint
ef446144 56func (iswprint, __ISwprint)
390955cb 57#undef iswpunct
ef446144 58func (iswpunct, __ISwpunct)
390955cb 59#undef iswspace
ef446144 60func (iswspace, __ISwspace)
0752d008 61libc_hidden_weak (iswspace)
390955cb 62#undef iswupper
ef446144 63func (iswupper, __ISwupper)
390955cb 64#undef iswxdigit
ef446144 65func (iswxdigit, __ISwxdigit)
0752d008 66libc_hidden_weak (iswxdigit)
19bc17a9 67
0752d008 68#undef towlower
19bc17a9 69wint_t
0752d008 70towlower (wc)
19bc17a9
RM
71 wint_t wc;
72{
0f283ffc
RM
73 size_t i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_OFFSET) + __TOW_tolower;
74 const char *desc = _NL_CURRENT (LC_CTYPE, i);
75 return wctrans_table_lookup (desc, wc);
19bc17a9 76}
b1b54458 77libc_hidden_def (towlower)
19bc17a9 78
0752d008 79#undef towupper
19bc17a9 80wint_t
0752d008 81towupper (wc)
19bc17a9
RM
82 wint_t wc;
83{
0f283ffc
RM
84 size_t i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_OFFSET) + __TOW_toupper;
85 const char *desc = _NL_CURRENT (LC_CTYPE, i);
86 return wctrans_table_lookup (desc, wc);
19bc17a9 87}
b1b54458 88libc_hidden_def (towupper)
This page took 0.259518 seconds and 5 git commands to generate.