CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ctype.c
Go to the documentation of this file.
1
2/* FUNCTION: isalnum */
3
4int isalnum(int c)
5{ return (c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9'); }
6
7/* FUNCTION: isalpha */
8
9int isalpha(int c)
10{ return (c>='a' && c<='z') || (c>='A' && c<='Z'); }
11
12/* FUNCTION: isblank */
13
14int isblank(int c)
15{ return c==' ' || c=='\t'; }
16
17/* FUNCTION: iscntrl */
18
19int iscntrl(int c)
20{ return (c>=0 && c<='\037') || c=='\177'; }
21
22/* FUNCTION: isdigit */
23
24int isdigit(int c)
25{ return c>='0' && c<='9'; }
26
27/* FUNCTION: isgraph */
28
29int isgraph(int c)
30{ return c>='!' && c<='~'; }
31
32/* FUNCTION: islower */
33
34int islower(int c)
35{ return c>='a' && c<='z'; }
36
37/* FUNCTION: isprint */
38
39int isprint(int c)
40{ return c>=' ' && c<='~'; }
41
42/* FUNCTION: ispunct */
43
44int ispunct(int c)
45{ return c=='!' ||
46 c=='"' ||
47 c=='#' ||
48 c=='$' ||
49 c=='%' ||
50 c=='&' ||
51 c=='\'' ||
52 c=='(' ||
53 c==')' ||
54 c=='*' ||
55 c=='+' ||
56 c==',' ||
57 c=='-' ||
58 c=='.' ||
59 c=='/' ||
60 c==':' ||
61 c==';' ||
62 c=='<' ||
63 c=='=' ||
64 c=='>' ||
65 c=='?' ||
66 c=='@' ||
67 c=='[' ||
68 c=='\\' ||
69 c==']' ||
70 c=='^' ||
71 c=='_' ||
72 c=='`' ||
73 c=='{' ||
74 c=='|' ||
75 c=='}' ||
76 c=='~'; }
77
78/* FUNCTION: isspace */
79
80int isspace(int c)
81{ return c=='\t' ||
82 c=='\n' ||
83 c=='\v' ||
84 c=='\f' ||
85 c=='\r' ||
86 c==' '; }
87
88/* FUNCTION: isupper */
89
90int isupper(int c)
91{ return c>='A' && c<='Z'; }
92
93/* FUNCTION: isxdigit */
94
95int isxdigit(int c)
96{ return (c>='A' && c<='F') || (c>='a' && c<='f') || (c>='0' && c<='9'); }
97
98/* FUNCTION: __CPROVER_tolower */
99
101{
102 return (c >= 'A' && c <= 'Z') ? c + ('a' - 'A') : c;
103}
104
105/* FUNCTION: tolower */
106
107int __CPROVER_tolower(int c);
108
109int tolower(int c)
110{
111 return __CPROVER_tolower(c);
112}
113
114/* FUNCTION: __tolower */
115
116int __CPROVER_tolower(int c);
117
118int __tolower(int c)
119{
120 return __CPROVER_tolower(c);
121}
122
123/* FUNCTION: __CPROVER_toupper */
124
126{
127 return (c >= 'a' && c <= 'z') ? c - ('a' - 'A') : c;
128}
129
130/* FUNCTION: toupper */
131
132int __CPROVER_toupper(int c);
133
134int toupper(int c)
135{
136 return __CPROVER_toupper(c);
137}
138
139/* FUNCTION: __toupper */
140
141int __CPROVER_toupper(int c);
142
143int __toupper(int c)
144{
145 return __CPROVER_toupper(c);
146}
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
int iscntrl(int c)
Definition ctype.c:19
int isalpha(int c)
Definition ctype.c:9
int isdigit(int c)
Definition ctype.c:24
int __CPROVER_toupper(int c)
Definition ctype.c:125
int isgraph(int c)
Definition ctype.c:29
int isspace(int c)
Definition ctype.c:80
int __tolower(int c)
Definition ctype.c:118
int islower(int c)
Definition ctype.c:34
int __toupper(int c)
Definition ctype.c:143
int isprint(int c)
Definition ctype.c:39
int toupper(int c)
Definition ctype.c:134
int tolower(int c)
Definition ctype.c:109
int __CPROVER_tolower(int c)
Definition ctype.c:100
int isupper(int c)
Definition ctype.c:90
int isxdigit(int c)
Definition ctype.c:95
int isalnum(int c)
Definition ctype.c:4
int isblank(int c)
Definition ctype.c:14
int ispunct(int c)
Definition ctype.c:44