1#ifndef _CTYPE_H
2
3#include <ctype/ctype.h>
4
5#ifndef _ISOMAC
6/* Initialize ctype locale data. */
7extern void __ctype_init (void);
8libc_hidden_proto (__ctype_init)
9
10/* ctype/ctype.h defined this as a macro and we don't want to #undef it.
11 So defeat macro expansion with parens for this declaration. */
12extern int (__isctype) (int __c, int __mask);
13
14libc_hidden_proto (tolower)
15libc_hidden_proto (toupper)
16
17# if IS_IN (libc)
18
19/* These accessors are used by the optimized macros to find the
20 thread-local cache of ctype information from the current thread's
21 locale. For inside libc, define them as inlines using the _NL_CURRENT
22 accessors. We don't use _NL_CURRENT_LOCALE->__ctype_b here because we
23 want to cause a link-time ref to _nl_current_LC_CTYPE under
24 NL_CURRENT_INDIRECT. */
25
26# include "../locale/localeinfo.h"
27
28# ifndef CTYPE_EXTERN_INLINE /* Used by ctype/ctype-info.c, which see. */
29# define CTYPE_EXTERN_INLINE extern inline
30# endif
31
32extern __thread const uint16_t * __libc_tsd_CTYPE_B
33 attribute_hidden attribute_tls_model_ie;
34extern __thread const int32_t * __libc_tsd_CTYPE_TOUPPER
35 attribute_hidden attribute_tls_model_ie;
36extern __thread const int32_t * __libc_tsd_CTYPE_TOLOWER
37 attribute_hidden attribute_tls_model_ie;
38
39
40CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const))
41__ctype_b_loc (void)
42{
43 return &__libc_tsd_CTYPE_B;
44}
45
46CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
47__ctype_toupper_loc (void)
48{
49 return &__libc_tsd_CTYPE_TOUPPER;
50}
51
52CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
53__ctype_tolower_loc (void)
54{
55 return &__libc_tsd_CTYPE_TOLOWER;
56}
57
58# ifndef __NO_CTYPE
59/* The spec says that isdigit must only match the decimal digits. We
60 can check this without a memory access. */
61# undef isdigit
62# define isdigit(c) ({ int __c = (c); __c >= '0' && __c <= '9'; })
63# undef isdigit_l
64# define isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; })
65# undef __isdigit_l
66# define __isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; })
67# endif /* Not __NO_CTYPE. */
68
69/* For use in initializers. */
70extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
71extern const uint32_t _nl_C_LC_CTYPE_toupper[] attribute_hidden;
72extern const uint32_t _nl_C_LC_CTYPE_tolower[] attribute_hidden;
73
74# endif /* IS_IN (libc). */
75#endif /* Not _ISOMAC. */
76
77#endif /* ctype.h */
78

source code of glibc/include/ctype.h