New #ifndef QCBOR_DISABLE_NON_INTEGER_LABELS

#define QCBOR_DISABLE_NON_INTEGER_LABELS allows label processing for all but integers labels to be disabled to save object code.

There was also a lot of refactoring of the decode in this change for the sake of clarity and object code size reduction.

All totaled, this saves nearly 200 bytes of object code, but that is the growth in object code over the last years from small fixes and features so there's no net gain compared to a years ago. The minimal decoder is still 1550 bytes.


* #define to disable non-integer labels

* Add non-int to CI

* Remove string labels from QCBORItem

* Small corrections

* lots of code tidiness

* optimize out-of-place break error handling

* fix allocate all bug introduced early in PR

---------

Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/test/run_tests.c b/test/run_tests.c
index e4a431b..a600731 100644
--- a/test/run_tests.c
+++ b/test/run_tests.c
@@ -66,8 +66,12 @@
 
 
 static test_entry s_tests[] = {
+#ifndef QCBOR_DISABLE_NON_INTEGER_LABELS
     TEST_ENTRY(GetMapAndArrayTest),
     TEST_ENTRY(TellTests),
+    TEST_ENTRY(ParseMapAsArrayTest),
+   TEST_ENTRY(SpiffyDateDecodeTest),
+#endif /* ! QCBOR_DISABLE_NON_INTEGER_LABELS */
     TEST_ENTRY(ErrorHandlingTests),
     TEST_ENTRY(OpenCloseBytesTest),
     TEST_ENTRY(EnterBstrTest),
@@ -76,7 +80,6 @@
     TEST_ENTRY(QCBORHeadTest),
     TEST_ENTRY(EmptyMapsAndArraysTest),
     TEST_ENTRY(NotWellFormedTests),
-    TEST_ENTRY(ParseMapAsArrayTest),
 #ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS
     TEST_ENTRY(IndefiniteLengthNestTest),
     TEST_ENTRY(IndefiniteLengthArrayMapTest),
@@ -98,7 +101,9 @@
     TEST_ENTRY(AllAddMethodsTest),
     TEST_ENTRY(ParseTooDeepArrayTest),
     TEST_ENTRY(ComprehensiveInputTest),
+#ifndef QCBOR_DISABLE_NON_INTEGER_LABELS
     TEST_ENTRY(ParseMapTest),
+#endif /* ! QCBOR_DISABLE_NON_INTEGER_LABELS */
     TEST_ENTRY(BasicEncodeTest),
     TEST_ENTRY(NestedMapTest),
     TEST_ENTRY(BignumParseTest),
@@ -107,7 +112,6 @@
     TEST_ENTRY(DateParseTest),
     TEST_ENTRY(DecodeTaggedTypeTests),
 #endif /* QCBOR_DISABLE_TAGS */
-    TEST_ENTRY(SpiffyDateDecodeTest),
     TEST_ENTRY(ShortBufferParseTest2),
     TEST_ENTRY(ShortBufferParseTest),
     TEST_ENTRY(ParseDeepArrayTest),
@@ -117,7 +121,9 @@
     TEST_ENTRY(AllocAllStringsTest),
     TEST_ENTRY(MemPoolTest),
     TEST_ENTRY(IndefiniteLengthStringTest),
+#ifndef QCBOR_DISABLE_NON_INTEGER_LABELS
     TEST_ENTRY(SpiffyIndefiniteLengthStringsTests),
+#endif /* ! QCBOR_DISABLE_NON_INTEGER_LABELS */
     TEST_ENTRY(SetUpAllocatorTest),
     TEST_ENTRY(CBORTestIssue134),
 #endif /* #ifndef QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS */
@@ -133,7 +139,9 @@
     TEST_ENTRY(BstrWrapErrorTest),
     TEST_ENTRY(BstrWrapNestTest),
     TEST_ENTRY(CoseSign1TBSTest),
+#ifndef QCBOR_DISABLE_NON_INTEGER_LABELS
     TEST_ENTRY(StringDecoderModeFailTest),
+#endif /* ! QCBOR_DISABLE_NON_INTEGER_LABELS */
     TEST_ENTRY_DISABLED(BigComprehensiveInputTest),
     TEST_ENTRY_DISABLED(TooLargeInputTest),
     TEST_ENTRY(EncodeErrorTests),
@@ -143,7 +151,9 @@
     TEST_ENTRY(EncodeLengthThirtyoneTest),
     TEST_ENTRY(CBORSequenceDecodeTests),
     TEST_ENTRY(IntToTests),
+#ifndef QCBOR_DISABLE_NON_INTEGER_LABELS
     TEST_ENTRY(PeekAndRewindTest),
+#endif /* ! QCBOR_DISABLE_NON_INTEGER_LABELS */
 #ifndef QCBOR_DISABLE_EXP_AND_MANTISSA
     TEST_ENTRY(ExponentAndMantissaDecodeTests),
 #ifndef QCBOR_DISABLE_TAGS