Commit 9b017b2
committed
cborpretty.c: Implement numeric encoding indicators for floating point
RFC 7049 section 6 has an encoding mechanism that I had not noticed
before. It says:
An underscore followed by a decimal digit n indicates that the
preceding item [...] was encoded with an additional
information value of 24+n. For example, 1.5_1 is a half-precision
floating-point number, while 1.5_3 is encoded as double precision.
This flag only changes the suffix used by floating point. We don't show
the encoding indicator in other contexts, including that for double
precision. That's a job for another flag.
Signed-off-by: Thiago Macieira <[email protected]>1 parent 23ab30a commit 9b017b2
2 files changed
+18
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
487 | 490 | | |
488 | 491 | | |
489 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| 120 | + | |
| 121 | + | |
117 | 122 | | |
118 | 123 | | |
119 | 124 | | |
| |||
404 | 409 | | |
405 | 410 | | |
406 | 411 | | |
| 412 | + | |
407 | 413 | | |
408 | 414 | | |
409 | 415 | | |
410 | 416 | | |
411 | 417 | | |
412 | | - | |
| 418 | + | |
413 | 419 | | |
414 | 420 | | |
415 | 421 | | |
416 | 422 | | |
417 | 423 | | |
418 | | - | |
| 424 | + | |
419 | 425 | | |
420 | 426 | | |
421 | 427 | | |
422 | 428 | | |
423 | 429 | | |
424 | | - | |
425 | | - | |
426 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
427 | 435 | | |
428 | 436 | | |
429 | 437 | | |
| |||
0 commit comments