| 1018 | json_token_t *token); |
| 1019 | |
| 1020 | static int hexdigit2int(char hex) |
| 1021 | { |
| 1022 | if ('0' <= hex && hex <= '9') |
| 1023 | return hex - '0'; |
| 1024 | |
| 1025 | /* Force lowercase */ |
| 1026 | hex |= 0x20; |
| 1027 | if ('a' <= hex && hex <= 'f') |
| 1028 | return 10 + hex - 'a'; |
| 1029 | |
| 1030 | return -1; |
| 1031 | } |
| 1032 | |
| 1033 | static int decode_hex4(const char *hex) |
| 1034 | { |