Allow disabling of indefinite length array/map decoding to save object code

Allows defining of QCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS to save 200 bytes of object code for the smallest decode configuration.

Added a few more tests related to bstr-wrapped CBOR.

Some code tidiness fixes (that don't change semantics)

Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/QCBOR.xcodeproj/project.pbxproj b/QCBOR.xcodeproj/project.pbxproj
index 9733eb7..783af79 100644
--- a/QCBOR.xcodeproj/project.pbxproj
+++ b/QCBOR.xcodeproj/project.pbxproj
@@ -69,6 +69,19 @@
 		E7FDBF0E256C969D007138A8 /* cmd_line_main.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E096214AE0C700E67947 /* cmd_line_main.c */; };
 		E7FDBF0F256C969D007138A8 /* example.c in Sources */ = {isa = PBXBuildFile; fileRef = E743D0E124AC516D0017899F /* example.c */; };
 		E7FDBF10256C969D007138A8 /* UsefulBuf_Tests.c in Sources */ = {isa = PBXBuildFile; fileRef = 0FA9BEBC216DE31700BA646B /* UsefulBuf_Tests.c */; };
+		E7FDBF1A257A6C1F007138A8 /* qcbor_encode.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E08C214AE07400E67947 /* qcbor_encode.c */; };
+		E7FDBF1B257A6C1F007138A8 /* ieee754.c in Sources */ = {isa = PBXBuildFile; fileRef = E73B57582161CA690080D658 /* ieee754.c */; };
+		E7FDBF1C257A6C1F007138A8 /* qcbor_err_to_str.c in Sources */ = {isa = PBXBuildFile; fileRef = E7864765252CE63100A0C11B /* qcbor_err_to_str.c */; };
+		E7FDBF1D257A6C1F007138A8 /* half_to_double_from_rfc7049.c in Sources */ = {isa = PBXBuildFile; fileRef = E73B575D2161CA7C0080D658 /* half_to_double_from_rfc7049.c */; };
+		E7FDBF1E257A6C1F007138A8 /* run_tests.c in Sources */ = {isa = PBXBuildFile; fileRef = E73B57632161F8F70080D658 /* run_tests.c */; };
+		E7FDBF1F257A6C1F007138A8 /* qcbor_decode.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E08E214AE07500E67947 /* qcbor_decode.c */; };
+		E7FDBF20257A6C1F007138A8 /* float_tests.c in Sources */ = {isa = PBXBuildFile; fileRef = E73B575A2161CA7C0080D658 /* float_tests.c */; };
+		E7FDBF21257A6C1F007138A8 /* qcbor_decode_tests.c in Sources */ = {isa = PBXBuildFile; fileRef = 0FA9BEB5216CE6CA00BA646B /* qcbor_decode_tests.c */; };
+		E7FDBF22257A6C1F007138A8 /* UsefulBuf.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E08D214AE07500E67947 /* UsefulBuf.c */; };
+		E7FDBF23257A6C1F007138A8 /* qcbor_encode_tests.c in Sources */ = {isa = PBXBuildFile; fileRef = 0FA9BEB8216DC7AD00BA646B /* qcbor_encode_tests.c */; };
+		E7FDBF24257A6C1F007138A8 /* cmd_line_main.c in Sources */ = {isa = PBXBuildFile; fileRef = E776E096214AE0C700E67947 /* cmd_line_main.c */; };
+		E7FDBF25257A6C1F007138A8 /* example.c in Sources */ = {isa = PBXBuildFile; fileRef = E743D0E124AC516D0017899F /* example.c */; };
+		E7FDBF26257A6C1F007138A8 /* UsefulBuf_Tests.c in Sources */ = {isa = PBXBuildFile; fileRef = 0FA9BEBC216DE31700BA646B /* UsefulBuf_Tests.c */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXCopyFilesBuildPhase section */
@@ -117,6 +130,15 @@
 			);
 			runOnlyForDeploymentPostprocessing = 1;
 		};
+		E7FDBF28257A6C1F007138A8 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = /usr/share/man/man1/;
+			dstSubfolderSpec = 0;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 1;
+		};
 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
@@ -157,6 +179,7 @@
 		E78C91E0240C90C100F4CECE /* qcbor_private.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 3; lastKnownFileType = sourcecode.c.h; name = qcbor_private.h; path = inc/qcbor/qcbor_private.h; sourceTree = "<group>"; tabWidth = 3; };
 		E78C91E1240C90C100F4CECE /* qcbor_encode.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 3; lastKnownFileType = sourcecode.c.h; name = qcbor_encode.h; path = inc/qcbor/qcbor_encode.h; sourceTree = "<group>"; tabWidth = 3; };
 		E7FDBF16256C969D007138A8 /* QCBOR_Disable_Indef */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = QCBOR_Disable_Indef; sourceTree = BUILT_PRODUCTS_DIR; };
+		E7FDBF2C257A6C1F007138A8 /* QCBOR_Disable_Indef_array */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = QCBOR_Disable_Indef_array; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -195,6 +218,13 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		E7FDBF27257A6C1F007138A8 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
@@ -230,6 +260,7 @@
 				E743D11B24DD4EF50017899F /* QCBOR_Disable_HW_Float */,
 				E743D13124DE05CC0017899F /* QCBOR_Disable_Preferred_Float */,
 				E7FDBF16256C969D007138A8 /* QCBOR_Disable_Indef */,
+				E7FDBF2C257A6C1F007138A8 /* QCBOR_Disable_Indef_array */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -369,6 +400,23 @@
 			productReference = E7FDBF16256C969D007138A8 /* QCBOR_Disable_Indef */;
 			productType = "com.apple.product-type.tool";
 		};
+		E7FDBF18257A6C1F007138A8 /* QCBOR_Disable_Indef_array */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = E7FDBF29257A6C1F007138A8 /* Build configuration list for PBXNativeTarget "QCBOR_Disable_Indef_array" */;
+			buildPhases = (
+				E7FDBF19257A6C1F007138A8 /* Sources */,
+				E7FDBF27257A6C1F007138A8 /* Frameworks */,
+				E7FDBF28257A6C1F007138A8 /* CopyFiles */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = QCBOR_Disable_Indef_array;
+			productName = QCBOR;
+			productReference = E7FDBF2C257A6C1F007138A8 /* QCBOR_Disable_Indef_array */;
+			productType = "com.apple.product-type.tool";
+		};
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
@@ -401,6 +449,7 @@
 				E743D10924DD4EF50017899F /* QCBOR_Disable_HW_Float */,
 				E743D11E24DE05CC0017899F /* QCBOR_Disable_Preferred_Float */,
 				E7FDBF02256C969D007138A8 /* QCBOR_Disable_Indef */,
+				E7FDBF18257A6C1F007138A8 /* QCBOR_Disable_Indef_array */,
 			);
 		};
 /* End PBXProject section */
@@ -503,6 +552,26 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		E7FDBF19257A6C1F007138A8 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				E7FDBF1A257A6C1F007138A8 /* qcbor_encode.c in Sources */,
+				E7FDBF1B257A6C1F007138A8 /* ieee754.c in Sources */,
+				E7FDBF1C257A6C1F007138A8 /* qcbor_err_to_str.c in Sources */,
+				E7FDBF1D257A6C1F007138A8 /* half_to_double_from_rfc7049.c in Sources */,
+				E7FDBF1E257A6C1F007138A8 /* run_tests.c in Sources */,
+				E7FDBF1F257A6C1F007138A8 /* qcbor_decode.c in Sources */,
+				E7FDBF20257A6C1F007138A8 /* float_tests.c in Sources */,
+				E7FDBF21257A6C1F007138A8 /* qcbor_decode_tests.c in Sources */,
+				E7FDBF22257A6C1F007138A8 /* UsefulBuf.c in Sources */,
+				E7FDBF23257A6C1F007138A8 /* qcbor_encode_tests.c in Sources */,
+				E7FDBF24257A6C1F007138A8 /* cmd_line_main.c in Sources */,
+				E7FDBF25257A6C1F007138A8 /* example.c in Sources */,
+				E7FDBF26257A6C1F007138A8 /* UsefulBuf_Tests.c in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXSourcesBuildPhase section */
 
 /* Begin XCBuildConfiguration section */
@@ -768,6 +837,35 @@
 			};
 			name = Release;
 		};
+		E7FDBF2A257A6C1F007138A8 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
+				CODE_SIGN_STYLE = Automatic;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = QCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS;
+				GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+				GCC_WARN_PEDANTIC = YES;
+				"HEADER_SEARCH_PATHS[arch=*]" = inc;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		E7FDBF2B257A6C1F007138A8 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES;
+				CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES;
+				CODE_SIGN_STYLE = Automatic;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+				GCC_WARN_PEDANTIC = YES;
+				"HEADER_SEARCH_PATHS[arch=*]" = inc;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -825,6 +923,15 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		E7FDBF29257A6C1F007138A8 /* Build configuration list for PBXNativeTarget "QCBOR_Disable_Indef_array" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				E7FDBF2A257A6C1F007138A8 /* Debug */,
+				E7FDBF2B257A6C1F007138A8 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 /* End XCConfigurationList section */
 	};
 	rootObject = E776E074214ADF7F00E67947 /* Project object */;