Back to index

glibc  2.9
ctype-extn.c
Go to the documentation of this file.
00001 /* Copyright (C) 1991,1997,1999,2000,2002,2005 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 #define __ctype_tolower \
00023   ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128)
00024 #define __ctype_toupper \
00025   ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128)
00026 
00027 /* Real function versions of the non-ANSI ctype functions.  isblank is
00028    now in ISO C99 but we leave it here.  */
00029 
00030 int
00031 isblank (int c)
00032 {
00033   return __isctype (c, _ISblank);
00034 }
00035 
00036 int
00037 _tolower (int c)
00038 {
00039   return __ctype_tolower[c];
00040 }
00041 int
00042 _toupper (int c)
00043 {
00044   return __ctype_toupper[c];
00045 }
00046 
00047 int
00048 toascii (int c)
00049 {
00050   return __toascii (c);
00051 }
00052 weak_alias (toascii, __toascii_l)
00053 
00054 int
00055 isascii (int c)
00056 {
00057   return __isascii (c);
00058 }
00059 weak_alias (isascii, __isascii_l)
00060 
00061 
00062 int
00063 __isblank_l (int c, __locale_t l)
00064 {
00065   return __isctype_l (c, _ISblank, l);
00066 }
00067 weak_alias (__isblank_l, isblank_l)