1 | #ifndef HEADER_CURL_CTYPE_H |
2 | #define |
3 | /*************************************************************************** |
4 | * _ _ ____ _ |
5 | * Project ___| | | | _ \| | |
6 | * / __| | | | |_) | | |
7 | * | (__| |_| | _ <| |___ |
8 | * \___|\___/|_| \_\_____| |
9 | * |
10 | * Copyright (C) 1998 - 2022, Daniel Stenberg, <[email protected]>, et al. |
11 | * |
12 | * This software is licensed as described in the file COPYING, which |
13 | * you should have received as part of this distribution. The terms |
14 | * are also available at https://curl.se/docs/copyright.html. |
15 | * |
16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell |
17 | * copies of the Software, and permit persons to whom the Software is |
18 | * furnished to do so, under the terms of the COPYING file. |
19 | * |
20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
21 | * KIND, either express or implied. |
22 | * |
23 | * SPDX-License-Identifier: curl |
24 | * |
25 | ***************************************************************************/ |
26 | |
27 | #include "curl_setup.h" |
28 | |
29 | int Curl_isspace(int c); |
30 | int Curl_isdigit(int c); |
31 | int Curl_isalnum(int c); |
32 | int Curl_isxdigit(int c); |
33 | int Curl_isgraph(int c); |
34 | int Curl_isprint(int c); |
35 | int Curl_isalpha(int c); |
36 | int Curl_isupper(int c); |
37 | int Curl_islower(int c); |
38 | int Curl_iscntrl(int c); |
39 | |
40 | #define ISSPACE(x) (Curl_isspace((int) ((unsigned char)x))) |
41 | #define ISDIGIT(x) (Curl_isdigit((int) ((unsigned char)x))) |
42 | #define ISALNUM(x) (Curl_isalnum((int) ((unsigned char)x))) |
43 | #define ISXDIGIT(x) (Curl_isxdigit((int) ((unsigned char)x))) |
44 | #define ISGRAPH(x) (Curl_isgraph((int) ((unsigned char)x))) |
45 | #define ISALPHA(x) (Curl_isalpha((int) ((unsigned char)x))) |
46 | #define ISPRINT(x) (Curl_isprint((int) ((unsigned char)x))) |
47 | #define ISUPPER(x) (Curl_isupper((int) ((unsigned char)x))) |
48 | #define ISLOWER(x) (Curl_islower((int) ((unsigned char)x))) |
49 | #define ISCNTRL(x) (Curl_iscntrl((int) ((unsigned char)x))) |
50 | #define ISASCII(x) (((x) >= 0) && ((x) <= 0x80)) |
51 | |
52 | #define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \ |
53 | (((unsigned char)x) == '\t')) |
54 | |
55 | #endif /* HEADER_CURL_CTYPE_H */ |
56 | |