diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/string_utils.h | 12 | ||||
-rw-r--r-- | src/uri_utils.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/string_utils.h b/src/string_utils.h index ff55a1d0..d90a19e1 100644 --- a/src/string_utils.h +++ b/src/string_utils.h @@ -30,35 +30,35 @@ static const uint8_t replacement_char[] = { 0xEF, 0xBF, 0xBD }; /** Return true if `c` lies within [`min`...`max`] (inclusive) */ static inline bool -in_range(const char c, const char min, const char max) +in_range(const int c, const int min, const int max) { return (c >= min && c <= max); } /** RFC2234: ALPHA ::= %x41-5A / %x61-7A ; A-Z / a-z */ static inline bool -is_alpha(const char c) +is_alpha(const int c) { return in_range(c, 'A', 'Z') || in_range(c, 'a', 'z'); } /** RFC2234: DIGIT ::= %x30-39 ; 0-9 */ static inline bool -is_digit(const char c) +is_digit(const int c) { return in_range(c, '0', '9'); } /** RFC2234: HEXDIG ::= DIGIT / "A" / "B" / "C" / "D" / "E" / "F" */ static inline bool -is_hexdig(const char c) +is_hexdig(const int c) { return is_digit(c) || in_range(c, 'A', 'F'); } /** Turtle / JSON / C: XDIGIT ::= DIGIT / A-F / a-f */ static inline bool -is_xdigit(const char c) +is_xdigit(const int c) { return is_hexdig(c) || in_range(c, 'a', 'f'); } @@ -77,7 +77,7 @@ is_space(const char c) /** Return true iff `c` is a valid encoded base64 character. */ static inline bool -is_base64(const char c) +is_base64(const int c) { return is_alpha(c) || is_digit(c) || c == '+' || c == '/' || c == '='; } diff --git a/src/uri_utils.h b/src/uri_utils.h index 2b61ab22..e341b896 100644 --- a/src/uri_utils.h +++ b/src/uri_utils.h @@ -96,7 +96,7 @@ uri_is_under(const SerdURI* uri, const SerdURI* root) } static inline bool -is_uri_scheme_char(const uint8_t c) +is_uri_scheme_char(const int c) { switch (c) { case ':': case '+': case '-': case '.': |