Lines Matching full:if

58  * indentation or line breaks. If those are necessary, they need to be applied
73 * for the functions for CborParsing. In addition, if the C standard library
77 * These functions also perform UTF-8 validation in CBOR text strings. If they
101 * 2<sup>53</sup>-1] and is not capable of representing NaN or infinite. If the
103 * lose precision. If the input was NaN or infinite, the result of the
108 * If enabled, the original value and original type are stored in the metadata.
119 * If enabled, the original type is stored in the metadata.
123 * converting to JSON. However, if the CborConvertObeyByteStringTags option is
128 * If the CborConvertTagsToObjects option is active, then the tag and the
129 * tagged value are converted to to a JSON object. Otherwise, if enabled, the
134 * default, if a non-string key is found, the conversion fails with error
135 * CborErrorJsonObjectKeyNotString. If the CborConvertStringifyMapKeys option
142 * validate that this is the case. If there are duplicated keys in the input,
144 * invalid. In addition to that, if the CborConvertStringifyMapKeys option is
182 if (err) in dump_bytestring_base16()
207 if (err) in generic_dump_base64()
227 if (false) { in generic_dump_base64()
229 } else if (i) { in generic_dump_base64()
245 if (n - i) { in generic_dump_base64()
246 /* we can read in[i + 1] even if it's past the end of the string because in generic_dump_base64()
260 if (n - i == 2) { in generic_dump_base64()
292 if (flags & TypeWasTagged) { in add_value_metadata()
297 if (fprintf(out, "\"tag\":\"%" PRIu64 "\"%s", status->lastTag, in add_value_metadata()
302 if (!flags) in add_value_metadata()
306 if (fprintf(out, "\"t\":%d", type) < 0) in add_value_metadata()
309 if (flags & NumberWasNaN) in add_value_metadata()
310 if (fprintf(out, ",\"v\":\"nan\"") < 0) in add_value_metadata()
312 if (flags & NumberWasInfinite) in add_value_metadata()
313 if (fprintf(out, ",\"v\":\"%sinf\"", flags & NumberWasNegative ? "-" : "") < 0) in add_value_metadata()
315 if (flags & NumberPrecisionWasLost) in add_value_metadata()
316 if (fprintf(out, ",\"v\":\"%c%" PRIx64 "\"", flags & NumberWasNegative ? '-' : '+', in add_value_metadata()
319 if (type == CborSimpleType) in add_value_metadata()
320 if (fprintf(out, ",\"v\":%d", (int)status->originalNumber) < 0) in add_value_metadata()
332 if (err) in find_tagged_type()
345 if (flags & CborConvertTagsToObjects) { in tagged_value_to_json()
348 if (err) in tagged_value_to_json()
351 if (fprintf(out, "{\"tag%" PRIu64 "\":", tag) < 0) in tagged_value_to_json()
356 if (err) in tagged_value_to_json()
358 if (flags & CborConvertAddMetadata && status->flags) { in tagged_value_to_json()
359 if (fprintf(out, ",\"tag%" PRIu64 "$cbor\":{", tag) < 0 || in tagged_value_to_json()
364 if (fputc('}', out) < 0) in tagged_value_to_json()
372 if (err) in tagged_value_to_json()
377 if (type == CborByteStringType && (flags & CborConvertByteStringsToBase64Url) == 0 && in tagged_value_to_json()
382 if (tag == CborNegativeBignumTag) { in tagged_value_to_json()
385 } else if (tag == CborExpectedBase64Tag) { in tagged_value_to_json()
390 if (err) in tagged_value_to_json()
416 if (memstream == NULL) in stringify_map_key()
420 if (unlikely(fclose(memstream) < 0 || *key == NULL)) in stringify_map_key()
430 if (fprintf(out, "%s", comma) < 0) in array_to_json()
435 if (err) in array_to_json()
447 if (fprintf(out, "%s", comma) < 0) in map_to_json()
452 if (likely(keyType == CborTextStringType)) { in map_to_json()
455 } else if (flags & CborConvertStringifyMapKeys) { in map_to_json()
460 if (err) in map_to_json()
464 if (fprintf(out, "\"%s\":", key) < 0) in map_to_json()
472 if (flags & CborConvertAddMetadata) { in map_to_json()
473 if (!err && keyType != CborTextStringType) { in map_to_json()
474 if (fprintf(out, ",\"%s$keycbordump\":true", key) < 0) in map_to_json()
477 if (!err && status->flags) { in map_to_json()
478 if (fprintf(out, ",\"%s$cbor\":{", key) < 0 || in map_to_json()
486 if (err) in map_to_json()
503 if (err) { in value_to_json()
507 if (fputc(type == CborArrayType ? '[' : '{', out) < 0) in value_to_json()
513 if (err) { in value_to_json()
518 if (fputc(type == CborArrayType ? ']' : '}', out) < 0) in value_to_json()
521 if (err) in value_to_json()
534 if (cbor_value_is_negative_integer(it)) { in value_to_json()
536 if ((uint64_t)(-num - 1) != val) { in value_to_json()
541 if ((uint64_t)num != val) { in value_to_json()
546if (fprintf(out, "%.0f", num) < 0) /* this number has no fraction, so no decimal points please */ in value_to_json()
554 if (type == CborByteStringType) { in value_to_json()
561 if (err) in value_to_json()
576 if (fprintf(out, "\"simple(%" PRIu8 ")\"", simple_type) < 0) in value_to_json()
582 if (fprintf(out, "null") < 0) in value_to_json()
588 if (fprintf(out, "\"undefined\"") < 0) in value_to_json()
595 if (fprintf(out, val ? "true" : "false") < 0) in value_to_json()
602 if (false) { in value_to_json()
609 } else if (false) { in value_to_json()
621 if (r == FP_NAN || r == FP_INFINITE) { in value_to_json()
622 if (fprintf(out, "null") < 0) in value_to_json()
628 if ((double)ival == fabs(val)) { in value_to_json()
636 if (r < 0) in value_to_json()
659 * \value CborConvertObeyByteStringTags (default) Honor formatting of CBOR byte strings if so tagged
661 …MapStringKeys (default) Require CBOR map keys to be strings, failing the conversion if they are not
670 * to the \a out stream. If an error occurs, this function returns an error
679 * to the \a out stream. If an error occurs, this function returns an error
683 * If no error ocurred, this function advances \a value to the next element.