Merge branch 'AdvancedDecode' of https://github.com/laurencelundblade/QCBOR into AdvancedDecode
diff --git a/inc/qcbor/qcbor_spiffy_decode.h b/inc/qcbor/qcbor_spiffy_decode.h
index a78ad61..d55d1b7 100644
--- a/inc/qcbor/qcbor_spiffy_decode.h
+++ b/inc/qcbor/qcbor_spiffy_decode.h
@@ -1678,7 +1678,6 @@
UsefulBufC *pBstr);
-
// Semi private
void QCBORDecode_GetTaggedItemInMapN(QCBORDecodeContext *pMe,
int64_t nLabel,
diff --git a/src/qcbor_decode.c b/src/qcbor_decode.c
index 10e64c7..fe91227 100644
--- a/src/qcbor_decode.c
+++ b/src/qcbor_decode.c
@@ -1694,15 +1694,11 @@
pDecodedItem->uNextNestLevel = mantissaItem.uNextNestLevel; // TODO: make sure this is right
Done:
-
return nReturn;
}
#endif /* QCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA */
-
-/*
- */
inline static QCBORError DecodeURI(QCBORItem *pDecodedItem)
{
if(pDecodedItem->uDataType != QCBOR_TYPE_TEXT_STRING) {
@@ -1742,6 +1738,7 @@
return QCBOR_SUCCESS;
}
+
inline static QCBORError DecodeWrappedCBOR(QCBORItem *pDecodedItem)
{
if(pDecodedItem->uDataType != QCBOR_TYPE_BYTE_STRING) {
@@ -1761,6 +1758,7 @@
return QCBOR_SUCCESS;
}
+
inline static QCBORError DecodeMIME(QCBORItem *pDecodedItem)
{
if(pDecodedItem->uDataType == QCBOR_TYPE_TEXT_STRING) {
@@ -1774,8 +1772,6 @@
}
-/*
- */
inline static QCBORError DecodeUUID(QCBORItem *pDecodedItem)
{
if(pDecodedItem->uDataType != QCBOR_TYPE_BYTE_STRING) {
@@ -1802,6 +1798,11 @@
for(int i = 0; i < QCBOR_MAX_TAGS_PER_ITEM; i++) {
switch(pDecodedItem->uTags[i] ) {
+ // Many of the functions here only just map a CBOR tag to
+ // a QCBOR_TYPE for a string and could probably be
+ // implemented with less object code. This implementation
+ // of string types takes about 120 bytes of object code
+ // (that is always linked and not removed by dead stripping).
case CBOR_TAG_DATE_STRING:
nReturn = DecodeDateString(pDecodedItem);
break;