summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-05 18:50:06 (GMT)
committerGitHub <noreply@github.com>2023-09-05 18:50:06 (GMT)
commitae1379094b71c51342772397af5caca088862a61 (patch)
treee79cb67a1227bfdec099f62e9df22917213b8a7d
parentd24f5d5223731d507b51d112ba564d764d6d6c18 (diff)
downloadhdf5-ae1379094b71c51342772397af5caca088862a61.zip
hdf5-ae1379094b71c51342772397af5caca088862a61.tar.gz
hdf5-ae1379094b71c51342772397af5caca088862a61.tar.bz2
hbool_t/TRUE/FALSE --> bool/true/false in tools (#3491)
-rw-r--r--tools/lib/h5diff.c24
-rw-r--r--tools/lib/h5diff.h8
-rw-r--r--tools/lib/h5diff_array.c132
-rw-r--r--tools/lib/h5diff_attr.c16
-rw-r--r--tools/lib/h5diff_dset.c8
-rw-r--r--tools/lib/h5tools.c162
-rw-r--r--tools/lib/h5tools.h46
-rw-r--r--tools/lib/h5tools_dump.c422
-rw-r--r--tools/lib/h5tools_dump.h64
-rw-r--r--tools/lib/h5tools_error.h2
-rw-r--r--tools/lib/h5tools_ref.c2
-rw-r--r--tools/lib/h5tools_str.c16
-rw-r--r--tools/lib/h5tools_utils.c24
-rw-r--r--tools/lib/h5tools_utils.h6
-rw-r--r--tools/lib/h5trav.c30
-rw-r--r--tools/lib/h5trav.h18
-rw-r--r--tools/libtest/h5tools_test_utils.c78
-rw-r--r--tools/src/h5copy/h5copy.c4
-rw-r--r--tools/src/h5diff/h5diff_common.c20
-rw-r--r--tools/src/h5dump/h5dump.c104
-rw-r--r--tools/src/h5dump/h5dump.h6
-rw-r--r--tools/src/h5dump/h5dump_ddl.c74
-rw-r--r--tools/src/h5dump/h5dump_extern.h2
-rw-r--r--tools/src/h5dump/h5dump_xml.c410
-rw-r--r--tools/src/h5format_convert/h5format_convert.c14
-rw-r--r--tools/src/h5import/h5import.c6
-rw-r--r--tools/src/h5jam/h5jam.c8
-rw-r--r--tools/src/h5jam/h5unjam.c6
-rw-r--r--tools/src/h5ls/h5ls.c430
-rw-r--r--tools/src/h5perf/pio_perf.c32
-rw-r--r--tools/src/h5perf/sio_engine.c6
-rw-r--r--tools/src/h5perf/sio_perf.c34
-rw-r--r--tools/src/h5repack/h5repack.c8
-rw-r--r--tools/src/h5repack/h5repack.h10
-rw-r--r--tools/src/h5repack/h5repack_copy.c30
-rw-r--r--tools/src/h5repack/h5repack_main.c38
-rw-r--r--tools/src/h5repack/h5repack_opttable.c8
-rw-r--r--tools/src/h5repack/h5repack_refs.c2
-rw-r--r--tools/src/h5repack/h5repack_verify.c4
-rw-r--r--tools/src/h5stat/h5stat.c102
-rw-r--r--tools/src/misc/h5clear.c18
-rw-r--r--tools/src/misc/h5debug.c6
-rw-r--r--tools/src/misc/h5delete.c4
-rw-r--r--tools/src/misc/h5mkgrp.c34
-rw-r--r--tools/src/misc/h5repart.c22
-rw-r--r--tools/test/h5copy/h5copygentest.c2
-rw-r--r--tools/test/h5dump/h5dumpgentest.c4
-rw-r--r--tools/test/h5format_convert/h5fc_chk_idx.c2
-rw-r--r--tools/test/h5format_convert/h5fc_gentest.c8
-rw-r--r--tools/test/h5repack/h5repackgentest.c22
-rw-r--r--tools/test/h5repack/h5repacktst.c184
-rw-r--r--tools/test/misc/clear_open_chk.c2
-rw-r--r--tools/test/misc/h5clear_gentest.c14
-rw-r--r--tools/test/misc/vds/UC_common.h4
-rw-r--r--tools/test/perform/overhead.c38
-rw-r--r--tools/test/perform/perf_meta.c18
-rw-r--r--tools/test/perform/zip_perf.c16
57 files changed, 1405 insertions, 1409 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 502b2ec..b607197 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -508,7 +508,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
}
else if (ret_value == 0) {
/* no dangling link option given and detect dangling link */
- tinfo->symlink_visited.dangle_link = TRUE;
+ tinfo->symlink_visited.dangle_link = true;
trav_info_visit_lnk(path, linfo, tinfo);
if (opts->no_dangle_links)
opts->err_stat = H5DIFF_ERR; /* make dangling link is error */
@@ -523,7 +523,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
if (symlink_visit_add(&(tinfo->symlink_visited), linfo->type, NULL, lnk_info.trg_path) < 0)
H5TOOLS_GOTO_DONE(SUCCEED);
- if (h5trav_visit(tinfo->fid, path, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, tinfo,
+ if (h5trav_visit(tinfo->fid, path, true, true, trav_grp_objs, trav_grp_symlinks, tinfo,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = H5DIFF_ERR;
@@ -537,7 +537,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
}
else if (ret_value == 0) {
/* no dangling link option given and detect dangling link */
- tinfo->symlink_visited.dangle_link = TRUE;
+ tinfo->symlink_visited.dangle_link = true;
trav_info_visit_lnk(path, linfo, tinfo);
if (opts->no_dangle_links)
opts->err_stat = H5DIFF_ERR; /* make dangling link is error */
@@ -555,7 +555,7 @@ trav_grp_symlinks(const char *path, const H5L_info2_t *linfo, void *udata)
if (symlink_visit_add(&(tinfo->symlink_visited), linfo->type, ext_fname, ext_path) < 0)
H5TOOLS_GOTO_DONE(SUCCEED);
- if (h5trav_visit(tinfo->fid, path, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, tinfo,
+ if (h5trav_visit(tinfo->fid, path, true, true, trav_grp_objs, trav_grp_symlinks, tinfo,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
opts->err_stat = H5DIFF_ERR;
@@ -961,7 +961,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
both_objs_grp = (obj1type == H5TRAV_TYPE_GROUP && obj2type == H5TRAV_TYPE_GROUP);
if (both_objs_grp) {
- H5TOOLS_DEBUG("h5diff both_objs_grp TRUE");
+ H5TOOLS_DEBUG("h5diff both_objs_grp true");
/*
* traverse group1
*/
@@ -969,7 +969,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
/* optional data pass */
info1_grp->opts = (diff_opt_t *)opts;
- if (h5trav_visit(file1_id, obj1fullname, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, info1_grp,
+ if (h5trav_visit(file1_id, obj1fullname, true, true, trav_grp_objs, trav_grp_symlinks, info1_grp,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "Could not get file contents");
@@ -983,7 +983,7 @@ h5diff(const char *fname1, const char *fname2, const char *objname1, const char
/* optional data pass */
info2_grp->opts = (diff_opt_t *)opts;
- if (h5trav_visit(file2_id, obj2fullname, TRUE, TRUE, trav_grp_objs, trav_grp_symlinks, info2_grp,
+ if (h5trav_visit(file2_id, obj2fullname, true, true, trav_grp_objs, trav_grp_symlinks, info2_grp,
H5O_INFO_BASIC) < 0) {
parallel_print("Error: Could not get file contents\n");
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "Could not get file contents");
@@ -1534,9 +1534,9 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
hid_t type2_id = H5I_INVALID_HID;
hid_t grp1_id = H5I_INVALID_HID;
hid_t grp2_id = H5I_INVALID_HID;
- hbool_t is_dangle_link1 = FALSE;
- hbool_t is_dangle_link2 = FALSE;
- hbool_t is_hard_link = FALSE;
+ bool is_dangle_link1 = false;
+ bool is_dangle_link2 = false;
+ bool is_hard_link = false;
hsize_t nfound = 0;
h5trav_type_t object_type;
diff_err_t ret_value = opts->err_stat;
@@ -1577,7 +1577,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "dangling link is error");
}
else
- is_dangle_link1 = TRUE;
+ is_dangle_link1 = true;
}
/* target object2 - get type and name */
@@ -1592,7 +1592,7 @@ diff(hid_t file1_id, const char *path1, hid_t file2_id, const char *path2, diff_
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "dangling link is error");
}
else
- is_dangle_link2 = TRUE;
+ is_dangle_link2 = true;
}
/* found dangling link */
diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h
index d16c855..12bf56a 100644
--- a/tools/lib/h5diff.h
+++ b/tools/lib/h5diff.h
@@ -27,7 +27,7 @@
*------------------------------------------------------------------------*/
typedef struct {
h5trav_type_t type[2];
- hbool_t is_same_trgobj;
+ bool is_same_trgobj;
} diff_args_t;
/*-------------------------------------------------------------------------
* command line options
@@ -61,7 +61,7 @@ typedef struct {
int use_system_epsilon; /* flag to use system epsilon (1 or 0) */
int percent_bool; /* relative error to compare*/
double percent; /* relative error value */
- hbool_t follow_links; /* follow symbolic links */
+ bool follow_links; /* follow symbolic links */
int no_dangle_links; /* return error when find dangling link */
int cmn_objs; /* do we have common objects */
int not_cmp; /* are the objects comparable */
@@ -90,8 +90,8 @@ typedef struct {
struct subset_t *sset[2]; /* subsetting parameters */
h5tools_vol_info_t vol_info[2]; /* VOL information for input file, output file */
h5tools_vfd_info_t vfd_info[2]; /* VFD information for input file, output file */
- hbool_t custom_vol[2]; /* Using a custom input, output VOL? */
- hbool_t custom_vfd[2]; /* Using a custom input, output VFD? */
+ bool custom_vol[2]; /* Using a custom input, output VOL? */
+ bool custom_vfd[2]; /* Using a custom input, output VFD? */
} diff_opt_t;
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c
index abb81b9..c0430bc 100644
--- a/tools/lib/h5diff_array.c
+++ b/tools/lib/h5diff_array.c
@@ -80,32 +80,32 @@
*-------------------------------------------------------------------------
*/
-static hbool_t not_comparable;
+static bool not_comparable;
#define PER(A, B) \
do { \
per = -1; \
- not_comparable = FALSE; \
- both_zero = FALSE; \
+ not_comparable = false; \
+ both_zero = false; \
if (H5_DBL_ABS_EQUAL(0, (double)(A)) && H5_DBL_ABS_EQUAL(0, (double)(B))) \
- both_zero = TRUE; \
+ both_zero = true; \
if (!H5_DBL_ABS_EQUAL(0, (double)(A))) \
per = (double)ABS((double)((B) - (A)) / (double)(A)); \
else \
- not_comparable = TRUE; \
+ not_comparable = true; \
} while (0)
#define PER_UNSIGN(TYPE, A, B) \
do { \
per = -1; \
- not_comparable = FALSE; \
- both_zero = FALSE; \
+ not_comparable = false; \
+ both_zero = false; \
if (H5_DBL_ABS_EQUAL(0, (double)(A)) && H5_DBL_ABS_EQUAL(0, (double)(B))) \
- both_zero = TRUE; \
+ both_zero = true; \
if (!H5_DBL_ABS_EQUAL(0, (double)(A))) \
per = ABS((double)((TYPE)((B) - (A))) / (double)(A)); \
else \
- not_comparable = TRUE; \
+ not_comparable = true; \
} while (0)
#define PDIFF(a, b) (((b) > (a)) ? ((b) - (a)) : ((a) - (b)))
@@ -121,14 +121,14 @@ typedef struct mcomp_t {
* local prototypes
*-------------------------------------------------------------------------
*/
-static hbool_t all_zero(const void *_mem, size_t size);
+static bool all_zero(const void *_mem, size_t size);
static int ull2float(unsigned long long ull_value, float *f_value);
static hsize_t character_compare(char *mem1, char *mem2, hsize_t elemtno, size_t u, diff_opt_t *opts);
static hsize_t character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno,
diff_opt_t *opts);
-static hbool_t equal_float(float value, float expected, diff_opt_t *opts);
-static hbool_t equal_double(double value, double expected, diff_opt_t *opts);
-static hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *opts);
+static bool equal_float(float value, float expected, diff_opt_t *opts);
+static bool equal_double(double value, double expected, diff_opt_t *opts);
+static bool equal_ldouble(long double value, long double expected, diff_opt_t *opts);
static int print_data(diff_opt_t *opts);
static void print_pos(diff_opt_t *opts, hsize_t elemtno, size_t u);
@@ -444,8 +444,8 @@ diff_datum(void *_mem1, void *_mem2, hsize_t elemtno, diff_opt_t *opts, hid_t co
unsigned nmembs;
unsigned j;
size_t size = 0;
- hbool_t iszero1;
- hbool_t iszero2;
+ bool iszero1;
+ bool iszero2;
hsize_t nfound = 0; /* differences found */
diff_err_t ret_value = opts->err_stat;
@@ -1270,20 +1270,20 @@ done:
*
* Purpose: Determines if memory is initialized to all zero bytes.
*
- * Return: TRUE if all bytes are zero; FALSE otherwise
+ * Return: true if all bytes are zero; false otherwise
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
all_zero(const void *_mem, size_t size)
{
const unsigned char *mem = (const unsigned char *)_mem;
while (size-- > 0)
if (mem[size])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1592,7 +1592,7 @@ character_compare_opt(unsigned char *mem1, unsigned char *mem2, hsize_t elemtno,
hsize_t nfound = 0; /* differences found */
unsigned char temp1_uchar;
unsigned char temp2_uchar;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
double per;
/* both_zero is set in the PER_UNSIGN macro but not used in this function */
@@ -1667,9 +1667,9 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
float temp1_float;
float temp2_float;
double per;
- hbool_t both_zero = FALSE;
- hbool_t isnan1 = FALSE;
- hbool_t isnan2 = FALSE;
+ bool both_zero = false;
+ bool isnan1 = false;
+ bool isnan2 = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -1817,7 +1817,7 @@ diff_float_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
*-------------------------------------------------------------------------
*/
else {
- if (equal_float(temp1_float, temp2_float, opts) == FALSE) {
+ if (equal_float(temp1_float, temp2_float, opts) == false) {
opts->print_percentage = 0;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -1847,9 +1847,9 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
double temp1_double;
double temp2_double;
double per;
- hbool_t both_zero = FALSE;
- hbool_t isnan1 = FALSE;
- hbool_t isnan2 = FALSE;
+ bool both_zero = false;
+ bool isnan1 = false;
+ bool isnan2 = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -1990,7 +1990,7 @@ diff_double_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
*-------------------------------------------------------------------------
*/
else {
- if (equal_double(temp1_double, temp2_double, opts) == FALSE) {
+ if (equal_double(temp1_double, temp2_double, opts) == false) {
opts->print_percentage = 0;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -2020,9 +2020,9 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
long double temp1_double;
long double temp2_double;
double per;
- hbool_t both_zero = FALSE;
- hbool_t isnan1 = FALSE;
- hbool_t isnan2 = FALSE;
+ bool both_zero = false;
+ bool isnan1 = false;
+ bool isnan2 = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2164,7 +2164,7 @@ diff_ldouble_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
* no -d and -p
*-------------------------------------------------------------------------
*/
- else if (equal_ldouble(temp1_double, temp2_double, opts) == FALSE) {
+ else if (equal_ldouble(temp1_double, temp2_double, opts) == false) {
opts->print_percentage = 0;
print_pos(opts, elem_idx, 0);
if (print_data(opts)) {
@@ -2193,7 +2193,7 @@ diff_schar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
char temp1_char;
char temp2_char;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
memcpy(&temp1_char, mem1, sizeof(char));
@@ -2281,7 +2281,7 @@ diff_uchar_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
unsigned char temp1_uchar;
unsigned char temp2_uchar;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2369,7 +2369,7 @@ diff_short_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
short temp1_short;
short temp2_short;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2457,7 +2457,7 @@ diff_ushort_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
unsigned short temp1_ushort;
unsigned short temp2_ushort;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2549,7 +2549,7 @@ diff_int_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, dif
int temp1_int;
int temp2_int;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2637,7 +2637,7 @@ diff_uint_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
unsigned int temp1_uint;
unsigned int temp2_uint;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2725,7 +2725,7 @@ diff_long_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, di
long temp1_long;
long temp2_long;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2813,7 +2813,7 @@ diff_ulong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
unsigned long temp1_ulong;
unsigned long temp2_ulong;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2903,7 +2903,7 @@ diff_llong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx, d
long long temp1_llong;
long long temp2_llong;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -2997,7 +2997,7 @@ diff_ullong_element(unsigned char *mem1, unsigned char *mem2, hsize_t elem_idx,
unsigned long long temp2_ullong;
float f1, f2;
double per;
- hbool_t both_zero = FALSE;
+ bool both_zero = false;
H5TOOLS_START_DEBUG("delta_bool:%d - percent_bool:%d", opts->delta_bool, opts->percent_bool);
@@ -3132,7 +3132,7 @@ done:
* Purpose: use a absolute error formula to deal with floating point uncertainty
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
equal_double(double value, double expected, diff_opt_t *opts)
{
if (opts->do_nans) {
@@ -3140,36 +3140,36 @@ equal_double(double value, double expected, diff_opt_t *opts)
* detect NaNs
*-------------------------------------------------------------------------
*/
- hbool_t isnan1 = HDisnan(value);
- hbool_t isnan2 = HDisnan(expected);
+ bool isnan1 = HDisnan(value);
+ bool isnan2 = HDisnan(expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
*/
if (isnan1 && isnan2)
- return TRUE;
+ return true;
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
*/
if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
- return FALSE;
+ return false;
}
if (opts->use_system_epsilon) {
/* Check equality within some epsilon */
if (H5_DBL_ABS_EQUAL(value, expected))
- return TRUE;
+ return true;
}
else {
/* Check bits */
if (!memcmp(&value, &expected, sizeof(double)))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*-------------------------------------------------------------------------
@@ -3179,7 +3179,7 @@ equal_double(double value, double expected, diff_opt_t *opts)
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
equal_ldouble(long double value, long double expected, diff_opt_t *opts)
{
if (opts->do_nans) {
@@ -3187,36 +3187,36 @@ equal_ldouble(long double value, long double expected, diff_opt_t *opts)
* detect NaNs
*-------------------------------------------------------------------------
*/
- hbool_t isnan1 = HDisnan(value);
- hbool_t isnan2 = HDisnan(expected);
+ bool isnan1 = HDisnan(value);
+ bool isnan2 = HDisnan(expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
*/
if (isnan1 && isnan2)
- return TRUE;
+ return true;
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
*/
if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
- return FALSE;
+ return false;
}
if (opts->use_system_epsilon) {
/* Check equality within some epsilon */
if (H5_LDBL_ABS_EQUAL(value, expected))
- return TRUE;
+ return true;
}
else {
/* Check bits */
if (!memcmp(&value, &expected, sizeof(long double)))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*-------------------------------------------------------------------------
@@ -3225,7 +3225,7 @@ equal_ldouble(long double value, long double expected, diff_opt_t *opts)
* Purpose: use a absolute error formula to deal with floating point uncertainty
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
equal_float(float value, float expected, diff_opt_t *opts)
{
if (opts->do_nans) {
@@ -3233,36 +3233,36 @@ equal_float(float value, float expected, diff_opt_t *opts)
* detect NaNs
*-------------------------------------------------------------------------
*/
- hbool_t isnan1 = HDisnan(value);
- hbool_t isnan2 = HDisnan(expected);
+ bool isnan1 = HDisnan(value);
+ bool isnan2 = HDisnan(expected);
/*-------------------------------------------------------------------------
* we consider NaN == NaN to be true
*-------------------------------------------------------------------------
*/
if (isnan1 && isnan2)
- return TRUE;
+ return true;
/*-------------------------------------------------------------------------
* one is a NaN, do not compare but assume difference
*-------------------------------------------------------------------------
*/
if ((isnan1 && !isnan2) || (!isnan1 && isnan2))
- return FALSE;
+ return false;
}
if (opts->use_system_epsilon) {
/* Check equality within some epsilon */
if (H5_FLT_ABS_EQUAL(value, expected))
- return TRUE;
+ return true;
}
else {
/* Check bits */
if (!memcmp(&value, &expected, sizeof(float)))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 0c377af..12abd28 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -326,8 +326,8 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
size_t msize2; /* memory size of memory type */
void *buf1 = NULL; /* data buffer */
void *buf2 = NULL; /* data buffer */
- hbool_t buf1hasdata = FALSE; /* buffer has data */
- hbool_t buf2hasdata = FALSE; /* buffer has data */
+ bool buf1hasdata = false; /* buffer has data */
+ bool buf2hasdata = false; /* buffer has data */
int rank1; /* rank of dataset */
int rank2; /* rank of dataset */
hsize_t dims1[H5S_MAX_RANK]; /* dimensions of dataset */
@@ -443,7 +443,7 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "H5Aget_type first attribute failed");
}
else
- buf1hasdata = TRUE;
+ buf1hasdata = true;
H5TOOLS_DEBUG("attr H5Aread 1");
if (H5Aread(attr2_id, mtype2_id, buf2) < 0) {
@@ -451,7 +451,7 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
H5TOOLS_GOTO_ERROR(H5DIFF_ERR, "H5Aget_type second attribute failed");
}
else
- buf2hasdata = TRUE;
+ buf2hasdata = true;
H5TOOLS_DEBUG("attr H5Aread 2");
/* format output string */
@@ -530,12 +530,12 @@ diff_attr_data(hid_t attr1_id, hid_t attr2_id, const char *name1, const char *na
/* Free buf1 and buf2, check both VLEN-data VLEN-string to reclaim any
* VLEN memory first */
- if (TRUE == h5tools_detect_vlen(mtype1_id))
+ if (true == h5tools_detect_vlen(mtype1_id))
H5Treclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
free(buf1);
buf1 = NULL;
- if (TRUE == h5tools_detect_vlen(mtype2_id))
+ if (true == h5tools_detect_vlen(mtype2_id))
H5Treclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
free(buf2);
buf2 = NULL;
@@ -559,12 +559,12 @@ done:
H5E_BEGIN_TRY
{
if (buf1) {
- if (buf1hasdata && TRUE == h5tools_detect_vlen(mtype1_id))
+ if (buf1hasdata && true == h5tools_detect_vlen(mtype1_id))
H5Treclaim(mtype1_id, space1_id, H5P_DEFAULT, buf1);
free(buf1);
} /* end if */
if (buf2) {
- if (buf2hasdata && TRUE == h5tools_detect_vlen(mtype2_id))
+ if (buf2hasdata && true == h5tools_detect_vlen(mtype2_id))
H5Treclaim(mtype2_id, space2_id, H5P_DEFAULT, buf2);
free(buf2);
} /* end if */
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 78f52bc..8ab9db1 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -351,10 +351,10 @@ diff_datasetid(hid_t did1, hid_t did2, const char *obj1_name, const char *obj2_n
/* Check if type is either VLEN-data or VLEN-string to reclaim any
* VLEN memory buffer later
*/
- if (TRUE == h5tools_detect_vlen(m_tid1))
- vl_data1 = TRUE;
- if (TRUE == h5tools_detect_vlen(m_tid2))
- vl_data2 = TRUE;
+ if (true == h5tools_detect_vlen(m_tid1))
+ vl_data1 = true;
+ if (true == h5tools_detect_vlen(m_tid2))
+ vl_data2 = true;
H5TOOLS_DEBUG("h5tools_detect_vlen %d:%d - errstat:%d", vl_data1, vl_data2, opts->err_stat);
/*------------------------------------------------------------------------
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 0e063c7..c3bfbd6 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -522,7 +522,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
}
else if (!HDstrcmp(vfd_info->u.name, drivernames[CORE_VFD_IDX])) {
/* Core Driver */
- if (H5Pset_fapl_core(fapl_id, (size_t)H5_MB, TRUE) < 0)
+ if (H5Pset_fapl_core(fapl_id, (size_t)H5_MB, true) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_core failed");
}
else if (!HDstrcmp(vfd_info->u.name, drivernames[FAMILY_VFD_IDX])) {
@@ -540,7 +540,7 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
}
else if (!HDstrcmp(vfd_info->u.name, drivernames[MULTI_VFD_IDX])) {
/* MULTI Driver */
- if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0)
+ if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, true) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_multi failed");
}
else if (!HDstrcmp(vfd_info->u.name, drivernames[MPIO_VFD_IDX])) {
@@ -822,9 +822,9 @@ done:
herr_t
h5tools_get_vfd_name(hid_t fid, hid_t fapl_id, char *drivername, size_t drivername_size)
{
- hid_t fapl_vol_id = H5I_INVALID_HID;
- hbool_t is_native = FALSE;
- herr_t ret_value = SUCCEED;
+ hid_t fapl_vol_id = H5I_INVALID_HID;
+ bool is_native = false;
+ herr_t ret_value = SUCCEED;
if (fapl_id < 0)
H5TOOLS_GOTO_ERROR(FAIL, "invalid FAPL");
@@ -915,14 +915,14 @@ done:
*
* The 'use_specific_driver' parameter is used to control the
* VFD/VOL connector that this routine uses to open the file
- * with. If 'use_specific_driver' is set to TRUE, this routine
+ * with. If 'use_specific_driver' is set to true, this routine
* assumes that the caller has already set a specific VFD or VOL
* connector on the given FAPL and will attempt to directly use
* the FAPL for opening the file. We assume that the caller knows
* what they are doing; if the file is unable to be opened using
* that FAPL, this routine will return H5I_INVALID_HID.
*
- * However, if 'use_specific_driver' is set to FALSE, this
+ * However, if 'use_specific_driver' is set to false, this
* routine assumes that the caller HAS NOT set a specific VFD or
* VOL connector on the given FAPL and will instead loop through
* the various available VFL drivers and VOL connectors trying to
@@ -951,7 +951,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_specific_driver, char *drivername,
+h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, bool use_specific_driver, char *drivername,
size_t drivername_size)
{
hid_t fid = H5I_INVALID_HID;
@@ -989,7 +989,7 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec
/*
* If we failed to open the file and the caller specified 'use_specific_driver'
- * as TRUE, we should return failure now since the file couldn't be opened with
+ * as true, we should return failure now since the file couldn't be opened with
* the VFL driver/VOL connector that was set on the FAPL by the caller.
*/
if (use_specific_driver)
@@ -1037,7 +1037,7 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec
/* Can we open the file with this combo? */
H5E_BEGIN_TRY
{
- fid = h5tools_fopen(fname, flags, tmp_fapl_id, TRUE, drivername, drivername_size);
+ fid = h5tools_fopen(fname, flags, tmp_fapl_id, true, drivername, drivername_size);
}
H5E_END_TRY
@@ -1060,7 +1060,7 @@ h5tools_fopen(const char *fname, unsigned flags, hid_t fapl_id, hbool_t use_spec
continue;
/* Can we open the file with this connector? */
- if ((fid = h5tools_fopen(fname, flags, tmp_fapl_id, TRUE, drivername, drivername_size)) >= 0) {
+ if ((fid = h5tools_fopen(fname, flags, tmp_fapl_id, true, drivername, drivername_size)) >= 0) {
used_fapl_id = tmp_fapl_id;
H5TOOLS_GOTO_DONE(fid);
}
@@ -1121,24 +1121,24 @@ h5tools_count_ncols(const char *s)
*
* Purpose: Recursive check for any variable length data in given type.
*
- * Return: TRUE : type contains any variable length data
- * FALSE : type doesn't contain any variable length data
+ * Return: true : type contains any variable length data
+ * false : type doesn't contain any variable length data
* Negative value: failed
*-------------------------------------------------------------------------
*/
htri_t
h5tools_detect_vlen(hid_t tid)
{
- htri_t ret = FALSE;
+ htri_t ret = false;
/* recursive detect any vlen data values in type (compound, array ...) */
ret = H5Tdetect_class(tid, H5T_VLEN);
- if ((ret == TRUE) || (ret < 0))
+ if ((ret == true) || (ret < 0))
goto done;
/* recursive detect any vlen string in type (compound, array ...) */
ret = h5tools_detect_vlen_str(tid);
- if ((ret == TRUE) || (ret < 0))
+ if ((ret == true) || (ret < 0))
goto done;
done:
@@ -1150,8 +1150,8 @@ done:
*
* Purpose: Recursive check for variable length string of a datatype.
*
- * Return: TRUE : type contains any variable length string
- * FALSE : type doesn't contain any variable length string
+ * Return: true : type contains any variable length string
+ * false : type doesn't contain any variable length string
* Negative value: failed
*-------------------------------------------------------------------------
*/
@@ -1159,10 +1159,10 @@ htri_t
h5tools_detect_vlen_str(hid_t tid)
{
H5T_class_t tclass = -1;
- htri_t ret = FALSE;
+ htri_t ret = false;
ret = H5Tis_variable_str(tid);
- if ((ret == TRUE) || (ret < 0))
+ if ((ret == true) || (ret < 0))
goto done;
tclass = H5Tget_class(tid);
@@ -1174,7 +1174,7 @@ h5tools_detect_vlen_str(hid_t tid)
goto done;
}
ret = h5tools_detect_vlen_str(btid);
- if ((ret == TRUE) || (ret < 0)) {
+ if ((ret == true) || (ret < 0)) {
H5Tclose(btid);
goto done;
}
@@ -1194,7 +1194,7 @@ h5tools_detect_vlen_str(hid_t tid)
hid_t mtid = H5Tget_member_type(tid, u);
ret = h5tools_detect_vlen_str(mtid);
- if ((ret == TRUE) || (ret < 0)) {
+ if ((ret == true) || (ret < 0)) {
H5Tclose(mtid);
goto done;
}
@@ -1411,16 +1411,16 @@ h5tools_region_simple_prefix(FILE *stream, const h5tool_format_t *info, h5tools_
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols, hsize_t local_elmt_counter,
hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
- char *s = NULL;
- char *section = NULL; /* a section of output */
- int secnum; /* section sequence number */
- int multiline; /* datum was multiline */
+ bool dimension_break = true;
+ char *s = NULL;
+ char *section = NULL; /* a section of output */
+ int secnum; /* section sequence number */
+ int multiline; /* datum was multiline */
if (stream == NULL)
return dimension_break;
@@ -1443,7 +1443,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* ... and the previous element also occupied more than one
* line, then start this element at the beginning of a line.
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
}
else if ((ctx->prev_prefix_len + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
HDstrlen(OPT(info->line_suf, ""))) <= ncols) {
@@ -1452,7 +1452,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* should end the current line and start this element on its
* own line.
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
}
H5TOOLS_DEBUG("ctx->need_prefix=%d", ctx->need_prefix);
}
@@ -1464,11 +1464,11 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
*/
if (info->arr_linebreak && ctx->cur_elmt) {
if (ctx->size_last_dim && (ctx->cur_elmt % ctx->size_last_dim) == 0)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if (elmt_counter == ctx->size_last_dim) {
- ctx->need_prefix = TRUE;
- dimension_break = FALSE;
+ ctx->need_prefix = true;
+ dimension_break = false;
}
H5TOOLS_DEBUG("ctx->need_prefix=%d", ctx->need_prefix);
}
@@ -1483,7 +1483,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
if (info->line_multi_new == 1 && ctx->prev_multiline &&
(ctx->cur_column + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
HDstrlen(OPT(info->line_suf, ""))) > ncols)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
H5TOOLS_DEBUG("ctx->need_prefix=%d", ctx->need_prefix);
/*
@@ -1491,7 +1491,7 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* start a new line.
*/
if (info->line_per_line > 0 && ctx->cur_elmt >= info->line_per_line)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
H5TOOLS_DEBUG("ctx->need_prefix=%d", ctx->need_prefix);
/*
@@ -1576,16 +1576,16 @@ h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_contex
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols, hsize_t *ptdata,
hsize_t local_elmt_counter, hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
- char *s = NULL;
- char *section = NULL; /* a section of output */
- int secnum; /* section sequence number */
- int multiline; /* datum was multiline */
+ bool dimension_break = true;
+ char *s = NULL;
+ char *section = NULL; /* a section of output */
+ int secnum; /* section sequence number */
+ int multiline; /* datum was multiline */
H5TOOLS_START_DEBUG(" ");
H5TOOLS_DEBUG("elmt_counter=%ld - local_elmt_counter=%ld", elmt_counter, local_elmt_counter);
@@ -1604,7 +1604,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
* ... and the previous element also occupied more than one
* line, then start this element at the beginning of a line.
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
}
else if ((ctx->prev_prefix_len + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
HDstrlen(OPT(info->line_suf, ""))) <= ncols) {
@@ -1613,7 +1613,7 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
* should end the current line and start this element on its
* own line.
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
}
}
@@ -1624,11 +1624,11 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
*/
if (info->arr_linebreak && ctx->cur_elmt) {
if (ctx->size_last_dim && (ctx->cur_elmt % ctx->size_last_dim) == 0)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if (elmt_counter == ctx->size_last_dim) {
- ctx->need_prefix = TRUE;
- dimension_break = FALSE;
+ ctx->need_prefix = true;
+ dimension_break = false;
}
}
@@ -1640,14 +1640,14 @@ h5tools_render_region_element(FILE *stream, const h5tool_format_t *info, h5tools
if (info->line_multi_new == 1 && ctx->prev_multiline &&
(ctx->cur_column + h5tools_count_ncols(s) + HDstrlen(OPT(info->elmt_suf2, " ")) +
HDstrlen(OPT(info->line_suf, ""))) > ncols)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/*
* If too many elements have already been printed then we need to
* start a new line.
*/
if (info->line_per_line > 0 && ctx->cur_elmt >= info->line_per_line)
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/*
* Each OPTIONAL_LINE_BREAK embedded in the rendered string can cause
@@ -1788,7 +1788,7 @@ render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t
size_t size; /* datum size */
hsize_t block_index;
H5T_class_t type_class;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
int ret_value = 0;
H5TOOLS_START_DEBUG(" ");
@@ -2036,7 +2036,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t contai
size_t type_size;
hid_t mem_space = H5I_INVALID_HID;
void *region_buf = NULL;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
hsize_t blkndx;
hid_t sid1 = H5I_INVALID_HID;
int ret_value = -1;
@@ -2121,7 +2121,7 @@ done:;
* True otherwise
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream, hid_t container)
{
hssize_t snblocks;
@@ -2132,30 +2132,30 @@ render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *strea
unsigned ndims;
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
H5TOOLS_START_DEBUG(" ");
if ((snblocks = H5Sget_select_hyper_nblocks(region_space)) <= 0)
- H5TOOLS_THROW(FALSE, "H5Sget_select_hyper_nblocks failed");
+ H5TOOLS_THROW(false, "H5Sget_select_hyper_nblocks failed");
nblocks = (hsize_t)snblocks;
/* Print block information */
if ((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
- H5TOOLS_THROW(FALSE, "H5Sget_simple_extent_ndims failed");
+ H5TOOLS_THROW(false, "H5Sget_simple_extent_ndims failed");
ndims = (unsigned)sndims;
alloc_size = nblocks * ndims * 2 * sizeof(ptdata[0]);
if ((ptdata = (hsize_t *)malloc((size_t)alloc_size)) == NULL)
- H5TOOLS_GOTO_ERROR(FALSE, "Could not allocate buffer for ptdata");
+ H5TOOLS_GOTO_ERROR(false, "Could not allocate buffer for ptdata");
if (H5Sget_select_hyper_blocklist(region_space, (hsize_t)0, nblocks, ptdata) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Rget_select_hyper_blocklist failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Rget_select_hyper_blocklist failed");
if ((dtype = H5Dget_type(region_id)) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Dget_type failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Dget_type failed");
if ((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Tget_native_type failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Tget_native_type failed");
render_bin_output_region_data_blocks(region_id, stream, container, ndims, type_id, nblocks, ptdata);
@@ -2163,12 +2163,12 @@ done:
free(ptdata);
if (type_id > 0 && H5Tclose(type_id) < 0)
- H5TOOLS_ERROR(FALSE, "H5Tclose failed");
+ H5TOOLS_ERROR(false, "H5Tclose failed");
if (dtype > 0 && H5Tclose(dtype) < 0)
- H5TOOLS_ERROR(FALSE, "H5Tclose failed");
+ H5TOOLS_ERROR(false, "H5Tclose failed");
- H5_LEAVE(TRUE);
+ H5_LEAVE(true);
CATCH
H5TOOLS_ENDDEBUG(" ");
@@ -2246,7 +2246,7 @@ done:
* True otherwise
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *stream, hid_t container)
{
hssize_t snpoints;
@@ -2255,33 +2255,33 @@ render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *strea
unsigned ndims;
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
H5TOOLS_START_DEBUG(" ");
if ((snpoints = H5Sget_select_elem_npoints(region_space)) <= 0)
- H5TOOLS_THROW(FALSE, "H5Sget_select_elem_npoints failed");
+ H5TOOLS_THROW(false, "H5Sget_select_elem_npoints failed");
npoints = (hsize_t)snpoints;
/* Allocate space for the dimension array */
if ((sndims = H5Sget_simple_extent_ndims(region_space)) < 0)
- H5TOOLS_THROW(FALSE, "H5Sget_simple_extent_ndims failed");
+ H5TOOLS_THROW(false, "H5Sget_simple_extent_ndims failed");
ndims = (unsigned)sndims;
if ((dtype = H5Dget_type(region_id)) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Dget_type failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Dget_type failed");
if ((type_id = H5Tget_native_type(dtype, H5T_DIR_DEFAULT)) < 0)
- H5TOOLS_GOTO_ERROR(FALSE, "H5Tget_native_type failed");
+ H5TOOLS_GOTO_ERROR(false, "H5Tget_native_type failed");
render_bin_output_region_data_points(region_space, region_id, stream, container, ndims, type_id, npoints);
done:
if (type_id > 0 && H5Tclose(type_id) < 0)
- H5TOOLS_ERROR(FALSE, "H5Tclose failed");
+ H5TOOLS_ERROR(false, "H5Tclose failed");
if (dtype > 0 && H5Tclose(dtype) < 0)
- H5TOOLS_ERROR(FALSE, "H5Tclose failed");
+ H5TOOLS_ERROR(false, "H5Tclose failed");
H5_LEAVE(ret_value);
CATCH
@@ -2294,20 +2294,20 @@ done:
*
* Purpose: Determines if memory is initialized to all zero bytes.
*
- * Return: TRUE if all bytes are zero
- * FALSE otherwise
+ * Return: true if all bytes are zero
+ * false otherwise
*-------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
h5tools_is_zero(const void *_mem, size_t size)
{
const unsigned char *mem = (const unsigned char *)_mem;
while (size-- > 0)
if (mem[size])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -2323,15 +2323,15 @@ h5tools_is_zero(const void *_mem, size_t size)
* char *name1: link name of the first object.
* Use "." or NULL if loc_id2 is the object to be compared.
*
- * Return: TRUE if it is the same object
- * FALSE otherwise.
+ * Return: true if it is the same object
+ * false otherwise.
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2)
{
H5O_info2_t oinfo1, oinfo2;
- hbool_t ret_val = FALSE;
+ bool ret_val = false;
if (name1 && HDstrcmp(name1, ".") != 0)
H5Oget_info_by_name3(loc_id1, name1, &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
@@ -2349,7 +2349,7 @@ h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char
H5Otoken_cmp(loc_id1, &oinfo1.token, &oinfo2.token, &token_cmp_val);
if (!token_cmp_val)
- ret_val = TRUE;
+ ret_val = true;
}
return ret_val;
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 98ced40..9126500 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -291,7 +291,7 @@ typedef struct h5tool_format_t {
*
* Numeric data is also subject to the formats for individual elements.
*/
- hbool_t raw;
+ bool raw;
const char *fmt_raw;
const char *fmt_int;
const char *fmt_uint;
@@ -674,17 +674,17 @@ H5TOOLS_DLL int h5tools_set_error_file(const char *fname, int is_bin);
H5TOOLS_DLL hid_t h5tools_get_fapl(hid_t prev_fapl_id, h5tools_vol_info_t *vol_info,
h5tools_vfd_info_t *vfd_info);
H5TOOLS_DLL herr_t h5tools_get_vfd_name(hid_t fid, hid_t fapl_id, char *drivername, size_t drivername_size);
-H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, hbool_t use_specific_driver,
+H5TOOLS_DLL hid_t h5tools_fopen(const char *fname, unsigned flags, hid_t fapl, bool use_specific_driver,
char *drivername, size_t drivername_size);
H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type);
H5TOOLS_DLL hid_t h5tools_get_big_endian_type(hid_t type);
H5TOOLS_DLL htri_t h5tools_detect_vlen(hid_t tid);
H5TOOLS_DLL htri_t h5tools_detect_vlen_str(hid_t tid);
-H5TOOLS_DLL hbool_t h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2);
+H5TOOLS_DLL bool h5tools_is_obj_same(hid_t loc_id1, const char *name1, hid_t loc_id2, const char *name2);
H5TOOLS_DLL void init_acc_pos(unsigned ndims, const hsize_t *dims, hsize_t *acc, hsize_t *pos,
hsize_t *p_min_idx);
H5TOOLS_DLL hsize_t calc_acc_pos(unsigned ndims, hsize_t elemtno, const hsize_t *acc, hsize_t *pos);
-H5TOOLS_DLL hbool_t h5tools_is_zero(const void *_mem, size_t size);
+H5TOOLS_DLL bool h5tools_is_zero(const void *_mem, size_t size);
H5TOOLS_DLL int h5tools_canreadf(const char *name, hid_t dcpl_id);
H5TOOLS_DLL int h5tools_can_encode(H5Z_filter_t filtn);
@@ -694,25 +694,25 @@ H5TOOLS_DLL void h5tools_region_simple_prefix(FILE *stream, const h5tool_format_
h5tools_context_t *ctx, hsize_t elmtno, hsize_t *ptdata,
int secnum);
-H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts);
-H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t container,
- unsigned ndims, hid_t type_id, hsize_t nblocks,
- const hsize_t *ptdata);
-H5TOOLS_DLL hbool_t render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream,
- hid_t container);
-H5TOOLS_DLL int render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
- hid_t container, unsigned ndims, hid_t type_id,
- hsize_t npoints);
-H5TOOLS_DLL hbool_t render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *stream,
- hid_t container);
-
-H5TOOLS_DLL hbool_t h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
- h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols,
- hsize_t local_elmt_counter, hsize_t elmt_counter);
-H5TOOLS_DLL hbool_t h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx, h5tools_str_t *buffer,
- hsize_t *curr_pos, size_t ncols, hsize_t *ptdata,
- hsize_t local_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL int render_bin_output(FILE *stream, hid_t container, hid_t tid, void *_mem, hsize_t nelmts);
+H5TOOLS_DLL int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t container,
+ unsigned ndims, hid_t type_id, hsize_t nblocks,
+ const hsize_t *ptdata);
+H5TOOLS_DLL bool render_bin_output_region_blocks(hid_t region_space, hid_t region_id, FILE *stream,
+ hid_t container);
+H5TOOLS_DLL int render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
+ hid_t container, unsigned ndims, hid_t type_id,
+ hsize_t npoints);
+H5TOOLS_DLL bool render_bin_output_region_points(hid_t region_space, hid_t region_id, FILE *stream,
+ hid_t container);
+
+H5TOOLS_DLL bool h5tools_render_element(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
+ h5tools_str_t *buffer, hsize_t *curr_pos, size_t ncols,
+ hsize_t local_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL bool h5tools_render_region_element(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t *ptdata,
+ hsize_t local_elmt_counter, hsize_t elmt_counter);
#ifdef __cplusplus
}
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 2986de7..7c221f5 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -248,7 +248,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont
unsigned char *mem = (unsigned char *)_mem;
hsize_t i; /* element counter */
size_t size; /* size of each datum */
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
size_t ncols = 80; /* available output width */
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
@@ -299,7 +299,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont
dimension_break =
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, ncols, i, elmt_counter);
/* Render the data element end*/
- if (FALSE == dimension_break)
+ if (false == dimension_break)
elmt_counter = 0;
} /* end for (i = 0; i < nelmts... */
H5TOOLS_DEBUG("data render finish");
@@ -334,7 +334,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, h5tools_cont
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx, /* in,out */
h5tools_str_t *buffer, /* string into which to render */
@@ -342,13 +342,13 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
size_t ncols, hsize_t region_elmt_counter, /* element counter */
hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hid_t atype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
hid_t region_space = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
assert(info);
assert(ctx);
@@ -379,16 +379,16 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
H5TOOLS_GOTO_ERROR(dimension_break, "H5Tget_native_type failed");
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the datatype element begin */
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s %s ", h5tools_dump_header_format->datatypebegin,
h5tools_dump_header_format->datatypeblockbegin);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
ctx->indent_level++;
- h5tools_print_datatype(stream, buffer, info, ctx, atype, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, atype, true);
ctx->indent_level--;
if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
@@ -403,7 +403,7 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the datatype element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataspace element begin */
h5tools_str_reset(buffer);
@@ -424,9 +424,9 @@ h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format
/* Render the dataspace element end */
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
- h5tools_dump_data(stream, &outputformat, ctx, region_id, FALSE);
+ h5tools_dump_data(stream, &outputformat, ctx, region_id, false);
}
done:
@@ -440,7 +440,7 @@ done:
H5TOOLS_ERROR(dimension_break, "H5Sclose failed");
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region } element begin */
h5tools_str_reset(buffer);
@@ -482,7 +482,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
size_t ncols, unsigned ndims, hid_t type_id, hsize_t nblocks,
hsize_t *ptdata)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hsize_t *dims1 = NULL;
hsize_t *start = NULL;
hsize_t *count = NULL;
@@ -495,7 +495,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
hsize_t numindex;
unsigned indx;
unsigned jndx;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
size_t type_size;
hid_t mem_space = H5I_INVALID_HID;
hid_t sid1 = H5I_INVALID_HID;
@@ -551,7 +551,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
ctx.prev_multiline = cur_ctx->prev_multiline;
ctx.ndims = ndims;
for (blkndx = 0; blkndx < nblocks; blkndx++) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
ctx.cur_elmt = 0;
for (indx = 0; indx < ndims; indx++) {
start[indx] = ptdata[indx + blkndx * ndims * 2];
@@ -600,7 +600,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
ncols, ptdata, numindex, elmtno);
/* Render the region data element end */
- if (FALSE == dimension_break)
+ if (false == dimension_break)
elmtno = 0;
} /* end for (numindex = 0; numindex < numelem; numindex++, elmtno++, ctx.cur_elmt++) */
}
@@ -658,7 +658,7 @@ done:
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *stream,
const h5tool_format_t *info, h5tools_context_t *ctx, /* in,out */
h5tools_str_t *buffer, /* string into which to render */
@@ -666,7 +666,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
size_t ncols, hsize_t region_elmt_counter, /* element counter */
hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hssize_t snblocks;
hsize_t nblocks;
hsize_t alloc_size;
@@ -677,8 +677,8 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
assert(info);
assert(ctx);
@@ -711,7 +711,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
/* Render the region { element end */
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region datatype info and indices element begin */
h5tools_str_reset(buffer);
@@ -749,7 +749,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region datatype info and indices element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if ((dtype = H5Dget_type(region_id)) < 0)
H5TOOLS_GOTO_ERROR(dimension_break, "H5Dget_type failed");
@@ -762,7 +762,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
h5tools_dump_header_format->datatypeblockbegin);
ctx->indent_level++;
- h5tools_print_datatype(stream, buffer, info, ctx, dtype, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, dtype, true);
ctx->indent_level--;
if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
@@ -777,7 +777,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the datatype element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataspace element begin */
h5tools_str_reset(buffer);
@@ -798,7 +798,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
/* Render the dataspace element end */
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the databegin element begin */
h5tools_str_reset(buffer);
@@ -808,7 +808,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
region_elmt_counter, elmt_counter);
/* Render the databegin element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_print_region_data_blocks(region_id, rawdatastream, info, ctx, buffer, ncols, ndims, type_id,
nblocks, ptdata);
@@ -824,7 +824,7 @@ done:
H5TOOLS_ERROR(dimension_break, "H5Tclose failed");
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataend element begin */
h5tools_str_reset(buffer);
@@ -842,7 +842,7 @@ done:
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region } element begin */
h5tools_str_reset(buffer);
@@ -884,7 +884,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
h5tools_str_t *buffer, size_t ncols, unsigned ndims, hid_t type_id,
hsize_t npoints, hsize_t *ptdata)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hsize_t *dims1 = NULL;
hsize_t elmtno; /* element index */
hsize_t curr_pos = 0;
@@ -896,7 +896,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
hid_t mem_space = H5I_INVALID_HID;
void *region_buf = NULL;
h5tools_context_t ctx;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
int ret_value = 0;
assert(info);
@@ -936,7 +936,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
H5TOOLS_DEBUG("data render start:%ld", npoints);
elmtno = 0;
for (jndx = 0; jndx < npoints; jndx++, elmtno++) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
ctx.cur_elmt = 0; /* points are always 0 */
ctx.indent_level++;
@@ -974,7 +974,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
dimension_break = h5tools_render_region_element(stream, info, &ctx, buffer, &curr_pos, ncols,
ptdata, (hsize_t)0, elmtno);
/* Render the point element end */
- if (FALSE == dimension_break)
+ if (false == dimension_break)
elmtno = 0;
}
else {
@@ -1019,13 +1019,13 @@ done:
* hsize_t elmt_count is the data element loop counter
*-------------------------------------------------------------------------
*/
-hbool_t
+bool
h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
const h5tool_format_t *info, h5tools_context_t *ctx, h5tools_str_t *buffer,
hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
hsize_t elmt_counter)
{
- hbool_t dimension_break = TRUE;
+ bool dimension_break = true;
hssize_t snpoints;
hsize_t npoints;
hsize_t alloc_size;
@@ -1036,8 +1036,8 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
hid_t dtype = H5I_INVALID_HID;
hid_t type_id = H5I_INVALID_HID;
h5tool_format_t outputformat; /* Use to disable prefix for DATA attribute display */
- hbool_t past_catch = FALSE;
- hbool_t ret_value = TRUE;
+ bool past_catch = false;
+ bool ret_value = true;
assert(info);
assert(ctx);
@@ -1070,7 +1070,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
/* Render the region { element end */
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region datatype info and indices element begin */
h5tools_str_reset(buffer);
@@ -1103,7 +1103,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the region datatype info and indices element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if ((dtype = H5Dget_type(region_id)) < 0)
H5TOOLS_GOTO_ERROR(dimension_break, "H5Dget_type failed");
@@ -1116,7 +1116,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
h5tools_dump_header_format->datatypeblockbegin);
ctx->indent_level++;
- h5tools_print_datatype(stream, buffer, info, ctx, dtype, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, dtype, true);
ctx->indent_level--;
if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
@@ -1131,7 +1131,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols, region_elmt_counter, elmt_counter);
/* Render the datatype element end */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataspace element begin */
h5tools_str_reset(buffer);
@@ -1152,7 +1152,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
/* Render the dataspace element end */
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the databegin element begin */
h5tools_str_reset(buffer);
@@ -1163,7 +1163,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
dimension_break = h5tools_render_element(stream, info, ctx, buffer, curr_pos, ncols,
region_elmt_counter, elmt_counter);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_print_region_data_points(region_space, region_id, rawdatastream, info, ctx, buffer, ncols,
ndims, type_id, npoints, ptdata);
@@ -1179,7 +1179,7 @@ done:
H5TOOLS_ERROR(dimension_break, "H5Tclose failed");
if (region_output) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the dataend element begin */
h5tools_str_reset(buffer);
@@ -1197,7 +1197,7 @@ done:
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
/* Render the region } element begin */
h5tools_str_reset(buffer);
@@ -1271,7 +1271,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
hid_t sm_space = H5I_INVALID_HID; /* stripmine data space */
hsize_t size_row_block; /* size for blocks along rows */
hsize_t row_counter = 0;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
herr_t ret_value = SUCCEED;
@@ -1283,8 +1283,8 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
size_row_block = ctx->sset->block.data[row_dim];
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen(p_type) == TRUE)
- vl_data = TRUE;
+ if (h5tools_detect_vlen(p_type) == true)
+ vl_data = true;
/* display loop */
for (; hyperslab_count > 0; temp_start[row_dim] += temp_stride[row_dim], hyperslab_count--) {
@@ -1364,7 +1364,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
}
ctx->sm_pos += low[ctx->ndims - 1];
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
if (h5tools_dump_simple_data(stream, info, ctx, dset, flags, sm_nelmts, p_type, sm_buf) < 0)
H5TOOLS_THROW(FAIL, "h5tools_dump_simple_data failed");
@@ -1566,7 +1566,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co
int sndims;
hid_t f_space = H5I_INVALID_HID; /* file data space */
hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
herr_t ret_value = SUCCEED;
H5TOOLS_START_DEBUG(" ");
@@ -1624,7 +1624,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
hsize_t zero[8]; /* vector of zeros */
unsigned int flags; /* buffer extent flags */
hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
/* Print info */
size_t p_type_nbytes; /* size of memory type */
@@ -1679,8 +1679,8 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
}
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen(p_type) == TRUE)
- vl_data = TRUE;
+ if (h5tools_detect_vlen(p_type) == true)
+ vl_data = true;
/*
* Determine the strip mine size and allocate a buffer. The strip mine is
@@ -1805,7 +1805,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
unsigned i; /* counters */
hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/
hsize_t p_nelmts; /* total selected elmts */
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
unsigned char *buf = NULL; /* buffer for raw data */
int ret_value = 0;
@@ -1844,8 +1844,8 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
H5_LEAVE(SUCCEED); /* nothing to print */
/* Check if we have VL data in the dataset's datatype */
- if (h5tools_detect_vlen(p_type) == TRUE)
- vl_data = TRUE;
+ if (h5tools_detect_vlen(p_type) == true)
+ vl_data = true;
alloc_size = p_nelmts * H5Tget_size(p_type);
assert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/
@@ -2062,8 +2062,8 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
H5T_order_t order;
H5T_class_t type_class;
H5T_sign_t sign; /* sign scheme value */
- htri_t is_vlstr = FALSE;
- hbool_t past_catch = FALSE;
+ htri_t is_vlstr = false;
+ bool past_catch = false;
const char *sign_s = NULL; /* sign scheme string */
const char *order_s = NULL; /* byte order string */
int ret_value = 0;
@@ -2102,57 +2102,57 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
switch (type_class) {
case H5T_INTEGER:
- if (H5Tequal(type, H5T_STD_I8BE) == TRUE)
+ if (H5Tequal(type, H5T_STD_I8BE) == true)
h5tools_str_append(buffer, "H5T_STD_I8BE");
- else if (H5Tequal(type, H5T_STD_I8LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I8LE) == true)
h5tools_str_append(buffer, "H5T_STD_I8LE");
- else if (H5Tequal(type, H5T_STD_I16BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I16BE) == true)
h5tools_str_append(buffer, "H5T_STD_I16BE");
- else if (H5Tequal(type, H5T_STD_I16LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I16LE) == true)
h5tools_str_append(buffer, "H5T_STD_I16LE");
- else if (H5Tequal(type, H5T_STD_I32BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I32BE) == true)
h5tools_str_append(buffer, "H5T_STD_I32BE");
- else if (H5Tequal(type, H5T_STD_I32LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I32LE) == true)
h5tools_str_append(buffer, "H5T_STD_I32LE");
- else if (H5Tequal(type, H5T_STD_I64BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I64BE) == true)
h5tools_str_append(buffer, "H5T_STD_I64BE");
- else if (H5Tequal(type, H5T_STD_I64LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_I64LE) == true)
h5tools_str_append(buffer, "H5T_STD_I64LE");
- else if (H5Tequal(type, H5T_STD_U8BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U8BE) == true)
h5tools_str_append(buffer, "H5T_STD_U8BE");
- else if (H5Tequal(type, H5T_STD_U8LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U8LE) == true)
h5tools_str_append(buffer, "H5T_STD_U8LE");
- else if (H5Tequal(type, H5T_STD_U16BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U16BE) == true)
h5tools_str_append(buffer, "H5T_STD_U16BE");
- else if (H5Tequal(type, H5T_STD_U16LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U16LE) == true)
h5tools_str_append(buffer, "H5T_STD_U16LE");
- else if (H5Tequal(type, H5T_STD_U32BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U32BE) == true)
h5tools_str_append(buffer, "H5T_STD_U32BE");
- else if (H5Tequal(type, H5T_STD_U32LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U32LE) == true)
h5tools_str_append(buffer, "H5T_STD_U32LE");
- else if (H5Tequal(type, H5T_STD_U64BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U64BE) == true)
h5tools_str_append(buffer, "H5T_STD_U64BE");
- else if (H5Tequal(type, H5T_STD_U64LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_U64LE) == true)
h5tools_str_append(buffer, "H5T_STD_U64LE");
- else if (H5Tequal(type, H5T_NATIVE_SCHAR) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_SCHAR) == true)
h5tools_str_append(buffer, "H5T_NATIVE_SCHAR");
- else if (H5Tequal(type, H5T_NATIVE_UCHAR) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_UCHAR) == true)
h5tools_str_append(buffer, "H5T_NATIVE_UCHAR");
- else if (H5Tequal(type, H5T_NATIVE_SHORT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_SHORT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_SHORT");
- else if (H5Tequal(type, H5T_NATIVE_USHORT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_USHORT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_USHORT");
- else if (H5Tequal(type, H5T_NATIVE_INT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_INT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_INT");
- else if (H5Tequal(type, H5T_NATIVE_UINT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_UINT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_UINT");
- else if (H5Tequal(type, H5T_NATIVE_LONG) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_LONG) == true)
h5tools_str_append(buffer, "H5T_NATIVE_LONG");
- else if (H5Tequal(type, H5T_NATIVE_ULONG) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_ULONG) == true)
h5tools_str_append(buffer, "H5T_NATIVE_ULONG");
- else if (H5Tequal(type, H5T_NATIVE_LLONG) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_LLONG) == true)
h5tools_str_append(buffer, "H5T_NATIVE_LLONG");
- else if (H5Tequal(type, H5T_NATIVE_ULLONG) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_ULLONG) == true)
h5tools_str_append(buffer, "H5T_NATIVE_ULLONG");
else {
@@ -2190,21 +2190,21 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
break;
case H5T_FLOAT:
- if (H5Tequal(type, H5T_IEEE_F32BE) == TRUE)
+ if (H5Tequal(type, H5T_IEEE_F32BE) == true)
h5tools_str_append(buffer, "H5T_IEEE_F32BE");
- else if (H5Tequal(type, H5T_IEEE_F32LE) == TRUE)
+ else if (H5Tequal(type, H5T_IEEE_F32LE) == true)
h5tools_str_append(buffer, "H5T_IEEE_F32LE");
- else if (H5Tequal(type, H5T_IEEE_F64BE) == TRUE)
+ else if (H5Tequal(type, H5T_IEEE_F64BE) == true)
h5tools_str_append(buffer, "H5T_IEEE_F64BE");
- else if (H5Tequal(type, H5T_IEEE_F64LE) == TRUE)
+ else if (H5Tequal(type, H5T_IEEE_F64LE) == true)
h5tools_str_append(buffer, "H5T_IEEE_F64LE");
- else if (H5Tequal(type, H5T_VAX_F32) == TRUE)
+ else if (H5Tequal(type, H5T_VAX_F32) == true)
h5tools_str_append(buffer, "H5T_VAX_F32");
- else if (H5Tequal(type, H5T_VAX_F64) == TRUE)
+ else if (H5Tequal(type, H5T_VAX_F64) == true)
h5tools_str_append(buffer, "H5T_VAX_F64");
- else if (H5Tequal(type, H5T_NATIVE_FLOAT) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_FLOAT) == true)
h5tools_str_append(buffer, "H5T_NATIVE_FLOAT");
- else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE)
+ else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == true)
h5tools_str_append(buffer, "H5T_NATIVE_DOUBLE");
else {
/* print what the library knows */
@@ -2250,7 +2250,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
@@ -2261,7 +2261,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
@@ -2301,7 +2301,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
@@ -2340,7 +2340,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
@@ -2415,7 +2415,7 @@ found_string_type:
(hsize_t)0);
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
if (H5Tclose(str_type) < 0)
@@ -2427,21 +2427,21 @@ found_string_type:
break;
case H5T_BITFIELD:
- if (H5Tequal(type, H5T_STD_B8BE) == TRUE)
+ if (H5Tequal(type, H5T_STD_B8BE) == true)
h5tools_str_append(buffer, "H5T_STD_B8BE");
- else if (H5Tequal(type, H5T_STD_B8LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B8LE) == true)
h5tools_str_append(buffer, "H5T_STD_B8LE");
- else if (H5Tequal(type, H5T_STD_B16BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B16BE) == true)
h5tools_str_append(buffer, "H5T_STD_B16BE");
- else if (H5Tequal(type, H5T_STD_B16LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B16LE) == true)
h5tools_str_append(buffer, "H5T_STD_B16LE");
- else if (H5Tequal(type, H5T_STD_B32BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B32BE) == true)
h5tools_str_append(buffer, "H5T_STD_B32BE");
- else if (H5Tequal(type, H5T_STD_B32LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B32LE) == true)
h5tools_str_append(buffer, "H5T_STD_B32LE");
- else if (H5Tequal(type, H5T_STD_B64BE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B64BE) == true)
h5tools_str_append(buffer, "H5T_STD_B64BE");
- else if (H5Tequal(type, H5T_STD_B64LE) == TRUE)
+ else if (H5Tequal(type, H5T_STD_B64LE) == true)
h5tools_str_append(buffer, "H5T_STD_B64LE");
else
h5tools_str_append(buffer, "undefined bitfield");
@@ -2458,7 +2458,7 @@ found_string_type:
if (NULL == (ttag = H5Tget_tag(type)))
H5TOOLS_THROW((-1), "H5Tget_tag failed");
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "OPAQUE_TAG \"%s\";", ttag);
@@ -2468,7 +2468,7 @@ found_string_type:
H5free_memory(ttag);
if ((size = H5Tget_size(type)) <= 0) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "OPAQUE_SIZE \"%zu\";", size);
@@ -2478,7 +2478,7 @@ found_string_type:
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->opaqblockend);
@@ -2497,10 +2497,10 @@ found_string_type:
for (i = 0; i < nmembers; i++) {
mname = H5Tget_member_name(type, i);
if ((mtype = H5Tget_member_type(type, i)) >= 0) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
- h5tools_print_datatype(stream, buffer, info, ctx, mtype, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, mtype, true);
h5tools_str_append(buffer, " \"%s\";", mname);
h5tools_render_element(stream, info, ctx, buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
@@ -2514,7 +2514,7 @@ found_string_type:
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->cmpdblockend);
@@ -2522,13 +2522,13 @@ found_string_type:
case H5T_REFERENCE:
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->refblockbegin);
- if (H5Tequal(type, H5T_STD_REF_DSETREG) == TRUE) {
+ if (H5Tequal(type, H5T_STD_REF_DSETREG) == true) {
h5tools_str_append(buffer, "H5T_STD_REF_DSETREG");
}
- else if (H5Tequal(type, H5T_STD_REF_OBJ) == TRUE) {
+ else if (H5Tequal(type, H5T_STD_REF_OBJ) == true) {
h5tools_str_append(buffer, "H5T_STD_REF_OBJECT");
}
- else if (H5Tequal(type, H5T_STD_REF) == TRUE) {
+ else if (H5Tequal(type, H5T_STD_REF) == true) {
h5tools_str_append(buffer, "H5T_STD_REF");
}
else {
@@ -2546,10 +2546,10 @@ found_string_type:
(hsize_t)0);
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
- h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, super, true);
if (H5Tclose(super) < 0)
H5TOOLS_ERROR((-1), "H5Tclose failed");
@@ -2562,7 +2562,7 @@ found_string_type:
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->enumblockend);
@@ -2575,7 +2575,7 @@ found_string_type:
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->vlenblockbegin);
- h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, super, true);
if (H5Tclose(super) < 0)
H5TOOLS_ERROR((-1), "H5Tclose failed");
@@ -2607,7 +2607,7 @@ found_string_type:
/* Get array base type */
if ((super = H5Tget_super(type)) >= 0) {
/* Print base type */
- h5tools_print_datatype(stream, buffer, info, ctx, super, TRUE);
+ h5tools_print_datatype(stream, buffer, info, ctx, super, true);
/* Close array base type */
if (H5Tclose(super) < 0)
H5TOOLS_ERROR((-1), "H5Tclose failed");
@@ -2649,7 +2649,7 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space)
hsize_t maxsize[H5TOOLS_DUMP_MAX_RANK];
int ndims = -1;
H5S_class_t space_type = -1;
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
int i;
int ret_value = 0;
@@ -2738,7 +2738,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
size_t dst_size; /*destination value type size */
size_t ncols = 80; /*available output width */
hsize_t curr_pos = 0; /* total data element position */
- hbool_t past_catch = FALSE;
+ bool past_catch = false;
int ret_value = 0;
H5TOOLS_START_DEBUG(" ");
@@ -2802,7 +2802,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
for (i = 0; i < nmembs; i++) {
int nchars; /*number of output characters */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_simple_prefix(stream, info, ctx, (hsize_t)0, 0);
h5tools_str_reset(buffer);
@@ -2885,12 +2885,12 @@ h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info, h5tools_context
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->datatypebegin,
h5tools_dump_header_format->datatypeblockbegin);
- h5tools_print_datatype(stream, &buffer, info, ctx, type, TRUE);
+ h5tools_print_datatype(stream, &buffer, info, ctx, type, true);
if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datatypeblockend);
if (HDstrlen(h5tools_dump_header_format->datatypeend))
@@ -2931,7 +2931,7 @@ h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info, h5tools_contex
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s ", h5tools_dump_header_format->dataspacebegin);
@@ -2978,7 +2978,7 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s %" PRId64 " %s", OBJID, BEGIN, oid, END);
@@ -3004,7 +3004,7 @@ h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_
{
switch (H5Sget_select_type(vspace)) {
case H5S_SEL_NONE: /* Nothing selected */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", VDS_NONE);
@@ -3017,7 +3017,7 @@ h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_
h5tools_str_append(buffer, " %s", h5tools_dump_header_format->virtualselectionblockend);
break;
case H5S_SEL_HYPERSLABS: /* "New-style" hyperslab selection defined */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
if (H5Sis_regular_hyperslab(vspace)) {
@@ -3035,7 +3035,7 @@ h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_
h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_simple_prefix(stream, info, ctx, *curr_pos, 0);
h5tools_str_reset(buffer);
@@ -3044,13 +3044,13 @@ h5tools_print_virtual_selection(hid_t vspace, FILE *stream, const h5tool_format_
}
h5tools_render_element(stream, info, ctx, buffer, curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", h5tools_dump_header_format->virtualselectionblockend);
break;
case H5S_SEL_ALL: /* Entire extent selected */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(buffer);
h5tools_str_append(buffer, "%s", VDS_ALL);
@@ -3082,7 +3082,7 @@ h5tools_print_fill_value(h5tools_str_t *buffer /*in,out*/, const h5tool_format_t
n_type = H5Tget_native_type(type_id, H5T_DIR_DEFAULT);
- if (h5tools_detect_vlen(type_id) == TRUE)
+ if (h5tools_detect_vlen(type_id) == true)
vl_data = true;
size = H5Tget_size(n_type);
@@ -3160,7 +3160,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
* STORAGE_LAYOUT
*-------------------------------------------------------------------------
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN);
@@ -3172,7 +3172,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
switch (stl) {
case H5D_CHUNKED:
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s ", CHUNKED);
@@ -3186,7 +3186,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
@@ -3241,14 +3241,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
break;
case H5D_COMPACT:
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", COMPACT);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "SIZE %" PRIuHSIZE, storage_size);
@@ -3266,14 +3266,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
/* EXTERNAL FILE */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", CONTIGUOUS);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN);
@@ -3284,7 +3284,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
for (j = 0; j < (unsigned)n_external; j++) {
H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "FILENAME %s SIZE %" PRIuHSIZE, name, size);
@@ -3298,7 +3298,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3311,14 +3311,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
/* NORMAL FILE */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", CONTIGUOUS);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "SIZE %" PRIuHSIZE, storage_size);
@@ -3332,7 +3332,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (supported & H5VL_OPT_QUERY_SUPPORTED) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
ioffset = H5Dget_offset(dset_id);
@@ -3362,7 +3362,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
hid_t virtual_vspace = H5Pget_virtual_vspace(dcpl_id, curr_vmap);
hid_t virtual_srcspace = H5Pget_virtual_srcspace(dcpl_id, curr_vmap);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %zu %s ", VDS_MAPPING, curr_vmap, BEGIN);
@@ -3371,7 +3371,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", VDS_VIRTUAL, BEGIN);
@@ -3385,14 +3385,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", VDS_SOURCE, BEGIN);
@@ -3410,7 +3410,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
assert((size_t)ssize_out < sizeof(name));
H5Pget_virtual_dsetname(dcpl_id, curr_vmap, dsetname, sizeof(dsetname));
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", VDS_SRC_FILE,
@@ -3420,7 +3420,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0,
(hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", VDS_SRC_DATASET,
@@ -3435,7 +3435,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3444,7 +3444,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3464,7 +3464,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0);
} /*switch*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3475,7 +3475,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
*-------------------------------------------------------------------------
*/
if (H5D_VIRTUAL != stl) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", FILTERS, BEGIN);
@@ -3492,7 +3492,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (filtn < 0)
continue; /* nothing to print for invalid filter */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
switch (filtn) {
@@ -3522,14 +3522,14 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
if (szip_options_mask & H5_SZIP_CHIP_OPTION_MASK)
@@ -3539,7 +3539,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
if (szip_options_mask & H5_SZIP_EC_OPTION_MASK)
@@ -3549,7 +3549,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
if (szip_options_mask & H5_SZIP_LSB_OPTION_MASK)
@@ -3560,7 +3560,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0, (hsize_t)0);
if (szip_options_mask & H5_SZIP_RAW_OPTION_MASK) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "HEADER %s", "RAW");
@@ -3570,7 +3570,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3595,7 +3595,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "FILTER_ID %d", filtn);
@@ -3603,7 +3603,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0, (hsize_t)0);
if (f_name[0] != '\0') {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "COMMENT %s", f_name);
@@ -3611,7 +3611,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0, (hsize_t)0);
}
if (cd_nelmts) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", "PARAMS", BEGIN);
@@ -3623,7 +3623,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3634,7 +3634,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
} /*i*/
} /*nfilters*/
else {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NONE");
@@ -3643,7 +3643,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3654,7 +3654,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
* FILLVALUE
*-------------------------------------------------------------------------
*/
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", FILLVALUE, BEGIN);
@@ -3662,7 +3662,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "FILL_TIME ");
@@ -3687,7 +3687,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
}
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s ", "VALUE ");
@@ -3715,7 +3715,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3726,7 +3726,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
*-------------------------------------------------------------------------
*/
if (H5D_VIRTUAL != stl) {
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "ALLOCATION_TIME %s", BEGIN);
@@ -3734,7 +3734,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
@@ -3761,7 +3761,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s", END);
@@ -3816,7 +3816,7 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_
if (cmt_bufsize > 0) {
comment[cmt_bufsize] = '\0'; /* necessary because null char is not returned */
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "COMMENT \"%s\"", comment);
@@ -3858,7 +3858,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s \"%s\" %s", h5tools_dump_header_format->attributebegin, attr_name,
@@ -3884,7 +3884,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_dump_oid(stream, info, ctx, attr_id);
if (data_output || attr_data_output)
- h5tools_dump_data(stream, info, ctx, attr_id, FALSE);
+ h5tools_dump_data(stream, info, ctx, attr_id, false);
ctx->indent_level--;
@@ -3893,7 +3893,7 @@ h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info, h5tools_contex
H5Aclose(attr_id);
}
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
@@ -3946,25 +3946,25 @@ h5tools_print_packed_bits(h5tools_str_t *buffer, hid_t type)
hid_t n_type = H5Tget_native_type(type, H5T_DIR_DEFAULT);
if (H5Tget_class(n_type) == H5T_INTEGER) {
- if (H5Tequal(n_type, H5T_NATIVE_SCHAR) == TRUE)
+ if (H5Tequal(n_type, H5T_NATIVE_SCHAR) == true)
packed_bits_size = 8 * sizeof(char);
- else if (H5Tequal(n_type, H5T_NATIVE_UCHAR) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_UCHAR) == true)
packed_bits_size = 8 * sizeof(unsigned char);
- else if (H5Tequal(n_type, H5T_NATIVE_SHORT) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_SHORT) == true)
packed_bits_size = 8 * sizeof(short);
- else if (H5Tequal(n_type, H5T_NATIVE_USHORT) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_USHORT) == true)
packed_bits_size = 8 * sizeof(unsigned short);
- else if (H5Tequal(n_type, H5T_NATIVE_INT) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_INT) == true)
packed_bits_size = 8 * sizeof(int);
- else if (H5Tequal(n_type, H5T_NATIVE_UINT) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_UINT) == true)
packed_bits_size = 8 * sizeof(unsigned int);
- else if (H5Tequal(n_type, H5T_NATIVE_LONG) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_LONG) == true)
packed_bits_size = 8 * sizeof(long);
- else if (H5Tequal(n_type, H5T_NATIVE_ULONG) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_ULONG) == true)
packed_bits_size = 8 * sizeof(unsigned long);
- else if (H5Tequal(n_type, H5T_NATIVE_LLONG) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_LLONG) == true)
packed_bits_size = 8 * sizeof(long long);
- else if (H5Tequal(n_type, H5T_NATIVE_ULLONG) == TRUE)
+ else if (H5Tequal(n_type, H5T_NATIVE_ULLONG) == true)
packed_bits_size = 8 * sizeof(unsigned long long);
else
error_msg("Packed Bit not valid for this datatype");
@@ -3999,7 +3999,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
if (info->line_ncols > 0)
ncols = info->line_ncols;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->subsettingbegin,
@@ -4008,7 +4008,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
ctx->indent_level++;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->startbegin,
@@ -4018,7 +4018,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
h5tools_dump_header_format->startblockend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->stridebegin,
@@ -4028,7 +4028,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
h5tools_dump_header_format->strideblockend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->countbegin,
@@ -4043,7 +4043,7 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool
h5tools_dump_header_format->countblockend);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s ", h5tools_dump_header_format->blockbegin,
@@ -4088,7 +4088,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
datactx = *ctx; /* print context */
/* Assume entire data space to be printed */
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
memset(&buffer, 0, sizeof(h5tools_str_t));
for (i = 0; i < ndims; i++, datactx.cur_elmt++, elmt_counter++) {
@@ -4097,7 +4097,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
H5TOOLS_DEBUG("reference loop:%d with curr_pos=%ld", i, curr_pos);
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
h5tools_str_reset(&buffer);
H5TOOLS_DEBUG("reference loop - h5tools_str_sprint with H5T_STD_REF:%d", i);
h5tools_str_sprint(&buffer, info, container, H5T_STD_REF, &ref_buf[i], &datactx);
@@ -4113,7 +4113,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
case H5O_TYPE_DATASET:
if ((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
- h5tools_dump_data(stream, info, &datactx, new_obj_id, TRUE);
+ h5tools_dump_data(stream, info, &datactx, new_obj_id, true);
// h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if (H5Dclose(new_obj_id) < 0)
@@ -4139,7 +4139,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
H5TOOLS_DEBUG("ref_type is H5R_DATASET_REGION1");
if ((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
- h5tools_dump_data(stream, info, &datactx, new_obj_id, TRUE);
+ h5tools_dump_data(stream, info, &datactx, new_obj_id, true);
// h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if (H5Dclose(new_obj_id) < 0)
@@ -4158,7 +4158,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
case H5O_TYPE_DATASET:
if ((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
- h5tools_dump_data(stream, info, &datactx, new_obj_id, TRUE);
+ h5tools_dump_data(stream, info, &datactx, new_obj_id, true);
// h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
if (H5Oclose(new_obj_id) < 0)
@@ -4200,14 +4200,14 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
datactx.indent_level++;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
datactx.indent_level--;
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "}");
@@ -4260,14 +4260,14 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
datactx.indent_level++;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "NULL");
h5tools_render_element(stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols,
(hsize_t)0, (hsize_t)0);
datactx.indent_level--;
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "}");
@@ -4297,7 +4297,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
/*-------------------------------------------------------------------------
* Function: dump_data
*
- * Purpose: Dump attribute, obj_data is FALSE, or dataset data, obj_data is TRUE
+ * Purpose: Dump attribute, obj_data is false, or dataset data, obj_data is true
*
* Return: void
*-------------------------------------------------------------------------
@@ -4358,7 +4358,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
ctx->indent_level++;
}
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "%s %s", h5tools_dump_header_format->databegin,
h5tools_dump_header_format->datablockbegin);
@@ -4381,7 +4381,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
H5Sget_simple_extent_dims(space, total_size, NULL);
init_acc_pos(datactx.ndims, total_size, datactx.acc, datactx.pos, datactx.p_min_idx);
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
if (NULL !=
(ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
@@ -4420,18 +4420,18 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
*/
string_dataformat.idx_fmt = "\"";
datactx.indent_level++;
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
h5tools_simple_prefix(stream, &string_dataformat, &datactx, (hsize_t)0, 0);
string_dataformat.line_multi_new = 1;
string_dataformat.str_repeat = 8;
- string_dataformat.ascii = TRUE;
+ string_dataformat.ascii = true;
string_dataformat.elmt_suf1 = "";
string_dataformat.elmt_suf2 = "";
string_dataformat.line_suf = "\"";
}
else {
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
}
/* Print all the values. */
@@ -4453,7 +4453,7 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
if (datactx.display_char && H5Tget_size(f_type) == 1 && H5Tget_class(f_type) == H5T_INTEGER) {
H5TOOLS_DEBUG("Print 1-byte integer data as an ASCII character string eol=%s",
string_dataformat.line_suf);
- datactx.need_prefix = FALSE;
+ datactx.need_prefix = false;
string_dataformat.arr_linebreak = 0;
string_dataformat.idx_fmt = "";
string_dataformat.line_multi_new = 0;
@@ -4474,7 +4474,7 @@ done:
H5Sclose(space);
H5Tclose(f_type);
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_simple_prefix(stream, &outputformat, ctx, (hsize_t)0, 0);
h5tools_str_reset(&buffer);
@@ -4492,7 +4492,7 @@ done:
if (ctx->sset && obj_data) {
ctx->indent_level--;
- ctx->need_prefix = TRUE;
+ ctx->need_prefix = true;
h5tools_simple_prefix(stream, &outputformat, ctx, (hsize_t)0, 0);
h5tools_str_reset(&buffer);
diff --git a/tools/lib/h5tools_dump.h b/tools/lib/h5tools_dump.h
index c8e1992..e57158a 100644
--- a/tools/lib/h5tools_dump.h
+++ b/tools/lib/h5tools_dump.h
@@ -42,40 +42,40 @@ H5TOOLS_DLL int h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5to
H5TOOLS_DLL int h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info,
h5tools_context_t *ctx /*in,out*/, hid_t container, unsigned flags,
hsize_t nelmts, hid_t type, void *_mem);
-H5TOOLS_DLL void h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t type);
-H5TOOLS_DLL void h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t space);
-H5TOOLS_DLL void h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, const char *attr_name,
- hid_t attr_id);
-H5TOOLS_DLL void h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t oid);
-H5TOOLS_DLL void h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t dcpl, hid_t type_id,
- hid_t obj_id);
-H5TOOLS_DLL void h5tools_dump_comment(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, hid_t obj_id);
-H5TOOLS_DLL void h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
- hid_t obj_id, int obj_data);
-H5TOOLS_DLL void h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
- hid_t container, H5R_ref_t *ref_buf, int ndims);
-H5TOOLS_DLL hbool_t h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
- hsize_t *curr_pos, size_t ncols,
- hsize_t region_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL void h5tools_dump_datatype(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t type);
+H5TOOLS_DLL void h5tools_dump_dataspace(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t space);
+H5TOOLS_DLL void h5tools_dump_attribute(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, const char *attr_name,
+ hid_t attr_id);
+H5TOOLS_DLL void h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t oid);
+H5TOOLS_DLL void h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t dcpl, hid_t type_id,
+ hid_t obj_id);
+H5TOOLS_DLL void h5tools_dump_comment(FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, hid_t obj_id);
+H5TOOLS_DLL void h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
+ hid_t obj_id, int obj_data);
+H5TOOLS_DLL void h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx,
+ hid_t container, H5R_ref_t *ref_buf, int ndims);
+H5TOOLS_DLL bool h5tools_dump_region_attribute(hid_t region_id, FILE *stream, const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
+ hsize_t elmt_counter);
-H5TOOLS_DLL hbool_t h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
- const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
- hsize_t *curr_pos, size_t ncols,
- hsize_t region_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL bool h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *stream,
+ const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
+ hsize_t elmt_counter);
-H5TOOLS_DLL hbool_t h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *stream,
- const h5tool_format_t *info,
- h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
- hsize_t *curr_pos, size_t ncols,
- hsize_t region_elmt_counter, hsize_t elmt_counter);
+H5TOOLS_DLL bool h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *stream,
+ const h5tool_format_t *info,
+ h5tools_context_t *ctx /*in,out*/, h5tools_str_t *buffer,
+ hsize_t *curr_pos, size_t ncols, hsize_t region_elmt_counter,
+ hsize_t elmt_counter);
H5TOOLS_DLL int h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer /*in,out*/,
const h5tool_format_t *info, h5tools_context_t *ctx /*in,out*/,
diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h
index 8a7414c..e085c72 100644
--- a/tools/lib/h5tools_error.h
+++ b/tools/lib/h5tools_error.h
@@ -213,7 +213,7 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g;
*/
#define CATCH \
catch_except:; \
- past_catch = TRUE;
+ past_catch = true;
/*
* H5_LEAVE macro, used to facilitate control flow in a function. The argument
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c
index d89c546..1f58d95 100644
--- a/tools/lib/h5tools_ref.c
+++ b/tools/lib/h5tools_ref.c
@@ -132,7 +132,7 @@ init_ref_path_table(void)
return (-1);
/* Iterate over objects in this file */
- if (h5trav_visit(thefile, "/", TRUE, TRUE, init_ref_path_cb, NULL, NULL, H5O_INFO_BASIC) < 0) {
+ if (h5trav_visit(thefile, "/", true, true, init_ref_path_cb, NULL, NULL, H5O_INFO_BASIC) < 0) {
error_msg("unable to construct reference path table\n");
h5tools_setstatus(EXIT_FAILURE);
} /* end if */
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index bd75879..507c6ef 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -43,10 +43,10 @@ typedef struct H5LD_memb_t {
/* Variable length string datatype */
#define STR_INIT_LEN 4096 /*initial length */
-static char *h5tools_escape(char *s, size_t size);
-static hbool_t h5tools_str_is_zero(const void *_mem, size_t size);
-static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch);
-void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx);
+static char *h5tools_escape(char *s, size_t size);
+static bool h5tools_str_is_zero(const void *_mem, size_t size);
+static void h5tools_print_char(h5tools_str_t *str, const h5tool_format_t *info, char ch);
+void h5tools_str_indent(h5tools_str_t *str, const h5tool_format_t *info, h5tools_context_t *ctx);
/*-------------------------------------------------------------------------
* Function: h5tools_str_close
@@ -1564,20 +1564,20 @@ h5tools_escape(char *s /*in,out*/, size_t size)
*
* Purpose: Determines if memory is initialized to all zero bytes.
*
- * Return: TRUE if all bytes are zero; FALSE otherwise
+ * Return: true if all bytes are zero; false otherwise
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
h5tools_str_is_zero(const void *_mem, size_t size)
{
const unsigned char *mem = (const unsigned char *)_mem;
while (size-- > 0)
if (mem[size])
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index fc9a646..663d355 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -51,7 +51,7 @@ static void init_table(hid_t fid, table_t **tbl);
#ifdef H5DUMP_DEBUG
static void dump_table(hid_t fid, char *tablename, table_t *table);
#endif /* H5DUMP_DEBUG */
-static void add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, hbool_t recorded);
+static void add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, bool recorded);
/*-------------------------------------------------------------------------
* Function: parallel_print
@@ -660,7 +660,7 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
switch (oinfo->type) {
case H5O_TYPE_GROUP:
if (NULL == already_seen)
- add_obj(info->group_table, &oinfo->token, name, TRUE);
+ add_obj(info->group_table, &oinfo->token, name, true);
break;
case H5O_TYPE_DATASET:
@@ -668,7 +668,7 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
hid_t dset = H5I_INVALID_HID;
/* Add the dataset to the list of objects */
- add_obj(info->dset_table, &oinfo->token, name, TRUE);
+ add_obj(info->dset_table, &oinfo->token, name, true);
/* Check for a dataset that uses a named datatype */
if ((dset = H5Dopen2(info->fid, name, H5P_DEFAULT)) >= 0) {
@@ -679,7 +679,7 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
H5Oget_info3(type, &type_oinfo, H5O_INFO_BASIC);
if (search_obj(info->type_table, &type_oinfo.token) == NULL)
- add_obj(info->type_table, &type_oinfo.token, name, FALSE);
+ add_obj(info->type_table, &type_oinfo.token, name, false);
} /* end if */
H5Tclose(type);
@@ -695,14 +695,14 @@ find_objs_cb(const char *name, const H5O_info2_t *oinfo, const char *already_see
obj_t *found_obj;
if ((found_obj = search_obj(info->type_table, &oinfo->token)) == NULL)
- add_obj(info->type_table, &oinfo->token, name, TRUE);
+ add_obj(info->type_table, &oinfo->token, name, true);
else {
/* Use latest version of name */
free(found_obj->objname);
found_obj->objname = HDstrdup(name);
/* Mark named datatype as having valid name */
- found_obj->recorded = TRUE;
+ found_obj->recorded = true;
} /* end else */
} /* end if */
break;
@@ -744,7 +744,7 @@ init_objs(hid_t fid, find_objs_t *info, table_t **group_table, table_t **dset_ta
info->dset_table = *dset_table;
/* Find all shared objects */
- if ((ret_value = h5trav_visit(fid, "/", TRUE, TRUE, find_objs_cb, NULL, info, H5O_INFO_BASIC)) < 0)
+ if ((ret_value = h5trav_visit(fid, "/", true, true, find_objs_cb, NULL, info, H5O_INFO_BASIC)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "finding shared objects failed");
done:
@@ -770,7 +770,7 @@ done:
*-------------------------------------------------------------------------
*/
static void
-add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, hbool_t record)
+add_obj(table_t *table, const H5O_token_t *obj_token, const char *objname, bool record)
{
size_t u;
@@ -831,7 +831,7 @@ tmpfile(void)
*-------------------------------------------------------------------------*/
int
H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t *link_info,
- hbool_t get_obj_type)
+ bool get_obj_type)
{
htri_t l_ret;
H5O_info2_t trg_oinfo;
@@ -905,7 +905,7 @@ H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t
l_ret = H5Oexists_by_name(file_id, linkpath, lapl);
/* detect dangling link */
- if (l_ret == FALSE) {
+ if (l_ret == false) {
H5TOOLS_GOTO_DONE(0);
}
else if (l_ret < 0) { /* function failed */
@@ -1146,7 +1146,7 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_ext_t *fa, const char **values)
printf(" preset fapl with default values\n");
}
fa->fa.version = H5FD_CURR_ROS3_FAPL_T_VERSION;
- fa->fa.authenticate = FALSE;
+ fa->fa.authenticate = false;
*(fa->fa.aws_region) = '\0';
*(fa->fa.secret_id) = '\0';
*(fa->fa.secret_key) = '\0';
@@ -1236,7 +1236,7 @@ h5tools_populate_ros3_fapl(H5FD_ros3_fapl_ext_t *fa, const char **values)
printf(" token set\n");
}
- fa->fa.authenticate = TRUE;
+ fa->fa.authenticate = true;
if (show_progress) {
printf(" set to authenticate\n");
}
diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h
index 2efa53f..ce5a24a 100644
--- a/tools/lib/h5tools_utils.h
+++ b/tools/lib/h5tools_utils.h
@@ -41,8 +41,8 @@ H5TOOLS_DLLVAR hsize_t H5TOOLS_BUFSIZE;
typedef struct obj_t {
H5O_token_t obj_token;
char *objname;
- hbool_t displayed; /* Flag to indicate that the object has been displayed */
- hbool_t recorded; /* Flag for named datatypes to indicate they were found in the group hierarchy */
+ bool displayed; /* Flag to indicate that the object has been displayed */
+ bool recorded; /* Flag for named datatypes to indicate they were found in the group hierarchy */
} obj_t;
/*struct for the tables that the find_objs function uses*/
@@ -126,7 +126,7 @@ typedef struct {
/* Definitions of routines */
H5TOOLS_DLL int H5tools_get_symlink_info(hid_t file_id, const char *linkpath, h5tool_link_info_t *link_info,
- hbool_t get_obj_type);
+ bool get_obj_type);
H5TOOLS_DLL const char *h5tools_getprogname(void);
H5TOOLS_DLL void h5tools_setprogname(const char *progname);
H5TOOLS_DLL int h5tools_getstatus(void);
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 5ae379e..438c705 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -38,7 +38,7 @@ typedef struct {
typedef struct {
trav_addr_t *seen; /* List of addresses seen already */
const trav_visitor_t *visitor; /* Information for visiting each link/object */
- hbool_t is_absolute; /* Whether the traversal has absolute paths */
+ bool is_absolute; /* Whether the traversal has absolute paths */
const char *base_grp_name; /* Name of the group that serves as the base
* for iteration */
unsigned fields; /* Fields needed in H5O_info2_t struct */
@@ -134,7 +134,7 @@ trav_token_add(trav_addr_t *visited, H5O_token_t *token, const char *path)
*
* Purpose: Check if an object token has already been seen
*
- * Return: TRUE/FALSE
+ * Return: true/false
*-------------------------------------------------------------------------
*/
H5_ATTR_PURE static const char *
@@ -241,8 +241,8 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info2_t *linfo, void *_uda
*-------------------------------------------------------------------------
*/
static int
-traverse(hid_t file_id, const char *grp_name, hbool_t visit_start, hbool_t recurse,
- const trav_visitor_t *visitor, unsigned fields)
+traverse(hid_t file_id, const char *grp_name, bool visit_start, bool recurse, const trav_visitor_t *visitor,
+ unsigned fields)
{
H5O_info2_t oinfo; /* Object info for starting group */
int ret_value = 0;
@@ -428,7 +428,7 @@ h5trav_getinfo(hid_t file_id, trav_info_t *info)
info_visitor.udata = info;
/* Traverse all objects in the file, visiting each object & link */
- if (traverse(file_id, "/", TRUE, TRUE, &info_visitor, H5O_INFO_BASIC) < 0)
+ if (traverse(file_id, "/", true, true, &info_visitor, H5O_INFO_BASIC) < 0)
H5TOOLS_GOTO_ERROR((-1), "traverse failed");
done:
@@ -486,7 +486,7 @@ trav_info_init(const char *filename, hid_t fileid, trav_info_t **_info)
info->symlink_visited.nused = 0;
info->symlink_visited.nalloc = 0;
info->symlink_visited.objs = NULL;
- info->symlink_visited.dangle_link = FALSE;
+ info->symlink_visited.dangle_link = false;
*_info = info;
} /* end trav_info_init() */
@@ -587,7 +587,7 @@ h5trav_gettable(hid_t fid, trav_table_t *table)
table_visitor.udata = table;
/* Traverse all objects in the file, visiting each object & link */
- if (traverse(fid, "/", TRUE, TRUE, &table_visitor, H5O_INFO_BASIC) < 0)
+ if (traverse(fid, "/", true, true, &table_visitor, H5O_INFO_BASIC) < 0)
H5TOOLS_GOTO_ERROR((-1), "traverse failed");
done:
@@ -1017,7 +1017,7 @@ h5trav_print(hid_t fid)
print_visitor.udata = &print_udata;
/* Traverse all objects in the file, visiting each object & link */
- if (traverse(fid, "/", TRUE, TRUE, &print_visitor, H5O_INFO_BASIC) < 0)
+ if (traverse(fid, "/", true, true, &print_visitor, H5O_INFO_BASIC) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "traverse failed");
done:
@@ -1034,8 +1034,8 @@ done:
*-------------------------------------------------------------------------
*/
int
-h5trav_visit(hid_t fid, const char *grp_name, hbool_t visit_start, hbool_t recurse,
- h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk, void *udata, unsigned fields)
+h5trav_visit(hid_t fid, const char *grp_name, bool visit_start, bool recurse, h5trav_obj_func_t visit_obj,
+ h5trav_lnk_func_t visit_lnk, void *udata, unsigned fields)
{
trav_visitor_t visitor; /* Visitor structure for objects */
int ret_value = 0;
@@ -1108,10 +1108,10 @@ done:
*
* Purpose: Check if an symbolic link has already been visited
*
- * Return: TRUE/FALSE
+ * Return: true/false
*-------------------------------------------------------------------------
*/
-H5_ATTR_PURE hbool_t
+H5_ATTR_PURE bool
symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file, const char *path)
{
size_t u; /* Local index variable */
@@ -1124,12 +1124,12 @@ symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file, c
/* if external link, file need to be matched as well */
if (visited->objs[u].type == H5L_TYPE_EXTERNAL)
if (!HDstrcmp(visited->objs[u].file, file))
- return (TRUE);
+ return (true);
- return (TRUE);
+ return (true);
} /* end if */
} /* end for */
/* Didn't find symlink */
- return (FALSE);
+ return (false);
} /* end symlink_is_visited() */
diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h
index 8f3e175..40ceaae 100644
--- a/tools/lib/h5trav.h
+++ b/tools/lib/h5trav.h
@@ -57,7 +57,7 @@ typedef struct symlink_trav_t {
size_t nalloc;
size_t nused;
symlink_trav_path_t *objs;
- hbool_t dangle_link;
+ bool dangle_link;
} symlink_trav_t;
typedef struct trav_path_t {
@@ -93,7 +93,7 @@ typedef struct trav_link_t {
typedef struct trav_obj_t {
H5O_token_t obj_token; /* object token */
unsigned flags[2]; /* h5diff.object is present or not in both files*/
- hbool_t is_same_trgobj; /* same target object? no need to compare */
+ bool is_same_trgobj; /* same target object? no need to compare */
char *name; /* name */
h5trav_type_t type; /* type of object */
trav_link_t *links; /* array of possible link names */
@@ -126,14 +126,14 @@ extern "C" {
* "h5trav general" public functions
*-------------------------------------------------------------------------
*/
-H5TOOLS_DLL void h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order);
-H5TOOLS_DLL int h5trav_visit(hid_t file_id, const char *grp_name, hbool_t visit_start, hbool_t recurse,
- h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk, void *udata,
- unsigned fields);
-H5TOOLS_DLL herr_t symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file,
+H5TOOLS_DLL void h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order);
+H5TOOLS_DLL int h5trav_visit(hid_t file_id, const char *grp_name, bool visit_start, bool recurse,
+ h5trav_obj_func_t visit_obj, h5trav_lnk_func_t visit_lnk, void *udata,
+ unsigned fields);
+H5TOOLS_DLL herr_t symlink_visit_add(symlink_trav_t *visited, H5L_type_t type, const char *file,
+ const char *path);
+H5TOOLS_DLL bool symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file,
const char *path);
-H5TOOLS_DLL hbool_t symlink_is_visited(symlink_trav_t *visited, H5L_type_t type, const char *file,
- const char *path);
/*-------------------------------------------------------------------------
* "h5trav info" public functions
diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c
index 26f467c..ebbb57b 100644
--- a/tools/libtest/h5tools_test_utils.c
+++ b/tools/libtest/h5tools_test_utils.c
@@ -447,13 +447,13 @@ test_parse_tuple(void)
unsigned elem_i = 0;
char **parsed = NULL;
char *cpy = NULL;
- herr_t success = TRUE;
- hbool_t show_progress = FALSE;
+ herr_t success = true;
+ bool show_progress = false;
TESTING("arbitrary-count tuple parsing");
#if H5TOOLS_UTILS_TEST_DEBUG > 0
- show_progress = TRUE;
+ show_progress = true;
#endif /* H5TOOLS_UTILS_TEST_DEBUG */
/*********
@@ -467,7 +467,7 @@ test_parse_tuple(void)
assert(parsed == NULL);
assert(cpy == NULL);
tc = cases[i];
- if (show_progress == TRUE) {
+ if (show_progress == true) {
printf("testing %d: %s...\n", i, tc.test_msg);
}
@@ -536,9 +536,9 @@ test_populate_ros3_fa(void)
* TEST-LOCAL VARIABLES *
************************/
- hbool_t show_progress = FALSE;
- int bad_version = 0xf87a; /* arbitrarily wrong version number */
-#endif /* H5_HAVE_ROS3_VFD */
+ bool show_progress = false;
+ int bad_version = 0xf87a; /* arbitrarily wrong version number */
+#endif /* H5_HAVE_ROS3_VFD */
TESTING("programmatic ros3 fapl population");
@@ -549,7 +549,7 @@ test_populate_ros3_fa(void)
return 0;
#else
#if H5TOOLS_UTILS_TEST_DEBUG > 0
- show_progress = TRUE;
+ show_progress = true;
#endif /* H5TOOLS_UTILS_TEST_DEBUG */
assert(bad_version != H5FD_CURR_ROS3_FAPL_T_VERSION);
@@ -573,7 +573,7 @@ test_populate_ros3_fa(void)
/* NULL values pointer yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, TRUE, "u", "v", "w"}, "x"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, true, "u", "v", "w"}, "x"};
if (show_progress) {
printf("NULL values pointer\n");
@@ -581,7 +581,7 @@ test_populate_ros3_fa(void)
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, NULL), "NULL values pointer yields \"default\" fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -592,7 +592,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, TRUE, "u", "v", "w"}, "x"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, true, "u", "v", "w"}, "x"};
const char *values[] = {"", "", "", ""};
if (show_progress) {
@@ -601,7 +601,7 @@ test_populate_ros3_fa(void)
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "empty values yields \"default\" fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -612,7 +612,7 @@ test_populate_ros3_fa(void)
* excess value is ignored
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y", "z", "a", "b"};
if (show_progress) {
@@ -621,7 +621,7 @@ test_populate_ros3_fa(void)
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "four values")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(TRUE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(true, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("x", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("y", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("z", fa.fa.secret_key, (char *)NULL)
@@ -632,7 +632,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {NULL, "y", "z", ""};
if (show_progress) {
@@ -641,7 +641,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -652,7 +652,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"", "y", "z", ""};
if (show_progress) {
@@ -661,7 +661,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -672,7 +672,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"somewhere over the rainbow not too high "
"there is another rainbow bounding some darkened sky",
"y", "z", ""};
@@ -685,7 +685,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -696,7 +696,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", NULL, "z", ""};
if (show_progress) {
@@ -705,7 +705,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -716,7 +716,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "", "z", ""};
if (show_progress) {
@@ -725,7 +725,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -736,7 +736,7 @@ test_populate_ros3_fa(void)
* partial set: region
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x",
"Why is it necessary to solve the problem? "
"What benefits will you receive by solving the problem? "
@@ -758,7 +758,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("x", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -769,7 +769,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y", NULL, ""};
if (show_progress) {
@@ -778,7 +778,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -789,7 +789,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y", "z", NULL};
if (show_progress) {
@@ -798,7 +798,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill token")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -809,7 +809,7 @@ test_populate_ros3_fa(void)
* yields authenticating fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y", "", ""};
if (show_progress) {
@@ -818,7 +818,7 @@ test_populate_ros3_fa(void)
JSVERIFY(1, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(TRUE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(true, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("x", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("y", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -829,7 +829,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"", "y", "", ""};
if (show_progress) {
@@ -838,7 +838,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -849,7 +849,7 @@ test_populate_ros3_fa(void)
* yields default fapl
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "", "", ""};
if (show_progress) {
@@ -858,7 +858,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -869,7 +869,7 @@ test_populate_ros3_fa(void)
* partial set: region, id
*/
{
- H5FD_ros3_fapl_ext_t fa = {{bad_version, FALSE, "a", "b", "c"}, "d"};
+ H5FD_ros3_fapl_ext_t fa = {{bad_version, false, "a", "b", "c"}, "d"};
const char *values[] = {"x", "y",
"Why is it necessary to solve the problem? "
"What benefits will you receive by solving the problem? "
@@ -891,7 +891,7 @@ test_populate_ros3_fa(void)
JSVERIFY(0, h5tools_populate_ros3_fapl(&fa, values), "could not fill fapl")
JSVERIFY(H5FD_CURR_ROS3_FAPL_T_VERSION, fa.fa.version, (char *)NULL)
- JSVERIFY(FALSE, fa.fa.authenticate, (char *)NULL)
+ JSVERIFY(false, fa.fa.authenticate, (char *)NULL)
JSVERIFY_STR("x", fa.fa.aws_region, (char *)NULL)
JSVERIFY_STR("y", fa.fa.secret_id, (char *)NULL)
JSVERIFY_STR("", fa.fa.secret_key, (char *)NULL)
@@ -965,7 +965,7 @@ test_set_configured_fapl(void)
hid_t fapl_id = H5I_INVALID_HID;
other_fa_t wrong_fa = {0x432, 0xf82, 0x9093};
#ifdef H5_HAVE_ROS3_VFD
- H5FD_ros3_fapl_ext_t ros3_anon_fa = {{1, FALSE, "", "", ""}, ""};
+ H5FD_ros3_fapl_ext_t ros3_anon_fa = {{1, false, "", "", ""}, ""};
#endif /* H5_HAVE_ROS3_VFD */
#ifdef H5_HAVE_LIBHDFS
H5FD_hdfs_fapl_t hdfs_fa = {
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 2b28df3..f753867 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -322,13 +322,13 @@ main(int argc, char *argv[])
/* Attempt to open an existing HDF5 file first. Need to open the dst file
before the src file just in case that the dst and src are the same file
*/
- fid_dst = h5tools_fopen(fname_dst, H5F_ACC_RDWR, H5P_DEFAULT, FALSE, NULL, 0);
+ fid_dst = h5tools_fopen(fname_dst, H5F_ACC_RDWR, H5P_DEFAULT, false, NULL, 0);
/*-------------------------------------------------------------------------
* open input file
*-------------------------------------------------------------------------*/
- fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, 0);
+ fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, H5P_DEFAULT, false, NULL, 0);
/*-------------------------------------------------------------------------
* test for error in opening input file
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 4854534..0a3225b 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -198,7 +198,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
break;
case 'l':
- opts->follow_links = TRUE;
+ opts->follow_links = true;
break;
case 'x':
@@ -241,7 +241,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
break;
case 'C':
- opts->disable_compact_subset = TRUE;
+ opts->disable_compact_subset = true;
break;
case 'A':
@@ -323,13 +323,13 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '1':
opts->vol_info[0].type = VOL_BY_VALUE;
opts->vol_info[0].u.value = (H5VL_class_value_t)atoi(H5_optarg);
- opts->custom_vol[0] = TRUE;
+ opts->custom_vol[0] = true;
break;
case '2':
opts->vol_info[0].type = VOL_BY_NAME;
opts->vol_info[0].u.name = H5_optarg;
- opts->custom_vol[0] = TRUE;
+ opts->custom_vol[0] = true;
break;
case '3':
@@ -339,13 +339,13 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '4':
opts->vol_info[1].type = VOL_BY_VALUE;
opts->vol_info[1].u.value = (H5VL_class_value_t)atoi(H5_optarg);
- opts->custom_vol[1] = TRUE;
+ opts->custom_vol[1] = true;
break;
case '5':
opts->vol_info[1].type = VOL_BY_NAME;
opts->vol_info[1].u.name = H5_optarg;
- opts->custom_vol[1] = TRUE;
+ opts->custom_vol[1] = true;
break;
case '6':
@@ -355,13 +355,13 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '7':
opts->vfd_info[0].type = VFD_BY_VALUE;
opts->vfd_info[0].u.value = (H5FD_class_value_t)atoi(H5_optarg);
- opts->custom_vfd[0] = TRUE;
+ opts->custom_vfd[0] = true;
break;
case '8':
opts->vfd_info[0].type = VFD_BY_NAME;
opts->vfd_info[0].u.name = H5_optarg;
- opts->custom_vfd[0] = TRUE;
+ opts->custom_vfd[0] = true;
break;
case '9':
@@ -371,13 +371,13 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case '0':
opts->vfd_info[1].type = VFD_BY_VALUE;
opts->vfd_info[1].u.value = (H5FD_class_value_t)atoi(H5_optarg);
- opts->custom_vfd[1] = TRUE;
+ opts->custom_vfd[1] = true;
break;
case 'Y':
opts->vfd_info[1].type = VFD_BY_NAME;
opts->vfd_info[1].u.name = H5_optarg;
- opts->custom_vfd[1] = TRUE;
+ opts->custom_vfd[1] = true;
break;
case 'Z':
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 1458354..e11999d 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -18,24 +18,24 @@
#define PROGRAMNAME "h5dump"
const char *outfname_g = NULL;
-static hbool_t doxml_g = FALSE;
-static hbool_t useschema_g = TRUE;
+static bool doxml_g = false;
+static bool useschema_g = true;
static const char *xml_dtd_uri_g = NULL;
-static hbool_t use_custom_vol_g = FALSE;
-static hbool_t use_custom_vfd_g = FALSE;
+static bool use_custom_vol_g = false;
+static bool use_custom_vfd_g = false;
static h5tools_vol_info_t vol_info_g = {0};
static h5tools_vfd_info_t vfd_info_g = {0};
-static hbool_t get_onion_revision_count = FALSE;
+static bool get_onion_revision_count = false;
#ifdef H5_HAVE_ROS3_VFD
/* Default "anonymous" S3 configuration */
static H5FD_ros3_fapl_ext_t ros3_fa_g = {
{
1, /* Structure Version */
- FALSE, /* Authenticate? */
+ false, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -752,7 +752,7 @@ parse_command_line(int argc, const char *const *argv)
struct handler_t *last_dset = NULL;
int i;
int opt;
- int last_was_dset = FALSE;
+ int last_was_dset = false;
/* no arguments */
if (argc == 1) {
@@ -770,50 +770,50 @@ parse_command_line(int argc, const char *const *argv)
parse_start:
switch ((char)opt) {
case 'R':
- dump_opts.display_region = TRUE;
- region_output = TRUE;
+ dump_opts.display_region = true;
+ region_output = true;
break;
case 'B':
- dump_opts.display_bb = TRUE;
- last_was_dset = FALSE;
+ dump_opts.display_bb = true;
+ last_was_dset = false;
break;
case 'n':
- dump_opts.display_fi = TRUE;
- last_was_dset = FALSE;
+ dump_opts.display_fi = true;
+ last_was_dset = false;
if (H5_optarg != NULL)
h5trav_set_verbose(atoi(H5_optarg));
break;
case 'p':
- dump_opts.display_dcpl = TRUE;
+ dump_opts.display_dcpl = true;
break;
case 'y':
- dump_opts.display_ai = FALSE;
+ dump_opts.display_ai = false;
break;
case 'e':
- dump_opts.display_escape = TRUE;
+ dump_opts.display_escape = true;
break;
case 'H':
- dump_opts.display_data = FALSE;
- dump_opts.display_attr_data = FALSE;
- last_was_dset = FALSE;
+ dump_opts.display_data = false;
+ dump_opts.display_attr_data = false;
+ last_was_dset = false;
break;
case 'A':
if (H5_optarg != NULL) {
if (0 == atoi(H5_optarg))
- dump_opts.include_attrs = FALSE;
+ dump_opts.include_attrs = false;
}
else {
- dump_opts.display_data = FALSE;
- dump_opts.display_attr_data = TRUE;
- last_was_dset = FALSE;
+ dump_opts.display_data = false;
+ dump_opts.display_attr_data = true;
+ last_was_dset = false;
}
break;
case 'i':
- dump_opts.display_oid = TRUE;
- last_was_dset = FALSE;
+ dump_opts.display_oid = true;
+ last_was_dset = false;
break;
case 'r':
- dump_opts.display_char = TRUE;
+ dump_opts.display_char = true;
break;
case 'V':
print_version(h5tools_getprogname());
@@ -829,7 +829,7 @@ parse_start:
h5tools_nCols = 65535;
else
h5tools_nCols = (unsigned)sh5tools_nCols;
- last_was_dset = FALSE;
+ last_was_dset = false;
} break;
case 'N':
dump_opts.display_all = 0;
@@ -841,7 +841,7 @@ parse_start:
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'a':
dump_opts.display_all = 0;
@@ -853,7 +853,7 @@ parse_start:
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'd':
dump_opts.display_all = 0;
@@ -868,12 +868,12 @@ parse_start:
break;
}
- last_was_dset = TRUE;
+ last_was_dset = true;
break;
case 'f':
vfd_info_g.type = VFD_BY_NAME;
vfd_info_g.u.name = H5_optarg;
- use_custom_vfd_g = TRUE;
+ use_custom_vfd_g = true;
#ifdef H5_HAVE_ROS3_VFD
if (0 == HDstrcmp(vfd_info_g.u.name, drivernames[ROS3_VFD_IDX]))
@@ -897,7 +897,7 @@ parse_start:
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'l':
dump_opts.display_all = 0;
@@ -909,7 +909,7 @@ parse_start:
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 't':
dump_opts.display_all = 0;
@@ -921,7 +921,7 @@ parse_start:
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'O':
@@ -953,8 +953,8 @@ parse_start:
}
}
- dump_opts.usingdasho = TRUE;
- last_was_dset = FALSE;
+ dump_opts.usingdasho = true;
+ last_was_dset = false;
outfname_g = H5_optarg;
break;
@@ -966,7 +966,7 @@ parse_start:
goto error;
}
}
- bin_output = TRUE;
+ bin_output = true;
if (outfname_g != NULL) {
if (h5tools_set_data_output_file(outfname_g, 1) < 0) {
/* failed to set output file */
@@ -974,7 +974,7 @@ parse_start:
goto error;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
}
break;
@@ -1003,10 +1003,10 @@ parse_start:
usage(h5tools_getprogname());
goto error;
}
- dump_opts.display_packed_bits = TRUE;
+ dump_opts.display_packed_bits = true;
break;
case 'v':
- dump_opts.display_vds_first = TRUE;
+ dump_opts.display_vds_first = true;
break;
case 'G':
dump_opts.vds_gap_size = atoi(H5_optarg);
@@ -1019,15 +1019,15 @@ parse_start:
/** begin XML parameters **/
case 'x':
/* select XML output */
- doxml_g = TRUE;
- useschema_g = TRUE;
+ doxml_g = true;
+ useschema_g = true;
h5tools_dump_header_format = NULL;
dump_function_table = &xml_function_table;
h5tools_nCols = 0;
break;
case 'u':
- doxml_g = TRUE;
- useschema_g = FALSE;
+ doxml_g = true;
+ useschema_g = false;
xmlnsprefix = "";
h5tools_dump_header_format = NULL;
dump_function_table = &xml_function_table;
@@ -1131,7 +1131,7 @@ parse_start:
} while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF);
end_collect:
- last_was_dset = FALSE;
+ last_was_dset = false;
if (opt != EOF)
goto parse_start;
@@ -1147,7 +1147,7 @@ end_collect:
enable_error_stack = 1;
break;
case 'C':
- dump_opts.disable_compact_subset = TRUE;
+ dump_opts.disable_compact_subset = true;
break;
case 'h':
usage(h5tools_getprogname());
@@ -1197,13 +1197,13 @@ end_collect:
case '1':
vol_info_g.type = VOL_BY_VALUE;
vol_info_g.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- use_custom_vol_g = TRUE;
+ use_custom_vol_g = true;
break;
case '2':
vol_info_g.type = VOL_BY_NAME;
vol_info_g.u.name = H5_optarg;
- use_custom_vol_g = TRUE;
+ use_custom_vol_g = true;
break;
case '3':
@@ -1213,13 +1213,13 @@ end_collect:
case '4':
vfd_info_g.type = VFD_BY_VALUE;
vfd_info_g.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- use_custom_vfd_g = TRUE;
+ use_custom_vfd_g = true;
break;
case '5':
vfd_info_g.type = VFD_BY_NAME;
vfd_info_g.u.name = H5_optarg;
- use_custom_vfd_g = TRUE;
+ use_custom_vfd_g = true;
break;
case '6':
@@ -1238,7 +1238,7 @@ end_collect:
if (vfd_info_g.info) {
if (!HDstrcmp(vfd_info_g.info, "revision_count"))
- get_onion_revision_count = TRUE;
+ get_onion_revision_count = true;
else {
errno = 0;
onion_fa_g.revision_num = strtoull(vfd_info_g.info, NULL, 10);
@@ -1333,7 +1333,7 @@ main(int argc, char *argv[])
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
- else if (dump_opts.display_char == TRUE) {
+ else if (dump_opts.display_char == true) {
error_msg("option \"%s\" not available for XML\n", "--string");
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/h5dump/h5dump.h b/tools/src/h5dump/h5dump.h
index 7877655..5deb951 100644
--- a/tools/src/h5dump/h5dump.h
+++ b/tools/src/h5dump/h5dump.h
@@ -54,7 +54,7 @@ table_t *group_table = NULL, *dset_table = NULL, *type_table = NULL;
unsigned dump_indent = 0; /* how far in to indent the line */
int unamedtype = 0; /* shared datatype with no name */
-hbool_t hit_elink = FALSE; /* whether we have traversed an external link */
+bool hit_elink = false; /* whether we have traversed an external link */
size_t prefix_len = 1024;
char *prefix = NULL;
const char *fp_format = NULL;
@@ -79,8 +79,8 @@ typedef struct {
int display_vds_first; /* vds display to all by default */
int vds_gap_size; /* vds skip missing files default is none */
} dump_opt_t;
-dump_opt_t dump_opts = {TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE,
- TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, 0};
+dump_opt_t dump_opts = {true, false, true, true, false, false, false, false, false,
+ true, false, false, false, false, true, false, 0};
#define PACKED_BITS_MAX 8 /* Maximum number of packed-bits to display */
#define PACKED_BITS_SIZE_MAX (8 * sizeof(long long)) /* Maximum bits size of integer types of packed-bits */
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index adc8585..0c4e105 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -262,7 +262,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
if (found_obj == NULL) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -274,7 +274,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -299,7 +299,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
goto done;
}
else if (found_obj->displayed) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -311,7 +311,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -321,7 +321,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -342,7 +342,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
goto done;
}
else {
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
}
} /* end if */
@@ -392,7 +392,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ret = FAIL;
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -411,7 +411,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
else {
/* print the value of a soft link */
/* Standard DDL: no modification */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -422,7 +422,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -447,7 +447,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ret = FAIL;
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -475,7 +475,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
else {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -483,7 +483,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -496,7 +496,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level--;
} /* end else */
} /* end else */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -518,7 +518,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
case H5L_TYPE_MAX:
case H5L_TYPE_HARD:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -529,7 +529,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, "LINKCLASS %d", linfo->type);
@@ -538,7 +538,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
if (HDstrlen(h5tools_dump_header_format->udlinkblockend)) {
@@ -673,7 +673,7 @@ dump_named_datatype(hid_t tid, const char *name)
h5tools_setstatus(EXIT_FAILURE);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -706,12 +706,12 @@ dump_named_datatype(hid_t tid, const char *name)
goto done;
}
else
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
} /* end if */
/* Render the element */
h5tools_str_reset(&buffer);
- h5tools_print_datatype(rawoutstream, &buffer, outputformat, &ctx, tid, FALSE);
+ h5tools_print_datatype(rawoutstream, &buffer, outputformat, &ctx, tid, false);
if (H5Tget_class(tid) != H5T_COMPOUND) {
h5tools_str_append(&buffer, ";");
@@ -813,7 +813,7 @@ dump_group(hid_t gid, const char *name)
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -863,7 +863,7 @@ dump_group(hid_t gid, const char *name)
h5tools_setstatus(EXIT_FAILURE);
}
else if (found_obj->displayed) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -872,7 +872,7 @@ dump_group(hid_t gid, const char *name)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
attr_iteration(gid, attr_crt_order_flags);
link_iteration(gid, crt_order_flags);
}
@@ -881,7 +881,7 @@ dump_group(hid_t gid, const char *name)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -955,7 +955,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
/* setup */
memset(&buffer, 0, sizeof(h5tools_str_t));
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -1003,7 +1003,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
data_loop = packed_bits_num;
for (u = 0; u < data_loop; u++) {
if (dump_opts.display_packed_bits) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1018,7 +1018,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
case H5T_TIME:
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1039,7 +1039,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
case H5T_ENUM:
case H5T_VLEN:
case H5T_ARRAY: {
- h5tools_dump_data(rawoutstream, outputformat, &ctx, did, TRUE);
+ h5tools_dump_data(rawoutstream, outputformat, &ctx, did, true);
} break;
case H5T_NO_CLASS:
@@ -1058,7 +1058,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -1090,7 +1090,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
h5tool_format_t string_dataformat;
- int print_dataset = FALSE;
+ int print_dataset = false;
string_dataformat = *outputformat;
@@ -1117,7 +1117,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
ctx.display_char = dump_opts.display_char;
if (obj_data == DATASET_DATA)
- print_dataset = TRUE;
+ print_dataset = true;
h5tools_dump_data(rawoutstream, outputformat, &ctx, obj_id, print_dataset);
}
@@ -1137,7 +1137,7 @@ dump_fcpl(hid_t fid)
size_t off_size; /* size of offsets in the file */
size_t len_size; /* size of lengths in the file */
H5F_fspace_strategy_t fs_strategy; /* file space strategy */
- hbool_t fs_persist; /* Persisting free-space or not */
+ bool fs_persist; /* Persisting free-space or not */
hsize_t fs_threshold; /* free-space section threshold */
hsize_t fsp_size; /* file space page size */
H5F_info2_t finfo; /* file information */
@@ -1500,7 +1500,7 @@ handle_paths(hid_t fid, const char *path_name, void H5_ATTR_UNUSED *data, int H5
handle_udata.fid = fid;
handle_udata.op_name = path_name;
- if (h5trav_visit(fid, "/", TRUE, TRUE, obj_search, lnk_search, &handle_udata, H5O_INFO_BASIC) < 0) {
+ if (h5trav_visit(fid, "/", true, true, obj_search, lnk_search, &handle_udata, H5O_INFO_BASIC) < 0) {
error_msg("error traversing information\n");
h5tools_setstatus(EXIT_FAILURE);
}
@@ -1581,7 +1581,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
/* setup */
memset(&buffer, 0, sizeof(h5tools_str_t));
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1592,7 +1592,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
error_msg("unable to open object \"%s\"\n", obj_name);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
if (HDstrlen(h5tools_dump_header_format->attributeblockend)) {
@@ -1802,7 +1802,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
end_obj(h5tools_dump_header_format->datasetend, h5tools_dump_header_format->datasetblockend);
}
else {
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
dump_indent += COL;
dump_dataset(dsetid, real_name, sset);
dump_indent -= COL;
@@ -2042,7 +2042,7 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
table_t *old_group_table = group_table;
table_t *old_dset_table = dset_table;
table_t *old_type_table = type_table;
- hbool_t old_hit_elink;
+ bool old_hit_elink;
ssize_t idx;
/* Open target object */
@@ -2073,7 +2073,7 @@ dump_extlink(hid_t group, const char *linkname, const char *objname)
/* We will now traverse the external link, set this global to indicate this */
old_hit_elink = hit_elink;
- hit_elink = TRUE;
+ hit_elink = true;
/* add some indentation to distinguish that these objects are external */
dump_indent += COL;
diff --git a/tools/src/h5dump/h5dump_extern.h b/tools/src/h5dump/h5dump_extern.h
index 3c4c772..723a39e 100644
--- a/tools/src/h5dump/h5dump_extern.h
+++ b/tools/src/h5dump/h5dump_extern.h
@@ -52,7 +52,7 @@ extern table_t *group_table, *dset_table, *type_table;
extern unsigned dump_indent; /* how far in to indent the line */
extern int unamedtype; /* shared datatype with no name */
-extern hbool_t hit_elink; /* whether we have traversed an external link */
+extern bool hit_elink; /* whether we have traversed an external link */
extern size_t prefix_len;
extern char *prefix;
extern const char *fp_format;
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index cb279e3..64be328 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -228,7 +228,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
if (found_obj == NULL) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -240,7 +240,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -276,7 +276,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
xml_name_to_XID(obj, obj_path, dsetxid, (int)sizeof(dsetxid), 1);
xml_name_to_XID(obj, prefix, parentxid, (int)sizeof(parentxid), 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -296,7 +296,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -307,7 +307,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -324,7 +324,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
goto done;
}
else
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
} /* end if */
dump_function_table->dump_dataset_function(obj, name, NULL);
@@ -403,7 +403,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
res = xml_name_to_XID(group, t_link_path, targetxid, (int)sizeof(targetxid), 0);
if (res == 0) {
/* target obj found */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -425,7 +425,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
}
else {
/* dangling link -- omit from xml attributes */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -490,7 +490,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
xml_name_to_XID(group, t_obj_path, linkxid, (int)sizeof(linkxid), 1);
xml_name_to_XID(group, prefix, parentxid, (int)sizeof(parentxid), 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -536,7 +536,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
xml_name_to_XID(group, t_obj_path, linkxid, (int)sizeof(linkxid), 1);
xml_name_to_XID(group, prefix, parentxid, (int)sizeof(parentxid), 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -865,7 +865,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
size_t mpos;
size_t msize;
int nmembs;
- htri_t is_vlstr = FALSE;
+ htri_t is_vlstr = false;
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &xml_dataformat;
@@ -915,7 +915,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* 'anonymous' NDT. Use it's object num.
as it's name. */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -927,7 +927,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* point to the NDT by name */
char *t_objname = xml_escape_the_name(found_obj->objname);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -940,7 +940,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
free(dtxid);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -953,7 +953,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
else {
switch (H5Tget_class(type)) {
case H5T_INTEGER:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -966,7 +966,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
ord = H5Tget_order(type);
sgn = H5Tget_sign(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1011,7 +1011,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1027,7 +1027,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
MantissaBits="mb" MantissaLocation="ml" /> */
ord = H5Tget_order(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1036,7 +1036,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1072,7 +1072,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1082,7 +1082,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
break;
case H5T_TIME:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1091,7 +1091,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1101,7 +1101,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
h5tools_str_append(&buffer, "<!-- H5T_TIME: not yet implemented -->");
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1117,7 +1117,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
cset = H5Tget_cset(type);
is_vlstr = H5Tis_variable_str(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1127,7 +1127,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1155,7 +1155,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1168,7 +1168,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* <hdf5:BitfieldType ByteOrder="bo" Size="bytes"/> */
ord = H5Tget_order(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1177,7 +1177,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1204,7 +1204,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1216,7 +1216,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
case H5T_OPAQUE:
/* <hdf5:OpaqueType Tag="tag" Size="bytes" /> */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1226,7 +1226,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
ctx.indent_level++;
mname = H5Tget_tag(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1238,7 +1238,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1253,7 +1253,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* type of a dataset */
nmembers = (unsigned)H5Tget_nmembers(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1273,7 +1273,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
mtype = H5Tget_member_type(type, i);
t_fname = xml_escape_the_name(mname);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1286,7 +1286,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent += COL;
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1299,7 +1299,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1309,7 +1309,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1320,7 +1320,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1330,7 +1330,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
break;
case H5T_REFERENCE:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1340,7 +1340,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
ctx.indent_level++;
/* Only Object references supported at this time */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1349,7 +1349,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1358,7 +1358,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1367,7 +1367,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1380,7 +1380,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* <hdf5:EnumType Nelems="ne" > list Name, values of enum */
nmembs = H5Tget_nmembers(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1390,7 +1390,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent += COL;
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1399,7 +1399,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
xml_print_enum(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1409,7 +1409,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1419,7 +1419,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
break;
case H5T_VLEN:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1430,7 +1430,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent += COL;
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1443,7 +1443,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1453,7 +1453,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1469,7 +1469,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
super = H5Tget_super(type);
/* Print lead-in */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1485,7 +1485,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* list of dimensions */
ctx.indent_level++;
for (i = 0; i < ndims; i++) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1499,7 +1499,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent += COL;
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1512,7 +1512,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1522,7 +1522,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
dump_indent -= COL;
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1536,7 +1536,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1617,7 +1617,7 @@ xml_dump_datatype(hid_t type)
use it's object ref as its name
*/
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1629,7 +1629,7 @@ xml_dump_datatype(hid_t type)
/* pointer to a named datatype already in XML */
char *t_objname = xml_escape_the_name(found_obj->objname);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1642,7 +1642,7 @@ xml_dump_datatype(hid_t type)
free(dtxid);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1652,7 +1652,7 @@ xml_dump_datatype(hid_t type)
}
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1665,7 +1665,7 @@ xml_dump_datatype(hid_t type)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1729,7 +1729,7 @@ xml_dump_dataspace(hid_t space)
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1742,7 +1742,7 @@ xml_dump_dataspace(hid_t space)
case H5S_SCALAR:
/* scalar dataspace (just a tag, no XML attrs. defined */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1755,7 +1755,7 @@ xml_dump_dataspace(hid_t space)
/* simple dataspace */
/* <hdf5:SimpleDataspace Ndims="nd"> */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1767,7 +1767,7 @@ xml_dump_dataspace(hid_t space)
ctx.indent_level++;
for (i = 0; i < ndims; i++) {
if (maxsize[i] == H5S_UNLIMITED) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1778,7 +1778,7 @@ xml_dump_dataspace(hid_t space)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else if (maxsize[i] == (hsize_t)0) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1789,7 +1789,7 @@ xml_dump_dataspace(hid_t space)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1802,7 +1802,7 @@ xml_dump_dataspace(hid_t space)
}
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1816,7 +1816,7 @@ xml_dump_dataspace(hid_t space)
case H5S_NULL:
/* null dataspace (just a tag, no XML attrs. defined */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1829,7 +1829,7 @@ xml_dump_dataspace(hid_t space)
case H5S_NULL:
case H5S_NO_CLASS:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1840,7 +1840,7 @@ xml_dump_dataspace(hid_t space)
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1904,7 +1904,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
string_dataformat.arr_pre = "";
outputformat = &string_dataformat;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1914,7 +1914,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1936,7 +1936,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
else {
h5tools_context_t datactx;
memset(&datactx, 0, sizeof(datactx));
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
status = h5tools_dump_dset(rawoutstream, outputformat, &datactx, obj_id);
@@ -1966,7 +1966,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
else {
h5tools_context_t datactx;
memset(&datactx, 0, sizeof(datactx));
- datactx.need_prefix = TRUE;
+ datactx.need_prefix = true;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id);
@@ -1980,7 +1980,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
if (status == FAIL) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -1997,7 +1997,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2007,7 +2007,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2067,7 +2067,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2103,7 +2103,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2111,7 +2111,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2119,7 +2119,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2127,7 +2127,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2135,7 +2135,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2148,7 +2148,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
break;
case H5T_COMPOUND:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2159,7 +2159,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
break;
case H5T_REFERENCE:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2167,7 +2167,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
if (!H5Tequal(type, H5T_STD_REF_OBJ)) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2175,7 +2175,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2184,7 +2184,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2194,7 +2194,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
xml_print_refs(attr_id, ATTRIBUTE_DATA);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2203,7 +2203,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2213,7 +2213,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
break;
case H5T_VLEN:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2226,7 +2226,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2234,7 +2234,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2242,7 +2242,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2250,7 +2250,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2263,7 +2263,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
else {
/* The case of an attribute never yet written ??
* Or dataspace is H5S_NULL. */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2273,7 +2273,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2283,7 +2283,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2298,7 +2298,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
H5Sclose(space);
H5Aclose(attr_id);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2313,7 +2313,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
/* ?? failed */
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2323,7 +2323,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2416,7 +2416,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
the future.
*/
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2430,7 +2430,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
else {
H5O_info2_t oinfo; /* Object info */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2467,7 +2467,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
xml_name_to_XID(type, found_obj->objname, pointerxid, (int)sizeof(pointerxid), 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2478,7 +2478,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2489,14 +2489,14 @@ xml_dump_named_datatype(hid_t type, const char *name)
goto done;
}
else
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
}
}
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2510,7 +2510,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2521,7 +2521,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2667,7 +2667,7 @@ xml_dump_group(hid_t gid, const char *name)
/* probably can't happen! */
xml_name_to_XID(gid, "/", grpxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2682,7 +2682,7 @@ xml_dump_group(hid_t gid, const char *name)
xml_name_to_XID(gid, tmp, grpxid, 100, 1);
xml_name_to_XID(gid, par, parentxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2703,7 +2703,7 @@ xml_dump_group(hid_t gid, const char *name)
xml_name_to_XID(gid, found_obj->objname, ptrstr, 100, 1);
xml_name_to_XID(gid, par, parentxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2727,7 +2727,7 @@ xml_dump_group(hid_t gid, const char *name)
if (isRoot) {
xml_name_to_XID(gid, "/", grpxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2743,7 +2743,7 @@ xml_dump_group(hid_t gid, const char *name)
xml_name_to_XID(gid, tmp, grpxid, 100, 1);
xml_name_to_XID(gid, par, parentxid, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2757,7 +2757,7 @@ xml_dump_group(hid_t gid, const char *name)
free(t_tmp);
free(par_name);
}
- found_obj->displayed = TRUE;
+ found_obj->displayed = true;
/* 1. do all the attributes of the group */
@@ -2822,7 +2822,7 @@ xml_dump_group(hid_t gid, const char *name)
char *grpxid = (char *)malloc((size_t)100);
char *parentxid = (char *)malloc((size_t)100);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2905,7 +2905,7 @@ xml_dump_group(hid_t gid, const char *name)
ctx.indent_level--;
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3026,7 +3026,7 @@ xml_print_refs(hid_t did, int source)
ctx.indent_level++;
if (!path) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3037,7 +3037,7 @@ xml_print_refs(hid_t did, int source)
else {
char *t_path = xml_escape_the_string(path, -1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3089,7 +3089,7 @@ xml_print_strs(hid_t did, int source)
hid_t type = H5I_INVALID_HID;
hid_t space = H5I_INVALID_HID;
hssize_t ssiz = -1;
- htri_t is_vlstr = FALSE;
+ htri_t is_vlstr = false;
size_t tsiz = 0;
hsize_t i;
size_t str_size = 0;
@@ -3189,7 +3189,7 @@ xml_print_strs(hid_t did, int source)
}
if (!onestring) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3200,7 +3200,7 @@ xml_print_strs(hid_t did, int source)
else {
char *t_onestring = xml_escape_the_string(onestring, (int)str_size);
if (t_onestring) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3300,7 +3300,7 @@ check_filters(hid_t dcpl)
namebuf, NULL);
if (filter == H5Z_FILTER_DEFLATE) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3319,7 +3319,7 @@ check_filters(hid_t dcpl)
}
else if (filter == H5Z_FILTER_FLETCHER32) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3330,7 +3330,7 @@ check_filters(hid_t dcpl)
}
else if (filter == H5Z_FILTER_SHUFFLE) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3342,7 +3342,7 @@ check_filters(hid_t dcpl)
else if (filter == H5Z_FILTER_SZIP) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3436,7 +3436,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3454,7 +3454,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
if (H5Tget_class(type) == H5T_REFERENCE) {
const char *path = lookup_ref_path(*(H5R_ref_t *)buf);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3462,7 +3462,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
if (!path) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3473,7 +3473,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
else {
char *t_path = xml_escape_the_string(path, -1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3483,7 +3483,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
free(t_path);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3495,7 +3495,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
}
else if (H5Tget_class(type) == H5T_STRING) {
/* ????? */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3503,7 +3503,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3515,7 +3515,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
/* all other data */
switch (H5Tget_class(type)) {
case H5T_INTEGER:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3523,7 +3523,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3532,7 +3532,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3541,7 +3541,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_FLOAT:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3549,7 +3549,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3558,7 +3558,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3568,7 +3568,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
break;
case H5T_BITFIELD:
case H5T_OPAQUE:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3577,7 +3577,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
sz = H5Tget_size(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3593,7 +3593,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3602,7 +3602,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_ENUM:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3611,7 +3611,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
name = H5Tget_member_name(type, *(unsigned *)buf);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -3621,7 +3621,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
if (name)
H5free_memory(name);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3630,7 +3630,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_ARRAY:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3638,7 +3638,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3647,7 +3647,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_TIME:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3655,7 +3655,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3664,7 +3664,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_COMPOUND:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3672,7 +3672,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3681,7 +3681,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
break;
case H5T_VLEN:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3689,7 +3689,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3702,7 +3702,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
case H5T_STRING:
case H5T_REFERENCE:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3710,7 +3710,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3724,7 +3724,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3817,7 +3817,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
xml_name_to_XID(did, tmp, rstr, 100, 1);
xml_name_to_XID(did, prefix, pstr, 100, 1);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3852,7 +3852,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3862,7 +3862,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3877,7 +3877,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
for (i = 0; i < ndims; i++) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3887,7 +3887,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3901,7 +3901,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3912,7 +3912,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3922,7 +3922,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3937,7 +3937,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
else if (H5D_CONTIGUOUS == H5Pget_layout(dcpl)) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3946,7 +3946,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3955,7 +3955,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3967,7 +3967,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
else if (H5D_COMPACT == H5Pget_layout(dcpl)) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3976,7 +3976,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -3985,7 +3985,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4001,7 +4001,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4050,7 +4050,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level++;
dump_indent += COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4063,7 +4063,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(fvstatus == H5D_FILL_VALUE_DEFAULT && ft == H5D_FILL_TIME_IFSET)) {
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4076,7 +4076,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
xml_dump_fill_value(dcpl, type);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4087,7 +4087,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4142,7 +4142,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
case H5T_TIME:
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4150,7 +4150,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4158,7 +4158,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4166,7 +4166,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4178,7 +4178,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
break;
case H5T_COMPOUND:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4194,7 +4194,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
break;
case H5T_REFERENCE:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4202,7 +4202,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
if (!H5Tequal(type, H5T_STD_REF_OBJ)) {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4210,7 +4210,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4219,7 +4219,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4229,7 +4229,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
xml_print_refs(did, DATASET_DATA);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4238,7 +4238,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4250,7 +4250,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
case H5T_VLEN:
ctx.indent_level--;
dump_indent -= COL;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4269,7 +4269,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
case H5T_NO_CLASS:
case H5T_NCLASSES:
default:
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4277,7 +4277,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4285,7 +4285,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4293,7 +4293,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4307,7 +4307,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
/* no data written */
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4316,7 +4316,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4325,7 +4325,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4339,7 +4339,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
H5Sclose(space);
H5Pclose(dcpl);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4404,7 +4404,7 @@ xml_print_enum(hid_t type)
nmembs = (unsigned)H5Tget_nmembers(type);
super = H5Tget_super(type);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4414,7 +4414,7 @@ xml_print_enum(hid_t type)
xml_print_datatype(super, 0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4465,7 +4465,7 @@ xml_print_enum(hid_t type)
for (i = 0; i < nmembs; i++) {
char *t_name = xml_escape_the_name(name[i]);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4473,7 +4473,7 @@ xml_print_enum(hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -4484,7 +4484,7 @@ xml_print_enum(hid_t type)
free(t_name);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4492,7 +4492,7 @@ xml_print_enum(hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -4500,7 +4500,7 @@ xml_print_enum(hid_t type)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level++;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
/* Render the element */
@@ -4527,7 +4527,7 @@ xml_print_enum(hid_t type)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
ctx.indent_level--;
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 96aab9b..022cede 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -25,8 +25,8 @@
static char *fname_g = NULL;
static char *dname_g = NULL;
-static int dset_g = FALSE;
-static int noop_g = FALSE;
+static int dset_g = false;
+static int noop_g = false;
static int verbose_g = 0;
/*
@@ -114,7 +114,7 @@ parse_command_line(int argc, const char *const *argv)
goto error;
case 'v':
- verbose_g = TRUE;
+ verbose_g = true;
break;
case 'd': /* -d dname */
@@ -126,11 +126,11 @@ parse_command_line(int argc, const char *const *argv)
usage(h5tools_getprogname());
goto error;
}
- dset_g = TRUE;
+ dset_g = true;
break;
case 'n': /* -n */
- noop_g = TRUE;
+ noop_g = true;
break;
case 'E':
@@ -399,7 +399,7 @@ main(int argc, char *argv[])
h5tools_error_report();
/* Open the HDF5 file */
- if ((fid = h5tools_fopen(fname_g, H5F_ACC_RDWR, H5P_DEFAULT, FALSE, NULL, 0)) < 0) {
+ if ((fid = h5tools_fopen(fname_g, H5F_ACC_RDWR, H5P_DEFAULT, false, NULL, 0)) < 0) {
error_msg("unable to open file \"%s\"\n", fname_g);
h5tools_setstatus(EXIT_FAILURE);
goto done;
@@ -416,7 +416,7 @@ main(int argc, char *argv[])
else { /* Convert all datasets in the file */
if (verbose_g)
fprintf(stdout, "Processing all datasets in the file...\n");
- if (h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid, H5O_INFO_BASIC) < 0)
+ if (h5trav_visit(fid, "/", true, true, convert_dsets_cb, NULL, &fid, H5O_INFO_BASIC) < 0)
goto done;
} /* end else */
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 2a89bcc..af0f171 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -73,7 +73,7 @@ int
main(int argc, char *argv[])
{
struct Options *opt;
- int outfile_named = FALSE;
+ int outfile_named = false;
int token;
int i;
int state = 0;
@@ -163,7 +163,7 @@ main(int argc, char *argv[])
goto err;
}
(void)HDstrcpy(opt->outfile, argv[i]);
- outfile_named = TRUE;
+ outfile_named = true;
break;
case 6: /* -h found; help, then exit */
@@ -228,7 +228,7 @@ main(int argc, char *argv[])
}
}
- if (FALSE == outfile_named) {
+ if (false == outfile_named) {
(void)fprintf(stderr, "%s", err3);
usage(argv[0]);
goto err;
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index 6f318a4..b5bf208 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -23,7 +23,7 @@ hsize_t compute_user_block_size(hsize_t);
hsize_t copy_some_to_file(int, int, hsize_t, hsize_t, ssize_t);
void parse_command_line(int, const char *const *);
-static int do_clobber = FALSE;
+static int do_clobber = false;
static char *output_file = NULL;
static char *input_file = NULL;
static char *ub_file = NULL;
@@ -105,7 +105,7 @@ leave(int ret)
void
parse_command_line(int argc, const char *const *argv)
{
- int opt = FALSE;
+ int opt = false;
/* parse command line options */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
@@ -120,7 +120,7 @@ parse_command_line(int argc, const char *const *argv)
ub_file = HDstrdup(H5_optarg);
break;
case 'c':
- do_clobber = TRUE;
+ do_clobber = true;
break;
case 'h':
usage(h5tools_getprogname());
@@ -294,7 +294,7 @@ main(int argc, char *argv[])
startub = usize;
if (usize > 0) {
- if (do_clobber == TRUE) {
+ if (do_clobber == true) {
/* where is max of the current size or the new UB */
if (usize > newubsize) {
newubsize = usize;
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index d752014..517cea4 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -24,7 +24,7 @@ hsize_t write_pad(int, hsize_t);
hsize_t compute_pad(hsize_t);
herr_t copy_to_file(FILE *, FILE *, ssize_t, ssize_t);
-int do_delete = FALSE;
+int do_delete = false;
char *output_file = NULL;
char *input_file = NULL;
char *ub_file = NULL;
@@ -92,7 +92,7 @@ usage(const char *prog)
static int
parse_command_line(int argc, const char *const *argv)
{
- int opt = FALSE;
+ int opt = false;
/* parse command line options */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
@@ -118,7 +118,7 @@ parse_command_line(int argc, const char *const *argv)
break;
case 'd':
- do_delete = TRUE;
+ do_delete = true;
break;
case 'h':
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 84567c8..fa9c565 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -106,30 +106,30 @@ typedef struct {
const char *fname; /* Filename */
hid_t fid; /* File ID */
hid_t gid; /* Group ID */
- hbool_t symlink_target; /* Whether this is the target of an symbolic link */
+ bool symlink_target; /* Whether this is the target of an symbolic link */
symlink_trav_t *symlink_list; /* List of visited symbolic links */
size_t base_len; /* Length of base path name, if not root */
size_t name_start; /* # of leading characters to strip off path names on output */
} iter_t;
/* Command-line switches */
-static int verbose_g = 0; /* lots of extra output */
-static int width_g = 80; /* output width in characters */
-static hbool_t address_g = FALSE; /* print raw data addresses */
-static hbool_t data_g = FALSE; /* display dataset values? */
-static hbool_t label_g = FALSE; /* label compound values? */
-static hbool_t string_g = FALSE; /* print 1-byte numbers as ASCII? */
-static hbool_t fullname_g = FALSE; /* print full path names */
-static hbool_t recursive_g = FALSE; /* recursive descent listing */
-static hbool_t follow_symlink_g = FALSE; /* follow symbolic links */
-static hbool_t no_dangling_link_g = FALSE; /* treat dangling link is error */
-static hbool_t follow_elink_g = FALSE; /* follow external links */
-static hbool_t grp_literal_g = FALSE; /* list group, not contents */
-static hbool_t hexdump_g = FALSE; /* show data as raw hexadecimal */
-static hbool_t simple_output_g = FALSE; /* make output more machine-readable */
-static hbool_t show_file_name_g = FALSE; /* show file name for full names */
-static hbool_t no_line_wrap_g = FALSE; /* show data content without line wrap */
-static hbool_t display_root_g = FALSE; /* show root group in output? */
+static int verbose_g = 0; /* lots of extra output */
+static int width_g = 80; /* output width in characters */
+static bool address_g = false; /* print raw data addresses */
+static bool data_g = false; /* display dataset values? */
+static bool label_g = false; /* label compound values? */
+static bool string_g = false; /* print 1-byte numbers as ASCII? */
+static bool fullname_g = false; /* print full path names */
+static bool recursive_g = false; /* recursive descent listing */
+static bool follow_symlink_g = false; /* follow symbolic links */
+static bool no_dangling_link_g = false; /* treat dangling link is error */
+static bool follow_elink_g = false; /* follow external links */
+static bool grp_literal_g = false; /* list group, not contents */
+static bool hexdump_g = false; /* show data as raw hexadecimal */
+static bool simple_output_g = false; /* make output more machine-readable */
+static bool show_file_name_g = false; /* show file name for full names */
+static bool no_line_wrap_g = false; /* show data content without line wrap */
+static bool display_root_g = false; /* show root group in output? */
/* Information about how to display each type of object */
static struct dispatch_t {
@@ -147,10 +147,10 @@ static struct dispatch_t {
dispatch_g[TYPE].list2 = (LIST2); \
} while (0)
-static void print_type(h5tools_str_t *buffer, hid_t type, int ind);
-static hbool_t print_int_type(h5tools_str_t *buffer, hid_t type, int ind);
-static hbool_t print_float_type(h5tools_str_t *buffer, hid_t type, int ind);
-static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter);
+static void print_type(h5tools_str_t *buffer, hid_t type, int ind);
+static bool print_int_type(h5tools_str_t *buffer, hid_t type, int ind);
+static bool print_float_type(h5tools_str_t *buffer, hid_t type, int ind);
+static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter);
/*-------------------------------------------------------------------------
* Function: usage
@@ -274,7 +274,7 @@ usage(void)
*-------------------------------------------------------------------------
*/
static int
-print_string(h5tools_str_t *buffer, const char *s, hbool_t escape_spaces)
+print_string(h5tools_str_t *buffer, const char *s, bool escape_spaces)
{
int nprint = 0;
@@ -349,8 +349,8 @@ print_string(h5tools_str_t *buffer, const char *s, hbool_t escape_spaces)
*
* Purpose: Print an object name and another string.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
static int
@@ -367,7 +367,7 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname, con
/* Print the object name, either full name or base name */
if (fullname_g)
- n = print_string(buffer, name, TRUE);
+ n = print_string(buffer, name, true);
else {
const char *last_sep; /* The location of the last group separator */
@@ -377,11 +377,11 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname, con
else {
last_sep++;
} /* end else */
- n = print_string(buffer, last_sep, TRUE);
+ n = print_string(buffer, last_sep, true);
} /* end else */
h5tools_str_append(buffer, "%*s ", MAX(0, (24 - n)), s);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -389,145 +389,145 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname, con
*
* Purpose: Prints the name of a native C data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed.
+ * Return: Success: true
+ * Failure: false, nothing printed.
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
{
if (!simple_output_g) {
- if (H5Tequal(type, H5T_NATIVE_SCHAR) == TRUE) {
+ if (H5Tequal(type, H5T_NATIVE_SCHAR) == true) {
h5tools_str_append(buffer, "native signed char");
}
- else if (H5Tequal(type, H5T_NATIVE_UCHAR) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UCHAR) == true) {
h5tools_str_append(buffer, "native unsigned char");
}
- else if (H5Tequal(type, H5T_NATIVE_INT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT) == true) {
h5tools_str_append(buffer, "native int");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT) == true) {
h5tools_str_append(buffer, "native unsigned int");
}
- else if (H5Tequal(type, H5T_NATIVE_SHORT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_SHORT) == true) {
h5tools_str_append(buffer, "native short");
}
- else if (H5Tequal(type, H5T_NATIVE_USHORT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_USHORT) == true) {
h5tools_str_append(buffer, "native unsigned short");
}
- else if (H5Tequal(type, H5T_NATIVE_LONG) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_LONG) == true) {
h5tools_str_append(buffer, "native long");
}
- else if (H5Tequal(type, H5T_NATIVE_ULONG) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_ULONG) == true) {
h5tools_str_append(buffer, "native unsigned long");
}
- else if (H5Tequal(type, H5T_NATIVE_LLONG) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_LLONG) == true) {
h5tools_str_append(buffer, "native long long");
}
- else if (H5Tequal(type, H5T_NATIVE_ULLONG) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_ULLONG) == true) {
h5tools_str_append(buffer, "native unsigned long long");
}
- else if (H5Tequal(type, H5T_NATIVE_FLOAT) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_FLOAT) == true) {
h5tools_str_append(buffer, "native float");
}
- else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == true) {
h5tools_str_append(buffer, "native double");
}
- else if (H5Tequal(type, H5T_NATIVE_INT8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT8) == true) {
h5tools_str_append(buffer, "native int8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT8) == true) {
h5tools_str_append(buffer, "native uint8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT16) == true) {
h5tools_str_append(buffer, "native int16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT16) == true) {
h5tools_str_append(buffer, "native uint16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT32) == true) {
h5tools_str_append(buffer, "native int32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT32) == true) {
h5tools_str_append(buffer, "native uint32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT64) == true) {
h5tools_str_append(buffer, "native int64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT64) == true) {
h5tools_str_append(buffer, "native uint64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_LEAST8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_LEAST8) == true) {
h5tools_str_append(buffer, "native int_least8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST8) == true) {
h5tools_str_append(buffer, "native uint_least8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_LEAST16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_LEAST16) == true) {
h5tools_str_append(buffer, "native int_least16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST16) == true) {
h5tools_str_append(buffer, "native uint_least16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_LEAST32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_LEAST32) == true) {
h5tools_str_append(buffer, "native int_least32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST32) == true) {
h5tools_str_append(buffer, "native uint_least32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_LEAST64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_LEAST64) == true) {
h5tools_str_append(buffer, "native int_least64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_LEAST64) == true) {
h5tools_str_append(buffer, "native uint_least64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_FAST8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_FAST8) == true) {
h5tools_str_append(buffer, "native int_fast8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_FAST8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_FAST8) == true) {
h5tools_str_append(buffer, "native uint_fast8_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_FAST16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_FAST16) == true) {
h5tools_str_append(buffer, "native int_fast16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_FAST16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_FAST16) == true) {
h5tools_str_append(buffer, "native uint_fast16_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_FAST32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_FAST32) == true) {
h5tools_str_append(buffer, "native int_fast32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_FAST32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_FAST32) == true) {
h5tools_str_append(buffer, "native uint_fast32_t");
}
- else if (H5Tequal(type, H5T_NATIVE_INT_FAST64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_INT_FAST64) == true) {
h5tools_str_append(buffer, "native int_fast64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_UINT_FAST64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_UINT_FAST64) == true) {
h5tools_str_append(buffer, "native uint_fast64_t");
}
- else if (H5Tequal(type, H5T_NATIVE_B8) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_B8) == true) {
h5tools_str_append(buffer, "native 8-bit field");
}
- else if (H5Tequal(type, H5T_NATIVE_B16) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_B16) == true) {
h5tools_str_append(buffer, "native 16-bit field");
}
- else if (H5Tequal(type, H5T_NATIVE_B32) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_B32) == true) {
h5tools_str_append(buffer, "native 32-bit field");
}
- else if (H5Tequal(type, H5T_NATIVE_B64) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_B64) == true) {
h5tools_str_append(buffer, "native 64-bit field");
}
- else if (H5Tequal(type, H5T_NATIVE_HSIZE) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_HSIZE) == true) {
h5tools_str_append(buffer, "native hsize_t");
}
- else if (H5Tequal(type, H5T_NATIVE_HSSIZE) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_HSSIZE) == true) {
h5tools_str_append(buffer, "native hssize_t");
}
- else if (H5Tequal(type, H5T_NATIVE_HERR) == TRUE) {
+ else if (H5Tequal(type, H5T_NATIVE_HERR) == true) {
h5tools_str_append(buffer, "native herr_t");
}
- else if (H5Tequal(type, H5T_NATIVE_HBOOL) == TRUE) {
- h5tools_str_append(buffer, "native hbool_t");
+ else if (H5Tequal(type, H5T_NATIVE_HBOOL) == true) {
+ h5tools_str_append(buffer, "native bool");
}
else {
return print_int_type(buffer, type, ind);
@@ -536,7 +536,7 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
else {
return print_int_type(buffer, type, ind);
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -544,29 +544,29 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print the name of an IEEE floating-point data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_ieee_type(h5tools_str_t *buffer, hid_t type, int ind)
{
- if (H5Tequal(type, H5T_IEEE_F32BE) == TRUE) {
+ if (H5Tequal(type, H5T_IEEE_F32BE) == true) {
h5tools_str_append(buffer, "IEEE 32-bit big-endian float");
}
- else if (H5Tequal(type, H5T_IEEE_F32LE) == TRUE) {
+ else if (H5Tequal(type, H5T_IEEE_F32LE) == true) {
h5tools_str_append(buffer, "IEEE 32-bit little-endian float");
}
- else if (H5Tequal(type, H5T_IEEE_F64BE) == TRUE) {
+ else if (H5Tequal(type, H5T_IEEE_F64BE) == true) {
h5tools_str_append(buffer, "IEEE 64-bit big-endian float");
}
- else if (H5Tequal(type, H5T_IEEE_F64LE) == TRUE) {
+ else if (H5Tequal(type, H5T_IEEE_F64LE) == true) {
h5tools_str_append(buffer, "IEEE 64-bit little-endian float");
}
else {
return print_float_type(buffer, type, ind);
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -661,11 +661,11 @@ print_precision(h5tools_str_t *buffer, hid_t type, int ind)
* the first line. Additional information might appear in
* parentheses on the following lines.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_int_type(h5tools_str_t *buffer, hid_t type, int ind)
{
H5T_order_t order; /* byte order value */
@@ -674,7 +674,7 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind)
const char *sign_s = NULL; /* sign scheme string */
if (H5T_INTEGER != H5Tget_class(type))
- return FALSE;
+ return false;
/* Byte order */
if (H5Tget_size(type) > 1) {
@@ -717,7 +717,7 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer, "%lu-bit%s%s integer", (unsigned long)(8 * H5Tget_size(type)), order_s,
sign_s);
print_precision(buffer, type, ind);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -725,11 +725,11 @@ print_int_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print info about a floating point data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
{
H5T_order_t order; /* byte order value */
@@ -744,7 +744,7 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
const char *pad_s = NULL; /* internal padding string */
if (H5T_FLOAT != H5Tget_class(type))
- return FALSE;
+ return false;
/* Byte order */
if (H5Tget_size(type) > 1) {
@@ -820,7 +820,7 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
}
h5tools_str_append(buffer, "\n%*s(internal padding bits are %s)", ind, "", pad_s);
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -828,11 +828,11 @@ print_float_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print info about a compound data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
{
char *name = NULL; /* member name */
@@ -843,16 +843,16 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
unsigned i; /* miscellaneous counters */
if (H5T_COMPOUND != H5Tget_class(type))
- return FALSE;
+ return false;
if ((nmembs = H5Tget_nmembers(type)) < 0)
- return FALSE;
+ return false;
h5tools_str_append(buffer, "struct {");
for (i = 0; i < (unsigned)nmembs; i++) {
/* Name and offset */
name = H5Tget_member_name(type, i);
h5tools_str_append(buffer, "\n%*s\"", ind + 4, "");
- n = print_string(buffer, name, FALSE);
+ n = print_string(buffer, name, false);
h5tools_str_append(buffer, "\"%*s +%-4lu ", MAX(0, 16 - n), "",
(unsigned long)H5Tget_member_offset(type, i));
H5free_memory(name);
@@ -865,7 +865,7 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
size = H5Tget_size(type);
h5tools_str_append(buffer, "\n%*s} %lu byte%s", ind, "", (unsigned long)size, 1 == size ? "" : "s");
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -873,20 +873,20 @@ print_cmpd_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print info about an enumeration data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
{
int nmembs; /* number of members */
hid_t super; /* enum base integer type */
if (H5T_ENUM != H5Tget_class(type))
- return FALSE;
+ return false;
if ((nmembs = H5Tget_nmembers(type)) < 0)
- return FALSE;
+ return false;
super = H5Tget_super(type);
h5tools_str_append(buffer, "enum ");
@@ -933,7 +933,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
free(value);
H5Tclose(super);
- return FALSE;
+ return false;
}
/* Sort members by increasing value */
@@ -944,7 +944,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
int nchars; /* number of output characters */
h5tools_str_append(buffer, "\n%*s", ind + 4, "");
- nchars = print_string(buffer, name[i], TRUE);
+ nchars = print_string(buffer, name[i], true);
h5tools_str_append(buffer, "%*s = ", MAX(0, 16 - nchars), "");
if (native < 0) {
@@ -981,7 +981,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
H5Tclose(super);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -989,11 +989,11 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print information about a string data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
{
H5T_str_t pad;
@@ -1002,7 +1002,7 @@ print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
const char *cset_s = NULL;
if (H5T_STRING != H5Tget_class(type))
- return FALSE;
+ return false;
/* Padding */
pad = H5Tget_strpad(type);
@@ -1073,7 +1073,7 @@ print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
h5tools_str_append(buffer, "%lu-byte", (unsigned long)H5Tget_size(type));
}
h5tools_str_append(buffer, " %s %s string", pad_s, cset_s);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1081,30 +1081,30 @@ print_string_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
*
* Purpose: Prints information about a reference data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_reference_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
{
if (H5T_REFERENCE != H5Tget_class(type))
- return FALSE;
+ return false;
- if (H5Tequal(type, H5T_STD_REF) == TRUE) {
+ if (H5Tequal(type, H5T_STD_REF) == true) {
h5tools_str_append(buffer, "standard reference");
}
- else if (H5Tequal(type, H5T_STD_REF_OBJ) == TRUE) {
+ else if (H5Tequal(type, H5T_STD_REF_OBJ) == true) {
h5tools_str_append(buffer, "object reference");
}
- else if (H5Tequal(type, H5T_STD_REF_DSETREG) == TRUE) {
+ else if (H5Tequal(type, H5T_STD_REF_DSETREG) == true) {
h5tools_str_append(buffer, "dataset region reference");
}
else {
h5tools_str_append(buffer, "%lu-byte unknown reference", (unsigned long)H5Tget_size(type));
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1112,28 +1112,28 @@ print_reference_type(h5tools_str_t *buffer, hid_t type, int H5_ATTR_UNUSED ind)
*
* Purpose: Prints information about an opaque data type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_opaque_type(h5tools_str_t *buffer, hid_t type, int ind)
{
char *tag;
size_t size;
if (H5T_OPAQUE != H5Tget_class(type))
- return FALSE;
+ return false;
size = H5Tget_size(type);
h5tools_str_append(buffer, "%lu-byte opaque type", (unsigned long)size);
if ((tag = H5Tget_tag(type))) {
h5tools_str_append(buffer, "\n%*s(tag = \"", ind, "");
- print_string(buffer, tag, FALSE);
+ print_string(buffer, tag, false);
h5tools_str_append(buffer, "\")");
H5free_memory(tag);
}
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1141,33 +1141,33 @@ print_opaque_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print information about a variable-length type
*
- * Return: Success: TRUE
- * Failure: FALSE
+ * Return: Success: true
+ * Failure: false
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_vlen_type(h5tools_str_t *buffer, hid_t type, int ind)
{
hid_t super;
if (H5T_VLEN != H5Tget_class(type))
- return FALSE;
+ return false;
h5tools_str_append(buffer, "variable length of\n%*s", ind + 4, "");
super = H5Tget_super(type);
print_type(buffer, super, ind + 4);
H5Tclose(super);
- return TRUE;
+ return true;
}
/*---------------------------------------------------------------------------
* Purpose: Print information about an array type
*
- * Return: Success: TRUE
- * Failure: FALSE
+ * Return: Success: true
+ * Failure: false
*---------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
{
hid_t super;
@@ -1175,7 +1175,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
hsize_t *dims = NULL;
if (H5T_ARRAY != H5Tget_class(type))
- return FALSE;
+ return false;
ndims = H5Tget_array_ndims(type);
if (ndims) {
dims = (hsize_t *)malloc((unsigned)ndims * sizeof(dims[0]));
@@ -1196,7 +1196,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
super = H5Tget_super(type);
print_type(buffer, super, ind + 4);
H5Tclose(super);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1204,18 +1204,18 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
*
* Purpose: Print information about a bitfield type.
*
- * Return: Success: TRUE
- * Failure: FALSE, nothing printed
+ * Return: Success: true
+ * Failure: false, nothing printed
*-------------------------------------------------------------------------
*/
-static hbool_t
+static bool
print_bitfield_type(h5tools_str_t *buffer, hid_t type, int ind)
{
H5T_order_t order; /* byte order value */
const char *order_s = NULL; /* byte order string */
if (H5T_BITFIELD != H5Tget_class(type))
- return FALSE;
+ return false;
if (H5Tget_size(type) > 1) {
order = H5Tget_order(type);
if (H5T_ORDER_LE == order) {
@@ -1237,7 +1237,7 @@ print_bitfield_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer, "%lu-bit%s bitfield", (unsigned long)(8 * H5Tget_size(type)), order_s);
print_precision(buffer, type, ind);
- return TRUE;
+ return true;
}
/*-------------------------------------------------------------------------
@@ -1389,12 +1389,12 @@ dump_dataset_values(hid_t dset)
if (hexdump_g) {
/* Print all data in hexadecimal format if the `-x' or `--hexdump'
* command line switch was given. */
- outputformat.raw = TRUE;
+ outputformat.raw = true;
}
else if (string_g && H5Tget_size(f_type) == 1 && (H5Tget_class(f_type) == H5T_INTEGER)) {
/* Print 1-byte integer data as an ASCI character string instead of
* integers if the `-s' or `--string' command-line option was given. */
- outputformat.ascii = TRUE;
+ outputformat.ascii = true;
outputformat.elmt_suf1 = "";
outputformat.elmt_suf2 = "";
HDsnprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
@@ -1412,7 +1412,7 @@ dump_dataset_values(hid_t dset)
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0,
(hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
ctx.cur_column = (size_t)curr_pos;
if (H5Tget_class(f_type) == H5T_REFERENCE) {
H5TOOLS_DEBUG("reference class type");
@@ -1428,7 +1428,7 @@ dump_dataset_values(hid_t dset)
H5Sget_simple_extent_dims(space, total_size, NULL);
init_acc_pos(ctx.ndims, total_size, ctx.acc, ctx.pos, ctx.p_min_idx);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
if (NULL !=
(ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
@@ -1558,12 +1558,12 @@ dump_attribute_values(hid_t attr)
if (hexdump_g) {
/* Print all data in hexadecimal format if the `-x' or `--hexdump'
* command line switch was given. */
- outputformat.raw = TRUE;
+ outputformat.raw = true;
}
else if (string_g && H5Tget_size(f_type) == 1 && (H5Tget_class(f_type) == H5T_INTEGER)) {
/* Print 1-byte integer data as an ASCI character string instead of
* integers if the `-s' or `--string' command-line option was given. */
- outputformat.ascii = TRUE;
+ outputformat.ascii = true;
outputformat.elmt_suf1 = "";
outputformat.elmt_suf2 = "";
HDsnprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
@@ -1582,7 +1582,7 @@ dump_attribute_values(hid_t attr)
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0,
(hsize_t)0);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
ctx.cur_column = (size_t)curr_pos;
if (H5Tget_class(f_type) == H5T_REFERENCE) {
H5TOOLS_DEBUG("reference class type");
@@ -1598,7 +1598,7 @@ dump_attribute_values(hid_t attr)
H5Sget_simple_extent_dims(space, total_size, NULL);
init_acc_pos(ctx.ndims, total_size, ctx.acc, ctx.pos, ctx.p_min_idx);
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
if (NULL !=
(ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
@@ -1675,7 +1675,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " Attribute: ");
- print_string(&buffer, attr_name, TRUE);
+ print_string(&buffer, attr_name, true);
H5TOOLS_DEBUG("Attribute name:%s", attr_name);
if ((attr = H5Aopen(obj, attr_name, H5P_DEFAULT)) >= 0) {
@@ -1876,7 +1876,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
for (i = 0, max_len = 0; i < nf; i++) {
if (H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0)
continue;
- n = print_string(NULL, f_name, TRUE);
+ n = print_string(NULL, f_name, true);
max_len = MAX(max_len, n);
} /* end for */
h5tools_str_append(&buffer, " %-10s %d external file%s\n", "Extern:", nf,
@@ -1899,13 +1899,13 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
h5tools_str_append(&buffer,
" #%03d %10" PRIuHSIZE " %10" PRIuHSIZE " %10s ", i,
total, (hsize_t)f_offset, "INF");
- print_string(&buffer, f_name, TRUE);
+ print_string(&buffer, f_name, true);
}
else {
h5tools_str_append(
&buffer, " #%03d %10" PRIuHSIZE " %10" PRIuHSIZE " %10" PRIuHSIZE " ",
i, total, (hsize_t)f_offset, f_size);
- print_string(&buffer, f_name, TRUE);
+ print_string(&buffer, f_name, true);
}
h5tools_str_append(&buffer, "\n");
total += f_size;
@@ -1932,9 +1932,9 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
H5Pget_virtual_filename(dcpl, next, f_name, sizeof(f_name));
H5Pget_virtual_dsetname(dcpl, next, dset_name, sizeof(dset_name));
h5tools_str_append(&buffer, " %-10s ", " ");
- print_string(&buffer, f_name, TRUE);
+ print_string(&buffer, f_name, true);
h5tools_str_append(&buffer, " ");
- print_string(&buffer, dset_name, TRUE);
+ print_string(&buffer, dset_name, true);
h5tools_str_append(&buffer, "\n");
}
h5tools_str_append(&buffer, " %-10s}\n", " ");
@@ -2114,7 +2114,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
if (first_seen) {
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, ", same as ");
- print_string(&buffer, first_seen, TRUE);
+ print_string(&buffer, first_seen, true);
if (!iter->symlink_target) {
h5tools_str_append(&buffer, "\n");
}
@@ -2210,7 +2210,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
comment[cmt_bufsize] = 0;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " %-10s \"", "Comment:");
- print_string(&buffer, comment, FALSE);
+ print_string(&buffer, comment, false);
h5tools_str_append(&buffer, "\"\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos,
(size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -2236,7 +2236,7 @@ done:
h5tools_str_append(&buffer, "}\n");
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols,
(hsize_t)0, (hsize_t)0);
- iter->symlink_target = FALSE;
+ iter->symlink_target = false;
}
h5tools_str_close(&buffer);
@@ -2292,7 +2292,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
goto done;
/* no dangling link option given and detect dangling link */
else if (no_dangling_link_g && ret == 0)
- iter->symlink_list->dangle_link = TRUE;
+ iter->symlink_list->dangle_link = true;
h5tools_str_append(&buffer, "Soft Link {");
h5tools_str_append(&buffer, "%s", buf);
@@ -2300,7 +2300,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols,
(hsize_t)0, (hsize_t)0);
if (follow_symlink_g) {
- hbool_t orig_grp_literal = grp_literal_g;
+ bool orig_grp_literal = grp_literal_g;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " ");
@@ -2320,12 +2320,12 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
/* Adjust user data to specify that we are operating on the
* target of an soft link */
- iter->symlink_target = TRUE;
+ iter->symlink_target = true;
/* Prevent recursive listing of soft link target if
* recursive_g is off */
if (!recursive_g)
- grp_literal_g = TRUE;
+ grp_literal_g = true;
/* Recurse through the soft link */
if (visit_obj(iter->fid, name, iter) < 0) {
grp_literal_g = orig_grp_literal;
@@ -2346,7 +2346,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
case H5L_TYPE_EXTERNAL: {
const char *filename;
const char *path;
- hbool_t follow_link = follow_symlink_g || follow_elink_g;
+ bool follow_link = follow_symlink_g || follow_elink_g;
ret = H5tools_get_symlink_info(iter->fid, name, &lnk_info, follow_link);
/* lnk_info.trg_path is malloced in H5tools_get_symlink_info()
@@ -2357,7 +2357,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
goto done;
/* no dangling link option given and detect dangling link */
else if (no_dangling_link_g && ret == 0)
- iter->symlink_list->dangle_link = TRUE;
+ iter->symlink_list->dangle_link = true;
if (H5Lunpack_elink_val(buf, linfo->u.val_size, NULL, &filename, &path) < 0)
goto done;
@@ -2375,7 +2375,7 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
/* Recurse through the external link */
/* keep the follow_elink_g for backward compatibility with -E */
if (follow_link) {
- hbool_t orig_grp_literal = grp_literal_g;
+ bool orig_grp_literal = grp_literal_g;
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " ");
@@ -2396,12 +2396,12 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
/* Adjust user data to specify that we are operating on the
* target of an external link */
- iter->symlink_target = TRUE;
+ iter->symlink_target = true;
/* Prevent recursive listing of external link target if
* recursive_g is off */
if (!recursive_g)
- grp_literal_g = TRUE;
+ grp_literal_g = true;
/* Recurse through the external link */
if (visit_obj(iter->fid, name, iter) < 0) {
@@ -2461,7 +2461,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
if (H5Oget_info_by_name3(file, oname, &oi, H5O_INFO_BASIC | H5O_INFO_TIME, H5P_DEFAULT) < 0) {
if (iter->symlink_target) {
h5tools_str_append(&buffer, "{**NOT FOUND**}\n");
- iter->symlink_target = FALSE;
+ iter->symlink_target = false;
}
else
print_obj_name(&buffer, iter, oname, "**NOT FOUND**");
@@ -2488,7 +2488,7 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
iter->name_start = iter->base_len;
/* Specified name is a group. List the complete contents of the group. */
- h5trav_visit(file, oname, (hbool_t)(display_root_g || iter->symlink_target), recursive_g, list_obj,
+ h5trav_visit(file, oname, (bool)(display_root_g || iter->symlink_target), recursive_g, list_obj,
list_lnk, iter, H5O_INFO_BASIC | H5O_INFO_TIME);
/* Close group */
@@ -2587,24 +2587,24 @@ get_width(void)
*
* Purpose: check if command line arguments are valid
*
- * Return: Success: TRUE (1)
- * Failure: FALSE (0)
+ * Return: Success: true (1)
+ * Failure: false (0)
*-------------------------------------------------------------------------*/
-static hbool_t
+static bool
is_valid_args(void)
{
- hbool_t ret = TRUE;
+ bool ret = true;
if (recursive_g && grp_literal_g) {
fprintf(rawerrorstream, "Error: 'recursive' option not compatible with 'group info' option!\n\n");
- ret = FALSE;
+ ret = false;
goto out;
}
if (no_dangling_link_g && !follow_symlink_g) {
fprintf(rawerrorstream,
"Error: --no-dangling-links must be used along with --follow-symlinks option!\n\n");
- ret = FALSE;
+ ret = false;
goto out;
}
@@ -2649,8 +2649,8 @@ main(int argc, char *argv[])
char drivername[50];
int err_exit = 0;
hid_t fapl_id = H5P_DEFAULT;
- hbool_t custom_vol_fapl = FALSE;
- hbool_t custom_vfd_fapl = FALSE;
+ bool custom_vol_fapl = false;
+ bool custom_vfd_fapl = false;
h5tools_vol_info_t vol_info = {0};
h5tools_vfd_info_t vfd_info = {0};
@@ -2659,7 +2659,7 @@ main(int argc, char *argv[])
H5FD_ros3_fapl_ext_t ros3_fa = {
{
1, /* Structure Version */
- FALSE, /* Authenticate? */
+ false, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -2710,10 +2710,10 @@ main(int argc, char *argv[])
leave(EXIT_SUCCESS);
}
else if (!HDstrcmp(argv[argno], "--address")) {
- address_g = TRUE;
+ address_g = true;
}
else if (!HDstrcmp(argv[argno], "--data")) {
- data_g = TRUE;
+ data_g = true;
}
else if (!HDstrcmp(argv[argno], "--enable-error-stack")) {
enable_error_stack = 1;
@@ -2723,42 +2723,42 @@ main(int argc, char *argv[])
enable_error_stack = 1;
}
else if (!HDstrcmp(argv[argno], "--follow-symlinks")) {
- follow_symlink_g = TRUE;
+ follow_symlink_g = true;
}
else if (!HDstrcmp(argv[argno], "--no-dangling-links")) {
- no_dangling_link_g = TRUE;
+ no_dangling_link_g = true;
}
else if (!HDstrcmp(argv[argno], "--external")) {
- follow_elink_g = TRUE;
+ follow_elink_g = true;
}
else if (!HDstrcmp(argv[argno], "--full")) {
- fullname_g = TRUE;
+ fullname_g = true;
}
else if (!HDstrcmp(argv[argno], "--group")) {
- grp_literal_g = TRUE;
+ grp_literal_g = true;
}
else if (!HDstrcmp(argv[argno], "--label")) {
- label_g = TRUE;
+ label_g = true;
}
else if (!HDstrcmp(argv[argno], "--recursive")) {
- recursive_g = TRUE;
- fullname_g = TRUE;
+ recursive_g = true;
+ fullname_g = true;
}
else if (!HDstrcmp(argv[argno], "--simple")) {
- simple_output_g = TRUE;
+ simple_output_g = true;
}
else if (!HDstrcmp(argv[argno], "--string")) {
- string_g = TRUE;
+ string_g = true;
}
else if (!HDstrncmp(argv[argno], "--vol-value=", (size_t)12)) {
vol_info.type = VOL_BY_VALUE;
vol_info.u.value = (H5VL_class_value_t)atoi(argv[argno] + 12);
- custom_vol_fapl = TRUE;
+ custom_vol_fapl = true;
}
else if (!HDstrncmp(argv[argno], "--vol-name=", (size_t)11)) {
vol_info.type = VOL_BY_NAME;
vol_info.u.name = argv[argno] + 11;
- custom_vol_fapl = TRUE;
+ custom_vol_fapl = true;
}
else if (!HDstrncmp(argv[argno], "--vol-info=", (size_t)11)) {
vol_info.info_string = argv[argno] + 11;
@@ -2766,17 +2766,17 @@ main(int argc, char *argv[])
else if (!HDstrncmp(argv[argno], "--vfd=", (size_t)6)) {
vfd_info.type = VFD_BY_NAME;
vfd_info.u.name = argv[argno] + 6;
- custom_vfd_fapl = TRUE;
+ custom_vfd_fapl = true;
}
else if (!HDstrncmp(argv[argno], "--vfd-value=", (size_t)12)) {
vfd_info.type = VFD_BY_VALUE;
vfd_info.u.value = (H5FD_class_value_t)atoi(argv[argno] + 12);
- custom_vfd_fapl = TRUE;
+ custom_vfd_fapl = true;
}
else if (!HDstrncmp(argv[argno], "--vfd-name=", (size_t)11)) {
vfd_info.type = VFD_BY_NAME;
vfd_info.u.name = argv[argno] + 11;
- custom_vfd_fapl = TRUE;
+ custom_vfd_fapl = true;
}
else if (!HDstrncmp(argv[argno], "--vfd-info=", (size_t)11)) {
vfd_info.info = (const void *)(argv[argno] + 11);
@@ -2785,7 +2785,7 @@ main(int argc, char *argv[])
width_g = (int)strtol(argv[argno] + 8, &rest, 0);
if (0 == width_g)
- no_line_wrap_g = TRUE;
+ no_line_wrap_g = true;
else if (width_g < 0 || *rest) {
usage();
leave(EXIT_FAILURE);
@@ -2813,7 +2813,7 @@ main(int argc, char *argv[])
leave(EXIT_SUCCESS);
}
else if (!HDstrcmp(argv[argno], "--hexdump")) {
- hexdump_g = TRUE;
+ hexdump_g = true;
}
else if (!HDstrncmp(argv[argno], "-w", (size_t)2)) {
if (argv[argno][2]) {
@@ -2829,7 +2829,7 @@ main(int argc, char *argv[])
width_g = (int)strtol(s, &rest, 0);
if (0 == width_g) {
- no_line_wrap_g = TRUE;
+ no_line_wrap_g = true;
}
else if (width_g < 0 || *rest) {
usage();
@@ -2897,11 +2897,11 @@ main(int argc, char *argv[])
break;
case 'a': /* --address */
- address_g = TRUE;
+ address_g = true;
break;
case 'd': /* --data */
- data_g = TRUE;
+ data_g = true;
break;
/* deprecated -e */
@@ -2910,32 +2910,32 @@ main(int argc, char *argv[])
break;
case 'E': /* --external */
- follow_elink_g = TRUE;
+ follow_elink_g = true;
break;
case 'f': /* --full */
- fullname_g = TRUE;
+ fullname_g = true;
break;
case 'g': /* --group */
- grp_literal_g = TRUE;
+ grp_literal_g = true;
break;
case 'l': /* --label */
- label_g = TRUE;
+ label_g = true;
break;
case 'r': /* --recursive */
- recursive_g = TRUE;
- fullname_g = TRUE;
+ recursive_g = true;
+ fullname_g = true;
break;
case 'S': /* --simple */
- simple_output_g = TRUE;
+ simple_output_g = true;
break;
case 's': /* --string */
- string_g = TRUE;
+ string_g = true;
break;
case 'v': /* --verbose */
@@ -2948,7 +2948,7 @@ main(int argc, char *argv[])
break;
case 'x': /* --hexdump */
- hexdump_g = TRUE;
+ hexdump_g = true;
break;
default:
@@ -3070,7 +3070,7 @@ main(int argc, char *argv[])
if (!oname || !*oname) {
oname = root_name;
if (recursive_g)
- display_root_g = TRUE;
+ display_root_g = true;
iter.base_len = 0;
iter.name_start = 0;
/* Use x to remember if we have allocated space in oname */
@@ -3081,9 +3081,9 @@ main(int argc, char *argv[])
iter.fname = fname;
iter.fid = file_id;
iter.gid = H5I_INVALID_HID;
- iter.symlink_target = FALSE;
+ iter.symlink_target = false;
iter.symlink_list = &symlink_list;
- iter.symlink_list->dangle_link = FALSE;
+ iter.symlink_list->dangle_link = false;
/* Initialize list of visited symbolic links */
symlink_list.nused = symlink_list.nalloc = 0;
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index 37e6aeb..f2b561c 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -83,12 +83,12 @@
/* report 0.0 in case t is zero too */
#define MB_PER_SEC(bytes, t) (H5_DBL_ABS_EQUAL((t), 0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t)))
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-#define FALSE (!TRUE)
-#endif /* FALSE */
+#ifndef true
+#define true 1
+#endif /* true */
+#ifndef false
+#define false (!true)
+#endif /* false */
/* global variables */
FILE *output; /* output file */
@@ -1255,13 +1255,13 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->interleaved = 0; /* Default to contiguous blocks in dataset */
cl_opts->collective = 0; /* Default to independent I/O access */
cl_opts->dim2d = 0; /* Default to 1D */
- cl_opts->print_times = FALSE; /* Printing times is off by default */
- cl_opts->print_raw = FALSE; /* Printing raw data throughput is off by default */
+ cl_opts->print_times = false; /* Printing times is off by default */
+ cl_opts->print_raw = false; /* Printing raw data throughput is off by default */
cl_opts->h5_alignment = 1; /* No alignment for HDF5 objects by default */
cl_opts->h5_threshold = 1; /* No threshold for aligning HDF5 objects by default */
- cl_opts->h5_use_chunks = FALSE; /* Don't chunk the HDF5 dataset by default */
- cl_opts->h5_write_only = FALSE; /* Do both read and write by default */
- cl_opts->verify = FALSE; /* No Verify data correctness by default */
+ cl_opts->h5_use_chunks = false; /* Don't chunk the HDF5 dataset by default */
+ cl_opts->h5_write_only = false; /* Do both read and write by default */
+ cl_opts->verify = false; /* No Verify data correctness by default */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
@@ -1313,7 +1313,7 @@ parse_command_line(int argc, const char *const *argv)
break;
case 'c':
/* Turn on chunked HDF5 dataset creation */
- cl_opts->h5_use_chunks = TRUE;
+ cl_opts->h5_use_chunks = true;
break;
case 'C':
cl_opts->collective = 1;
@@ -1354,15 +1354,15 @@ parse_command_line(int argc, const char *const *argv)
switch (*buf) {
case 'r':
/* Turn on raw data throughput info */
- cl_opts->print_raw = TRUE;
+ cl_opts->print_raw = true;
break;
case 't':
/* Turn on time printing */
- cl_opts->print_times = TRUE;
+ cl_opts->print_times = true;
break;
case 'v':
/* Turn on verify data correctness*/
- cl_opts->verify = TRUE;
+ cl_opts->verify = true;
break;
default:
fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
@@ -1406,7 +1406,7 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->h5_threshold = parse_size_directive(H5_optarg);
break;
case 'w':
- cl_opts->h5_write_only = TRUE;
+ cl_opts->h5_write_only = true;
break;
case 'x':
cl_opts->min_xfer_size = (size_t)parse_size_directive(H5_optarg);
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index 1f73a62..5c2b504 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -1129,7 +1129,7 @@ set_vfd(parameters *param)
}
else if (vfd == core) {
/* In-core temporary file with 1MB increment */
- if (H5Pset_fapl_core(my_fapl, (size_t)1024 * 1024, TRUE) < 0)
+ if (H5Pset_fapl_core(my_fapl, (size_t)1024 * 1024, true) < 0)
return -1;
}
else if (vfd == split) {
@@ -1164,7 +1164,7 @@ set_vfd(parameters *param)
memb_addr[mt] = (haddr_t)MAX(mt - 1, 0) * (HADDR_MAX / 10);
}
- if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE) < 0) {
+ if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, false) < 0) {
free(sv);
return -1;
}
@@ -1284,7 +1284,7 @@ do_cleanupfile(iotype iot, char *filename)
}
}
else if (driver == H5FD_CORE) {
- hbool_t backing; /* Whether the core file has backing store */
+ bool backing; /* Whether the core file has backing store */
H5Pget_fapl_core(fapl, NULL, &backing);
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index 5ffad71..bab8d97 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -67,12 +67,12 @@
/* report 0.0 in case t is zero too */
#define MB_PER_SEC(bytes, t) (H5_DBL_ABS_EQUAL(t, 0.0) ? 0.0 : ((((double)(bytes)) / (double)ONE_MB) / (t)))
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
-#ifndef FALSE
-#define FALSE (!TRUE)
-#endif /* FALSE */
+#ifndef true
+#define true 1
+#endif /* true */
+#ifndef false
+#define false (!true)
+#endif /* false */
/* global variables */
FILE *output; /* output file */
@@ -824,14 +824,14 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->vfd = sec2;
- cl_opts->print_times = FALSE; /* Printing times is off by default */
- cl_opts->print_raw = FALSE; /* Printing raw data throughput is off by default */
+ cl_opts->print_times = false; /* Printing times is off by default */
+ cl_opts->print_raw = false; /* Printing raw data throughput is off by default */
cl_opts->h5_alignment = 1; /* No alignment for HDF5 objects by default */
cl_opts->h5_threshold = 1; /* No threshold for aligning HDF5 objects by default */
- cl_opts->h5_use_chunks = FALSE; /* Don't chunk the HDF5 dataset by default */
- cl_opts->h5_write_only = FALSE; /* Do both read and write by default */
- cl_opts->h5_extendable = FALSE; /* Use extendable dataset */
- cl_opts->verify = FALSE; /* No Verify data correctness by default */
+ cl_opts->h5_use_chunks = false; /* Don't chunk the HDF5 dataset by default */
+ cl_opts->h5_write_only = false; /* Do both read and write by default */
+ cl_opts->h5_extendable = false; /* Use extendable dataset */
+ cl_opts->verify = false; /* No Verify data correctness by default */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
@@ -941,15 +941,15 @@ parse_command_line(int argc, const char *const *argv)
switch (*buf) {
case 'r':
/* Turn on raw data throughput info */
- cl_opts->print_raw = TRUE;
+ cl_opts->print_raw = true;
break;
case 't':
/* Turn on time printing */
- cl_opts->print_times = TRUE;
+ cl_opts->print_times = true;
break;
case 'v':
/* Turn on verify data correctness*/
- cl_opts->verify = TRUE;
+ cl_opts->verify = true;
break;
default:
fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
@@ -1029,10 +1029,10 @@ parse_command_line(int argc, const char *const *argv)
}
break;
case 'w':
- cl_opts->h5_write_only = TRUE;
+ cl_opts->h5_write_only = true;
break;
case 't':
- cl_opts->h5_extendable = TRUE;
+ cl_opts->h5_extendable = true;
break;
case 'x': {
const char *end = H5_optarg;
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index 7849e29..6747c25 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -67,7 +67,7 @@ h5repack(const char *infile, const char *outfile, pack_opt_t *options)
*-------------------------------------------------------------------------
*/
int
-h5repack_init(pack_opt_t *options, int verbose, hbool_t latest)
+h5repack_init(pack_opt_t *options, int verbose, bool latest)
{
int k, n;
@@ -373,7 +373,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
H5O_info2_t oinfo; /* object info */
int j;
unsigned u;
- hbool_t is_ref = 0;
+ bool is_ref = 0;
H5T_class_t type_class = -1;
int ret_value = 0;
@@ -523,7 +523,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
/* Check if we have VL data and string in the attribute's datatype that must
* be reclaimed */
- if (TRUE == h5tools_detect_vlen(wtype_id))
+ if (true == h5tools_detect_vlen(wtype_id))
H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
free(buf);
@@ -562,7 +562,7 @@ done:
/* Check if we have VL data and string in the attribute's
* datatype that must be reclaimed
*/
- if (TRUE == h5tools_detect_vlen(wtype_id))
+ if (true == h5tools_detect_vlen(wtype_id))
H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
/* Free buf */
diff --git a/tools/src/h5repack/h5repack.h b/tools/src/h5repack/h5repack.h
index 0387c68..fa79c6f 100644
--- a/tools/src/h5repack/h5repack.h
+++ b/tools/src/h5repack/h5repack.h
@@ -35,7 +35,7 @@
/* File space default information */
#define FS_PAGESIZE_DEF 4096
#define FS_STRATEGY_DEF H5F_FSPACE_STRATEGY_FSM_AGGR
-#define FS_PERSIST_DEF FALSE
+#define FS_PERSIST_DEF false
#define FS_THRESHOLD_DEF 1
/*-------------------------------------------------------------------------
@@ -111,11 +111,11 @@ typedef struct {
chunk_info_t chunk_g; /* global chunk INFO for the ALL case */
H5D_layout_t layout_g; /* global layout information for the ALL case */
int verbose; /* verbose mode */
- hbool_t merge; /* Merge external file. */
- hbool_t prune; /* Don't follow external file. */
+ bool merge; /* Merge external file. */
+ bool prune; /* Don't follow external file. */
hsize_t min_comp; /* minimum size to compress, in bytes */
int use_native; /* use a native type in write */
- hbool_t latest; /* pack file with the latest file format */
+ bool latest; /* pack file with the latest file format */
H5F_libver_t low_bound; /* The file's low bound as in H5Fset_libver_bounds() */
H5F_libver_t high_bound; /* The file's high bound as in H5Fset_libver_bounds() */
hid_t fin_fapl; /* FAPL to use for opening the input file */
@@ -153,7 +153,7 @@ extern "C" {
int h5repack(const char *infile, const char *outfile, pack_opt_t *options);
int h5repack_addfilter(const char *str, pack_opt_t *options);
int h5repack_addlayout(const char *str, pack_opt_t *options);
-int h5repack_init(pack_opt_t *options, int verbose, hbool_t latest);
+int h5repack_init(pack_opt_t *options, int verbose, bool latest);
int h5repack_end(pack_opt_t *options);
int h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options);
int h5repack_cmp_pl(const char *fname1, hid_t fname1_fapl, const char *fname2, hid_t fname2_fapl);
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 2d0819b..ef69510 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -67,11 +67,11 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options)
trav_table_t *travt = NULL;
hsize_t ub_size = 0; /* size of user block */
H5F_fspace_strategy_t set_strategy; /* Strategy to be set in output file */
- hbool_t set_persist; /* Persist free-space status to be set in output file */
+ bool set_persist; /* Persist free-space status to be set in output file */
hsize_t set_threshold; /* Free-space section threshold to be set in output file */
hsize_t set_pagesize; /* File space page size to be set in output file */
H5F_fspace_strategy_t in_strategy; /* Strategy from input file */
- hbool_t in_persist; /* Persist free-space status from input file */
+ bool in_persist; /* Persist free-space status from input file */
hsize_t in_threshold; /* Free-space section threshold from input file */
hsize_t in_pagesize; /* File space page size from input file */
unsigned crt_order_flags; /* group creation order flag */
@@ -274,7 +274,7 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options)
if (options->fs_persist == -1) /* A default "persist" is specified by user */
set_persist = FS_PERSIST_DEF;
else if (options->fs_persist != 0) /* Set "persist" as specified by user */
- set_persist = (hbool_t)options->fs_persist;
+ set_persist = (bool)options->fs_persist;
if (options->fs_threshold == -1) /* A "0" threshold is specified by user */
set_threshold = (hsize_t)0;
@@ -654,7 +654,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
int is_ref = 0;
htri_t is_named;
htri_t is_vlen = 0;
- hbool_t limit_maxdims;
+ bool limit_maxdims;
hsize_t size_dset;
int ret_value = 0;
@@ -683,7 +683,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
for (i = 0; i < travt->nobjs; i++) {
/* init variables per obj */
buf = NULL;
- limit_maxdims = FALSE;
+ limit_maxdims = false;
switch (travt->objs[i].type) {
case H5TRAV_TYPE_UNKNOWN:
@@ -763,7 +763,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
*-------------------------------------------------------------------------
*/
case H5TRAV_TYPE_DATASET: {
- hbool_t use_h5ocopy;
+ bool use_h5ocopy;
read_time = 0.0;
write_time = 0.0;
@@ -867,7 +867,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Pget_vol_id failed");
if (in_vol_id != out_vol_id)
- use_h5ocopy = FALSE;
+ use_h5ocopy = false;
if (in_vol_id != default_vol_id)
if (H5VLclose(in_vol_id) < 0)
@@ -979,15 +979,15 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (options->op_tbl->nelems > 0) {
/* if current obj match specified obj */
if (options_get_object(travt->objs[i].name, options->op_tbl))
- limit_maxdims = TRUE;
+ limit_maxdims = true;
}
else /* no dataset is specified */
- limit_maxdims = TRUE;
+ limit_maxdims = true;
/* if convert to COMPACT */
if (options->layout_g == H5D_COMPACT)
if (size_dset > MAX_COMPACT_DSIZE)
- limit_maxdims = FALSE;
+ limit_maxdims = false;
/* unset unlimited max dims */
if (limit_maxdims)
@@ -1032,7 +1032,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* Set up collective write if using filters in parallel */
{
#ifdef H5_HAVE_PARALLEL
- hbool_t parallel = (H5FD_MPIO == H5Pget_driver(options->fout_fapl));
+ bool parallel = (H5FD_MPIO == H5Pget_driver(options->fout_fapl));
if (parallel && apply_s && apply_f) {
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
@@ -1070,7 +1070,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* Check if we have VL data in the dataset's
* datatype that must be reclaimed */
- if (TRUE == H5Tdetect_class(wtype_id, H5T_VLEN))
+ if (true == H5Tdetect_class(wtype_id, H5T_VLEN))
if (H5Treclaim(wtype_id, f_space_id, H5P_DEFAULT, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Treclaim failed");
@@ -1104,8 +1104,8 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5I_INVALID_HID; /* dataset creation property list ID */
/* check if we have VL data in the dataset's datatype */
- if (H5Tdetect_class(wtype_id, H5T_VLEN) == TRUE)
- vl_data = TRUE;
+ if (H5Tdetect_class(wtype_id, H5T_VLEN) == true)
+ vl_data = true;
/* check first if writing dataset is chunked,
* if so use its chunk layout for better performance. */
@@ -1420,7 +1420,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
}
/* Set flag for intermediate group creation */
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0)
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Pset_create_intermediate_group failed");
if (H5Ocopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, ocpl_id,
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 33e3b83..13f0f19 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -526,10 +526,10 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
h5tools_vol_info_t out_vol_info;
h5tools_vfd_info_t in_vfd_info;
h5tools_vfd_info_t out_vfd_info;
- hbool_t custom_in_vol = FALSE;
- hbool_t custom_in_vfd = FALSE;
- hbool_t custom_out_vol = FALSE;
- hbool_t custom_out_vfd = FALSE;
+ bool custom_in_vol = false;
+ bool custom_in_vfd = false;
+ bool custom_out_vol = false;
+ bool custom_out_vfd = false;
hid_t tmp_fapl = H5I_INVALID_HID;
int bound, opt;
int ret_value = 0;
@@ -621,7 +621,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'L':
- options->latest = TRUE;
+ options->latest = true;
break;
case 'j':
@@ -647,30 +647,30 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'X':
- options->merge = TRUE;
+ options->merge = true;
break;
case 'W':
- options->prune = TRUE;
+ options->prune = true;
break;
case 'c':
options->grp_compact = atoi(H5_optarg);
if (options->grp_compact > 0)
- options->latest = TRUE; /* must use latest format */
+ options->latest = true; /* must use latest format */
break;
case 'd':
options->grp_indexed = atoi(H5_optarg);
if (options->grp_indexed > 0)
- options->latest = TRUE; /* must use latest format */
+ options->latest = true; /* must use latest format */
break;
case 's': {
int idx = 0;
int ssize = 0;
char *msgPtr = HDstrchr(H5_optarg, ':');
- options->latest = TRUE; /* must use latest format */
+ options->latest = true; /* must use latest format */
if (msgPtr == NULL) {
ssize = atoi(H5_optarg);
for (idx = 0; idx < 5; idx++)
@@ -793,13 +793,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '1':
in_vol_info.type = VOL_BY_VALUE;
in_vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- custom_in_vol = TRUE;
+ custom_in_vol = true;
break;
case '2':
in_vol_info.type = VOL_BY_NAME;
in_vol_info.u.name = H5_optarg;
- custom_in_vol = TRUE;
+ custom_in_vol = true;
break;
case '3':
@@ -809,13 +809,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '4':
out_vol_info.type = VOL_BY_VALUE;
out_vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- custom_out_vol = TRUE;
+ custom_out_vol = true;
break;
case '5':
out_vol_info.type = VOL_BY_NAME;
out_vol_info.u.name = H5_optarg;
- custom_out_vol = TRUE;
+ custom_out_vol = true;
break;
case '6':
@@ -825,13 +825,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '7':
in_vfd_info.type = VFD_BY_VALUE;
in_vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- custom_in_vfd = TRUE;
+ custom_in_vfd = true;
break;
case '8':
in_vfd_info.type = VFD_BY_NAME;
in_vfd_info.u.name = H5_optarg;
- custom_in_vfd = TRUE;
+ custom_in_vfd = true;
break;
case '9':
@@ -841,13 +841,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case '0':
out_vfd_info.type = VFD_BY_VALUE;
out_vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- custom_out_vfd = TRUE;
+ custom_out_vfd = true;
break;
case 'Y':
out_vfd_info.type = VFD_BY_NAME;
out_vfd_info.u.name = H5_optarg;
- custom_out_vfd = TRUE;
+ custom_out_vfd = true;
break;
case 'Z':
@@ -982,7 +982,7 @@ main(int argc, char **argv)
}
/* initialize options */
- if (h5repack_init(&options, 0, FALSE) < 0) {
+ if (h5repack_init(&options, 0, false) < 0) {
printf("Error occurred while initializing repack options\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c
index 2018527..8216e7a 100644
--- a/tools/src/h5repack/h5repack_opttable.c
+++ b/tools/src/h5repack/h5repack_opttable.c
@@ -181,7 +181,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
{
unsigned i, j, I;
unsigned added = 0;
- hbool_t found = FALSE;
+ bool found = false;
int ret_value = 0;
/* increase the size of the collection by N_OBJS if necessary */
@@ -205,7 +205,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* insert the layout info */
else {
aux_tblinsert_layout(table, i, pack);
- found = TRUE;
+ found = true;
break;
}
} /* if */
@@ -261,7 +261,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
{
unsigned int i, j, I;
unsigned added = 0;
- hbool_t found = FALSE;
+ bool found = false;
/* increase the size of the collection by N_OBJS if necessary */
if (table->nelems + n_objs >= table->size)
@@ -278,7 +278,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
if (HDstrcmp(obj_list[j].obj, table->objs[i].path) == 0) {
/* insert */
aux_tblinsert_filter(table, i, filt);
- found = TRUE;
+ found = true;
break;
} /* if */
} /* i */
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index ce4a5cf..e71d6db 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -451,7 +451,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
unsigned u, i, j;
int rank;
H5T_class_t type_class = -1;
- hbool_t is_ref = 0, is_ref_vlen = 0, is_ref_array = 0, is_ref_comp = 0;
+ bool is_ref = 0, is_ref_vlen = 0, is_ref_array = 0, is_ref_comp = 0;
void *refbuf = NULL;
void *buf = NULL;
unsigned *ref_comp_index = NULL;
diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c
index 572aa48..819dd94 100644
--- a/tools/src/h5repack/h5repack_verify.c
+++ b/tools/src/h5repack/h5repack_verify.c
@@ -49,7 +49,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
hid_t fcpl_in = H5I_INVALID_HID; /* file creation property for input file */
hid_t fcpl_out = H5I_INVALID_HID; /* file creation property for output file */
H5F_fspace_strategy_t in_strategy, out_strategy; /* file space handling strategy for in/output file */
- hbool_t in_persist, out_persist; /* free-space persist status for in/output file */
+ bool in_persist, out_persist; /* free-space persist status for in/output file */
hsize_t in_threshold, out_threshold; /* free-space section threshold for in/output file */
hsize_t in_pagesize, out_pagesize; /* file space page size for input/output file */
int ret_value = 0;
@@ -234,7 +234,7 @@ h5repack_verify(const char *in_fname, const char *out_fname, pack_opt_t *options
* the same as the input file's free-space persist status
*/
if (options->fs_persist) {
- if (out_persist != (hbool_t)(options->fs_persist == (-1) ? FALSE : options->fs_persist))
+ if (out_persist != (bool)(options->fs_persist == (-1) ? false : options->fs_persist))
H5TOOLS_GOTO_ERROR((-1), "free-space persist status not set as unexpected");
}
else {
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 5cfa61d..bb4e58a 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -101,7 +101,7 @@ typedef struct iter_t {
hsize_t super_ext_size; /* superblock extension size */
hsize_t ublk_size; /* user block size (if exists) */
H5F_fspace_strategy_t fs_strategy; /* File space management strategy */
- hbool_t fs_persist; /* Free-space persist or not */
+ bool fs_persist; /* Free-space persist or not */
hsize_t fs_threshold; /* Free-space section threshold */
hsize_t fsp_size; /* File space page size */
hsize_t free_space; /* Amount of freespace in the file */
@@ -122,7 +122,7 @@ static const char *drivername = NULL;
static H5FD_ros3_fapl_ext_t ros3_fa = {
{
1, /* Structure Version */
- FALSE, /* Authenticate? */
+ false, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -143,22 +143,22 @@ static H5FD_hdfs_fapl_t hdfs_fa = {
};
#endif /* H5_HAVE_LIBHDFS */
-static int display_all = TRUE;
+static int display_all = true;
/* Enable the printing of selected statistics */
-static int display_file = FALSE; /* display file information */
-static int display_group = FALSE; /* display groups information */
-static int display_dset = FALSE; /* display datasets information */
-static int display_dset_dtype_meta = FALSE; /* display datasets' datatype information */
-static int display_attr = FALSE; /* display attributes information */
-static int display_free_sections = FALSE; /* display free space information */
-static int display_summary = FALSE; /* display summary of file space information */
+static int display_file = false; /* display file information */
+static int display_group = false; /* display groups information */
+static int display_dset = false; /* display datasets information */
+static int display_dset_dtype_meta = false; /* display datasets' datatype information */
+static int display_attr = false; /* display attributes information */
+static int display_free_sections = false; /* display free space information */
+static int display_summary = false; /* display summary of file space information */
-static int display_file_metadata = FALSE; /* display file space info for file's metadata */
-static int display_group_metadata = FALSE; /* display file space info for groups' metadata */
-static int display_dset_metadata = FALSE; /* display file space info for datasets' metadata */
+static int display_file_metadata = false; /* display file space info for file's metadata */
+static int display_group_metadata = false; /* display file space info for groups' metadata */
+static int display_dset_metadata = false; /* display file space info for datasets' metadata */
-static int display_object = FALSE; /* not implemented yet */
+static int display_object = false; /* not implemented yet */
/* Initialize threshold for small groups/datasets/attributes */
static int sgroups_threshold = DEF_SIZE_SMALL_GROUPS;
@@ -516,10 +516,10 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info2_t *oi, const H5O_n
if ((tid = H5Dget_type(did)) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Dget_type() failed");
- type_found = FALSE;
+ type_found = false;
for (u = 0; u < iter->dset_ntypes; u++)
if (H5Tequal(iter->dset_type_info[u].tid, tid) > 0) {
- type_found = TRUE;
+ type_found = true;
break;
} /* end for */
@@ -825,23 +825,23 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 'F':
- display_all = FALSE;
- display_file_metadata = TRUE;
+ display_all = false;
+ display_file_metadata = true;
break;
case 'f':
- display_all = FALSE;
- display_file = TRUE;
+ display_all = false;
+ display_file = true;
break;
case 'G':
- display_all = FALSE;
- display_group_metadata = TRUE;
+ display_all = false;
+ display_group_metadata = true;
break;
case 'g':
- display_all = FALSE;
- display_group = TRUE;
+ display_all = false;
+ display_group = true;
break;
case 'l':
@@ -858,13 +858,13 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 'D':
- display_all = FALSE;
- display_dset_metadata = TRUE;
+ display_all = false;
+ display_dset_metadata = true;
break;
case 'd':
- display_all = FALSE;
- display_dset = TRUE;
+ display_all = false;
+ display_dset = true;
break;
case 'm':
@@ -881,13 +881,13 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 'T':
- display_all = FALSE;
- display_dset_dtype_meta = TRUE;
+ display_all = false;
+ display_dset_dtype_meta = true;
break;
case 'A':
- display_all = FALSE;
- display_attr = TRUE;
+ display_all = false;
+ display_attr = true;
break;
case 'a':
@@ -904,18 +904,18 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
break;
case 's':
- display_all = FALSE;
- display_free_sections = TRUE;
+ display_all = false;
+ display_free_sections = true;
break;
case 'S':
- display_all = FALSE;
- display_summary = TRUE;
+ display_all = false;
+ display_summary = true;
break;
case 'O':
- display_all = FALSE;
- display_object = TRUE;
+ display_all = false;
+ display_object = true;
/* Allocate space to hold the command line info */
if (NULL == (hand = (struct handler_t *)calloc((size_t)1, sizeof(struct handler_t)))) {
@@ -1514,17 +1514,17 @@ static void
print_file_statistics(const iter_t *iter)
{
if (display_all) {
- display_file = TRUE;
- display_group = TRUE;
- display_dset = TRUE;
- display_dset_dtype_meta = TRUE;
- display_attr = TRUE;
- display_free_sections = TRUE;
- display_summary = TRUE;
-
- display_file_metadata = TRUE;
- display_group_metadata = TRUE;
- display_dset_metadata = TRUE;
+ display_file = true;
+ display_group = true;
+ display_dset = true;
+ display_dset_dtype_meta = true;
+ display_attr = true;
+ display_free_sections = true;
+ display_summary = true;
+
+ display_file_metadata = true;
+ display_group_metadata = true;
+ display_dset_metadata = true;
}
if (display_file)
@@ -1708,7 +1708,7 @@ main(int argc, char *argv[])
unsigned u;
for (u = 0; u < hand->obj_count; u++) {
- if (h5trav_visit(fid, hand->obj[u], TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) <
+ if (h5trav_visit(fid, hand->obj[u], true, true, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) <
0) {
error_msg("unable to traverse object \"%s\"\n", hand->obj[u]);
h5tools_setstatus(EXIT_FAILURE);
@@ -1718,7 +1718,7 @@ main(int argc, char *argv[])
} /* end for */
} /* end if */
else {
- if (h5trav_visit(fid, "/", TRUE, TRUE, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0) {
+ if (h5trav_visit(fid, "/", true, true, obj_stats, lnk_stats, &iter, H5O_INFO_ALL) < 0) {
error_msg("unable to traverse objects/links in file \"%s\"\n", fname);
h5tools_setstatus(EXIT_FAILURE);
}
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index 2272626..d1ea0c3 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -34,10 +34,10 @@
#define DEFAULT_INCREMENT (1024 * 1024)
static char *fname_g = NULL;
-static hbool_t clear_status_flags = FALSE;
-static hbool_t remove_cache_image = FALSE;
-static hbool_t print_filesize = FALSE;
-static hbool_t increment_eoa_eof = FALSE;
+static bool clear_status_flags = false;
+static bool remove_cache_image = false;
+static bool print_filesize = false;
+static bool increment_eoa_eof = false;
static hsize_t increment = DEFAULT_INCREMENT;
/*
@@ -130,19 +130,19 @@ parse_command_line(int argc, const char *const *argv)
goto done;
case 's':
- clear_status_flags = TRUE;
+ clear_status_flags = true;
break;
case 'm':
- remove_cache_image = TRUE;
+ remove_cache_image = true;
break;
case 'z':
- print_filesize = TRUE;
+ print_filesize = true;
break;
case 'i':
- increment_eoa_eof = TRUE;
+ increment_eoa_eof = true;
if (H5_optarg != NULL) {
if (atoi(H5_optarg) < 0) {
usage(h5tools_getprogname());
@@ -308,7 +308,7 @@ main(int argc, char *argv[])
}
/* Open the file */
- if ((fid = h5tools_fopen(fname, flags, fapl, FALSE, NULL, (size_t)0)) < 0) {
+ if ((fid = h5tools_fopen(fname, flags, fapl, false, NULL, (size_t)0)) < 0) {
error_msg("h5tools_fopen\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index fa93244..c93d9c6 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -233,7 +233,7 @@ main(int argc, char *argv[])
size_t u;
H5E_auto2_t func = NULL;
void *edata = NULL;
- hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
+ bool api_ctx_pushed = false; /* Whether API context pushed */
herr_t status = SUCCEED;
int exit_value = 0;
@@ -280,7 +280,7 @@ main(int argc, char *argv[])
exit_value = 1;
goto done;
}
- api_ctx_pushed = TRUE;
+ api_ctx_pushed = true;
if (NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(fid))) {
fprintf(stderr, "cannot obtain vol_obj pointer\n");
@@ -807,7 +807,7 @@ done:
/* Pop API context */
if (api_ctx_pushed)
- H5CX_pop(FALSE);
+ H5CX_pop(false);
H5Eset_auto2(H5E_DEFAULT, func, edata);
diff --git a/tools/src/misc/h5delete.c b/tools/src/misc/h5delete.c
index f996d8d..c3c8bf0 100644
--- a/tools/src/misc/h5delete.c
+++ b/tools/src/misc/h5delete.c
@@ -31,7 +31,7 @@ usage(void)
int
main(int argc, char *argv[])
{
- hbool_t quiet = FALSE;
+ bool quiet = false;
const char *name = NULL;
int ret = 0;
@@ -41,7 +41,7 @@ main(int argc, char *argv[])
usage();
return EXIT_FAILURE;
}
- quiet = TRUE;
+ quiet = true;
name = argv[2];
break;
case 2:
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index 31deb8b..baf3b9b 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -30,13 +30,13 @@ static struct h5_long_options l_opts[] = {
/* Command line parameter settings */
typedef struct mkgrp_opt_t {
- char *fname; /* File name to operate on */
- hbool_t latest; /* Whether file should use latest format versions */
- hbool_t verbose; /* Whether output should be verbose */
- hbool_t parents; /* Whether to create intermediate groups */
- size_t ngroups; /* Number of groups to create */
- char **groups; /* Pointer to array of group names */
- hid_t fapl_id; /* fapl to use when opening the file */
+ char *fname; /* File name to operate on */
+ bool latest; /* Whether file should use latest format versions */
+ bool verbose; /* Whether output should be verbose */
+ bool parents; /* Whether to create intermediate groups */
+ size_t ngroups; /* Number of groups to create */
+ char **groups; /* Pointer to array of group names */
+ hid_t fapl_id; /* fapl to use when opening the file */
} mkgrp_opt_t;
static mkgrp_opt_t params_g; /* Command line parameter settings */
@@ -135,8 +135,8 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
{
int opt; /* Option from command line */
size_t curr_group; /* Current group name to copy */
- hbool_t custom_vol = FALSE;
- hbool_t custom_vfd = FALSE;
+ bool custom_vol = false;
+ bool custom_vfd = false;
h5tools_vol_info_t vol_info;
h5tools_vfd_info_t vfd_info;
hid_t tmp_fapl_id = H5I_INVALID_HID;
@@ -162,17 +162,17 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
/* Create objects with the latest version of the format */
case 'l':
- options->latest = TRUE;
+ options->latest = true;
break;
/* Create parent groups */
case 'p':
- options->parents = TRUE;
+ options->parents = true;
break;
/* Verbose output */
case 'v':
- options->verbose = TRUE;
+ options->verbose = true;
break;
/* Display version */
@@ -184,13 +184,13 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
case '1':
vol_info.type = VOL_BY_VALUE;
vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
- custom_vol = TRUE;
+ custom_vol = true;
break;
case '2':
vol_info.type = VOL_BY_NAME;
vol_info.u.name = H5_optarg;
- custom_vol = TRUE;
+ custom_vol = true;
break;
case '3':
@@ -200,13 +200,13 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
case '4':
vfd_info.type = VFD_BY_VALUE;
vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
- custom_vfd = TRUE;
+ custom_vfd = true;
break;
case '5':
vfd_info.type = VFD_BY_NAME;
vfd_info.u.name = H5_optarg;
- custom_vfd = TRUE;
+ custom_vfd = true;
break;
case '6':
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
/* Check for creating intermediate groups */
if (params_g.parents) {
/* Set the intermediate group creation property */
- if (H5Pset_create_intermediate_group(lcpl_id, TRUE) < 0) {
+ if (H5Pset_create_intermediate_group(lcpl_id, true) < 0) {
error_msg("Could not set property for creating parent groups\n");
leave(EXIT_FAILURE);
}
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index e7bf055..818a489 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -146,11 +146,11 @@ main(int argc, char *argv[])
ssize_t nio; /*I/O return value */
int argno = 1; /*program argument number */
int src, dst = -1; /*source & destination files */
- int need_seek = FALSE; /*destination needs to seek? */
+ int need_seek = false; /*destination needs to seek? */
int need_write; /*data needs to be written? */
h5_stat_t sb; /*temporary file stat buffer */
- int verbose = FALSE; /*display file names? */
+ int verbose = false; /*display file names? */
const char *src_gen_name; /*general source name */
char *src_name = NULL; /*source member name */
@@ -172,7 +172,7 @@ main(int argc, char *argv[])
hid_t fapl; /*file access property list */
hid_t file;
hsize_t hdsize; /*destination logical memb size */
- hbool_t family_to_single = FALSE; /*change family to single file driver? */
+ bool family_to_single = false; /*change family to single file driver? */
/*
* Get the program name from argv[0]. Use only the last component.
@@ -187,7 +187,7 @@ main(int argc, char *argv[])
*/
while (argno < argc && '-' == argv[argno][0]) {
if (!HDstrcmp(argv[argno], "-v")) {
- verbose = TRUE;
+ verbose = true;
argno++;
}
else if (!HDstrcmp(argv[argno], "-V")) {
@@ -196,11 +196,11 @@ main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}
else if (!HDstrcmp(argv[argno], "-family_to_sec2")) {
- family_to_single = TRUE;
+ family_to_single = true;
argno++;
}
else if (!HDstrcmp(argv[argno], "-family_to_single")) {
- family_to_single = TRUE;
+ family_to_single = true;
argno++;
}
else if ('b' == argv[argno][1]) {
@@ -278,7 +278,7 @@ main(int argc, char *argv[])
if (left_overs) {
n = (size_t)MIN((off_t)n, left_overs);
left_overs = left_overs - (off_t)n;
- need_write = FALSE;
+ need_write = false;
}
else if (src_offset < src_act_size) {
n = (size_t)MIN((off_t)n, src_act_size - src_offset);
@@ -299,7 +299,7 @@ main(int argc, char *argv[])
else {
n = 0;
left_overs = src_size - src_act_size;
- need_write = FALSE;
+ need_write = false;
}
/*
@@ -320,10 +320,10 @@ main(int argc, char *argv[])
fprintf(stderr, "%s: short write\n", dst_name);
exit(EXIT_FAILURE);
}
- need_seek = FALSE;
+ need_seek = false;
}
else {
- need_seek = TRUE;
+ need_seek = true;
}
/*
@@ -395,7 +395,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
dst_offset = 0;
- need_seek = FALSE;
+ need_seek = false;
if (verbose)
fprintf(stderr, "> %s\n", dst_name);
}
diff --git a/tools/test/h5copy/h5copygentest.c b/tools/test/h5copy/h5copygentest.c
index db50693..ac19f34 100644
--- a/tools/test/h5copy/h5copygentest.c
+++ b/tools/test/h5copy/h5copygentest.c
@@ -723,7 +723,7 @@ Test_Obj_Copy(void)
}
/* Test with old & new format groups */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
/* Set the FAPL for the type of format */
/* Create source file */
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c
index aad1b8d..1b4b85c 100644
--- a/tools/test/h5dump/h5dumpgentest.c
+++ b/tools/test/h5dump/h5dumpgentest.c
@@ -3891,7 +3891,7 @@ gent_multi(void)
}
memb_map[H5FD_MEM_DEFAULT] = H5FD_MEM_SUPER;
- H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE);
+ H5Pset_fapl_multi(fapl, memb_map, memb_fapl, memb_name, memb_addr, false);
fid = H5Fcreate(FILE36, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
@@ -7133,7 +7133,7 @@ gent_fs_strategy_threshold(void)
fcpl = H5Pcreate(H5P_FILE_CREATE);
/* Set file space information */
- H5Pset_file_space_strategy(fcpl, STRATEGY, TRUE, (hsize_t)THRESHOLD10);
+ H5Pset_file_space_strategy(fcpl, STRATEGY, true, (hsize_t)THRESHOLD10);
H5Pset_file_space_page_size(fcpl, (hsize_t)FSPACE_PAGE_SIZE);
/* Create the file with the specified strategy and threshold */
diff --git a/tools/test/h5format_convert/h5fc_chk_idx.c b/tools/test/h5format_convert/h5fc_chk_idx.c
index 49fbbab..51309f6 100644
--- a/tools/test/h5format_convert/h5fc_chk_idx.c
+++ b/tools/test/h5format_convert/h5fc_chk_idx.c
@@ -59,7 +59,7 @@ main(int argc, char *argv[])
dname = HDstrdup(argv[2]);
/* Try opening the file */
- if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
+ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, false, NULL, (size_t)0)) < 0) {
fprintf(stderr, "h5fc_chk_idx: unable to open the file\n");
exit(EXIT_FAILURE);
} /* end if */
diff --git a/tools/test/h5format_convert/h5fc_gentest.c b/tools/test/h5format_convert/h5fc_gentest.c
index 5b8bfce..ff0f02e 100644
--- a/tools/test/h5format_convert/h5fc_gentest.c
+++ b/tools/test/h5format_convert/h5fc_gentest.c
@@ -572,7 +572,7 @@ gen_ext(const char *fname, unsigned new_format, unsigned what)
H5Pset_shared_mesg_nindexes(fcpl, 4);
break;
case 2:
- H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)1);
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)1);
break;
case 3:
H5Pset_istore_k(fcpl, ISTORE_IK);
@@ -580,7 +580,7 @@ gen_ext(const char *fname, unsigned new_format, unsigned what)
break;
case 4:
H5Pset_istore_k(fcpl, ISTORE_IK);
- H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1);
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1);
break;
case 5:
H5Pset_shared_mesg_nindexes(fcpl, 4);
@@ -589,7 +589,7 @@ gen_ext(const char *fname, unsigned new_format, unsigned what)
case 6:
H5Pset_istore_k(fcpl, ISTORE_IK);
H5Pset_shared_mesg_nindexes(fcpl, 4);
- H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1);
+ H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1);
break;
default:
break;
@@ -793,7 +793,7 @@ main(void)
gen_err_level(ERR_LEVEL_FILE);
/* Generate old/new format file with/without messages in the superblock extension */
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
for (i = 0; i < 8; i++) {
char filename[50];
diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c
index 8910abb..203581d 100644
--- a/tools/test/h5repack/h5repackgentest.c
+++ b/tools/test/h5repack/h5repackgentest.c
@@ -173,7 +173,7 @@ done:
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_1d(hbool_t external)
+generate_int32le_1d(bool external)
{
int32_t wdata[12];
hsize_t dims[] = {12};
@@ -188,7 +188,7 @@ generate_int32le_1d(hbool_t external)
wdata[n] = n - 6;
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_INT32LE_1, def_ptr, H5T_STD_I32LE, 1, dims, wdata) < 0)
ret_value = -1;
@@ -199,7 +199,7 @@ generate_int32le_1d(hbool_t external)
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_2d(hbool_t external)
+generate_int32le_2d(bool external)
{
int32_t wdata[64];
hsize_t dims[] = {8, 8};
@@ -214,7 +214,7 @@ generate_int32le_2d(hbool_t external)
wdata[n] = n - 32;
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_INT32LE_2, def_ptr, H5T_STD_I32LE, 2, dims, wdata) < 0)
ret_value = -1;
@@ -225,7 +225,7 @@ generate_int32le_2d(hbool_t external)
* Returns 0 on success, -1 on failure.
*/
static int
-generate_int32le_3d(hbool_t external)
+generate_int32le_3d(bool external)
{
hsize_t dims[] = {8, 8, 8};
int32_t wdata[512]; /* 8^3, from dims */
@@ -247,7 +247,7 @@ generate_int32le_3d(hbool_t external)
}
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_INT32LE_3, def_ptr, H5T_STD_I32LE, 3, dims, wdata) < 0)
ret_value = -1;
@@ -258,7 +258,7 @@ generate_int32le_3d(hbool_t external)
* Returns 0 on success, -1 on failure.
*/
static int
-generate_uint8be(hbool_t external)
+generate_uint8be(bool external)
{
hsize_t dims[] = {4, 8, 8};
uint8_t wdata[256]; /* 4*8*8, from dims */
@@ -280,7 +280,7 @@ generate_uint8be(hbool_t external)
}
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_UINT8BE, def_ptr, H5T_STD_U8BE, 3, dims, wdata) < 0)
ret_value = -1;
@@ -291,7 +291,7 @@ generate_uint8be(hbool_t external)
* Returns 0 on success, -1 on failure.
*/
static int
-generate_f32le(hbool_t external)
+generate_f32le(bool external)
{
hsize_t dims[] = {12, 6};
float wdata[72]; /* 12*6, from dims */
@@ -310,7 +310,7 @@ generate_f32le(hbool_t external)
}
}
- def_ptr = (TRUE == external) ? (&def) : NULL;
+ def_ptr = (true == external) ? (&def) : NULL;
if (make_file(FILE_F32LE, def_ptr, H5T_IEEE_F32LE, 2, dims, wdata) < 0)
ret_value = -1;
@@ -327,7 +327,7 @@ main(void)
int i = 0;
for (i = 0; i < 2; i++) {
- hbool_t external = (i & 1) ? TRUE : FALSE;
+ bool external = (i & 1) ? true : false;
if (generate_int32le_1d(external) < 0)
printf("A generate_int32le_1d failed!\n");
diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c
index 00a7ae2..6fa2d8d 100644
--- a/tools/test/h5repack/h5repacktst.c
+++ b/tools/test/h5repack/h5repacktst.c
@@ -182,7 +182,7 @@ main(void)
h5_stat_t file_stat;
h5_stat_size_t fsize1, fsize2; /* file sizes */
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
#if defined(H5_HAVE_FILTER_SZIP)
int szip_can_encode = 0;
#endif
@@ -224,7 +224,7 @@ main(void)
j = 0; /* #0 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
@@ -241,10 +241,10 @@ main(void)
++j; /* #1 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_persist = -1; /* "false" is set via -P 0 */
pack_options.fs_threshold = 1;
pack_options.fs_pagesize = 8192;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
@@ -261,7 +261,7 @@ main(void)
++j; /* #2 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.fs_strategy = (H5F_fspace_strategy_t)-1; /* "FSM_AGGR" specified via -S FSM_AGGR */
pack_options.fs_threshold = -1; /* "0" specified via -T 0 */
@@ -280,10 +280,10 @@ main(void)
++j; /* #3 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE; /* "PAGE" specified via -S */
- pack_options.fs_persist = TRUE;
+ pack_options.fs_persist = true;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
if (h5diff(fname, FSPACE_OUT, NULL, NULL, &diff_options) > 0)
@@ -298,9 +298,9 @@ main(void)
++j; /* #4 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_persist = -1; /* "false" is set via -P 0 */
pack_options.fs_threshold = 2;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
GOERROR;
@@ -316,7 +316,7 @@ main(void)
++j; /* #5 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_PAGE;
pack_options.fs_pagesize = 8192;
@@ -334,10 +334,10 @@ main(void)
++j; /* #6 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_NONE;
- pack_options.fs_persist = -1; /* "FALSE" is set via -P 0 */
+ pack_options.fs_persist = -1; /* "false" is set via -P 0 */
pack_options.fs_threshold = 1;
pack_options.fs_pagesize = 8192;
if (h5repack(fname, FSPACE_OUT, &pack_options) < 0)
@@ -354,7 +354,7 @@ main(void)
++j; /* #7 */
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
fname = H5REPACK_FSPACE_FNAMES[j];
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
pack_options.fs_strategy = H5F_FSPACE_STRATEGY_AGGR;
pack_options.fs_threshold = 1;
@@ -376,7 +376,7 @@ main(void)
*/
TESTING(" copy of datasets (fill values)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME0, FNAME0OUT, &pack_options) < 0)
GOERROR;
@@ -396,7 +396,7 @@ main(void)
*/
if (!driver_is_parallel) {
TESTING(" copy of datasets (all datatypes)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME1, FNAME1OUT, &pack_options) < 0)
GOERROR;
@@ -416,7 +416,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (attributes)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME2, FNAME2OUT, &pack_options) < 0)
GOERROR;
@@ -435,7 +435,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of datasets (hardlinks)");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME3, FNAME3OUT, &pack_options) < 0)
GOERROR;
@@ -455,7 +455,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" copy of allocation early file");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME5, FNAME5OUT, &pack_options) < 0)
GOERROR;
@@ -485,7 +485,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset1:GZIP=9", &pack_options) < 0)
GOERROR;
@@ -512,7 +512,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
if (h5repack_addfilter("dset1:GZIP=9", &pack_options) < 0)
GOERROR;
@@ -540,7 +540,7 @@ main(void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1", &pack_options) < 0)
GOERROR;
@@ -577,7 +577,7 @@ main(void)
*/
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset2:SZIP=8,EC", &pack_options) < 0)
GOERROR;
@@ -609,7 +609,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("SZIP=8,NN", &pack_options) < 0)
GOERROR;
@@ -638,7 +638,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset1:SHUF", &pack_options) < 0)
GOERROR;
@@ -662,7 +662,7 @@ main(void)
TESTING(" adding shuffle filter to all");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("SHUF", &pack_options) < 0)
GOERROR;
@@ -685,7 +685,7 @@ main(void)
* test an individual object option
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset1:FLET", &pack_options) < 0)
GOERROR;
@@ -708,7 +708,7 @@ main(void)
*/
TESTING(" adding checksum filter to all");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("FLET", &pack_options) < 0)
GOERROR;
@@ -732,7 +732,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK 20x10", &pack_options) < 0)
GOERROR;
@@ -771,7 +771,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
@@ -793,7 +793,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, TRUE) < 0)
+ if (h5repack_init(&pack_options, 0, true) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CHUNK=20x10", &pack_options) < 0)
GOERROR;
@@ -813,7 +813,7 @@ main(void)
*/
TESTING(" adding layout chunked to all");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("CHUNK=20x10", &pack_options) < 0)
GOERROR;
@@ -834,7 +834,7 @@ main(void)
* test an individual object option
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset1:CONTI", &pack_options) < 0)
GOERROR;
@@ -855,7 +855,7 @@ main(void)
* test all objects option
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("CONTI", &pack_options) < 0)
GOERROR;
@@ -872,7 +872,7 @@ main(void)
* do the same test for a file with filters (chunked)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("CONTI", &pack_options) < 0)
GOERROR;
@@ -894,7 +894,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset1:COMPA", &pack_options) < 0)
GOERROR;
@@ -915,7 +915,7 @@ main(void)
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("COMPA", &pack_options) < 0)
GOERROR;
@@ -936,7 +936,7 @@ main(void)
* layout compact to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CONTI", &pack_options) < 0)
GOERROR;
@@ -956,7 +956,7 @@ main(void)
* layout compact to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:CHUNK=2x5", &pack_options) < 0)
GOERROR;
@@ -976,7 +976,7 @@ main(void)
* layout compact to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_compact:COMPA", &pack_options) < 0)
GOERROR;
@@ -995,7 +995,7 @@ main(void)
* layout contiguous to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:COMPA", &pack_options) < 0)
GOERROR;
@@ -1014,7 +1014,7 @@ main(void)
* layout contiguous to chunk conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CHUNK=3x6", &pack_options) < 0)
GOERROR;
@@ -1034,7 +1034,7 @@ main(void)
* layout contiguous to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_contiguous:CONTI", &pack_options) < 0)
GOERROR;
@@ -1053,7 +1053,7 @@ main(void)
* layout chunked to compact conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:COMPA", &pack_options) < 0)
GOERROR;
@@ -1073,7 +1073,7 @@ main(void)
* layout chunked to contiguous conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CONTI", &pack_options) < 0)
GOERROR;
@@ -1092,7 +1092,7 @@ main(void)
* layout chunked to chunked conversion
*-------------------------------------------------------------------------
*/
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addlayout("dset_chunk:CHUNK=18x13", &pack_options) < 0)
GOERROR;
@@ -1119,7 +1119,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME7, FNAME7OUT, &pack_options) < 0)
GOERROR;
@@ -1145,7 +1145,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:NONE", &pack_options) < 0)
GOERROR;
@@ -1170,7 +1170,7 @@ main(void)
TESTING(" copy of deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME8, FNAME8OUT, &pack_options) < 0)
GOERROR;
@@ -1189,7 +1189,7 @@ main(void)
TESTING(" removing deflate filter");
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:NONE", &pack_options) < 0)
GOERROR;
@@ -1209,7 +1209,7 @@ main(void)
TESTING(" copy of shuffle filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME9, FNAME9OUT, &pack_options) < 0)
GOERROR;
@@ -1224,7 +1224,7 @@ main(void)
TESTING(" removing shuffle filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_shuffle:NONE", &pack_options) < 0)
GOERROR;
@@ -1241,7 +1241,7 @@ main(void)
TESTING(" copy of fletcher filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME10, FNAME10OUT, &pack_options) < 0)
GOERROR;
@@ -1256,7 +1256,7 @@ main(void)
TESTING(" removing fletcher filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_fletcher32:NONE", &pack_options) < 0)
GOERROR;
@@ -1273,7 +1273,7 @@ main(void)
TESTING(" copy of nbit filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME12, FNAME12OUT, &pack_options) < 0)
GOERROR;
@@ -1288,7 +1288,7 @@ main(void)
TESTING(" removing nbit filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_nbit:NONE", &pack_options) < 0)
GOERROR;
@@ -1305,7 +1305,7 @@ main(void)
TESTING(" adding nbit filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_int31:NBIT", &pack_options) < 0)
GOERROR;
@@ -1322,7 +1322,7 @@ main(void)
TESTING(" copy of scaleoffset filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME13, FNAME13OUT, &pack_options) < 0)
GOERROR;
@@ -1337,7 +1337,7 @@ main(void)
TESTING(" removing scaleoffset filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_scaleoffset:NONE", &pack_options) < 0)
GOERROR;
@@ -1354,7 +1354,7 @@ main(void)
TESTING(" adding scaleoffset filter");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_none:SOFF=31,IN", &pack_options) < 0)
GOERROR;
@@ -1383,7 +1383,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP) && defined(H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_deflate:SZIP=8,NN", &pack_options) < 0)
GOERROR;
@@ -1410,7 +1410,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP) && defined(H5_HAVE_FILTER_DEFLATE)
if (szip_can_encode) {
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("dset_szip:GZIP=1", &pack_options) < 0)
GOERROR;
@@ -1441,7 +1441,7 @@ main(void)
#if defined(H5_HAVE_FILTER_SZIP) && defined(H5_HAVE_FILTER_DEFLATE)
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("NONE", &pack_options) < 0)
GOERROR;
@@ -1465,7 +1465,7 @@ main(void)
*/
TESTING(" big file");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME14, FNAME14OUT, &pack_options) < 0)
GOERROR;
@@ -1482,7 +1482,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" external datasets");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME15, FNAME15OUT, &pack_options) < 0)
GOERROR;
@@ -1500,7 +1500,7 @@ main(void)
*-------------------------------------------------------------------------
*/
TESTING(" file with userblock");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME16, FNAME16OUT, &pack_options) < 0)
GOERROR;
@@ -1521,7 +1521,7 @@ main(void)
*/
if (!driver_is_parallel) {
TESTING(" latest file format options");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.latest = 1;
pack_options.grp_compact = 10;
@@ -1551,7 +1551,7 @@ main(void)
#if defined(H5_HAVE_FILTER_DEFLATE)
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack_addfilter("GZIP=1", &pack_options) < 0)
GOERROR;
@@ -1580,7 +1580,7 @@ main(void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
/* add the options for a user block size and user block filename */
@@ -1612,7 +1612,7 @@ main(void)
#ifdef H5_HAVE_FILTER_DEFLATE
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
/* add the options for alignment */
@@ -1663,7 +1663,7 @@ main(void)
*/
TESTING(" file with committed datatypes");
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME17, FNAME17OUT, &pack_options) < 0)
@@ -1690,7 +1690,7 @@ main(void)
/* First run without metadata option. No need to verify the correctness */
/* since this has been verified by earlier tests. Just record the file */
/* size of the output file. */
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
GOERROR;
@@ -1701,7 +1701,7 @@ main(void)
GOERROR;
/* run it again with metadata option */
- if (h5repack_init(&pack_options, 0, FALSE) < 0)
+ if (h5repack_init(&pack_options, 0, false) < 0)
GOERROR;
pack_options.meta_block_size = 8192;
if (h5repack(FNAME4, FNAME4OUT, &pack_options) < 0)
@@ -1762,7 +1762,7 @@ make_testfiles(void)
hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
hid_t fapl = H5I_INVALID_HID; /* File access property list */
unsigned j; /* Local index variable */
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
return -1;
@@ -2026,7 +2026,7 @@ make_testfiles(void)
/*
* #0 -- h5repack_latest.h5
- * default: strategy=FSM_AGGR, persist=FALSE, threshold=1
+ * default: strategy=FSM_AGGR, persist=false, threshold=1
* default: inpage=4096
*/
j = 0;
@@ -2037,7 +2037,7 @@ make_testfiles(void)
/*
* #1 -- h5repack_default.h5
- * default: strategy=FSM_AGGR, persist=FALSE, threshold=1
+ * default: strategy=FSM_AGGR, persist=false, threshold=1
* default: inpage=4096
*/
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
@@ -2050,7 +2050,7 @@ make_testfiles(void)
/*
* #2 -- h5repack_page_persist.h5
* Setting:
- * strategy=PAGE, persist=TRUE, threshold=1
+ * strategy=PAGE, persist=true, threshold=1
* inpage=512
* latest format
*/
@@ -2059,7 +2059,7 @@ make_testfiles(void)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)512) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, true, (hsize_t)1) < 0)
return -1;
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
@@ -2072,13 +2072,13 @@ make_testfiles(void)
/*
* #3 -- h5repack_fsm_aggr_persist.h5
* Setting:
- * strategy=FSM_AGGR, persist=TRUE, threshold=1
+ * strategy=FSM_AGGR, persist=true, threshold=1
* default: inpage=4096
*/
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
return -1;
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, H5P_DEFAULT)) < 0)
@@ -2091,7 +2091,7 @@ make_testfiles(void)
/*
* #4 -- h5repack_page_threshold.h5
* Setting:
- * strategy=PAGE, persist=FALSE, threshold=3
+ * strategy=PAGE, persist=false, threshold=3
* inpage=8192
* latest format
*/
@@ -2099,7 +2099,7 @@ make_testfiles(void)
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, FALSE, (hsize_t)3) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_PAGE, false, (hsize_t)3) < 0)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0)
return -1;
@@ -2114,14 +2114,14 @@ make_testfiles(void)
/*
* #5 -- h5repack_fsm_aggr_threshold.h5
* Setting:
- * strategy=FSM_AGGR, persist=FALSE, threshold=3
+ * strategy=FSM_AGGR, persist=false, threshold=3
* inpage=4096
*/
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, FALSE, (hsize_t)3) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, false, (hsize_t)3) < 0)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)FS_PAGESIZE_DEF) < 0)
return -1;
@@ -2136,14 +2136,14 @@ make_testfiles(void)
/*
* #6 -- h5repack_aggr.h5
* Setting:
- * strategy=AGGR, persist=FALSE, threshold=1
+ * strategy=AGGR, persist=false, threshold=1
* latest format
*/
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_AGGR, false, (hsize_t)1) < 0)
return -1;
assert(j < NELMTS(H5REPACK_FSPACE_FNAMES));
if ((fid = H5Fcreate(H5REPACK_FSPACE_FNAMES[++j], H5F_ACC_TRUNC, fcpl, fapl)) < 0)
@@ -2157,14 +2157,14 @@ make_testfiles(void)
/*
* #7 -- h5repack_none.h5
* Setting:
- * strategy=NONE, persist=FALSE, threshold=1
+ * strategy=NONE, persist=false, threshold=1
* inpage=8192
*/
/* Create file creation property list */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
return -1;
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, FALSE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_NONE, false, (hsize_t)1) < 0)
return -1;
if (H5Pset_file_space_page_size(fcpl, (hsize_t)8192) < 0)
return -1;
@@ -2788,7 +2788,7 @@ make_nbit(hid_t loc_id)
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
/* Set up collective writes for parallel driver */
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
@@ -2896,7 +2896,7 @@ make_scaleoffset(hid_t loc_id)
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
goto error;
@@ -3005,7 +3005,7 @@ make_all_filters(hid_t loc_id)
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
goto error;
@@ -5914,7 +5914,7 @@ make_dset(hid_t loc_id, const char *name, hid_t sid, hid_t dcpl, void *buf)
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
goto out;
@@ -5966,7 +5966,7 @@ write_dset(hid_t loc_id, int rank, hsize_t *dims, const char *dset_name, hid_t t
if (buf) {
#ifdef H5_HAVE_PARALLEL
{
- hbool_t driver_is_parallel;
+ bool driver_is_parallel;
if (h5_using_parallel_driver(H5P_DEFAULT, &driver_is_parallel) < 0)
goto out;
diff --git a/tools/test/misc/clear_open_chk.c b/tools/test/misc/clear_open_chk.c
index 3095618..bcf9a42 100644
--- a/tools/test/misc/clear_open_chk.c
+++ b/tools/test/misc/clear_open_chk.c
@@ -50,7 +50,7 @@ main(int argc, char *argv[])
fname = HDstrdup(argv[1]);
/* Try opening the file */
- if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, FALSE, NULL, (size_t)0)) < 0) {
+ if ((fid = h5tools_fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT, false, NULL, (size_t)0)) < 0) {
fprintf(stderr, "clear_open_chk: unable to open the file\n");
free(fname);
exit(EXIT_FAILURE);
diff --git a/tools/test/misc/h5clear_gentest.c b/tools/test/misc/h5clear_gentest.c
index 5cb7aa2..1698f4a 100644
--- a/tools/test/misc/h5clear_gentest.c
+++ b/tools/test/misc/h5clear_gentest.c
@@ -64,7 +64,7 @@ gen_cache_image_file(const char *fname)
int arr[50][100];
} * buf; /* Buffer for data to write */
H5AC_cache_image_config_t cache_image_config = /* Cache image input configuration */
- {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, TRUE, FALSE, H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
+ {H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION, true, false, H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE};
/* Create and fill array */
buf = malloc(sizeof(*buf));
@@ -168,7 +168,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-gen_enhance_files(hbool_t user)
+gen_enhance_files(bool user)
{
hid_t fid = H5I_INVALID_HID; /* File ID */
hid_t fcpl = H5I_INVALID_HID; /* File creation property list */
@@ -193,7 +193,7 @@ gen_enhance_files(hbool_t user)
}
/* Set file space strategy and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
goto error;
/*
@@ -383,9 +383,9 @@ main(void)
goto error;
/* Generate the first 6 files in FILENAME_ENHANCE[] */
- if (gen_enhance_files(FALSE) < 0)
+ if (gen_enhance_files(false) < 0)
goto error;
- if (gen_enhance_files(TRUE) < 0)
+ if (gen_enhance_files(true) < 0)
goto error;
/*
@@ -407,7 +407,7 @@ main(void)
* --FILENAME[0]: "h5clear_sec2_v3.h5", "latest_h5clear_sec2_v3.h5"
* --FILENAME[1]: "h5clear_log_v3.h5", "latest_h5clear_log_v3.h5"
*/
- for (new_format = FALSE; new_format <= TRUE; new_format++) {
+ for (new_format = false; new_format <= true; new_format++) {
hid_t fapl2, my_fapl; /* File access property lists */
/* Set to use the appropriate file access property list */
@@ -559,7 +559,7 @@ main(void)
goto error;
/* Set file space strategy and persisting free-space */
- if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, TRUE, (hsize_t)1) < 0)
+ if (H5Pset_file_space_strategy(fcpl, H5F_FSPACE_STRATEGY_FSM_AGGR, true, (hsize_t)1) < 0)
goto error;
/* Create the file with the set file space info */
diff --git a/tools/test/misc/vds/UC_common.h b/tools/test/misc/vds/UC_common.h
index 234ec87..4cfce35 100644
--- a/tools/test/misc/vds/UC_common.h
+++ b/tools/test/misc/vds/UC_common.h
@@ -26,10 +26,6 @@
/* Compression level */
#define COMPRESSION_LEVEL 7
-/* Booleans */
-#define TRUE 1
-#define FALSE 0
-
/* Testing macros */
#define AT() printf(" at %s:%d in %s()...\n", __FILE__, __LINE__, __func__);
#define UC_ERROR \
diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c
index 90d5897..00a35bb 100644
--- a/tools/test/perform/overhead.c
+++ b/tools/test/perform/overhead.c
@@ -40,12 +40,12 @@
#endif
#define FILE_NAME_1 "overhead.h5"
-#ifndef FALSE
-#define FALSE 0
-#endif /* FALSE */
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
+#ifndef false
+#define false 0
+#endif /* false */
+#ifndef true
+#define true 1
+#endif /* true */
typedef enum fill_t { FILL_ALL, FILL_FORWARD, FILL_REVERSE, FILL_INWARD, FILL_OUTWARD, FILL_RANDOM } fill_t;
@@ -142,7 +142,7 @@ display_error_cb(hid_t estack, void H5_ATTR_UNUSED *client_data)
*-------------------------------------------------------------------------
*/
static int
-test(fill_t fill_style, const double splits[], hbool_t verbose, hbool_t use_rdcc)
+test(fill_t fill_style, const double splits[], bool verbose, bool use_rdcc)
{
hid_t file = (-1), fapl = (-1), dcpl = (-1), xfer = (-1), mspace = (-1), fspace = (-1), dset = (-1);
hsize_t ch_size[1] = {1}; /*chunk size */
@@ -312,11 +312,11 @@ error:
int
main(int argc, char *argv[])
{
- hid_t xfer;
- fill_t fill_style = FILL_ALL;
- hbool_t use_cache = FALSE;
- double splits[3];
- int i, j, nerrors = 0;
+ hid_t xfer;
+ fill_t fill_style = FILL_ALL;
+ bool use_cache = false;
+ double splits[3];
+ int i, j, nerrors = 0;
/* Default split ratios */
H5Eset_auto2(H5E_DEFAULT, display_error_cb, NULL);
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
fill_style = FILL_RANDOM;
}
else if (!strcmp(argv[i], "cache")) {
- use_cache = TRUE;
+ use_cache = true;
}
else if (j < 3 && (isdigit(argv[i][0]) || '.' == argv[i][0])) {
splits[j++] = strtod(argv[i], NULL);
@@ -359,16 +359,16 @@ main(int argc, char *argv[])
if (FILL_ALL == fill_style) {
printf("%-7s %8s\n", "Style", "Bytes/Chunk");
printf("%-7s %8s\n", "-----", "-----------");
- nerrors += test(FILL_FORWARD, splits, FALSE, use_cache);
- nerrors += test(FILL_REVERSE, splits, FALSE, use_cache);
- nerrors += test(FILL_INWARD, splits, FALSE, use_cache);
- nerrors += test(FILL_OUTWARD, splits, FALSE, use_cache);
- nerrors += test(FILL_RANDOM, splits, FALSE, use_cache);
+ nerrors += test(FILL_FORWARD, splits, false, use_cache);
+ nerrors += test(FILL_REVERSE, splits, false, use_cache);
+ nerrors += test(FILL_INWARD, splits, false, use_cache);
+ nerrors += test(FILL_OUTWARD, splits, false, use_cache);
+ nerrors += test(FILL_RANDOM, splits, false, use_cache);
}
else {
if (use_cache)
usage(argv[0]);
- nerrors += test(fill_style, splits, TRUE, FALSE);
+ nerrors += test(fill_style, splits, true, false);
}
if (nerrors > 0)
goto error;
diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c
index 16df60a..6762f7c 100644
--- a/tools/test/perform/perf_meta.c
+++ b/tools/test/perform/perf_meta.c
@@ -33,13 +33,13 @@ static int TEST_3 = 0x4; /* Test 3 */
static const char *FILENAME[] = {"meta_perf_1", "meta_perf_2", "meta_perf_3", NULL};
/* Default values for performance. Can be changed through command line options */
-static int NUM_DSETS = 16;
-static int NUM_ATTRS = 8;
-static int BATCH_ATTRS = 2;
-static hbool_t flush_dset = FALSE;
-static hbool_t flush_attr = FALSE;
-static int nerrors = 0; /* errors count */
-static hid_t fapl;
+static int NUM_DSETS = 16;
+static int NUM_ATTRS = 8;
+static int BATCH_ATTRS = 2;
+static bool flush_dset = false;
+static bool flush_attr = false;
+static int nerrors = 0; /* errors count */
+static hid_t fapl;
/* Data space IDs */
static hid_t space;
@@ -117,9 +117,9 @@ parse_options(int argc, char **argv)
case 'f': /* Call H5Fflush for each dataset or attribute */
if (!strcmp("a", (*argv + 2)))
- flush_attr = TRUE;
+ flush_attr = true;
else if (!strcmp("d", (*argv + 2)))
- flush_dset = TRUE;
+ flush_dset = true;
else {
nerrors++;
return (1);
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index b8b80e8..61bb6c0 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -36,13 +36,13 @@
/* report 0.0 in case t is zero too */
#define MB_PER_SEC(bytes, t) ((fabs(t) < 0.0000000001) ? 0.0 : ((((double)(bytes)) / (double)ONE_MB) / (t)))
-#ifndef TRUE
-#define TRUE 1
-#endif /* TRUE */
+#ifndef true
+#define true 1
+#endif /* true */
-#ifndef FALSE
-#define FALSE (!TRUE)
-#endif /* FALSE */
+#ifndef false
+#define false (!true)
+#endif /* false */
#ifndef S_IRWXU
#define S_IRWXU (_S_IREAD | _S_IWRITE)
@@ -54,7 +54,7 @@ static const char *option_prefix = NULL;
static char *filename = NULL;
static int compress_percent = 0;
static int compress_level = Z_DEFAULT_COMPRESSION;
-static int output, random_test = FALSE;
+static int output, random_test = false;
static int report_once_flag;
static double compression_time;
@@ -500,7 +500,7 @@ main(int argc, char *argv[])
option_prefix = H5_optarg;
break;
case 'r':
- random_test = TRUE;
+ random_test = true;
break;
case 's':
file_size = parse_size_directive(H5_optarg);