Lines Matching refs:depth
447 static char *print_value(cJSON *item, int depth, int fmt, printbuffer *p);
449 static char *print_array(cJSON *item, int depth, int fmt, printbuffer *p);
451 static char *print_object(cJSON *item, int depth, int fmt, printbuffer *p);
532 static char *print_value(cJSON *item, int depth, int fmt, printbuffer *p) {
559 out = print_array(item, depth, fmt, p);
562 out = print_object(item, depth, fmt, p);
583 out = print_array(item, depth, fmt, 0);
586 out = print_object(item, depth, fmt, 0);
633 static char *print_array(cJSON *item, int depth, int fmt, printbuffer *p) {
662 print_value(child, depth + 1, fmt, p);
688 ret = print_value(child, depth + 1, fmt, 0);
788 static char *print_object(cJSON *item, int depth, int fmt, printbuffer *p) {
800 out = ensure(item->pAllocator, p, fmt ? depth + 4 : 3);
802 out = (char *)cJSON_malloc(item->pAllocator, fmt ? depth + 4 : 3);
808 for (j = 0; j < depth - 1; j++) *ptr++ = '\t';
825 depth++;
828 ptr = ensure(item->pAllocator, p, depth);
830 for (j = 0; j < depth; j++) *ptr++ = '\t';
831 p->offset += depth;
843 print_value(child, depth, fmt, p);
855 ptr = ensure(item->pAllocator, p, fmt ? (depth + 1) : 2);
858 for (j = 0; j < depth - 1; j++) *ptr++ = '\t';
876 depth++;
877 if (fmt) len += depth;
880 entries[i++] = ret = print_value(child, depth, fmt, 0);
882 len += strlen(ret) + strlen(str) + 2 + (fmt ? 2 + depth : 0);
910 for (k = 0; k < depth; k++) *ptr++ = '\t';
929 for (j = 0; j < depth - 1; j++) *ptr++ = '\t';