| 1234 | } |
| 1235 | |
| 1236 | static int toml_hex_digit(unsigned char ch) { |
| 1237 | if (ch >= '0' && ch <= '9') { |
| 1238 | return ch - '0'; |
| 1239 | } |
| 1240 | if (ch >= 'a' && ch <= 'f') { |
| 1241 | return ch - 'a' + 10; |
| 1242 | } |
| 1243 | if (ch >= 'A' && ch <= 'F') { |
| 1244 | return ch - 'A' + 10; |
| 1245 | } |
| 1246 | return -1; |
| 1247 | } |
| 1248 | |
| 1249 | static int toml_append_codepoint(toml_buffer_t *buffer, uint32_t codepoint) { |
| 1250 | char encoded[4]; |
no outgoing calls
no test coverage detected