summaryrefslogtreecommitdiffstats
path: root/tools/src/h5repack
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5repack')
-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
7 files changed, 50 insertions, 50 deletions
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 {