@@ -28,19 +28,19 @@ extern "C" {
28
28
29
29
// WCharacter.h prototypes
30
30
#if defined ( __GNUC__ )
31
- inline boolean isAlphaNumeric (int c ) __attribute__((always_inline ));
32
- inline boolean isAlpha (int c ) __attribute__((always_inline ));
33
- inline boolean isAscii (int c ) __attribute__((always_inline ));
34
- inline boolean isWhitespace (int c ) __attribute__((always_inline ));
35
- inline boolean isControl (int c ) __attribute__((always_inline ));
36
- inline boolean isDigit (int c ) __attribute__((always_inline ));
37
- inline boolean isGraph (int c ) __attribute__((always_inline ));
38
- inline boolean isLowerCase (int c ) __attribute__((always_inline ));
39
- inline boolean isPrintable (int c ) __attribute__((always_inline ));
40
- inline boolean isPunct (int c ) __attribute__((always_inline ));
41
- inline boolean isSpace (int c ) __attribute__((always_inline ));
42
- inline boolean isUpperCase (int c ) __attribute__((always_inline ));
43
- inline boolean isHexadecimalDigit (int c ) __attribute__((always_inline ));
31
+ inline bool isAlphaNumeric (int c ) __attribute__((always_inline ));
32
+ inline bool isAlpha (int c ) __attribute__((always_inline ));
33
+ inline bool isAscii (int c ) __attribute__((always_inline ));
34
+ inline bool isWhitespace (int c ) __attribute__((always_inline ));
35
+ inline bool isControl (int c ) __attribute__((always_inline ));
36
+ inline bool isDigit (int c ) __attribute__((always_inline ));
37
+ inline bool isGraph (int c ) __attribute__((always_inline ));
38
+ inline bool isLowerCase (int c ) __attribute__((always_inline ));
39
+ inline bool isPrintable (int c ) __attribute__((always_inline ));
40
+ inline bool isPunct (int c ) __attribute__((always_inline ));
41
+ inline bool isSpace (int c ) __attribute__((always_inline ));
42
+ inline bool isUpperCase (int c ) __attribute__((always_inline ));
43
+ inline bool isHexadecimalDigit (int c ) __attribute__((always_inline ));
44
44
inline int toAscii (int c ) __attribute__((always_inline ));
45
45
inline int toLowerCase (int c ) __attribute__((always_inline ));
46
46
inline int toUpperCase (int c )__attribute__((always_inline ));
@@ -49,74 +49,74 @@ inline int toUpperCase(int c)__attribute__((always_inline));
49
49
50
50
// Checks for an alphanumeric character.
51
51
// It is equivalent to (isalpha(c) || isdigit(c)).
52
- inline boolean isAlphaNumeric (int c )
52
+ inline bool isAlphaNumeric (int c )
53
53
{
54
54
return ( isalnum (c ) == 0 ? false : true);
55
55
}
56
56
57
57
58
58
// Checks for an alphabetic character.
59
59
// It is equivalent to (isupper(c) || islower(c)).
60
- inline boolean isAlpha (int c )
60
+ inline bool isAlpha (int c )
61
61
{
62
62
return ( isalpha (c ) == 0 ? false : true);
63
63
}
64
64
65
65
66
66
// Checks whether c is a 7-bit unsigned char value
67
67
// that fits into the ASCII character set.
68
- inline boolean isAscii (int c )
68
+ inline bool isAscii (int c )
69
69
{
70
70
/* return ( isascii(c) == 0 ? false : true); */
71
71
return ( (c & ~0x7f ) != 0 ? false : true);
72
72
}
73
73
74
74
75
75
// Checks for a blank character, that is, a space or a tab.
76
- inline boolean isWhitespace (int c )
76
+ inline bool isWhitespace (int c )
77
77
{
78
78
return ( isblank (c ) == 0 ? false : true);
79
79
}
80
80
81
81
82
82
// Checks for a control character.
83
- inline boolean isControl (int c )
83
+ inline bool isControl (int c )
84
84
{
85
85
return ( iscntrl (c ) == 0 ? false : true);
86
86
}
87
87
88
88
89
89
// Checks for a digit (0 through 9).
90
- inline boolean isDigit (int c )
90
+ inline bool isDigit (int c )
91
91
{
92
92
return ( isdigit (c ) == 0 ? false : true);
93
93
}
94
94
95
95
96
96
// Checks for any printable character except space.
97
- inline boolean isGraph (int c )
97
+ inline bool isGraph (int c )
98
98
{
99
99
return ( isgraph (c ) == 0 ? false : true);
100
100
}
101
101
102
102
103
103
// Checks for a lower-case character.
104
- inline boolean isLowerCase (int c )
104
+ inline bool isLowerCase (int c )
105
105
{
106
106
return (islower (c ) == 0 ? false : true);
107
107
}
108
108
109
109
110
110
// Checks for any printable character including space.
111
- inline boolean isPrintable (int c )
111
+ inline bool isPrintable (int c )
112
112
{
113
113
return ( isprint (c ) == 0 ? false : true);
114
114
}
115
115
116
116
117
117
// Checks for any printable character which is not a space
118
118
// or an alphanumeric character.
119
- inline boolean isPunct (int c )
119
+ inline bool isPunct (int c )
120
120
{
121
121
return ( ispunct (c ) == 0 ? false : true);
122
122
}
@@ -125,22 +125,22 @@ inline boolean isPunct(int c)
125
125
// Checks for white-space characters. For the avr-libc library,
126
126
// these are: space, formfeed ('\f'), newline ('\n'), carriage
127
127
// return ('\r'), horizontal tab ('\t'), and vertical tab ('\v').
128
- inline boolean isSpace (int c )
128
+ inline bool isSpace (int c )
129
129
{
130
130
return ( isspace (c ) == 0 ? false : true);
131
131
}
132
132
133
133
134
134
// Checks for an uppercase letter.
135
- inline boolean isUpperCase (int c )
135
+ inline bool isUpperCase (int c )
136
136
{
137
137
return ( isupper (c ) == 0 ? false : true);
138
138
}
139
139
140
140
141
141
// Checks for a hexadecimal digits, i.e. one of 0 1 2 3 4 5 6 7
142
142
// 8 9 a b c d e f A B C D E F.
143
- inline boolean isHexadecimalDigit (int c )
143
+ inline bool isHexadecimalDigit (int c )
144
144
{
145
145
return ( isxdigit (c ) == 0 ? false : true);
146
146
}
0 commit comments