Lines Matching refs:st
173 size_t *st, size_t lvl) in json_parse_array() argument
181 if (!json_parse(&uc, ue, st, lvl + 1)) in json_parse_array()
191 st[JSON_ARRAYN]++; in json_parse_array()
207 size_t *st, size_t lvl) in json_parse_object() argument
235 if (!json_parse(&uc, ue, st, lvl + 1)) { in json_parse_object()
330 size_t *st, size_t lvl) in json_parse() argument
345 if (lvl > 1 && (st[JSON_OBJECT] || st[JSON_ARRAYN])) in json_parse()
356 rv = json_parse_array(&uc, ue, st, lvl + 1); in json_parse()
360 rv = json_parse_object(&uc, ue, st, lvl + 1); in json_parse()
382 st[t]++; in json_parse()
388 return rv && (st[JSON_ARRAYN] || st[JSON_OBJECT]); in json_parse()
398 size_t st[JSON_MAX]; in file_is_json() local
405 memset(st, 0, sizeof(st)); in file_is_json()
407 if (!json_parse(&uc, ue, st, 0)) in file_is_json()
420 #define P(n) st[n], st[n] > 1 ? "s" : "" in file_is_json()
448 struct stat st; in main() local
455 if (fstat(fd, &st) == -1) in main()
458 if ((p = malloc(st.st_size)) == NULL) in main()
460 (intmax_t)st.st_size); in main()
461 if (read(fd, p, st.st_size) != st.st_size) in main()
463 (intmax_t)st.st_size); in main()
466 p + st.st_size, stats, 0)); in main()