Outputs up to the first 16 chars of token to fp. */
| 304 | |
| 305 | /** Outputs up to the first 16 chars of token to fp. */ |
| 306 | static void show_16(FILE *fp, jsmntok_t *tok) |
| 307 | { |
| 308 | size_t len = tok->end - tok->start; |
| 309 | if (len > 16) { |
| 310 | len = 16; |
| 311 | fwrite(input + tok->start, 1, len, fp); |
| 312 | fputs("...", fp); |
| 313 | } |
| 314 | else |
| 315 | fwrite(input + tok->start, 1, len, fp); |
| 316 | } |
| 317 | |
| 318 | void show_attrs(FILE *fp, Attr attrs, int need_comma) |
| 319 | { |