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.c76
-rw-r--r--tools/src/h5repack/h5repack_filters.c6
-rw-r--r--tools/src/h5repack/h5repack_main.c84
-rw-r--r--tools/src/h5repack/h5repack_opttable.c40
-rw-r--r--tools/src/h5repack/h5repack_parse.c48
-rw-r--r--tools/src/h5repack/h5repack_refs.c2
-rw-r--r--tools/src/h5repack/h5repack_verify.c4
9 files changed, 139 insertions, 139 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 dd32a3c..3921913 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:
@@ -725,7 +725,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
* and copy its attributes using that ID
*-------------------------------------------------------------------------
*/
- if (HDstrcmp(travt->objs[i].name, "/") == 0) {
+ if (strcmp(travt->objs[i].name, "/") == 0) {
if ((grp_out = H5Gopen2(fidout, "/", H5P_DEFAULT)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Gopen2 failed");
}
@@ -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;
@@ -778,7 +778,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* check if filters were requested for individual objects */
if (options->op_tbl->objs) {
for (u = 0; u < options->op_tbl->nelems; u++) {
- if (HDstrcmp(travt->objs[i].name, options->op_tbl->objs[u].path) == 0)
+ if (strcmp(travt->objs[i].name, options->op_tbl->objs[u].path) == 0)
for (ifil = 0; ifil < options->op_tbl->objs[ifil].nfilters; ifil++) {
if (options->op_tbl->objs[u].filter[ifil].filtn > 0)
req_filter = 1;
@@ -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,
@@ -1528,7 +1528,7 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
char f_objname[256]; /* filter objname */
int i;
- HDstrcpy(strfilter, "\0");
+ strcpy(strfilter, "\0");
/* get information about input filters */
if ((nfilters = H5Pget_nfilters(dcpl_id)) < 0)
@@ -1539,65 +1539,65 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
if ((filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, cd_values,
sizeof(f_objname), f_objname, NULL)) < 0) {
- HDstrcat(strfilter, "ERROR ");
+ strcat(strfilter, "ERROR ");
continue;
}
switch (filtn) {
case H5Z_FILTER_NONE:
- HDstrcat(strfilter, "NONE ");
+ strcat(strfilter, "NONE ");
break;
case H5Z_FILTER_DEFLATE:
- HDstrcat(strfilter, "GZIP ");
+ strcat(strfilter, "GZIP ");
#if defined(PRINT_DEBUG)
{
unsigned level = cd_values[0];
- HDsnprintf(temp, sizeof(temp), "(%d)", level);
- HDstrcat(strfilter, temp);
+ snprintf(temp, sizeof(temp), "(%d)", level);
+ strcat(strfilter, temp);
}
#endif
break;
case H5Z_FILTER_SZIP:
- HDstrcat(strfilter, "SZIP ");
+ strcat(strfilter, "SZIP ");
#if defined(PRINT_DEBUG)
{
unsigned options_mask = cd_values[0]; /* from dcpl, not filt*/
unsigned ppb = cd_values[1];
- HDsnprintf(temp, sizeof(temp), "(%d,", ppb);
- HDstrcat(strfilter, temp);
+ snprintf(temp, sizeof(temp), "(%d,", ppb);
+ strcat(strfilter, temp);
if (options_mask & H5_SZIP_EC_OPTION_MASK)
- HDstrcpy(temp, "EC) ");
+ strcpy(temp, "EC) ");
else if (options_mask & H5_SZIP_NN_OPTION_MASK)
- HDstrcpy(temp, "NN) ");
+ strcpy(temp, "NN) ");
}
- HDstrcat(strfilter, temp);
+ strcat(strfilter, temp);
#endif
break;
case H5Z_FILTER_SHUFFLE:
- HDstrcat(strfilter, "SHUF ");
+ strcat(strfilter, "SHUF ");
break;
case H5Z_FILTER_FLETCHER32:
- HDstrcat(strfilter, "FLET ");
+ strcat(strfilter, "FLET ");
break;
case H5Z_FILTER_NBIT:
- HDstrcat(strfilter, "NBIT ");
+ strcat(strfilter, "NBIT ");
break;
case H5Z_FILTER_SCALEOFFSET:
- HDstrcat(strfilter, "SCALEOFFSET ");
+ strcat(strfilter, "SCALEOFFSET ");
break;
default:
- HDstrcat(strfilter, "UD ");
+ strcat(strfilter, "UD ");
break;
} /* end switch */
} /* end for each filter */
@@ -1610,10 +1610,10 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
else {
char str[512], temp[512];
- HDstrcpy(str, "dset ");
- HDstrcat(str, strfilter);
- HDsnprintf(temp, sizeof(temp), " (%.3f:1)", ratio);
- HDstrcat(str, temp);
+ strcpy(str, "dset ");
+ strcat(str, strfilter);
+ snprintf(temp, sizeof(temp), " (%.3f:1)", ratio);
+ strcat(str, temp);
if (options->verbose == 2)
printf(FORMAT_OBJ_TIME, str, read_time, write_time, objname);
else
diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c
index 512e4fa..9669d0c 100644
--- a/tools/src/h5repack/h5repack_filters.c
+++ b/tools/src/h5repack/h5repack_filters.c
@@ -57,7 +57,7 @@ aux_copy_obj(hid_t dcpl_id, /* dataset creation property list */
}
objout->nfilters = nfilters;
- HDstrcpy(objout->path, name);
+ strcpy(objout->path, name);
if ((layout = H5Pget_layout(dcpl_id)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Pget_layout failed");
@@ -92,7 +92,7 @@ aux_find_obj(const char *name, /* object name from traverse list */
unsigned int i;
for (i = 0; i < options->op_tbl->nelems; i++) {
- if (HDstrcmp(options->op_tbl->objs[i].path, name) == 0) {
+ if (strcmp(options->op_tbl->objs[i].path, name) == 0) {
*obj = options->op_tbl->objs[i];
return (int)i;
}
@@ -104,7 +104,7 @@ aux_find_obj(const char *name, /* object name from traverse list */
if (pname[0] == '/')
pname++;
- if (HDstrcmp(pdest, pname) == 0) {
+ if (strcmp(pdest, pname) == 0) {
*obj = options->op_tbl->objs[i];
return (int)i;
}
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 85bc15d..85ab93a 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -400,11 +400,11 @@ read_info(const char *filename, pack_opt_t *options)
/* cycle until end of file reached */
while (1) {
- if (EOF == HDfscanf(fp, "%9s", stype))
+ if (EOF == fscanf(fp, "%9s", stype))
break;
/* Info indicator must be for layout or filter */
- if (HDstrcmp(stype, "-l") != 0 && HDstrcmp(stype, "-f") != 0) {
+ if (strcmp(stype, "-l") != 0 && strcmp(stype, "-f") != 0) {
error_msg("bad file format for %s", filename);
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -415,7 +415,7 @@ read_info(const char *filename, pack_opt_t *options)
i = 0;
c = '0';
while (c != ' ') {
- if (HDfscanf(fp, "%c", &c) < 0 && ferror(fp)) {
+ if (fscanf(fp, "%c", &c) < 0 && ferror(fp)) {
error_msg("fscanf error\n");
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -427,7 +427,7 @@ read_info(const char *filename, pack_opt_t *options)
c = '0';
/* go until end */
while (c != ' ') {
- if (HDfscanf(fp, "%c", &c) < 0 && ferror(fp)) {
+ if (fscanf(fp, "%c", &c) < 0 && ferror(fp)) {
error_msg("fscanf error\n");
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -441,7 +441,7 @@ read_info(const char *filename, pack_opt_t *options)
}
comp_info[i - 1] = '\0'; /*cut the last " */
- if (!HDstrcmp(stype, "-l")) {
+ if (!strcmp(stype, "-l")) {
if (h5repack_addlayout(comp_info, options) == -1) {
error_msg("could not add chunk option\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -481,9 +481,9 @@ set_sort_by(const char *form)
{
H5_index_t idx_type = H5_INDEX_UNKNOWN;
- if (!HDstrcmp(form, "name"))
+ if (!strcmp(form, "name"))
idx_type = H5_INDEX_NAME;
- else if (!HDstrcmp(form, "creation_order"))
+ else if (!strcmp(form, "creation_order"))
idx_type = H5_INDEX_CRT_ORDER;
return idx_type;
@@ -504,9 +504,9 @@ set_sort_order(const char *form)
{
H5_iter_order_t iter_order = H5_ITER_UNKNOWN;
- if (!HDstrcmp(form, "ascending"))
+ if (!strcmp(form, "ascending"))
iter_order = H5_ITER_INC;
- else if (!HDstrcmp(form, "descending"))
+ else if (!strcmp(form, "descending"))
iter_order = H5_ITER_DEC;
return iter_order;
@@ -525,10 +525,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;
@@ -620,7 +620,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':
@@ -646,30 +646,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 */
+ char *msgPtr = strchr(H5_optarg, ':');
+ options->latest = true; /* must use latest format */
if (msgPtr == NULL) {
ssize = atoi(H5_optarg);
for (idx = 0; idx < 5; idx++)
@@ -678,18 +678,18 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
else {
char msgType[10];
- HDstrcpy(msgType, msgPtr + 1);
+ strcpy(msgType, msgPtr + 1);
msgPtr[0] = '\0';
ssize = atoi(H5_optarg);
- if (!HDstrncmp(msgType, "dspace", 6))
+ if (!strncmp(msgType, "dspace", 6))
options->msg_size[0] = ssize;
- else if (!HDstrncmp(msgType, "dtype", 5))
+ else if (!strncmp(msgType, "dtype", 5))
options->msg_size[1] = ssize;
- else if (!HDstrncmp(msgType, "fill", 4))
+ else if (!strncmp(msgType, "fill", 4))
options->msg_size[2] = ssize;
- else if (!HDstrncmp(msgType, "pline", 5))
+ else if (!strncmp(msgType, "pline", 5))
options->msg_size[3] = ssize;
- else if (!HDstrncmp(msgType, "attr", 4))
+ else if (!strncmp(msgType, "attr", 4))
options->msg_size[4] = ssize;
}
} break;
@@ -723,14 +723,14 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case 'S': {
char strategy[MAX_NC_NAME];
- HDstrcpy(strategy, H5_optarg);
- if (!HDstrcmp(strategy, "FSM_AGGR"))
+ strcpy(strategy, H5_optarg);
+ if (!strcmp(strategy, "FSM_AGGR"))
options->fs_strategy = H5F_FSPACE_STRATEGY_FSM_AGGR;
- else if (!HDstrcmp(strategy, "PAGE"))
+ else if (!strcmp(strategy, "PAGE"))
options->fs_strategy = H5F_FSPACE_STRATEGY_PAGE;
- else if (!HDstrcmp(strategy, "AGGR"))
+ else if (!strcmp(strategy, "AGGR"))
options->fs_strategy = H5F_FSPACE_STRATEGY_AGGR;
- else if (!HDstrcmp(strategy, "NONE"))
+ else if (!strcmp(strategy, "NONE"))
options->fs_strategy = H5F_FSPACE_STRATEGY_NONE;
else {
error_msg("invalid file space management strategy `%s`\n", H5_optarg);
@@ -792,13 +792,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':
@@ -808,13 +808,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':
@@ -824,13 +824,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':
@@ -840,13 +840,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':
@@ -864,7 +864,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
infile = argv[H5_optind];
outfile = argv[H5_optind + 1];
- if (!HDstrcmp(infile, outfile)) {
+ if (!strcmp(infile, outfile)) {
error_msg("file names cannot be the same\n");
usage(h5tools_getprogname());
h5tools_setstatus(EXIT_FAILURE);
@@ -886,7 +886,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
}
/* If the input file uses the onion VFD, get the revision number */
- if (in_vfd_info.u.name && !HDstrcmp(in_vfd_info.u.name, "onion")) {
+ if (in_vfd_info.u.name && !strcmp(in_vfd_info.u.name, "onion")) {
if (in_vfd_info.info) {
errno = 0;
onion_fa_in_g.revision_num = strtoull(in_vfd_info.info, NULL, 10);
@@ -981,7 +981,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..8a9042d 100644
--- a/tools/src/h5repack/h5repack_opttable.c
+++ b/tools/src/h5repack/h5repack_opttable.c
@@ -28,7 +28,7 @@ init_packobject(pack_info_t *obj)
{
int j, k;
- HDstrcpy(obj->path, "\0");
+ strcpy(obj->path, "\0");
for (j = 0; j < H5_REPACK_MAX_NFILTERS; j++) {
obj->filter[j].filtn = -1;
obj->filter[j].cd_nelmts = CD_VALUES;
@@ -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 */
@@ -196,7 +196,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* linear table search */
for (i = 0; i < table->nelems; i++) {
/*already on the table */
- if (HDstrcmp(obj_list[j].obj, table->objs[i].path) == 0) {
+ if (strcmp(obj_list[j].obj, table->objs[i].path) == 0) {
/* already chunk info inserted for this one; exit */
if (table->objs[i].chunk.rank > 0) {
H5TOOLS_INFO("chunk information already inserted for <%s>\n", obj_list[j].obj);
@@ -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 */
@@ -215,7 +215,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* keep the grow in a temp var */
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_layout(table, I, pack);
}
/* cases where we have an already inserted name but there is a new name also
@@ -223,11 +223,11 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
-f dset1:GZIP=1 -l dset1,dset2:CHUNK=20x20
dset1 is already inserted, but dset2 must also be
*/
- else if (found && HDstrcmp(obj_list[j].obj, table->objs[i].path) != 0) {
+ else if (found && strcmp(obj_list[j].obj, table->objs[i].path) != 0) {
/* keep the grow in a temp var */
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_layout(table, I, pack);
}
} /* j */
@@ -238,7 +238,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
for (j = 0; j < n_objs; j++) {
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_layout(table, I, pack);
}
}
@@ -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)
@@ -275,10 +275,10 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
/* linear table search */
for (i = 0; i < table->nelems; i++) {
/*already on the table */
- if (HDstrcmp(obj_list[j].obj, table->objs[i].path) == 0) {
+ if (strcmp(obj_list[j].obj, table->objs[i].path) == 0) {
/* insert */
aux_tblinsert_filter(table, i, filt);
- found = TRUE;
+ found = true;
break;
} /* if */
} /* i */
@@ -287,7 +287,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
/* keep the grow in a temp var */
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_filter(table, I, filt);
}
/* cases where we have an already inserted name but there is a new name also
@@ -295,11 +295,11 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
-l dset1:CHUNK=20x20 -f dset1,dset2:GZIP=1
dset1 is already inserted, but dset2 must also be
*/
- else if (found && HDstrcmp(obj_list[j].obj, table->objs[i].path) != 0) {
+ else if (found && strcmp(obj_list[j].obj, table->objs[i].path) != 0) {
/* keep the grow in a temp var */
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_filter(table, I, filt);
}
} /* j */
@@ -311,7 +311,7 @@ options_add_filter(obj_list_t *obj_list, unsigned n_objs, filter_info_t filt, pa
for (j = 0; j < n_objs; j++) {
I = table->nelems + added;
added++;
- HDstrcpy(table->objs[I].path, obj_list[j].obj);
+ strcpy(table->objs[I].path, obj_list[j].obj);
aux_tblinsert_filter(table, I, filt);
}
}
@@ -338,15 +338,15 @@ options_get_object(const char *path, pack_opttbl_t *table)
for (i = 0; i < table->nelems; i++) {
/* make full path (start with "/") to compare correctly */
- if (HDstrncmp(table->objs[i].path, "/", 1) != 0) {
- HDstrcpy(tbl_path, "/");
- HDstrcat(tbl_path, table->objs[i].path);
+ if (strncmp(table->objs[i].path, "/", 1) != 0) {
+ strcpy(tbl_path, "/");
+ strcat(tbl_path, table->objs[i].path);
}
else
- HDstrcpy(tbl_path, table->objs[i].path);
+ strcpy(tbl_path, table->objs[i].path);
/* found it */
- if (HDstrcmp(tbl_path, path) == 0) {
+ if (strcmp(tbl_path, path) == 0) {
return (&table->objs[i]);
}
}
diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c
index f88ba6f..0317ef7 100644
--- a/tools/src/h5repack/h5repack_parse.c
+++ b/tools/src/h5repack/h5repack_parse.c
@@ -41,7 +41,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
{
size_t i, m, u;
char c;
- size_t len = HDstrlen(str);
+ size_t len = strlen(str);
int f, k, l, p, q, end_obj = -1, no_param = 0;
unsigned j, n;
char sobj[MAX_NC_NAME];
@@ -94,7 +94,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
else
sobj[k + 1] = '\0';
- HDstrcpy(obj_list[n].obj, sobj);
+ strcpy(obj_list[n].obj, sobj);
memset(sobj, 0, sizeof(sobj));
n++;
k = -1;
@@ -123,7 +123,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* example SZIP=8,NN
*-------------------------------------------------------------------------
*/
- if (HDstrcmp(scomp, "SZIP") == 0) {
+ if (strcmp(scomp, "SZIP") == 0) {
l = -1; /* mask index check */
for (m = 0, u = i + 1; u < len; u++, m++) {
if (str[u] == ',') {
@@ -146,9 +146,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (l == 2) {
smask[l] = '\0';
i = len - 1; /* end */
- if (HDstrcmp(smask, "NN") == 0)
+ if (strcmp(smask, "NN") == 0)
filt->cd_values[j++] = H5_SZIP_NN_OPTION_MASK;
- else if (HDstrcmp(smask, "EC") == 0)
+ else if (strcmp(smask, "EC") == 0)
filt->cd_values[j++] = H5_SZIP_EC_OPTION_MASK;
else {
error_msg("szip mask must be 'NN' or 'EC' \n");
@@ -173,7 +173,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* SOFF=3,DF
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "SOFF") == 0) {
+ else if (strcmp(scomp, "SOFF") == 0) {
l = -1; /* mask index check */
for (m = 0, u = i + 1; u < len; u++, m++) {
if (str[u] == ',') {
@@ -196,9 +196,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (l == 2) {
smask[l] = '\0';
i = len - 1; /* end */
- if (HDstrcmp(smask, "IN") == 0)
+ if (strcmp(smask, "IN") == 0)
filt->cd_values[j++] = H5Z_SO_INT;
- else if (HDstrcmp(smask, "DS") == H5Z_SO_FLOAT_DSCALE)
+ else if (strcmp(smask, "DS") == H5Z_SO_FLOAT_DSCALE)
filt->cd_values[j++] = H5Z_SO_FLOAT_DSCALE;
else {
error_msg("scale type must be 'IN' or 'DS' \n");
@@ -216,7 +216,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* UD=307,0,1,9
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "UD") == 0) {
+ else if (strcmp(scomp, "UD") == 0) {
l = -1; /* filter number index check */
f = -1; /* filter flag index check */
p = -1; /* CD_VAL count check */
@@ -298,7 +298,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_NONE
*-------------------------------------------------------------------------
*/
- if (HDstrcmp(scomp, "NONE") == 0) {
+ if (strcmp(scomp, "NONE") == 0) {
filt->filtn = H5Z_FILTER_NONE;
filt->cd_nelmts = 0;
}
@@ -307,7 +307,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_DEFLATE
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "GZIP") == 0) {
+ else if (strcmp(scomp, "GZIP") == 0) {
filt->filtn = H5Z_FILTER_DEFLATE;
filt->cd_nelmts = 1;
if (no_param) { /*no more parameters, GZIP must have parameter */
@@ -322,7 +322,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_SZIP
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "SZIP") == 0) {
+ else if (strcmp(scomp, "SZIP") == 0) {
filt->filtn = H5Z_FILTER_SZIP;
filt->cd_nelmts = 2;
if (no_param) { /*no more parameters, SZIP must have parameter */
@@ -337,7 +337,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_SHUFFLE
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "SHUF") == 0) {
+ else if (strcmp(scomp, "SHUF") == 0) {
filt->filtn = H5Z_FILTER_SHUFFLE;
filt->cd_nelmts = 0;
if (m > 0) { /*shuffle does not have parameter */
@@ -351,7 +351,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_FLETCHER32
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "FLET") == 0) {
+ else if (strcmp(scomp, "FLET") == 0) {
filt->filtn = H5Z_FILTER_FLETCHER32;
filt->cd_nelmts = 0;
if (m > 0) { /*shuffle does not have parameter */
@@ -365,7 +365,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_NBIT
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "NBIT") == 0) {
+ else if (strcmp(scomp, "NBIT") == 0) {
filt->filtn = H5Z_FILTER_NBIT;
filt->cd_nelmts = 0;
if (m > 0) { /*nbit does not have parameter */
@@ -379,7 +379,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* H5Z_FILTER_SCALEOFFSET
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "SOFF") == 0) {
+ else if (strcmp(scomp, "SOFF") == 0) {
filt->filtn = H5Z_FILTER_SCALEOFFSET;
filt->cd_nelmts = 2;
if (no_param) { /*no more parameters, SOFF must have parameter */
@@ -393,7 +393,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
* User Defined Filter
*-------------------------------------------------------------------------
*/
- else if (HDstrcmp(scomp, "UD") == 0) {
+ else if (strcmp(scomp, "UD") == 0) {
/* parameters does not match count */
if (filt->cd_nelmts != j) {
if (obj_list)
@@ -448,7 +448,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
error_msg("pixels_per_block is too large in <%s>\n", str);
exit(EXIT_FAILURE);
}
- if ((HDstrcmp(smask, "NN") != 0) && (HDstrcmp(smask, "EC") != 0)) {
+ if ((strcmp(smask, "NN") != 0) && (strcmp(smask, "EC") != 0)) {
if (obj_list)
free(obj_list);
error_msg("szip mask must be 'NN' or 'EC' \n");
@@ -486,7 +486,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
obj_list_t *obj_list = NULL;
unsigned i, j, n;
char c;
- size_t len = HDstrlen(str);
+ size_t len = strlen(str);
int k, end_obj = -1, c_index;
char sobj[MAX_NC_NAME];
char sdim[10];
@@ -527,7 +527,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
sobj[k] = '\0';
else
sobj[k + 1] = '\0';
- HDstrcpy(obj_list[n].obj, sobj);
+ strcpy(obj_list[n].obj, sobj);
memset(sobj, 0, sizeof(sobj));
n++;
k = -1;
@@ -546,11 +546,11 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
for (j = (unsigned)(end_obj + 1), n = 0; n <= 5; j++, n++) {
if (n == 5) {
slayout[n] = '\0'; /*cut string */
- if (HDstrcmp(slayout, "COMPA") == 0)
+ if (strcmp(slayout, "COMPA") == 0)
pack->layout = H5D_COMPACT;
- else if (HDstrcmp(slayout, "CONTI") == 0)
+ else if (strcmp(slayout, "CONTI") == 0)
pack->layout = H5D_CONTIGUOUS;
- else if (HDstrcmp(slayout, "CHUNK") == 0)
+ else if (strcmp(slayout, "CHUNK") == 0)
pack->layout = H5D_CHUNKED;
else {
error_msg("in parse layout, not a valid layout in <%s>\n", str);
@@ -604,7 +604,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
else if (i == len - 1) { /*no more parameters */
sdim[k] = '\0';
k = 0;
- if (HDstrcmp(sdim, "NONE") == 0) {
+ if (strcmp(sdim, "NONE") == 0) {
pack->chunk.rank = -2;
}
else {
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 {