Back to index

glibc  2.9
wctype.h
Go to the documentation of this file.
00001 #ifndef _WCTYPE_H
00002 
00003 /* We try to get wint_t from <stddef.h>, but not all GCC versions define it
00004    there.  So define it ourselves if it remains undefined.  */
00005 # define __need_wint_t
00006 # include <stddef.h>
00007 # ifndef _WINT_T
00008 /* Integral type unchanged by default argument promotions that can
00009    hold any value corresponding to members of the extended character
00010    set, as well as at least one value that does not correspond to any
00011    member of the extended character set.  */
00012 #  define _WINT_T
00013 typedef unsigned int wint_t;
00014 # endif
00015 
00016 /* Need to repeat these prototypes here, as wctype/wctype.h defines all
00017    these as macros and thus we couldn't add libc_hidden_proto.  */
00018 
00019 extern int iswalpha (wint_t __wc);
00020 extern int iswalnum (wint_t __wc);
00021 extern int iswdigit (wint_t __wc);
00022 extern int iswlower (wint_t __wc);
00023 extern int iswspace (wint_t __wc);
00024 extern int iswxdigit (wint_t __wc);
00025 extern wint_t towlower (wint_t __wc);
00026 extern wint_t towupper (wint_t __wc);
00027 
00028 libc_hidden_proto (iswalpha)
00029 libc_hidden_proto (iswalnum)
00030 libc_hidden_proto (iswdigit)
00031 libc_hidden_proto (iswlower)
00032 libc_hidden_proto (iswspace)
00033 libc_hidden_proto (iswxdigit)
00034 libc_hidden_proto (towlower)
00035 libc_hidden_proto (towupper)
00036 
00037 #include <wctype/wctype.h>
00038 
00039 /* Internal interfaces.  */
00040 extern int __iswalpha_l_internal (wint_t __wc, __locale_t __locale)
00041      attribute_hidden;
00042 extern int __iswdigit_l_internal (wint_t __wc, __locale_t __locale)
00043      attribute_hidden;
00044 extern int __iswspace_l_internal (wint_t __wc, __locale_t __locale)
00045      attribute_hidden;
00046 extern int __iswxdigit_l_internal (wint_t __wc, __locale_t __locale)
00047      attribute_hidden;
00048 extern int __iswspace (wint_t __wc);
00049 extern int __iswctype (wint_t __wc, wctype_t __desc);
00050 extern int __iswctype_internal (wint_t __wc, wctype_t __desc) attribute_hidden;
00051 extern wctype_t __wctype (__const char *__property);
00052 extern wctrans_t __wctrans (const char *__property);
00053 extern wint_t __towctrans (wint_t __wc, wctrans_t __desc);
00054 
00055 extern __typeof (iswalnum_l) __iswalnum_l;
00056 extern __typeof (iswalpha_l) __iswalpha_l;
00057 extern __typeof (iswblank_l) __iswblank_l;
00058 extern __typeof (iswcntrl_l) __iswcntrl_l;
00059 extern __typeof (iswdigit_l) __iswdigit_l;
00060 extern __typeof (iswlower_l) __iswlower_l;
00061 extern __typeof (iswgraph_l) __iswgraph_l;
00062 extern __typeof (iswprint_l) __iswprint_l;
00063 extern __typeof (iswpunct_l) __iswpunct_l;
00064 extern __typeof (iswspace_l) __iswspace_l;
00065 extern __typeof (iswupper_l) __iswupper_l;
00066 extern __typeof (iswxdigit_l) __iswxdigit_l;
00067 extern __typeof (towlower_l) __towlower_l;
00068 extern __typeof (towupper_l) __towupper_l;
00069 
00070 libc_hidden_proto (__towctrans)
00071 libc_hidden_proto (__iswctype)
00072 libc_hidden_proto (__iswalnum_l)
00073 libc_hidden_proto (__iswalpha_l)
00074 libc_hidden_proto (__iswblank_l)
00075 libc_hidden_proto (__iswcntrl_l)
00076 libc_hidden_proto (__iswdigit_l)
00077 libc_hidden_proto (__iswlower_l)
00078 libc_hidden_proto (__iswgraph_l)
00079 libc_hidden_proto (__iswprint_l)
00080 libc_hidden_proto (__iswpunct_l)
00081 libc_hidden_proto (__iswspace_l)
00082 libc_hidden_proto (__iswupper_l)
00083 libc_hidden_proto (__iswxdigit_l)
00084 libc_hidden_proto (__towlower_l)
00085 libc_hidden_proto (__towupper_l)
00086 
00087 /* The spec says that isdigit must only match the decimal digits.  We
00088    can check this without a memory access.  */
00089 # ifndef NOT_IN_libc
00090 #  undef iswdigit
00091 #  define iswdigit(c) ({ wint_t __c = (c); __c >= L'0' && __c <= L'9'; })
00092 #  undef iswdigit_l
00093 #  define iswdigit_l(c, l) ({ wint_t __c = (c); __c >= L'0' && __c <= L'9'; })
00094 #  undef __iswdigit_l
00095 #  define __iswdigit_l(c, l) ({ wint_t __c = (c); __c >= L'0' && __c <= L'9'; })
00096 # endif
00097 
00098 #endif