fix inet_pton
[musl.git] / include / ctype.h
blob8f0d16872e7a788827564c606867a0e2927d92fd
1 #ifndef _CTYPE_H
2 #define _CTYPE_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 #include <features.h>
10 int isalnum(int);
11 int isalpha(int);
12 int isblank(int);
13 int iscntrl(int);
14 int isdigit(int);
15 int isgraph(int);
16 int islower(int);
17 int isprint(int);
18 int ispunct(int);
19 int isspace(int);
20 int isupper(int);
21 int isxdigit(int);
22 int tolower(int);
23 int toupper(int);
25 #define isalpha(a) ((((unsigned)(a)|32)-'a') < 26)
26 #define isdigit(a) (((unsigned)(a)-'0') < 10)
27 #define islower(a) (((unsigned)(a)-'a') < 26)
28 #define isupper(a) (((unsigned)(a)-'A') < 26)
29 #define isprint(a) (((unsigned)(a)-0x20) < 0x5f)
30 #define isgraph(a) (((unsigned)(a)-0x21) < 0x5e)
34 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
35 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
36 || defined(_BSD_SOURCE)
38 #define __NEED_locale_t
39 #include <bits/alltypes.h>
41 int isalnum_l(int, locale_t);
42 int isalpha_l(int, locale_t);
43 int isblank_l(int, locale_t);
44 int iscntrl_l(int, locale_t);
45 int isdigit_l(int, locale_t);
46 int isgraph_l(int, locale_t);
47 int islower_l(int, locale_t);
48 int isprint_l(int, locale_t);
49 int ispunct_l(int, locale_t);
50 int isspace_l(int, locale_t);
51 int isupper_l(int, locale_t);
52 int isxdigit_l(int, locale_t);
53 int tolower_l(int, locale_t);
54 int toupper_l(int, locale_t);
56 int isascii(int);
57 int toascii(int);
58 #define _tolower(a) ((a)|0x20)
59 #define _toupper(a) ((a)&0x5f)
61 #endif
63 #ifdef __cplusplus
65 #endif
67 #endif