From af55191102f01e76de658c881299f0909ca0feda Mon Sep 17 00:00:00 2001 From: Jia Tan Date: Thu, 29 Dec 2022 21:52:15 +0800 Subject: liblzma: Defines masks for return values from lzma_index_checks(). --- src/liblzma/api/lzma/index.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/liblzma') diff --git a/src/liblzma/api/lzma/index.h b/src/liblzma/api/lzma/index.h index f7de84b5..46afe3eb 100644 --- a/src/liblzma/api/lzma/index.h +++ b/src/liblzma/api/lzma/index.h @@ -303,6 +303,28 @@ typedef enum { } lzma_index_iter_mode; +/** + * \brief Mask for return value from lzma_index_checks() for check none + * + * \note This and the other CHECK_MASK macros were added in 5.5.1alpha. + */ +#define LZMA_INDEX_CHECK_MASK_NONE (UINT32_C(1) << LZMA_CHECK_NONE) + +/** + * \brief Mask for return value from lzma_index_checks() for check CRC32 + */ +#define LZMA_INDEX_CHECK_MASK_CRC32 (UINT32_C(1) << LZMA_CHECK_CRC32) + +/** + * \brief Mask for return value from lzma_index_checks() for check CRC64 + */ +#define LZMA_INDEX_CHECK_MASK_CRC64 (UINT32_C(1) << LZMA_CHECK_CRC64) + +/** + * \brief Mask for return value from lzma_index_checks() for check SHA256 + */ +#define LZMA_INDEX_CHECK_MASK_SHA256 (UINT32_C(1) << LZMA_CHECK_SHA256) + /** * \brief Calculate memory usage of lzma_index * @@ -433,6 +455,7 @@ extern LZMA_API(lzma_ret) lzma_index_stream_flags( * showing the Check types to the user. * * The bitmask is 1 << check_id, e.g. CRC32 is 1 << 1 and SHA-256 is 1 << 10. + * These masks are defined for convenience as LZMA_INDEX_CHECK_MASK_XXX * * \param i Pointer to lzma_index structure * -- cgit v1.2.3