Remove DISABLE_UNCOMMON_TAGS
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1e233d2..a6f27ac 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -51,10 +51,6 @@
container: ubuntu:22.04
dis-xxx: '-DQCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS'
- - os-image: ubuntu-latest
- container: ubuntu:22.04
- dis-xxx: '-DQCBOR_DISABLE_UNCOMMON_TAGS'
-
name: ${{ matrix.config.dis-xxx }} • ${{ matrix.c-compiler }} • ${{ matrix.config.container }}
diff --git a/README.md b/README.md
index 1bce59f..0be7770 100644
--- a/README.md
+++ b/README.md
@@ -463,7 +463,6 @@
| QCBOR_DISABLE_ENCODE_USAGE_GUARDS | 150 |
| QCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS | 400 |
| QCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS | 200 |
- | QCBOR_DISABLE_UNCOMMON_TAGS | 100 |
| QCBOR_DISABLE_EXP_AND_MANTISSA | 5000 |
| QCBOR_DISABLE_PREFERRED_FLOAT | 900 |
| QCBOR_DISABLE_FLOAT_HW_USE | 50 |
@@ -496,9 +495,9 @@
QCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS which will result in an error
when an indefinite-length map or array arrives for decoding.
-QCBOR_DISABLE_UNCOMMON_TAGS disables the decoding of explicit tags for
-base 64, regex, UUID and MIME data. This just disables the automatic
-recognition of these from a major type 6 tag.
+QCBOR_DISABLE_UNCOMMON_TAGS is removed from QCBOR v2. It didn't save
+very much and you can get the same effect by not install
+the tag content handlers.
QCBOR_DISABLE_EXP_AND_MANTISSA disables the decoding of decimal
fractions and big floats.
diff --git a/inc/qcbor/qcbor_common.h b/inc/qcbor/qcbor_common.h
index 92ec85d..d986742 100644
--- a/inc/qcbor/qcbor_common.h
+++ b/inc/qcbor/qcbor_common.h
@@ -33,9 +33,6 @@
#ifndef qcbor_common_h
#define qcbor_common_h
-//TODO: get rid of uncommon tags define
-//#define QCBOR_DISABLE_EXP_AND_MANTISSA
-
#ifdef __cplusplus
extern "C" {
#if 0
diff --git a/src/qcbor_tag_decode.c b/src/qcbor_tag_decode.c
index 325a7a4..b59ed59 100644
--- a/src/qcbor_tag_decode.c
+++ b/src/qcbor_tag_decode.c
@@ -408,11 +408,10 @@
{CBOR_TAG_B64, QCBORDecode_StringsTagCB},
{CBOR_TAG_REGEX, QCBORDecode_StringsTagCB},
{CBOR_TAG_BIN_UUID, QCBORDecode_StringsTagCB},
- {CBOR_TAG_CBOR_SEQUENCE, QCBORDecode_StringsTagCB}, // TODO: does this belong here?
+ {CBOR_TAG_CBOR_SEQUENCE, QCBORDecode_StringsTagCB},
{CBOR_TAG_MIME, QCBORDecode_MIMETagCB},
{CBOR_TAG_BINARY_MIME, QCBORDecode_MIMETagCB},
#ifndef QCBOR_DISABLE_EXP_AND_MANTISSA
-
{CBOR_TAG_BIGFLOAT, QCBORDecode_ExpMantissaTagCB},
{CBOR_TAG_DECIMAL_FRACTION, QCBORDecode_ExpMantissaTagCB},
#endif /* ! QCBOR_DISABLE_EXP_AND_MANTISSA */
diff --git a/test/qcbor_decode_tests.c b/test/qcbor_decode_tests.c
index 1abb5a8..b385edc 100644
--- a/test/qcbor_decode_tests.c
+++ b/test/qcbor_decode_tests.c
@@ -8986,12 +8986,10 @@
return 23;
}
-#ifndef QCBOR_DISABLE_UNCOMMON_TAGS
QCBORDecode_GetB64InMapN(&DC, 30, QCBOR_TAG_REQUIREMENT_TAG, &String);
if(QCBORDecode_GetAndResetError(&DC) != QCBOR_SUCCESS) {
return 30;
}
-#endif
QCBORDecode_GetB64InMapN(&DC, 31, QCBOR_TAG_REQUIREMENT_NOT_A_TAG, &String);
if(QCBORDecode_GetAndResetError(&DC) != QCBOR_SUCCESS) {
return 31;
@@ -9005,12 +9003,10 @@
return 33;
}
-#ifndef QCBOR_DISABLE_UNCOMMON_TAGS
QCBORDecode_GetB64URLInMapN(&DC, 40, QCBOR_TAG_REQUIREMENT_TAG, &String);
if(QCBORDecode_GetAndResetError(&DC) != QCBOR_SUCCESS) {
return 40;
}
-#endif
QCBORDecode_GetB64URLInMapN(&DC, 41, QCBOR_TAG_REQUIREMENT_NOT_A_TAG, &String);
if(QCBORDecode_GetAndResetError(&DC) != QCBOR_SUCCESS) {
return 41;
@@ -9024,12 +9020,10 @@
return 43;
}
-#ifndef QCBOR_DISABLE_UNCOMMON_TAGS
QCBORDecode_GetRegexInMapN(&DC, 50, QCBOR_TAG_REQUIREMENT_TAG, &String);
if(QCBORDecode_GetAndResetError(&DC) != QCBOR_SUCCESS) {
return 50;
}
-#endif
QCBORDecode_GetRegexInMapN(&DC, 51, QCBOR_TAG_REQUIREMENT_NOT_A_TAG, &String);
if(QCBORDecode_GetAndResetError(&DC) != QCBOR_SUCCESS) {
return 51;
@@ -9043,7 +9037,6 @@
return 53;
}
-#ifndef QCBOR_DISABLE_UNCOMMON_TAGS
// MIME
bool bIsNot7Bit;
QCBORDecode_GetMIMEMessageInMapN(&DC, 60, QCBOR_TAG_REQUIREMENT_TAG, &String, &bIsNot7Bit);
@@ -9080,7 +9073,6 @@
if(QCBORDecode_GetAndResetError(&DC) != QCBOR_SUCCESS) {
return 70;
}
-#endif /* #ifndef QCBOR_DISABLE_UNCOMMON_TAGS */
QCBORDecode_GetBinaryUUIDInMapN(&DC, 71, QCBOR_TAG_REQUIREMENT_NOT_A_TAG, &String);
if(QCBORDecode_GetAndResetError(&DC) != QCBOR_SUCCESS) {