Lines Matching refs:output_buffer
712 static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer)
723 if (output_buffer == NULL)
761 output_pointer = ensure(output_buffer, (size_t)length + sizeof(""));
781 output_buffer->offset += (size_t)length;
787 static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer)
797 if (output_buffer == NULL)
831 output_pointer = ensure(output_buffer, (size_t)length + sizeof(""));
851 output_buffer->offset += (size_t)length;
1145 static cJSON_bool print_string_ptr(const unsigned char * const input, printbuffer * const output_buffer)
1154 if (output_buffer == NULL)
1162 output = ensure(output_buffer, sizeof("\"\""));
1198 output = ensure(output_buffer, output_length + sizeof("\"\""));
1274 static cJSON_bool print_value(const cJSON * const item, printbuffer * const output_buffer);
1276 static cJSON_bool print_array(const cJSON * const item, printbuffer * const output_buffer);
1278 static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer);
1610 static cJSON_bool print_value(const cJSON * const item, printbuffer * const output_buffer)
1614 if ((item == NULL) || (output_buffer == NULL))
1622 output = ensure(output_buffer, 5);
1631 output = ensure(output_buffer, 6);
1640 output = ensure(output_buffer, 5);
1649 return print_number(item, output_buffer);
1660 output = ensure(output_buffer, raw_length);
1670 return print_string(item, output_buffer);
1673 return print_array(item, output_buffer);
1676 return print_object(item, output_buffer);
1782 static cJSON_bool print_array(const cJSON * const item, printbuffer * const output_buffer)
1788 if (output_buffer == NULL)
1795 output_pointer = ensure(output_buffer, 1);
1802 output_buffer->offset++;
1803 output_buffer->depth++;
1807 if (!print_value(current_element, output_buffer))
1811 update_offset(output_buffer);
1814 length = (size_t) (output_buffer->format ? 2 : 1);
1815 output_pointer = ensure(output_buffer, length + 1);
1821 if(output_buffer->format)
1826 output_buffer->offset += length;
1831 output_pointer = ensure(output_buffer, 2);
1838 output_buffer->depth--;
1962 static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer)
1968 if (output_buffer == NULL)
1974 length = (size_t) (output_buffer->format ? 2 : 1); /* fmt: {\n */
1975 output_pointer = ensure(output_buffer, length + 1);
1982 output_buffer->depth++;
1983 if (output_buffer->format)
1987 output_buffer->offset += length;
1991 if (output_buffer->format)
1994 output_pointer = ensure(output_buffer, output_buffer->depth);
1999 for (i = 0; i < output_buffer->depth; i++)
2003 output_buffer->offset += output_buffer->depth;
2007 if (!print_string_ptr((unsigned char*)current_item->string, output_buffer))
2011 update_offset(output_buffer);
2013 length = (size_t) (output_buffer->format ? 2 : 1);
2014 output_pointer = ensure(output_buffer, length);
2020 if (output_buffer->format)
2024 output_buffer->offset += length;
2027 if (!print_value(current_item, output_buffer))
2031 update_offset(output_buffer);
2034 length = ((size_t)(output_buffer->format ? 1 : 0) + (size_t)(current_item->next ? 1 : 0));
2035 output_pointer = ensure(output_buffer, length + 1);
2045 if (output_buffer->format)
2050 output_buffer->offset += length;
2055 output_pointer = ensure(output_buffer, output_buffer->format ? (output_buffer->depth + 1) : 2);
2060 if (output_buffer->format)
2063 for (i = 0; i < (output_buffer->depth - 1); i++)
2070 output_buffer->depth--;