diff options
author | Gerd Heber <gheber@hdfgroup.org> | 2021-09-01 21:09:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 21:09:27 (GMT) |
commit | cf25524474a4012a70cc2bdb6eaddc402b5ea136 (patch) | |
tree | cf7e30d16a602e5146500158696d429a146cb2c2 /src/H5public.h | |
parent | 01fe2549a36d7635b2cbe6f6a57cbcce29c1335b (diff) | |
download | hdf5-cf25524474a4012a70cc2bdb6eaddc402b5ea136.zip hdf5-cf25524474a4012a70cc2bdb6eaddc402b5ea136.tar.gz hdf5-cf25524474a4012a70cc2bdb6eaddc402b5ea136.tar.bz2 |
A batch of life-cycle examples for different modules (#654)
* Create a tag file for permalinks.
* Added DOXYGEN_TAG_FILE.
* Added Doxygen life-cycle examples for different modules.
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5public.h')
-rw-r--r-- | src/H5public.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/H5public.h b/src/H5public.h index e7ed518..65709c6 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -172,8 +172,9 @@ * Status return values. Failed integer functions in HDF5 result almost * always in a negative value (unsigned failing functions sometimes return * zero for failure) while successful return is non-negative (often zero). - * The negative failure value is most commonly -1, but don't bet on it. The - * proper way to detect failure is something like: + * The negative failure value is most commonly -1, but don't bet on it. + * + * The proper way to detect failure is something like: * \code * if((dset = H5Dopen2(file, name)) < 0) * fprintf(stderr, "unable to open the requested dataset\n"); @@ -182,11 +183,17 @@ typedef int herr_t; /** - * Boolean type. Successful return values are zero (false) or positive - * (true). The typical true value is 1 but don't bet on it. Boolean - * functions cannot fail. Functions that return #htri_t however return zero - * (false), positive (true), or negative (failure). The proper way to test - * for truth from a #htri_t function is: + * C99-style Boolean type. Successful return values are zero (false) or positive + * (true). The typical true value is 1 but don't bet on it. + * \attention Boolean functions cannot fail. + */ +#include <stdbool.h> +typedef bool hbool_t; +/** + * Three-valued Boolean type. Functions that return #htri_t however return zero + * (false), positive (true), or negative (failure). + * + * The proper way to test for truth from a #htri_t function is: * \code * if ((retval = H5Tcommitted(type)) > 0) { * printf("data type is committed\n"); @@ -197,8 +204,7 @@ typedef int herr_t; * } * \endcode */ -typedef bool hbool_t; -typedef int htri_t; +typedef int htri_t; /* The signed version of size_t * @@ -285,9 +291,9 @@ typedef enum { /* (Actually, any positive value will cause the iterator to stop and pass back * that positive value to the function that called the iterator) */ -#define H5_ITER_ERROR (-1) -#define H5_ITER_CONT (0) -#define H5_ITER_STOP (1) +#define H5_ITER_ERROR (-1) /**< Error, stop iteration */ +#define H5_ITER_CONT (0) /**< Continue iteration */ +#define H5_ITER_STOP (1) /**< Stop iteration, short-circuit success */ //! <!-- [H5_index_t_snip] --> /** |