| 49 | typedef unsigned short json_uchar; |
| 50 | |
| 51 | static unsigned char hex_value (json_char c) |
| 52 | { |
| 53 | if (isdigit(c)) |
| 54 | return c - '0'; |
| 55 | |
| 56 | switch (c) { |
| 57 | case 'a': case 'A': return 0x0A; |
| 58 | case 'b': case 'B': return 0x0B; |
| 59 | case 'c': case 'C': return 0x0C; |
| 60 | case 'd': case 'D': return 0x0D; |
| 61 | case 'e': case 'E': return 0x0E; |
| 62 | case 'f': case 'F': return 0x0F; |
| 63 | default: return 0xFF; |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | typedef struct |
| 68 | { |