/tinycbor-2.7.6/src/ |
D | cborvalidation.c | 296 CborError err = CborNoError; in validate_number() local 301 return err; in validate_number() 303 return err; /* checked elsewhere */ in validate_number() 306 err = _cbor_value_extract_number(it->parser, &offset, &value); in validate_number() 307 if (err) in validate_number() 308 return err; in validate_number() 380 CborError err; in validate_floating_point() local 387 err = cbor_value_get_float(it, &valf); in validate_floating_point() 394 err = cbor_value_get_half_float(it, &valf16); in validate_floating_point() 399 err = cbor_value_get_double(it, &val); in validate_floating_point() [all …]
|
D | cbortojson.c | 181 CborError err = cbor_value_calculate_string_length(it, &n); in dump_bytestring_base16() local 182 if (err) in dump_bytestring_base16() 183 return err; in dump_bytestring_base16() 191 err = cbor_value_copy_byte_string(it, buffer + n - 1, &n, it); in dump_bytestring_base16() 192 assert(err == CborNoError); in dump_bytestring_base16() 206 CborError err = cbor_value_calculate_string_length(it, &n); in generic_dump_base64() local 207 if (err) in generic_dump_base64() 208 return err; in generic_dump_base64() 221 err = cbor_value_copy_byte_string(it, in, &n, it); in generic_dump_base64() 222 assert(err == CborNoError); in generic_dump_base64() [all …]
|
D | cborpretty.c | 252 CborError err = value_to_pretty(out, it); in container_to_pretty() local 253 if (err) in container_to_pretty() 254 return err; in container_to_pretty() 262 err = value_to_pretty(out, it); in container_to_pretty() 263 if (err) in container_to_pretty() 264 return err; in container_to_pretty() 271 CborError err = CborNoError; in value_to_pretty() local 286 err = cbor_value_enter_container(it, &recursed); in value_to_pretty() 287 if (err) { in value_to_pretty() 289 return err; /* parse error */ in value_to_pretty() [all …]
|
D | cborparser.c | 154 CborError err = extract_number(parser, offset, &v); in extract_length() local 155 if (err) { in extract_length() 157 return err; in extract_length() 281 CborError err = extract_number(it->parser, &it->offset, &length); in advance_internal() local 282 if (err != CborNoError) { in advance_internal() 283 return err; in advance_internal() 426 CborError err; in advance_recursive() local 428 err = cbor_value_enter_container(it, &recursed); in advance_recursive() 429 if (err) in advance_recursive() 430 return err; in advance_recursive() [all …]
|
D | cborencoder.c | 223 static inline bool isOomError(CborError err) in isOomError() argument 225 (void) err; in isOomError() 385 CborError err = encode_number(encoder, length, shiftedMajorType); in encode_string() local 386 if (err && !isOomError(err)) in encode_string() 387 return err; in encode_string() 423 CborError err; in cbor_encode_byte_iovec() local 431 err = encode_number(encoder, length, ByteStringType << MajorTypeShift); in cbor_encode_byte_iovec() 432 if (err && !isOomError(err)) { in cbor_encode_byte_iovec() 433 return err; in cbor_encode_byte_iovec() 436 err = append_to_buffer(encoder, iov[i].iov_base, iov[i].iov_len); in cbor_encode_byte_iovec() [all …]
|
D | cborparser_dup_string.c | 97 CborError err = _cbor_value_copy_string(value, NULL, buflen, NULL); in _cbor_value_dup_string() local 98 if (err) in _cbor_value_dup_string() 99 return err; in _cbor_value_dup_string() 107 err = _cbor_value_copy_string(value, *buffer, buflen, next); in _cbor_value_dup_string() 108 if (err) { in _cbor_value_dup_string() 110 return err; in _cbor_value_dup_string()
|
/tinycbor-2.7.6/examples/ |
D | simplereader.c | 38 CborError err; in dumprecursive() local 49 err = cbor_value_enter_container(it, &recursed); in dumprecursive() 50 if (err) in dumprecursive() 51 return err; // parse error in dumprecursive() 52 err = dumprecursive(&recursed, nestingLevel + 1); in dumprecursive() 53 if (err) in dumprecursive() 54 return err; // parse error in dumprecursive() 55 err = cbor_value_leave_container(it, &recursed); in dumprecursive() 56 if (err) in dumprecursive() 57 return err; // parse error in dumprecursive() [all …]
|
/tinycbor-2.7.6/tools/json2cbor/ |
D | json2cbor.c | 259 CborError err = cbor_encode_byte_string(encoder, data, len); in decode_json_with_metadata() local 261 return err; in decode_json_with_metadata() 310 CborError err; in decode_json() local 327 err = cbor_encode_double(encoder, json->valuedouble); in decode_json() 329 if (err == CborErrorOutOfMemory) { in decode_json() 333 return err; in decode_json() 341 return err; in decode_json() 350 err = cbor_encoder_create_array(encoder, &container, get_cjson_size_limited(json)); in decode_json() 351 if (err) in decode_json() 352 return err; in decode_json() [all …]
|
/tinycbor-2.7.6/tools/cbordump/ |
D | cbordump.c | 45 void printerror(CborError err, const char *fname) in printerror() argument 47 fprintf(stderr, "%s: %s\n", fname, cbor_error_string(err)); in printerror() 74 CborError err = cbor_parser_init(buffer, buflen, 0, &parser, &value); in dumpFile() local 75 if (!err) { in dumpFile() 77 err = cbor_value_to_json_advance(stdout, &value, flags); in dumpFile() 79 err = cbor_value_to_pretty_advance_flags(stdout, &value, flags); in dumpFile() 80 if (!err) in dumpFile() 83 if (!err && value.offset != (int)buflen) in dumpFile() 84 err = CborErrorGarbageAtEnd; in dumpFile() 85 if (err) in dumpFile() [all …]
|
/tinycbor-2.7.6/tests/parser/ |
D | tst_parser.cpp | 34 template<> char *toString<CborError>(const CborError &err) in toString() argument 36 return qstrdup(cbor_error_string(err)); in toString() 126 CborError err = CborNoError; in parseOneChunk() local 131 err = cbor_value_get_byte_string_chunk(it, &bytes, &len, it); in parseOneChunk() 132 if (err) in parseOneChunk() 133 return err; in parseOneChunk() 142 err = cbor_value_get_text_string_chunk(it, &text, &len, it); in parseOneChunk() 143 if (err) in parseOneChunk() 144 return err; in parseOneChunk() 151 return err; in parseOneChunk() [all …]
|
/tinycbor-2.7.6/tests/encoder/ |
D | tst_encoder.cpp | 34 template<> char *toString<CborError>(const CborError &err) in toString() argument 36 return qstrdup(cbor_error_string(err)); in toString() 172 static inline bool isOomError(CborError err) in isOomError() argument 174 return err == CborErrorOutOfMemory; in isOomError() 227 CborError err = cbor_encode_tag(encoder, v.value<Tag>().tag); in encodeVariant() local 228 if (err && !isOomError(err)) in encodeVariant() 229 return err; in encodeVariant() 230 return static_cast<CborError>(err | encodeVariant(encoder, v.value<Tag>().tagged)); in encodeVariant() 240 CborError err = cbor_encoder_create_array(encoder, &sub, len); in encodeVariant() local 241 if (err && !isOomError(err)) in encodeVariant() [all …]
|
/tinycbor-2.7.6/tests/tojson/ |
D | tst_tojson.cpp | 204 CborError err = cbor_value_to_json_advance(f, it, flags); in parseOne() local 209 return err; in parseOne() 218 …CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length()… in compareOne_real() local 219 QVERIFY2(!err, QByteArray::number(line) + ": Got error \"" + cbor_error_string(err) + "\""); in compareOne_real() 222 err = parseOne(&first, &decoded, flags); in compareOne_real() 223 QVERIFY2(!err, QByteArray::number(line) + ": Got error \"" + cbor_error_string(err) + in compareOne_real() 425 CborError err = parseOne(&first, &decoded, CborConvertRequireMapStringKeys); in nonStringKeyMaps() local 426 QCOMPARE(err, CborErrorJsonObjectKeyNotString); in nonStringKeyMaps() 660 …CborError err = cbor_parser_init(reinterpret_cast<const quint8 *>(data.constData()), data.length()… in compareMetaData() local 661 QVERIFY2(!err, QByteArrayLiteral(": Got error \"") + cbor_error_string(err) + "\""); in compareMetaData() [all …]
|