blob: 3edf01b2ce04f6783e2b5e5a35fd89796ca42a93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/*-
* Copyright (c) 2014-present MongoDB, Inc.
* Copyright (c) 2008-2014 WiredTiger, Inc.
* All rights reserved.
*
* See the file LICENSE for redistribution information.
*/
#include <ctype.h>
/*
* __wt_isalnum --
* Wrap the ctype function without sign extension.
*/
static inline bool
__wt_isalnum(u_char c)
{
return (isalnum(c) != 0);
}
/*
* __wt_isalpha --
* Wrap the ctype function without sign extension.
*/
static inline bool
__wt_isalpha(u_char c)
{
return (isalpha(c) != 0);
}
/*
* __wt_isascii --
* Wrap the ctype function without sign extension.
*/
static inline bool
__wt_isascii(u_char c)
{
return (isascii(c) != 0);
}
/*
* __wt_isdigit --
* Wrap the ctype function without sign extension.
*/
static inline bool
__wt_isdigit(u_char c)
{
return (isdigit(c) != 0);
}
/*
* __wt_isprint --
* Wrap the ctype function without sign extension.
*/
static inline bool
__wt_isprint(u_char c)
{
/*
* On some systems, isprint() says that characters over 0x80 are printable, even if they may not
* actually be printable.
*/
return (isprint(c) != 0) && (c < 0x80);
}
/*
* __wt_isspace --
* Wrap the ctype function without sign extension.
*/
static inline bool
__wt_isspace(u_char c)
{
return (isspace(c) != 0);
}
/*
* __wt_tolower --
* Wrap the ctype function without sign extension.
*/
static inline u_char
__wt_tolower(u_char c)
{
return ((u_char)tolower(c));
}
|