Big improvements in source code comments for encoding (#58)
Except for a few lines, all changes are to comments, not code. The code change are simple clarifications.
This is primarily change to the implementation comments, not to documentation of the public interface.
Co-authored-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/inc/qcbor/qcbor_encode.h b/inc/qcbor/qcbor_encode.h
index 54a3635..b1a2574 100644
--- a/inc/qcbor/qcbor_encode.h
+++ b/inc/qcbor/qcbor_encode.h
@@ -1935,13 +1935,14 @@
/**
@brief Semi-private method to add bigfloats and decimal fractions.
- @param[in] pCtx The encoding context to add the value to.
- @param[in] uTag The type 6 tag indicating what this is to be.
- @param[in] BigNumMantissa Is @ref NULLUsefulBufC if mantissa is an
- @c int64_t or the actual big number mantissa
- if not.
- @param[in] nMantissa The @c int64_t mantissa if it is not a big number.
- @param[in] nExponent The exponent.
+ @param[in] pCtx The encoding context to add the value to.
+ @param[in] uTag The type 6 tag indicating what this is to be.
+ @param[in] BigNumMantissa Is @ref NULLUsefulBufC if mantissa is an
+ @c int64_t or the actual big number mantissa
+ if not.
+ @param[in] bBigNumIsNegative This is @c true if the big number is negative.
+ @param[in] nMantissa The @c int64_t mantissa if it is not a big number.
+ @param[in] nExponent The exponent.
This outputs either the @ref CBOR_TAG_DECIMAL_FRACTION or @ref
CBOR_TAG_BIGFLOAT tag. if @c uTag is @ref CBOR_TAG_INVALID64, then
@@ -1954,7 +1955,7 @@
This implementation cannot output an exponent further from 0 than
@c INT64_MAX.
- To output a mantissa that is bewteen INT64_MAX and UINT64_MAX from 0,
+ To output a mantissa that is between INT64_MAX and UINT64_MAX from 0,
it must be as a big number.
Typically, QCBOREncode_AddDecimalFraction(), QCBOREncode_AddBigFloat(),