Lines Matching +full:- +full:g

59  * in a post-processing phase.
63 * of metadata JSON values that can be used by a JSON-to-CBOR converter to
77 * These functions also perform UTF-8 validation in CBOR text strings. If they
78 * encounter a sequence of bytes that not permitted in UTF-8, they will return
80 * in UTF-8.
99 * double-precision floating point. This means JSON is not capable of
100 * representing integers numbers outside the range [-(2<sup>53</sup>)+1,
101 * 2<sup>53</sup>-1] and is not capable of representing NaN or infinite. If the
104 * conversion will be "null". In addition, the distinction between half-,
105 * single- and double-precision is lost.
110 * \par Non-native types:
132 * \par Non-string keys in maps:
134 * default, if a non-string key is found, the conversion fails with error
145 * active, it is possible that a non-string key in a CBOR map will be converted
149 * When metadata support is active, the conversion will add extra key-value
191 err = cbor_value_copy_byte_string(it, buffer + n - 1, &n, it); in dump_bytestring_base16()
216 * so we can do an in-place conversion while iterating forwards */ in generic_dump_base64()
217 in = buffer + len - n; in generic_dump_base64()
225 for (i = 0; n - i >= 3; i += 3) { in generic_dump_base64()
230 __builtin_memcpy(&val, in + i - 1, sizeof(val)); in generic_dump_base64()
245 if (n - i) { in generic_dump_base64()
260 if (n - i == 2) { in generic_dump_base64()
285 "ghijklmn" "opqrstuv" "wxyz0123" "456789-_"; in dump_bytestring_base64url()
291 int flags = status->flags; in add_value_metadata()
297 if (fprintf(out, "\"tag\":\"%" PRIu64 "\"%s", status->lastTag, in add_value_metadata()
313 if (fprintf(out, ",\"v\":\"%sinf\"", flags & NumberWasNegative ? "-" : "") < 0) in add_value_metadata()
316 if (fprintf(out, ",\"v\":\"%c%" PRIx64 "\"", flags & NumberWasNegative ? '-' : '+', in add_value_metadata()
317 status->originalNumber) < 0) in add_value_metadata()
320 if (fprintf(out, ",\"v\":%d", (int)status->originalNumber) < 0) in add_value_metadata()
358 if (flags & CborConvertAddMetadata && status->flags) { in tagged_value_to_json()
366 status->flags = TypeWasNotNative | CborTagType; in tagged_value_to_json()
371 err = find_tagged_type(it, &status->lastTag, &type); in tagged_value_to_json()
374 tag = status->lastTag; in tagged_value_to_json()
394 status->flags = TypeWasNotNative | TypeWasTagged | CborByteStringType; in tagged_value_to_json()
400 status->flags |= TypeWasTagged | type; in tagged_value_to_json()
477 if (!err && status->flags) { in map_to_json()
495 status->flags = 0; in value_to_json()
504 it->offset = recursed.offset; in value_to_json()
514 it->offset = recursed.offset; in value_to_json()
524 status->flags = 0; /* reset, there are never conversion errors for us */ in value_to_json()
535 num = -num - 1; /* convert to negative */ in value_to_json()
536 if ((uint64_t)(-num - 1) != val) { in value_to_json()
537 status->flags = NumberPrecisionWasLost | NumberWasNegative; in value_to_json()
538 status->originalNumber = val; in value_to_json()
542 status->flags = NumberPrecisionWasLost; in value_to_json()
543 status->originalNumber = val; in value_to_json()
556 status->flags = TypeWasNotNative; in value_to_json()
574 status->flags = TypeWasNotNative; in value_to_json()
575 status->originalNumber = simple_type; in value_to_json()
587 status->flags = TypeWasNotNative; in value_to_json()
605 status->flags = TypeWasNotNative; in value_to_json()
612 status->flags = TypeWasNotNative; in value_to_json()
624 status->flags |= r == FP_NAN ? NumberWasNaN : in value_to_json()
630 r = fprintf(out, "%s%" PRIu64, val < 0 ? "-" : "", ival); in value_to_json()
631 status->flags |= TypeWasNotNative; /* mark this integer number as a double */ in value_to_json()
633 /* this number is definitely not a 64-bit integer */ in value_to_json()
634 r = fprintf(out, "%." DBL_DECIMAL_DIG_STR "g", val); in value_to_json()
662 * \value CborConvertStringifyMapKeys Convert non-string keys in CBOR maps to a string form