summaryrefslogtreecommitdiffstats
path: root/src/H5public.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5public.h')
-rw-r--r--src/H5public.h30
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] -->
/**