Lines Matching refs:stack
43 } stack[JSON_MAX_STACK]; variable
55 if (stack[level].compact) in do_comma_indent()
58 if (stack[level].count++ > 0) { in do_comma_indent()
63 if (stack[level].compact) in do_comma_indent()
72 if (stack[level].type == ARRAY) in do_name()
84 if (type == stack[i].type && in do_find()
85 strcmp(name, stack[i].name) == 0) in do_find()
96 memset(stack, 0, sizeof(stack)); in json_do_start()
98 stack[level].type = START; in json_do_start()
129 if (stack[level].type == ARRAY) in json_do_array()
132 if (stack[level].compact) in json_do_array()
142 stack[level].name = name; in json_do_array()
143 stack[level].type = ARRAY; in json_do_array()
144 stack[level].count = 0; in json_do_array()
146 stack[level].compact = stack[level - 1].compact; in json_do_array()
171 stack[level].name = name; in json_do_object()
172 stack[level].type = OBJECT; in json_do_object()
173 stack[level].count = 0; in json_do_object()
174 stack[level].compact = compact; in json_do_object()
182 if (stack[level].type == ARRAY) in json_do_end()
184 else if (stack[level].type == OBJECT) in json_do_end()
189 if (!stack[level].compact) { in json_do_end()
197 stack[level].name = NULL; in json_do_end()
198 stack[level].type = NONE; in json_do_end()
199 stack[level].count = 0; in json_do_end()
200 stack[level].compact = 0; in json_do_end()
205 stack[level].count++; in json_do_end()