QCBOR: Improve handling of end of data and error; add indefinite length encoding

 * Minor improvements / fixes in run_test framework

 * Add CBOR indefinite length encoding

 * Recheck pointer math in UsefulBuf and remove "TODO"

 * Better error handling of not-well-formed CBOR when decoding

 * Better handling of end of data when decoding

 * Better handling of encode error when out of space in output buffer

Change-Id: Ib8dc2af95bc533b7905648d8f8c3b1bf1c42ba44
Signed-off-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/lib/ext/qcbor/test/float_tests.c b/lib/ext/qcbor/test/float_tests.c
index 4f12ca6..eaf75aa 100644
--- a/lib/ext/qcbor/test/float_tests.c
+++ b/lib/ext/qcbor/test/float_tests.c
@@ -73,7 +73,7 @@
     UsefulBufC HalfPrecision = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spExpectedHalf);
 
     QCBORDecodeContext DC;
-    QCBORDecode_Init(&DC, HalfPrecision, QCBOR_DECODE_MODE_NORMAL);
+    QCBORDecode_Init(&DC, HalfPrecision, 0);
 
     QCBORItem Item;
 
@@ -194,7 +194,7 @@
 
         // Now parse the hand-constructed CBOR. This will invoke the conversion to a float
         QCBORDecodeContext DC;
-        QCBORDecode_Init(&DC, UsefulOutBuf_OutUBuf(&UOB), QCBOR_DECODE_MODE_NORMAL);
+        QCBORDecode_Init(&DC, UsefulOutBuf_OutUBuf(&UOB), 0);
 
         QCBORItem Item;