ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
ctype.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <__esbmc/stddefs.h>
5
7
8int islower(int c);
9int toupper(int c);
10int isdigit(int c);
11int isalpha(int c);
12int isalnum(int c);
13int isxdigit(int c);
14int isupper(int c);
15int tolower(int c);
16int isspace(int c);
17int iscntrl(int c);
18int ispunct(int c);
19int isprint(int c);
20int isgraph(int c);
21int isblank(int c);
22
23#if defined(__GLIBC__)
24// libstdc++ requires these to be defined
25#ifndef _ISbit
26/* These are all the characteristics of characters.
27 If there get to be more than 16 distinct characteristics,
28 many things must be changed that use `unsigned short int's.
29
30 The characteristics are stored always in network byte order (big
31 endian). We define the bit value interpretations here dependent on the
32 machine's byte order. */
33
34# include <bits/endian.h>
35# if __BYTE_ORDER == __BIG_ENDIAN
36# define _ISbit(bit) (1 << (bit))
37# else /* __BYTE_ORDER == __LITTLE_ENDIAN */
38# define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))
39# endif
40
41enum
42{
43 _ISupper = _ISbit (0), /* UPPERCASE. */
44 _ISlower = _ISbit (1), /* lowercase. */
45 _ISalpha = _ISbit (2), /* Alphabetic. */
46 _ISdigit = _ISbit (3), /* Numeric. */
47 _ISxdigit = _ISbit (4), /* Hexadecimal numeric. */
48 _ISspace = _ISbit (5), /* Whitespace. */
49 _ISprint = _ISbit (6), /* Printing. */
50 _ISgraph = _ISbit (7), /* Graphical. */
51 _ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */
52 _IScntrl = _ISbit (9), /* Control character. */
53 _ISpunct = _ISbit (10), /* Punctuation. */
54 _ISalnum = _ISbit (11) /* Alphanumeric. */
55};
56#endif /* ! _ISbit */
57#endif /* __GLIBC__ */
58
59
int iscntrl(int c)
Definition ctype.c:38
__ESBMC_C_CPP_BEGIN int islower(int c)
Definition ctype.c:56
int isalpha(int c)
Definition ctype.c:26
int isdigit(int c)
Definition ctype.c:44
int isgraph(int c)
Definition ctype.c:50
int isspace(int c)
Definition ctype.c:79
int isprint(int c)
Definition ctype.c:62
int toupper(int c)
Definition ctype.c:105
int tolower(int c)
Definition ctype.c:99
int isupper(int c)
Definition ctype.c:86
int isxdigit(int c)
Definition ctype.c:92
int isalnum(int c)
Definition ctype.c:18
int isblank(int c)
Definition ctype.c:32
int ispunct(int c)
Definition ctype.c:68
#define __ESBMC_C_CPP_END
Definition stddefs.h:9
#define __ESBMC_C_CPP_BEGIN
Definition stddefs.h:8