• Home
  • Raw
  • Download

Lines Matching refs:input_buffer

305 static cJSON_bool parse_number(cJSON * const item, parse_buffer * const input_buffer)  in parse_number()  argument
313 if ((input_buffer == NULL) || (input_buffer->content == NULL)) in parse_number()
321 for (i = 0; (i < (sizeof(number_c_string) - 1)) && can_access_at_index(input_buffer, i); i++) in parse_number()
323 switch (buffer_at_offset(input_buffer)[i]) in parse_number() local
339 number_c_string[i] = buffer_at_offset(input_buffer)[i]; in parse_number()
377 input_buffer->offset += (size_t)(after_end - number_c_string); in parse_number()
778 static cJSON_bool parse_string(cJSON * const item, parse_buffer * const input_buffer) in parse_string() argument
780 const unsigned char *input_pointer = buffer_at_offset(input_buffer) + 1; in parse_string()
781 const unsigned char *input_end = buffer_at_offset(input_buffer) + 1; in parse_string()
786 if (buffer_at_offset(input_buffer)[0] != '\"') in parse_string() local
795 …while (((size_t)(input_end - input_buffer->content) < input_buffer->length) && (*input_end != '\"'… in parse_string()
800 if ((size_t)(input_end + 1 - input_buffer->content) >= input_buffer->length) in parse_string()
810 … if (((size_t)(input_end - input_buffer->content) >= input_buffer->length) || (*input_end != '\"')) in parse_string()
816 allocation_length = (size_t) (input_end - buffer_at_offset(input_buffer)) - skipped_bytes; in parse_string()
817 output = (unsigned char*)input_buffer->hooks.allocate(allocation_length + sizeof("")); in parse_string()
887 input_buffer->offset = (size_t) (input_end - input_buffer->content); in parse_string()
888 input_buffer->offset++; in parse_string()
895 input_buffer->hooks.deallocate(output); in parse_string()
900 input_buffer->offset = (size_t)(input_pointer - input_buffer->content); in parse_string()
1035 static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer);
1037 static cJSON_bool parse_array(cJSON * const item, parse_buffer * const input_buffer);
1039 static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer);
1317 static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer) in parse_value() argument
1319 if ((input_buffer == NULL) || (input_buffer->content == NULL)) in parse_value()
1326 …if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "null", 4) … in parse_value()
1329 input_buffer->offset += 4; in parse_value()
1333 …if (can_read(input_buffer, 5) && (strncmp((const char*)buffer_at_offset(input_buffer), "false", 5)… in parse_value()
1336 input_buffer->offset += 5; in parse_value()
1340 …if (can_read(input_buffer, 4) && (strncmp((const char*)buffer_at_offset(input_buffer), "true", 4) … in parse_value()
1344 input_buffer->offset += 4; in parse_value()
1348 if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '\"')) in parse_value()
1350 return parse_string(item, input_buffer); in parse_value()
1353 …dex(input_buffer, 0) && ((buffer_at_offset(input_buffer)[0] == '-') || ((buffer_at_offset(input_bu… in parse_value()
1355 return parse_number(item, input_buffer); in parse_value()
1358 if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '[')) in parse_value()
1360 return parse_array(item, input_buffer); in parse_value()
1363 if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '{')) in parse_value()
1365 return parse_object(item, input_buffer); in parse_value()
1446 static cJSON_bool parse_array(cJSON * const item, parse_buffer * const input_buffer) in parse_array() argument
1451 if (input_buffer->depth >= CJSON_NESTING_LIMIT) in parse_array()
1455 input_buffer->depth++; in parse_array()
1457 if (buffer_at_offset(input_buffer)[0] != '[') in parse_array() local
1463 input_buffer->offset++; in parse_array()
1464 buffer_skip_whitespace(input_buffer); in parse_array()
1465 if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ']')) in parse_array()
1472 if (cannot_access_at_index(input_buffer, 0)) in parse_array()
1474 input_buffer->offset--; in parse_array()
1479 input_buffer->offset--; in parse_array()
1484 cJSON *new_item = cJSON_New_Item(&(input_buffer->hooks)); in parse_array()
1505 input_buffer->offset++; in parse_array()
1506 buffer_skip_whitespace(input_buffer); in parse_array()
1507 if (!parse_value(current_item, input_buffer)) in parse_array()
1511 buffer_skip_whitespace(input_buffer); in parse_array()
1513 while (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ',')); in parse_array()
1515 if (cannot_access_at_index(input_buffer, 0) || buffer_at_offset(input_buffer)[0] != ']') in parse_array()
1521 input_buffer->depth--; in parse_array()
1530 input_buffer->offset++; in parse_array()
1606 static cJSON_bool parse_object(cJSON * const item, parse_buffer * const input_buffer) in parse_object() argument
1611 if (input_buffer->depth >= CJSON_NESTING_LIMIT) in parse_object()
1615 input_buffer->depth++; in parse_object()
1617 if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != '{')) in parse_object()
1622 input_buffer->offset++; in parse_object()
1623 buffer_skip_whitespace(input_buffer); in parse_object()
1624 if (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == '}')) in parse_object()
1630 if (cannot_access_at_index(input_buffer, 0)) in parse_object()
1632 input_buffer->offset--; in parse_object()
1637 input_buffer->offset--; in parse_object()
1642 cJSON *new_item = cJSON_New_Item(&(input_buffer->hooks)); in parse_object()
1663 input_buffer->offset++; in parse_object()
1664 buffer_skip_whitespace(input_buffer); in parse_object()
1665 if (!parse_string(current_item, input_buffer)) in parse_object()
1669 buffer_skip_whitespace(input_buffer); in parse_object()
1675 if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != ':')) in parse_object()
1681 input_buffer->offset++; in parse_object()
1682 buffer_skip_whitespace(input_buffer); in parse_object()
1683 if (!parse_value(current_item, input_buffer)) in parse_object()
1687 buffer_skip_whitespace(input_buffer); in parse_object()
1689 while (can_access_at_index(input_buffer, 0) && (buffer_at_offset(input_buffer)[0] == ',')); in parse_object()
1691 if (cannot_access_at_index(input_buffer, 0) || (buffer_at_offset(input_buffer)[0] != '}')) in parse_object()
1697 input_buffer->depth--; in parse_object()
1706 input_buffer->offset++; in parse_object()