Lines Matching refs:value
305 uint64_t _cbor_value_decode_int64_internal(const CborValue *value) in _cbor_value_decode_int64_internal() argument
307 uint8_t val = value->parser->d->get8(value->parser->d, value->offset); in _cbor_value_decode_int64_internal()
309 assert(value->flags & CborIteratorFlag_IntegerValueTooLarge || in _cbor_value_decode_int64_internal()
310 value->type == CborFloatType || value->type == CborDoubleType); in _cbor_value_decode_int64_internal()
316 return value->parser->d->get32(value->parser->d, value->offset + 1); in _cbor_value_decode_int64_internal()
319 return value->parser->d->get64(value->parser->d, value->offset + 1); in _cbor_value_decode_int64_internal()
753 CborError cbor_value_get_int64_checked(const CborValue *value, int64_t *result) in cbor_value_get_int64_checked() argument
755 assert(cbor_value_is_integer(value)); in cbor_value_get_int64_checked()
756 uint64_t v = _cbor_value_extract_int64_helper(value); in cbor_value_get_int64_checked()
772 if (value->flags & CborIteratorFlag_NegativeInteger) in cbor_value_get_int64_checked()
792 CborError cbor_value_get_int_checked(const CborValue *value, int *result) in cbor_value_get_int_checked() argument
794 assert(cbor_value_is_integer(value)); in cbor_value_get_int_checked()
795 uint64_t v = _cbor_value_extract_int64_helper(value); in cbor_value_get_int_checked()
807 if (value->flags & CborIteratorFlag_NegativeInteger) { in cbor_value_get_int_checked()
902 CborError cbor_value_calculate_string_length(const CborValue *value, size_t *len) in cbor_value_calculate_string_length() argument
905 return _cbor_value_copy_string(value, NULL, len, NULL); in cbor_value_calculate_string_length()
923 static CborError iterate_string_chunks(const CborValue *value, char *buffer, size_t *buflen, in iterate_string_chunks() argument
926 assert(cbor_value_is_byte_string(value) || cbor_value_is_text_string(value)); in iterate_string_chunks()
930 int offset = value->offset; in iterate_string_chunks()
931 if (cbor_value_is_length_known(value)) { in iterate_string_chunks()
933 err = extract_length(value->parser, &offset, &total); in iterate_string_chunks()
936 if (total > (size_t)(value->parser->end - offset)) in iterate_string_chunks()
939 *result = !!func(value->parser->d, buffer, offset, total); in iterate_string_chunks()
953 if (offset == value->parser->end) in iterate_string_chunks()
956 val = value->parser->d->get8(value->parser->d, offset); in iterate_string_chunks()
964 if ((val & MajorTypeMask) != value->type) in iterate_string_chunks()
967 err = extract_length(value->parser, &offset, &chunkLen); in iterate_string_chunks()
974 if (chunkLen > (size_t)(value->parser->end - offset)) in iterate_string_chunks()
978 *result = !!func(value->parser->d, buffer + total, offset, chunkLen); in iterate_string_chunks()
1000 *next = *value; in iterate_string_chunks()
1072 CborError _cbor_value_copy_string(const CborValue *value, void *buffer, in _cbor_value_copy_string() argument
1076 CborError err = iterate_string_chunks(value, (char*)buffer, buflen, &copied_all, next, in _cbor_value_copy_string()
1077 … buffer ? (IterateFunction) value->parser->d->cpy : iterate_noop); in _cbor_value_copy_string()
1100 CborError cbor_value_text_string_equals(const CborValue *value, const char *string, bool *result) in cbor_value_text_string_equals() argument
1102 CborValue copy = *value; in cbor_value_text_string_equals()
1113 result, NULL, value->parser->d->cmp); in cbor_value_text_string_equals()
1299 CborError cbor_value_get_half_float(const CborValue *value, void *result) in cbor_value_get_half_float() argument
1301 assert(cbor_value_is_half_float(value)); in cbor_value_get_half_float()
1304 uint16_t v = value->parser->d->get16(value->parser->d, value->offset + 1); in cbor_value_get_half_float()