Back to index

glibc  2.9
ctype_l.c
Go to the documentation of this file.
00001 /* Copyright (C) 1991,92,97,2001,02 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #define       __NO_CTYPE
00020 #include <ctype.h>
00021 
00022 /* Provide real-function versions of all the ctype macros.  */
00023 
00024 #define       func(name, type) \
00025   int __##name (int c, __locale_t l) { return __isctype_l (c, type, l); } \
00026   weak_alias (__##name, name)
00027 
00028 func (isalnum_l, _ISalnum)
00029 func (isalpha_l, _ISalpha)
00030 func (iscntrl_l, _IScntrl)
00031 func (isdigit_l, _ISdigit)
00032 func (islower_l, _ISlower)
00033 func (isgraph_l, _ISgraph)
00034 func (isprint_l, _ISprint)
00035 func (ispunct_l, _ISpunct)
00036 func (isspace_l, _ISspace)
00037 func (isupper_l, _ISupper)
00038 func (isxdigit_l, _ISxdigit)
00039 
00040 int
00041 (__tolower_l) (int c, __locale_t l)
00042 {
00043   return l->__ctype_tolower[c];
00044 }
00045 weak_alias (__tolower_l, tolower_l)
00046 
00047 int
00048 (__toupper_l) (int c, __locale_t l)
00049 {
00050   return l->__ctype_toupper[c];
00051 }
00052 weak_alias (__toupper_l, toupper_l)