From 88ba566781cd4a8203264a3aa7a08066027a208b Mon Sep 17 00:00:00 2001 From: Laurence Lundblade Date: Sun, 3 Nov 2024 02:10:24 -0800 Subject: [PATCH] Make all doxygen '@' (#266) Co-authored-by: Laurence Lundblade --- example.c | 2 +- inc/qcbor/UsefulBuf.h | 4 ++-- inc/qcbor/qcbor_common.h | 4 +--- inc/qcbor/qcbor_decode.h | 12 ++++++------ inc/qcbor/qcbor_encode.h | 2 +- src/qcbor_decode.c | 34 +++++++++++++++++----------------- 6 files changed, 28 insertions(+), 30 deletions(-) diff --git a/example.c b/example.c index a6a0a132..c489ad61 100644 --- a/example.c +++ b/example.c @@ -130,7 +130,7 @@ static bool EngineCompare(const CarEngine *pE1, const CarEngine *pE2) * @return The pointer and length of the encoded CBOR or * @ref NULLUsefulBufC on error. * - * This encodes the input structure \c pEngine as a CBOR map of + * This encodes the input structure @c pEngine as a CBOR map of * label-value pairs. An array of float is one of the items in the * map. * diff --git a/inc/qcbor/UsefulBuf.h b/inc/qcbor/UsefulBuf.h index 38bdb8df..0a6e823c 100644 --- a/inc/qcbor/UsefulBuf.h +++ b/inc/qcbor/UsefulBuf.h @@ -1339,8 +1339,8 @@ UsefulOutBuf_GetOutPlace(UsefulOutBuf *pUOutBuf); * @param[in] uAmount The amount to advance. * * This advances the position in the output buffer - * by \c uAmount. This assumes that the - * caller has written \c uAmount to the pointer obtained + * by @c uAmount. This assumes that the + * caller has written @c uAmount to the pointer obtained * with UsefulOutBuf_GetOutPlace(). * * Warning: this bypasses the buffer safety provided by diff --git a/inc/qcbor/qcbor_common.h b/inc/qcbor/qcbor_common.h index 8fafba82..5b940011 100644 --- a/inc/qcbor/qcbor_common.h +++ b/inc/qcbor/qcbor_common.h @@ -30,11 +30,9 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ========================================================================= */ - #ifndef qcbor_common_h #define qcbor_common_h - #ifdef __cplusplus extern "C" { #if 0 @@ -533,7 +531,7 @@ typedef enum { * that they are not QCBOR_SUCCESS. See QCBORDecode_SetError(). */ QCBOR_ERR_FIRST_USER_DEFINED = 128, - /** See \ref QCBOR_ERR_FIRST_USER_DEFINED */ + /** See @ref QCBOR_ERR_FIRST_USER_DEFINED */ QCBOR_ERR_LAST_USER_DEFINED = 255 /* This is stored in uint8_t; never add values > 255 */ diff --git a/inc/qcbor/qcbor_decode.h b/inc/qcbor/qcbor_decode.h index f832fd1a..8c7a44c2 100644 --- a/inc/qcbor/qcbor_decode.h +++ b/inc/qcbor/qcbor_decode.h @@ -908,8 +908,8 @@ QCBORDecode_SetUpAllocator(QCBORDecodeContext *pCtx, * * See [Decode Error Overview](#Decode-Errors-Overview). * - * If a decoding error occurs or previously occured, \c uDataType and - * \c uLabelType will be set to @ref QCBOR_TYPE_NONE. If there is no + * If a decoding error occurs or previously occured, @c uDataType and + * @c uLabelType will be set to @ref QCBOR_TYPE_NONE. If there is no * need to know the specific error, it is sufficient to check for @ref * QCBOR_TYPE_NONE. * @@ -1352,11 +1352,11 @@ QCBORDecode_IsUnrecoverableError(QCBORError uErr); * and propagate up. * * When the error condition is set, QCBORDecode_VGetNext() will always - * return an item with data and label type as \ref QCBOR_TYPE_NONE. + * return an item with data and label type as @ref QCBOR_TYPE_NONE. * * The main intent of this is to set a user-defined error code in the - * range of \ref QCBOR_ERR_FIRST_USER_DEFINED to - * \ref QCBOR_ERR_LAST_USER_DEFINED, but it is OK to set QCBOR-defined + * range of @ref QCBOR_ERR_FIRST_USER_DEFINED to + * @ref QCBOR_ERR_LAST_USER_DEFINED, but it is OK to set QCBOR-defined * error codes too. */ static void @@ -1599,7 +1599,7 @@ QCBORDecode_IsTagged(QCBORDecodeContext *pCtx, * internally. * * This works the same as QCBORDecode_GetNext() except that it also - * returns the list of tags for the data item in \c pTagList. + * returns the list of tags for the data item in @c pTagList. * * The 0th tag returned here is the one furthest from the data * item. This is opposite the order for QCBORDecode_GetNthTag(). diff --git a/inc/qcbor/qcbor_encode.h b/inc/qcbor/qcbor_encode.h index 27d1dd54..f7252171 100644 --- a/inc/qcbor/qcbor_encode.h +++ b/inc/qcbor/qcbor_encode.h @@ -893,7 +893,7 @@ QCBOREncode_AddBytesToMapN(QCBOREncodeContext *pCtx, int64_t nLabel, UsefulBufC * multiple writes. * * The pointer in @c pPlace is where to start writing. Writing is just - * copying bytes to the location by the pointer in \c pPlace. Writing + * copying bytes to the location by the pointer in @c pPlace. Writing * past the length in @c pPlace will be writing off the end of the * output buffer. * diff --git a/src/qcbor_decode.c b/src/qcbor_decode.c index 14330823..0f4d5c02 100644 --- a/src/qcbor_decode.c +++ b/src/qcbor_decode.c @@ -2128,7 +2128,7 @@ QCBORDecode_Private_GetNextMapOrArray(QCBORDecodeContext *pMe, * * pDecodedItem[in,out] The data item to convert. * - * The 0th tag is discarded. \ref CBOR_TAG_INVALID16 is + * The 0th tag is discarded. @ref CBOR_TAG_INVALID16 is * shifted into empty slot at the end of the tag list. */ static void @@ -2330,7 +2330,7 @@ QCBORDecode_Private_GetNextTagContent(QCBORDecodeContext *pMe, * exponent. * * @returns Decoding errors from getting primitive data items or - * \ref QCBOR_ERR_BAD_EXP_AND_MANTISSA. + * @ref QCBOR_ERR_BAD_EXP_AND_MANTISSA. * * When called pDecodedItem must be the array with two members, the * exponent and mantissa. @@ -2511,8 +2511,8 @@ static const struct StringTagMapEntry QCBOR_Private_StringTagMap[] = { * @param[in,out] pDecodedItem The data item. * * @returns This returns QCBOR_SUCCESS if the tag was procssed, - * \ref QCBOR_ERR_UNSUPPORTED if the tag was not processed and - * \ref QCBOR_ERR_UNRECOVERABLE_TAG_CONTENT if the content type was wrong for the tag. + * @ref QCBOR_ERR_UNSUPPORTED if the tag was not processed and + * @ref QCBOR_ERR_UNRECOVERABLE_TAG_CONTENT if the content type was wrong for the tag. * * Process the CBOR tags that whose content is a byte string or a text * string and for which the string is just passed on to the caller. @@ -2570,7 +2570,7 @@ QCBOR_Private_ProcessTaggedString(uint16_t uTag, QCBORItem *pDecodedItem) * @ref CBOR_TAG_BIG_FLOAT. * @param[in] pDecodedItem Item being decoded. * - * @returns One of the 6 values between \ref QCBOR_TYPE_DECIMAL_FRACTION + * @returns One of the 6 values between @ref QCBOR_TYPE_DECIMAL_FRACTION * and @ref QCBOR_TYPE_BIGFLOAT_NEG_BIGNUM. * * Does mapping between a CBOR tag number and a QCBOR type. with a @@ -3320,7 +3320,7 @@ typedef struct { * * @retval Also errors returned by QCBORDecode_GetNext(). * - * On input, \c pItemArray contains a list of labels and data types of + * On input, @c pItemArray contains a list of labels and data types of * items to be found. * * On output, the fully retrieved items are filled in with values and @@ -3608,10 +3608,10 @@ QCBORDecode_GetItemInMapSZ(QCBORDecodeContext *pMe, * @param[out] pItem The item for the array/map. * @param[out] pEncodedCBOR Pointer and length of the encoded map or array. * - * The next item to be decoded must be a map or array as specified by \c uType. + * The next item to be decoded must be a map or array as specified by @c uType. * - * \c pItem will be filled in with the label and tags of the array or map - * in addition to \c pEncodedCBOR giving the pointer and length of the + * @c pItem will be filled in with the label and tags of the array or map + * in addition to @c pEncodedCBOR giving the pointer and length of the * encoded CBOR. * * When this is complete, the traversal cursor is at the end of the array or @@ -3711,7 +3711,7 @@ QCBORDecode_Private_GetArrayOrMap(QCBORDecodeContext *pMe, * @param[out] pItem The item for the array/map. * @param[out] pEncodedCBOR Pointer and length of the encoded map or array. * - * The next item to be decoded must be a map or array as specified by \c uType. + * The next item to be decoded must be a map or array as specified by @c uType. * * When this is complete, the traversal cursor is unchanged. */void @@ -3774,8 +3774,8 @@ QCBOR_Private_CheckTypeList(const int uDataType, * @param[in] TagSpec Specification for matching tags. * @param[in] pItem The item to check. * - * @retval QCBOR_SUCCESS \c uDataType is allowed by @c TagSpec - * @retval QCBOR_ERR_UNEXPECTED_TYPE \c uDataType is not allowed by @c TagSpec + * @retval QCBOR_SUCCESS @c uDataType is allowed by @c TagSpec + * @retval QCBOR_ERR_UNEXPECTED_TYPE @c uDataType is not allowed by @c TagSpec * * This checks the item data type of untagged items as well as of * tagged items against a specification to see if decoding should @@ -5080,7 +5080,7 @@ typedef QCBORError (*fExponentiator)(uint64_t uMantissa, int64_t nExponent, uint * unsigned integer. * * There are many inputs for which the result will not fit in the - * 64-bit integer and \ref QCBOR_ERR_CONVERSION_UNDER_OVER_FLOW will + * 64-bit integer and @ref QCBOR_ERR_CONVERSION_UNDER_OVER_FLOW will * be returned. */ static QCBORError @@ -5128,7 +5128,7 @@ QCBOR_Private_Exponentitate10(const uint64_t uMantissa, * output is a 64-bit unsigned integer. * * There are many inputs for which the result will not fit in the - * 64-bit integer and \ref QCBOR_ERR_CONVERSION_UNDER_OVER_FLOW will + * 64-bit integer and @ref QCBOR_ERR_CONVERSION_UNDER_OVER_FLOW will * be returned. */ static QCBORError @@ -5175,7 +5175,7 @@ QCBOR_Private_Exponentitate2(const uint64_t uMantissa, * * @returns Error code * - * \c pfExp performs exponentiation on and unsigned mantissa and + * @c pfExp performs exponentiation on and unsigned mantissa and * produces an unsigned result. This converts the mantissa from signed * and converts the result to signed. The exponentiation function is * either for base 2 or base 10 (and could be other if needed). @@ -5263,7 +5263,7 @@ QCBOR_Private_ExponentiateNN(const int64_t nMantissa, * * @returns Error code * - * \c pfExp performs exponentiation on and unsigned mantissa and + * @c pfExp performs exponentiation on and unsigned mantissa and * produces an unsigned result. This errors out if the mantissa * is negative because the output is unsigned. */ @@ -5295,7 +5295,7 @@ QCBOR_Private_ExponentitateNU(const int64_t nMantissa, * * @returns Error code * - * \c pfExp performs exponentiation on and unsigned mantissa and + * @c pfExp performs exponentiation on and unsigned mantissa and * produces an unsigned result so this is just a wrapper that does * nothing (and is likely inlined). */