/src/dovecot/src/lib-json/json-syntax.h
Line | Count | Source |
1 | | #ifndef JSON_SYNTAX_H |
2 | | #define JSON_SYNTAX_H |
3 | | |
4 | | #include "unichar.h" |
5 | | |
6 | | extern const unsigned char json_uchar_char_mask; |
7 | | extern const unsigned char json_control_char_mask; |
8 | | extern const unsigned char json_ws_char_mask; |
9 | | extern const unsigned char json_digit_char_mask; |
10 | | |
11 | | extern const unsigned char json_char_lookup[128]; |
12 | | |
13 | | static inline bool json_unichar_is_uchar(unichar_t ch) |
14 | 0 | { |
15 | 0 | if (ch > 0x7F) |
16 | 0 | return (ch <= 0x10FFFF); |
17 | 0 | return ((json_char_lookup[ch] & json_uchar_char_mask) != 0); |
18 | 0 | } Unexecuted instantiation: json-parser.c:json_unichar_is_uchar Unexecuted instantiation: json-generator.c:json_unichar_is_uchar Unexecuted instantiation: json-syntax.c:json_unichar_is_uchar |
19 | | |
20 | | static inline bool json_unichar_is_control(unichar_t ch) |
21 | 0 | { |
22 | 0 | if (ch > 0x7F) |
23 | 0 | return FALSE; |
24 | 0 | return ((json_char_lookup[ch] & json_control_char_mask) != 0); |
25 | 0 | } Unexecuted instantiation: json-parser.c:json_unichar_is_control Unexecuted instantiation: json-generator.c:json_unichar_is_control Unexecuted instantiation: json-syntax.c:json_unichar_is_control |
26 | | |
27 | | static inline bool json_unichar_is_ws(unichar_t ch) |
28 | 0 | { |
29 | 0 | if (ch > 0x7F) |
30 | 0 | return FALSE; |
31 | 0 | return ((json_char_lookup[ch] & json_ws_char_mask) != 0); |
32 | 0 | } Unexecuted instantiation: json-parser.c:json_unichar_is_ws Unexecuted instantiation: json-generator.c:json_unichar_is_ws Unexecuted instantiation: json-syntax.c:json_unichar_is_ws |
33 | | |
34 | | static inline bool json_unichar_is_digit(unichar_t ch) |
35 | 0 | { |
36 | 0 | if (ch > 0x7F) |
37 | 0 | return FALSE; |
38 | 0 | return ((json_char_lookup[ch] & json_digit_char_mask) != 0); |
39 | 0 | } Unexecuted instantiation: json-parser.c:json_unichar_is_digit Unexecuted instantiation: json-generator.c:json_unichar_is_digit Unexecuted instantiation: json-syntax.c:json_unichar_is_digit |
40 | | |
41 | | #endif |