summaryrefslogtreecommitdiffstats
path: root/tools/src
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src')
-rw-r--r--tools/src/h5copy/h5copy.c32
-rw-r--r--tools/src/h5diff/h5diff_common.c30
-rw-r--r--tools/src/h5diff/ph5diff_main.c4
-rw-r--r--tools/src/h5dump/h5dump.c158
-rw-r--r--tools/src/h5dump/h5dump.h6
-rw-r--r--tools/src/h5dump/h5dump_ddl.c202
-rw-r--r--tools/src/h5dump/h5dump_defines.h6
-rw-r--r--tools/src/h5dump/h5dump_extern.h2
-rw-r--r--tools/src/h5dump/h5dump_xml.c556
-rw-r--r--tools/src/h5format_convert/h5format_convert.c18
-rw-r--r--tools/src/h5import/h5import.c474
-rw-r--r--tools/src/h5jam/h5jam.c20
-rw-r--r--tools/src/h5jam/h5unjam.c12
-rw-r--r--tools/src/h5ls/h5ls.c526
-rw-r--r--tools/src/h5perf/pio_engine.c30
-rw-r--r--tools/src/h5perf/pio_perf.c50
-rw-r--r--tools/src/h5perf/sio_engine.c55
-rw-r--r--tools/src/h5perf/sio_perf.c44
-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
-rw-r--r--tools/src/h5stat/h5stat.c108
-rw-r--r--tools/src/misc/h5clear.c22
-rw-r--r--tools/src/misc/h5debug.c16
-rw-r--r--tools/src/misc/h5delete.c6
-rw-r--r--tools/src/misc/h5mkgrp.c38
-rw-r--r--tools/src/misc/h5repart.c88
33 files changed, 1391 insertions, 1390 deletions
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 2b28df3..ef7e36f 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -156,25 +156,25 @@ parse_flag(const char *s_flag, unsigned *flag)
{
unsigned fla = 0;
- if (HDstrcmp(s_flag, "shallow") == 0) {
+ if (strcmp(s_flag, "shallow") == 0) {
fla = H5O_COPY_SHALLOW_HIERARCHY_FLAG;
}
- else if (HDstrcmp(s_flag, "soft") == 0) {
+ else if (strcmp(s_flag, "soft") == 0) {
fla = H5O_COPY_EXPAND_SOFT_LINK_FLAG;
}
- else if (HDstrcmp(s_flag, "ext") == 0) {
+ else if (strcmp(s_flag, "ext") == 0) {
fla = H5O_COPY_EXPAND_EXT_LINK_FLAG;
}
- else if (HDstrcmp(s_flag, "ref") == 0) {
+ else if (strcmp(s_flag, "ref") == 0) {
fla = H5O_COPY_EXPAND_REFERENCE_FLAG;
}
- else if (HDstrcmp(s_flag, "noattr") == 0) {
+ else if (strcmp(s_flag, "noattr") == 0) {
fla = H5O_COPY_WITHOUT_ATTR_FLAG;
}
- else if (HDstrcmp(s_flag, "allflags") == 0) {
+ else if (strcmp(s_flag, "allflags") == 0) {
fla = H5O_COPY_ALL;
}
- else if (HDstrcmp(s_flag, "nullmsg") == 0) {
+ else if (strcmp(s_flag, "nullmsg") == 0) {
fla = H5O_COPY_PRESERVE_NULL_FLAG;
}
else {
@@ -229,7 +229,7 @@ main(int argc, char *argv[])
while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'd':
- oname_dst = HDstrdup(H5_optarg);
+ oname_dst = strdup(H5_optarg);
break;
case 'f':
@@ -238,7 +238,7 @@ main(int argc, char *argv[])
usage();
leave(EXIT_FAILURE);
}
- str_flag = HDstrdup(H5_optarg);
+ str_flag = strdup(H5_optarg);
break;
case 'h':
@@ -247,11 +247,11 @@ main(int argc, char *argv[])
break;
case 'i':
- fname_src = HDstrdup(H5_optarg);
+ fname_src = strdup(H5_optarg);
break;
case 'o':
- fname_dst = HDstrdup(H5_optarg);
+ fname_dst = strdup(H5_optarg);
break;
case 'p':
@@ -259,7 +259,7 @@ main(int argc, char *argv[])
break;
case 's':
- oname_src = HDstrdup(H5_optarg);
+ oname_src = strdup(H5_optarg);
break;
case 'V':
@@ -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
@@ -403,7 +403,7 @@ main(int argc, char *argv[])
/* error, if parent groups doesn't already exist in destination file */
size_t i, len;
- len = HDstrlen(oname_dst);
+ len = strlen(oname_dst);
/* check if all the parents groups exist. skip root group */
for (i = 1; i < len; i++) {
@@ -411,7 +411,7 @@ main(int argc, char *argv[])
char *str_ptr;
str_ptr = (char *)calloc(i + 1, sizeof(char));
- HDstrncpy(str_ptr, oname_dst, i);
+ strncpy(str_ptr, oname_dst, i);
str_ptr[i] = '\0';
if (H5Lexists(fid_dst, str_ptr, H5P_DEFAULT) <= 0) {
error_msg("group <%s> doesn't exist. Use -p to create parent groups.\n", str_ptr);
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 4854534..c66311f 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':
@@ -387,7 +387,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
}
/* If file 1 uses the onion VFD, get the revision number */
- if (opts->vfd_info[0].u.name && !HDstrcmp(opts->vfd_info[0].u.name, "onion")) {
+ if (opts->vfd_info[0].u.name && !strcmp(opts->vfd_info[0].u.name, "onion")) {
if (opts->vfd_info[0].info) {
errno = 0;
onion_fa_g_1.revision_num = strtoull(opts->vfd_info[0].info, NULL, 10);
@@ -404,7 +404,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
}
/* If file 2 uses the onion VFD, get the revision number */
- if (opts->vfd_info[1].u.name && !HDstrcmp(opts->vfd_info[1].u.name, "onion")) {
+ if (opts->vfd_info[1].u.name && !strcmp(opts->vfd_info[1].u.name, "onion")) {
if (opts->vfd_info[1].info) {
errno = 0;
onion_fa_g_2.revision_num = strtoull(opts->vfd_info[1].info, NULL, 10);
@@ -512,7 +512,7 @@ check_n_input(const char *str)
unsigned i;
char c;
- for (i = 0; i < HDstrlen(str); i++) {
+ for (i = 0; i < strlen(str); i++) {
c = str[i];
if (i == 0) {
if (c < 49 || c > 57) /* ascii values between 1 and 9 */
@@ -541,7 +541,7 @@ check_p_input(const char *str)
* the atof return value on a hexadecimal input is different
* on some systems; we do a character check for this
*/
- if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x')
+ if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x')
return -1;
x = atof(str);
@@ -568,7 +568,7 @@ check_d_input(const char *str)
* the atof return value on a hexadecimal input is different
* on some systems; we do a character check for this
*/
- if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x')
+ if (strlen(str) > 2 && str[0] == '0' && str[1] == 'x')
return -1;
x = atof(str);
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index c5f97df..0f43261 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -246,8 +246,8 @@ print_manager_output(void)
if (overflow_file) {
int tmp;
rewind(overflow_file);
- while ((tmp = HDgetc(overflow_file)) >= 0)
- HDputchar(tmp);
+ while ((tmp = getc(overflow_file)) >= 0)
+ putchar(tmp);
fclose(overflow_file);
overflow_file = NULL;
}
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 1458354..a1a6de0 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 */
@@ -515,15 +515,15 @@ set_binary_form(const char *form)
{
int bform = -1;
- if (HDstrcmp(form, "NATIVE") == 0 || HDstrcmp(form, "MEMORY") == 0) {
+ if (strcmp(form, "NATIVE") == 0 || strcmp(form, "MEMORY") == 0) {
/* native form */
bform = 0;
}
- else if (HDstrcmp(form, "FILE") == 0) /* file type form */
+ else if (strcmp(form, "FILE") == 0) /* file type form */
bform = 1;
- else if (HDstrcmp(form, "LE") == 0) /* convert to little endian */
+ else if (strcmp(form, "LE") == 0) /* convert to little endian */
bform = 2;
- else if (HDstrcmp(form, "BE") == 0) /* convert to big endian */
+ else if (strcmp(form, "BE") == 0) /* convert to big endian */
bform = 3;
return bform;
@@ -544,9 +544,9 @@ set_sort_by(const char *form)
{
H5_index_t idx_type = H5_INDEX_UNKNOWN;
- if (HDstrcmp(form, "name") == 0) /* H5_INDEX_NAME */
+ if (strcmp(form, "name") == 0) /* H5_INDEX_NAME */
idx_type = H5_INDEX_NAME;
- else if (HDstrcmp(form, "creation_order") == 0) /* H5_INDEX_CRT_ORDER */
+ else if (strcmp(form, "creation_order") == 0) /* H5_INDEX_CRT_ORDER */
idx_type = H5_INDEX_CRT_ORDER;
return idx_type;
@@ -567,9 +567,9 @@ set_sort_order(const char *form)
{
H5_iter_order_t iter_order = H5_ITER_UNKNOWN;
- if (HDstrcmp(form, "ascending") == 0) /* H5_ITER_INC */
+ if (strcmp(form, "ascending") == 0) /* H5_ITER_INC */
iter_order = H5_ITER_INC;
- else if (HDstrcmp(form, "descending") == 0) /* H5_ITER_DEC */
+ else if (strcmp(form, "descending") == 0) /* H5_ITER_DEC */
iter_order = H5_ITER_DEC;
return iter_order;
@@ -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;
@@ -837,11 +837,11 @@ parse_start:
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_paths;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'a':
dump_opts.display_all = 0;
@@ -849,11 +849,11 @@ parse_start:
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_attributes;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'd':
dump_opts.display_all = 0;
@@ -861,27 +861,27 @@ parse_start:
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_datasets;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
if (!dump_opts.disable_compact_subset)
hand[i].subset_info = parse_subset_params(hand[i].obj);
last_dset = &hand[i];
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]))
+ if (0 == strcmp(vfd_info_g.u.name, drivernames[ROS3_VFD_IDX]))
if (!vfd_info_g.info)
vfd_info_g.info = &ros3_fa_g;
#endif
#ifdef H5_HAVE_LIBHDFS
- if (0 == HDstrcmp(vfd_info_g.u.name, drivernames[HDFS_VFD_IDX]))
+ if (0 == strcmp(vfd_info_g.u.name, drivernames[HDFS_VFD_IDX]))
if (!vfd_info_g.info)
vfd_info_g.info = &hdfs_fa_g;
#endif
@@ -893,11 +893,11 @@ parse_start:
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_groups;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 'l':
dump_opts.display_all = 0;
@@ -905,11 +905,11 @@ parse_start:
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_links;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
break;
}
- last_was_dset = FALSE;
+ last_was_dset = false;
break;
case 't':
dump_opts.display_all = 0;
@@ -917,11 +917,11 @@ parse_start:
for (i = 0; i < argc; i++)
if (!hand[i].func) {
hand[i].func = handle_datatypes;
- hand[i].obj = HDstrdup(H5_optarg);
+ hand[i].obj = strdup(H5_optarg);
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;
@@ -1053,7 +1053,7 @@ parse_start:
usage(h5tools_getprogname());
goto error;
}
- if (HDstrcmp(H5_optarg, ":") == 0)
+ if (strcmp(H5_optarg, ":") == 0)
xmlnsprefix = "";
else
xmlnsprefix = H5_optarg;
@@ -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':
@@ -1234,11 +1234,11 @@ end_collect:
}
/* If the file uses the onion VFD, get the revision number */
- if (vfd_info_g.u.name && !HDstrcmp(vfd_info_g.u.name, "onion")) {
+ if (vfd_info_g.u.name && !strcmp(vfd_info_g.u.name, "onion")) {
if (vfd_info_g.info) {
- if (!HDstrcmp(vfd_info_g.info, "revision_count"))
- get_onion_revision_count = TRUE;
+ if (!strcmp(vfd_info_g.info, "revision_count"))
+ 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;
@@ -1373,7 +1373,7 @@ main(int argc, char *argv[])
}
while (H5_optind < argc) {
- fname = HDstrdup(argv[H5_optind++]);
+ fname = strdup(argv[H5_optind++]);
/* A short cut to get the revision count of an onion file without opening the file */
if (get_onion_revision_count && H5FD_ONION == H5Pget_driver(fapl_id)) {
@@ -1406,7 +1406,7 @@ main(int argc, char *argv[])
if (doxml_g) {
/* initialize XML */
/* reset prefix! */
- HDstrcpy(prefix, "");
+ strcpy(prefix, "");
/* make sure the URI is initialized to something */
if (xml_dtd_uri_g == NULL) {
@@ -1419,7 +1419,7 @@ main(int argc, char *argv[])
}
}
else {
- if (useschema_g && HDstrcmp(xmlnsprefix, "") != 0) {
+ if (useschema_g && strcmp(xmlnsprefix, "") != 0) {
error_msg(
"Cannot set Schema URL for a qualified namespace--use -X or -U option with -D \n");
h5tools_setstatus(EXIT_FAILURE);
@@ -1462,7 +1462,7 @@ main(int argc, char *argv[])
/* alternative first element, depending on schema or DTD. */
if (useschema_g) {
- if (HDstrcmp(xmlnsprefix, "") == 0) {
+ if (strcmp(xmlnsprefix, "") == 0) {
PRINTSTREAM(rawoutstream,
"<HDF5-File xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
"xsi:noNamespaceSchemaLocation=\"%s\">\n",
@@ -1473,8 +1473,8 @@ main(int argc, char *argv[])
char *ns;
char *indx;
- ns = HDstrdup(xmlnsprefix);
- indx = HDstrrchr(ns, (int)':');
+ ns = strdup(xmlnsprefix);
+ indx = strrchr(ns, (int)':');
if (indx)
*indx = '\0';
@@ -1633,7 +1633,7 @@ init_prefix(char **prfx, size_t prfx_len)
void
add_prefix(char **prfx, size_t *prfx_len, const char *name)
{
- size_t new_len = HDstrlen(*prfx) + HDstrlen(name) + 2;
+ size_t new_len = strlen(*prfx) + strlen(name) + 2;
/* Check if we need more space */
if (*prfx_len <= new_len) {
@@ -1642,5 +1642,5 @@ add_prefix(char **prfx, size_t *prfx_len, const char *name)
}
/* Append object name to prefix */
- HDstrcat(HDstrcat(*prfx, "/"), name);
+ strcat(strcat(*prfx, "/"), name);
} /* end add_prefix */
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..3b72faa 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -187,15 +187,15 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
outputformat = &string_dataformat;
/* Build the object's path name */
- obj_path = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ obj_path = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (!obj_path) {
ret = FAIL;
goto done;
}
- HDstrcpy(obj_path, prefix);
- HDstrcat(obj_path, "/");
- HDstrcat(obj_path, name);
+ strcpy(obj_path, prefix);
+ strcat(obj_path, "/");
+ strcat(obj_path, name);
if (linfo->type == H5L_TYPE_HARD) {
H5O_info2_t oinfo;
@@ -219,7 +219,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
char *old_prefix; /* Pointer to previous prefix */
/* Keep copy of prefix before iterating into group */
- old_prefix = HDstrdup(prefix);
+ old_prefix = strdup(prefix);
if (old_prefix) {
/* Append group name to prefix */
add_prefix(&prefix, &prefix_len, name);
@@ -228,7 +228,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
dump_function_table->dump_group_function(obj, name);
/* Restore old prefix name */
- HDstrcpy(prefix, old_prefix);
+ strcpy(prefix, old_prefix);
free(old_prefix);
}
else
@@ -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,17 +274,17 @@ 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);
- if (HDstrlen(h5tools_dump_header_format->datasetblockend)) {
+ if (strlen(h5tools_dump_header_format->datasetblockend)) {
h5tools_str_append(&buffer, "%s",
h5tools_dump_header_format->datasetblockend);
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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,17 +321,17 @@ 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->datasetblockend)) {
+ if (strlen(h5tools_dump_header_format->datasetblockend)) {
h5tools_str_append(&buffer, "%s",
h5tools_dump_header_format->datasetblockend);
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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,16 +422,16 @@ 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->softlinkblockend)) {
+ if (strlen(h5tools_dump_header_format->softlinkblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkblockend);
- if (HDstrlen(h5tools_dump_header_format->softlinkend))
+ if (strlen(h5tools_dump_header_format->softlinkend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->softlinkend))
+ if (strlen(h5tools_dump_header_format->softlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->softlinkend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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,16 +496,16 @@ 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);
- if (HDstrlen(h5tools_dump_header_format->extlinkblockend)) {
+ if (strlen(h5tools_dump_header_format->extlinkblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkblockend);
- if (HDstrlen(h5tools_dump_header_format->extlinkend))
+ if (strlen(h5tools_dump_header_format->extlinkend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->extlinkend))
+ if (strlen(h5tools_dump_header_format->extlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->extlinkend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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,15 +538,15 @@ 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)) {
+ if (strlen(h5tools_dump_header_format->udlinkblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->udlinkblockend);
- if (HDstrlen(h5tools_dump_header_format->udlinkend))
+ if (strlen(h5tools_dump_header_format->udlinkend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->udlinkend))
+ if (strlen(h5tools_dump_header_format->udlinkend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->udlinkend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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, ";");
@@ -730,12 +730,12 @@ dump_named_datatype(hid_t tid, const char *name)
done:
/* Render the element */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->datatypeblockend)) {
+ if (strlen(h5tools_dump_header_format->datatypeblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datatypeblockend);
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datatypeend))
+ if (strlen(h5tools_dump_header_format->datatypeend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datatypeend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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);
@@ -825,7 +825,7 @@ dump_group(hid_t gid, const char *name)
ctx.indent_level++;
dump_indent += COL;
- if (!HDstrcmp(name, "/") && unamedtype) {
+ if (!strcmp(name, "/") && unamedtype) {
unsigned u; /* Local index variable */
/* dump unnamed type in root group */
@@ -837,7 +837,7 @@ dump_group(hid_t gid, const char *name)
type = H5Dget_type(dset);
H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str);
- HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
+ snprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
H5free_memory(obj_tok_str);
dump_function_table->dump_named_datatype_function(type, type_name);
@@ -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,16 +881,16 @@ 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);
- if (HDstrlen(h5tools_dump_header_format->groupblockend)) {
+ if (strlen(h5tools_dump_header_format->groupblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->groupblockend);
- if (HDstrlen(h5tools_dump_header_format->groupend))
+ if (strlen(h5tools_dump_header_format->groupend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->groupend))
+ if (strlen(h5tools_dump_header_format->groupend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->groupend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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,17 +1058,17 @@ 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 */
h5tools_str_reset(&buffer);
- if (HDstrlen(h5tools_dump_header_format->datasetblockend)) {
+ if (strlen(h5tools_dump_header_format->datasetblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetblockend);
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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 */
@@ -1202,25 +1202,25 @@ dump_fcpl(hid_t fid)
#ifdef SHOW_FILE_DRIVER
if (H5FD_CORE == fdriver)
- HDstrcpy(dname, "H5FD_CORE");
+ strcpy(dname, "H5FD_CORE");
#ifdef H5_HAVE_DIRECT
else if (H5FD_DIRECT == fdriver)
- HDstrcpy(dname, "H5FD_DIRECT");
+ strcpy(dname, "H5FD_DIRECT");
#endif
else if (H5FD_FAMILY == fdriver)
- HDstrcpy(dname, "H5FD_FAMILY");
+ strcpy(dname, "H5FD_FAMILY");
else if (H5FD_LOG == fdriver)
- HDstrcpy(dname, "H5FD_LOG");
+ strcpy(dname, "H5FD_LOG");
else if (H5FD_MPIO == fdriver)
- HDstrcpy(dname, "H5FD_MPIO");
+ strcpy(dname, "H5FD_MPIO");
else if (H5FD_MULTI == fdriver)
- HDstrcpy(dname, "H5FD_MULTI");
+ strcpy(dname, "H5FD_MULTI");
else if (H5FD_SEC2 == fdriver)
- HDstrcpy(dname, "H5FD_SEC2");
+ strcpy(dname, "H5FD_SEC2");
else if (H5FD_STDIO == fdriver)
- HDstrcpy(dname, "H5FD_STDIO");
+ strcpy(dname, "H5FD_STDIO");
else
- HDstrcpy(dname, "Unknown driver");
+ strcpy(dname, "Unknown driver");
/* Take out this because the driver used can be different from the
* standard output. */
@@ -1311,7 +1311,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
const char *buf = attr_data->path;
const char *op_name = attr_data->op_name;
- j = (int)HDstrlen(op_name) - 1;
+ j = (int)strlen(op_name) - 1;
/* find the last / */
while (j >= 0) {
if (op_name[j] == '/' && (j == 0 || (op_name[j - 1] != '\\')))
@@ -1326,12 +1326,12 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
ret = FAIL;
}
else {
- if (HDstrcmp(attr_name, obj_op_name) == 0) {
+ if (strcmp(attr_name, obj_op_name) == 0) {
size_t u, v, w;
/* object name */
- u = HDstrlen(buf);
- v = HDstrlen(op_name);
+ u = strlen(buf);
+ v = strlen(op_name);
w = u + 1 + v + 1 + 2;
obj_name = (char *)malloc(w);
if (obj_name == NULL) {
@@ -1343,16 +1343,16 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
memset(obj_name, '\0', w);
if (op_name[0] != '/') {
- HDstrncat(obj_name, buf, buffer_space);
+ strncat(obj_name, buf, buffer_space);
buffer_space -= MIN(buffer_space, u);
if (buf[u - 1] != '/') {
- HDstrncat(obj_name, "/", buffer_space);
+ strncat(obj_name, "/", buffer_space);
buffer_space -= MIN(buffer_space, 2);
}
}
- HDstrncat(obj_name, op_name, buffer_space);
+ strncat(obj_name, op_name, buffer_space);
buffer_space -= MIN(buffer_space, v);
handle_attributes(oid, obj_name, NULL, 0, NULL);
@@ -1377,7 +1377,7 @@ obj_search(const char *path, const H5O_info2_t *oi, const char H5_ATTR_UNUSED *a
H5Aiterate_by_name(handle_data->fid, path, H5_INDEX_NAME, H5_ITER_INC, NULL, attr_search,
(void *)&attr_data, H5P_DEFAULT);
- if (HDstrcmp(path, op_name) == 0) {
+ if (strcmp(path, op_name) == 0) {
switch (oi->type) {
case H5O_TYPE_GROUP:
handle_groups(handle_data->fid, path, NULL, 0, NULL);
@@ -1412,7 +1412,7 @@ lnk_search(const char *path, const H5L_info2_t *li, void *_op_data)
trav_handle_udata_t *handle_data = (trav_handle_udata_t *)_op_data;
const char *op_name = handle_data->op_name;
- search_len = HDstrlen(op_name);
+ search_len = strlen(op_name);
if (search_len > 0 && op_name[0] != '/')
k = 2;
else
@@ -1424,14 +1424,14 @@ lnk_search(const char *path, const H5L_info2_t *li, void *_op_data)
}
else {
if (k == 2) {
- HDstrcpy(search_name, "/");
- HDstrcat(search_name, op_name);
+ strcpy(search_name, "/");
+ strcat(search_name, op_name);
}
else
- HDstrcpy(search_name, op_name);
+ strcpy(search_name, op_name);
search_name[search_len + k - 1] = '\0';
- if (HDstrcmp(path, search_name) == 0) {
+ if (strcmp(path, search_name) == 0) {
switch (li->type) {
case H5L_TYPE_SOFT:
case H5L_TYPE_EXTERNAL:
@@ -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);
}
@@ -1530,7 +1530,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
h5tool_format_t string_dataformat;
hsize_t curr_pos = 0; /* total data element position */
- j = (int)HDstrlen(attr) - 1;
+ j = (int)strlen(attr) - 1;
obj_name = (char *)malloc((size_t)j + 2);
if (obj_name == NULL)
goto error;
@@ -1544,9 +1544,9 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
/* object name */
if (j == -1)
- HDstrcpy(obj_name, "/");
+ strcpy(obj_name, "/");
else {
- HDstrncpy(obj_name, attr, (size_t)j + 1);
+ strncpy(obj_name, attr, (size_t)j + 1);
obj_name[j + 1] = '\0';
} /* end else */
@@ -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,15 +1592,15 @@ 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)) {
+ if (strlen(h5tools_dump_header_format->attributeblockend)) {
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->attributeblockend);
- if (HDstrlen(h5tools_dump_header_format->attributeend))
+ if (strlen(h5tools_dump_header_format->attributeend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->attributeend))
+ if (strlen(h5tools_dump_header_format->attributeend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->attributeend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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;
@@ -1849,14 +1849,14 @@ handle_groups(hid_t fid, const char *group, void H5_ATTR_UNUSED *data, int pe, c
}
}
else {
- size_t new_len = HDstrlen(group) + 1;
+ size_t new_len = strlen(group) + 1;
if (prefix_len <= new_len) {
prefix_len = new_len;
prefix = (char *)realloc(prefix, prefix_len);
} /* end if */
- HDstrcpy(prefix, group);
+ strcpy(prefix, group);
dump_indent += COL;
dump_group(gid, real_name);
@@ -1978,10 +1978,10 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED *data, int pe,
/* unnamed datatype */
H5Otoken_to_str(fid, &type_table->objs[idx].obj_token, &obj_tok_str);
- HDsnprintf(name, sizeof(name), "/#%s", obj_tok_str);
+ snprintf(name, sizeof(name), "/#%s", obj_tok_str);
H5free_memory(obj_tok_str);
- if (!HDstrcmp(name, real_name))
+ if (!strcmp(name, real_name))
break;
} /* end if */
@@ -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_defines.h b/tools/src/h5dump/h5dump_defines.h
index 5f89178..f82dee5 100644
--- a/tools/src/h5dump/h5dump_defines.h
+++ b/tools/src/h5dump/h5dump_defines.h
@@ -32,12 +32,12 @@
#define end_obj(obj, end) \
do { \
- if (HDstrlen(end)) { \
+ if (strlen(end)) { \
PRINTSTREAM(rawoutstream, "%s", end); \
- if (HDstrlen(obj)) \
+ if (strlen(obj)) \
PRINTVALSTREAM(rawoutstream, " "); \
} \
- if (HDstrlen(obj)) \
+ if (strlen(obj)) \
PRINTSTREAM(rawoutstream, "%s", obj); \
} while (0)
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..93fc3b0 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -164,15 +164,15 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
outputformat = &string_dataformat;
/* Build the object's path name */
- obj_path = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ obj_path = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (!obj_path) {
ret = FAIL;
goto done;
}
- HDstrcpy(obj_path, prefix);
- HDstrcat(obj_path, "/");
- HDstrcat(obj_path, name);
+ strcpy(obj_path, prefix);
+ strcat(obj_path, "/");
+ strcat(obj_path, name);
if (linfo->type == H5L_TYPE_HARD) {
H5O_info2_t oinfo;
@@ -196,7 +196,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char *old_prefix; /* Pointer to previous prefix */
/* Keep copy of prefix before iterating into group */
- if ((old_prefix = HDstrdup(prefix)) == NULL) {
+ if ((old_prefix = strdup(prefix)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -209,7 +209,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
dump_function_table->dump_group_function(obj, name);
/* Restore old prefix name */
- HDstrcpy(prefix, old_prefix);
+ strcpy(prefix, old_prefix);
free(old_prefix);
}
@@ -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,17 +240,17 @@ 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);
- if (HDstrlen(h5tools_dump_header_format->datasetblockend)) {
+ if (strlen(h5tools_dump_header_format->datasetblockend)) {
h5tools_str_append(&buffer, "%s",
h5tools_dump_header_format->datasetblockend);
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, " ");
}
- if (HDstrlen(h5tools_dump_header_format->datasetend))
+ if (strlen(h5tools_dump_header_format->datasetend))
h5tools_str_append(&buffer, "%s", h5tools_dump_header_format->datasetend);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -265,7 +265,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
else if (found_obj->displayed) {
/* the XML version */
char *t_obj_path = xml_escape_the_name(obj_path);
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix, "") ? prefix : "/");
+ char *t_prefix = xml_escape_the_name(strcmp(prefix, "") ? prefix : "/");
char *t_name = xml_escape_the_name(name);
char *t_objname = xml_escape_the_name(found_obj->objname);
char dsetxid[100];
@@ -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);
@@ -380,19 +380,19 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char linkxid[100];
char parentxid[100];
char targetxid[100];
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix, "") ? prefix : "/");
+ char *t_prefix = xml_escape_the_name(strcmp(prefix, "") ? prefix : "/");
char *t_name = xml_escape_the_name(name);
char *t_targbuf = xml_escape_the_name(targbuf);
char *t_obj_path = xml_escape_the_name(obj_path);
char *t_link_path;
int res;
- t_link_path = (char *)malloc(HDstrlen(prefix) + linfo->u.val_size + 1);
+ t_link_path = (char *)malloc(strlen(prefix) + linfo->u.val_size + 1);
if (targbuf[0] == '/')
- HDstrcpy(t_link_path, targbuf);
+ strcpy(t_link_path, targbuf);
else {
- HDstrcpy(t_link_path, prefix);
- HDstrcat(HDstrcat(t_link_path, "/"), targbuf);
+ strcpy(t_link_path, prefix);
+ strcat(strcat(t_link_path, "/"), targbuf);
} /* end else */
/* Create OBJ-XIDs for the parent and object */
@@ -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);
@@ -481,7 +481,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char linkxid[100];
char parentxid[100];
char *t_name = xml_escape_the_name(name);
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix, "") ? prefix : "/");
+ char *t_prefix = xml_escape_the_name(strcmp(prefix, "") ? prefix : "/");
char *t_obj_path = xml_escape_the_name(obj_path);
char *t_filename = xml_escape_the_name(filename);
char *t_targname = xml_escape_the_name(targname);
@@ -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);
@@ -529,14 +529,14 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char linkxid[100];
char parentxid[100];
char *t_name = xml_escape_the_name(name);
- char *t_prefix = xml_escape_the_name(HDstrcmp(prefix, "") ? prefix : "/");
+ char *t_prefix = xml_escape_the_name(strcmp(prefix, "") ? prefix : "/");
char *t_obj_path = xml_escape_the_name(obj_path);
/* Create OBJ-XIDs for the parent and object */
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);
@@ -593,14 +593,14 @@ xml_name_to_XID(hid_t loc_id, const char *str, char *outstr, int outlen, int gen
lookup_ret = ref_path_table_lookup(str, &obj_token);
if (lookup_ret < 0) {
- if (HDstrlen(str) == 0) {
+ if (strlen(str) == 0) {
lookup_ret = ref_path_table_lookup("/", &obj_token);
if (lookup_ret < 0) {
if (gen) {
ref_path_table_gen_fake(str, &obj_token);
H5Otoken_to_str(loc_id, &obj_token, &obj_tok_str);
- HDsnprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
+ snprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
H5free_memory(obj_tok_str);
return 0;
@@ -615,7 +615,7 @@ xml_name_to_XID(hid_t loc_id, const char *str, char *outstr, int outlen, int gen
ref_path_table_gen_fake(str, &obj_token);
H5Otoken_to_str(loc_id, &obj_token, &obj_tok_str);
- HDsnprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
+ snprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
H5free_memory(obj_tok_str);
return 0;
@@ -627,7 +627,7 @@ xml_name_to_XID(hid_t loc_id, const char *str, char *outstr, int outlen, int gen
}
H5Otoken_to_str(loc_id, &obj_token, &obj_tok_str);
- HDsnprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
+ snprintf(outstr, (size_t)outlen, "xid_%s", obj_tok_str);
H5free_memory(obj_tok_str);
return 0;
@@ -664,26 +664,26 @@ xml_escape_the_name(const char *str)
return NULL;
cp = str;
- len = HDstrlen(str);
+ len = strlen(str);
extra = 0;
for (i = 0; i < len; i++) {
if (*cp == '\"')
- extra += (HDstrlen(quote) - 1);
+ extra += (strlen(quote) - 1);
else if (*cp == '\'')
- extra += (HDstrlen(apos) - 1);
+ extra += (strlen(apos) - 1);
else if (*cp == '<')
- extra += (HDstrlen(lt) - 1);
+ extra += (strlen(lt) - 1);
else if (*cp == '>')
- extra += (HDstrlen(gt) - 1);
+ extra += (strlen(gt) - 1);
else if (*cp == '&')
- extra += (HDstrlen(amp) - 1);
+ extra += (strlen(amp) - 1);
cp++;
}
if (extra == 0)
- return HDstrdup(str);
+ return strdup(str);
cp = str;
ncp_len = len + extra + 1;
@@ -696,24 +696,24 @@ xml_escape_the_name(const char *str)
size_t esc_len;
if (*cp == '\'') {
- HDstrncpy(ncp, apos, ncp_len);
- esc_len = HDstrlen(apos);
+ strncpy(ncp, apos, ncp_len);
+ esc_len = strlen(apos);
}
else if (*cp == '<') {
- HDstrncpy(ncp, lt, ncp_len);
- esc_len = HDstrlen(lt);
+ strncpy(ncp, lt, ncp_len);
+ esc_len = strlen(lt);
}
else if (*cp == '>') {
- HDstrncpy(ncp, gt, ncp_len);
- esc_len = HDstrlen(gt);
+ strncpy(ncp, gt, ncp_len);
+ esc_len = strlen(gt);
}
else if (*cp == '\"') {
- HDstrncpy(ncp, quote, ncp_len);
- esc_len = HDstrlen(quote);
+ strncpy(ncp, quote, ncp_len);
+ esc_len = strlen(quote);
}
else if (*cp == '&') {
- HDstrncpy(ncp, amp, ncp_len);
- esc_len = HDstrlen(amp);
+ strncpy(ncp, amp, ncp_len);
+ esc_len = strlen(amp);
}
else {
*ncp = *cp;
@@ -755,7 +755,7 @@ xml_escape_the_string(const char *str, int slen)
cp = str;
if (slen < 0)
- len = HDstrlen(str);
+ len = strlen(str);
else
len = (size_t)slen;
@@ -767,13 +767,13 @@ xml_escape_the_string(const char *str, int slen)
else if (*cp == '\"')
extra++;
else if (*cp == '\'')
- extra += (HDstrlen(apos) - 1);
+ extra += (strlen(apos) - 1);
else if (*cp == '<')
- extra += (HDstrlen(lt) - 1);
+ extra += (strlen(lt) - 1);
else if (*cp == '>')
- extra += (HDstrlen(gt) - 1);
+ extra += (strlen(gt) - 1);
else if (*cp == '&')
- extra += (HDstrlen(amp) - 1);
+ extra += (strlen(amp) - 1);
cp++;
}
@@ -800,20 +800,20 @@ xml_escape_the_string(const char *str, int slen)
esc_len = 1;
}
else if (*cp == '\'') {
- HDstrncpy(ncp, apos, ncp_len);
- esc_len = HDstrlen(apos);
+ strncpy(ncp, apos, ncp_len);
+ esc_len = strlen(apos);
}
else if (*cp == '<') {
- HDstrncpy(ncp, lt, ncp_len);
- esc_len = HDstrlen(lt);
+ strncpy(ncp, lt, ncp_len);
+ esc_len = strlen(lt);
}
else if (*cp == '>') {
- HDstrncpy(ncp, gt, ncp_len);
- esc_len = HDstrlen(gt);
+ strncpy(ncp, gt, ncp_len);
+ esc_len = strlen(gt);
}
else if (*cp == '&') {
- HDstrncpy(ncp, amp, ncp_len);
- esc_len = HDstrlen(amp);
+ strncpy(ncp, amp, ncp_len);
+ esc_len = strlen(amp);
}
else {
*ncp = *cp;
@@ -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);
@@ -2362,7 +2362,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
char *t_prefix = NULL;
char *t_name = NULL;
- tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (tmp == NULL) {
indentation(dump_indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
@@ -2370,9 +2370,9 @@ xml_dump_named_datatype(hid_t type, const char *name)
goto done;
}
- HDstrcpy(tmp, prefix);
- HDstrcat(tmp, "/");
- HDstrcat(tmp, name);
+ strcpy(tmp, prefix);
+ strcat(tmp, "/");
+ strcat(tmp, name);
/* setup */
memset(&buffer, 0, sizeof(h5tools_str_t));
@@ -2406,7 +2406,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
xml_name_to_XID(type, tmp, dtxid, 100, 1);
xml_name_to_XID(type, prefix, parentxid, 100, 1);
- if (HDstrncmp(name, "#", (size_t)1) == 0) {
+ if (strncmp(name, "#", (size_t)1) == 0) {
/* Special: this is an 'anonymous' NDT, deleted but
still in use.
We follow the dumper's undocumented practice, and
@@ -2416,21 +2416,21 @@ 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);
h5tools_str_append(&buffer,
"<%sNamedDataType Name=\"%s\" OBJ-XID=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\">",
- xmlnsprefix, name, dtxid, parentxid, HDstrcmp(prefix, "") ? t_prefix : "/");
+ xmlnsprefix, name, dtxid, parentxid, strcmp(prefix, "") ? t_prefix : "/");
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
else {
H5O_info2_t oinfo; /* Object info */
- ctx.need_prefix = TRUE;
+ ctx.need_prefix = true;
/* Render the element */
h5tools_str_reset(&buffer);
@@ -2438,7 +2438,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
"<%sNamedDataType Name=\"%s\" OBJ-XID=\"%s\" "
"H5Path=\"%s\" Parents=\"%s\" H5ParentPaths=\"%s\">",
xmlnsprefix, t_name, dtxid, t_tmp, parentxid,
- (HDstrcmp(prefix, "") ? t_prefix : "/"));
+ (strcmp(prefix, "") ? t_prefix : "/"));
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
@@ -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);
@@ -2617,12 +2617,12 @@ xml_dump_group(hid_t gid, const char *name)
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- if (HDstrcmp(name, "/") == 0) {
+ if (strcmp(name, "/") == 0) {
isRoot = 1;
- tmp = HDstrdup("/");
+ tmp = strdup("/");
}
else {
- tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (tmp == NULL) {
indentation(dump_indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
@@ -2630,11 +2630,11 @@ xml_dump_group(hid_t gid, const char *name)
return;
}
- HDstrcpy(tmp, prefix);
- par = HDstrdup(tmp);
- cp = HDstrrchr(par, '/');
+ strcpy(tmp, prefix);
+ par = strdup(tmp);
+ cp = strrchr(par, '/');
if (cp) {
- if ((cp == par) && HDstrlen(par) > 1)
+ if ((cp == par) && strlen(par) > 1)
*(cp + 1) = '\0';
else
*cp = '\0';
@@ -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 */
@@ -2791,7 +2791,7 @@ xml_dump_group(hid_t gid, const char *name)
type = H5Dget_type(dset);
H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str);
- HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
+ snprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
H5free_memory(obj_tok_str);
dump_function_table->dump_named_datatype_function(type, type_name);
@@ -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);
@@ -2884,7 +2884,7 @@ xml_dump_group(hid_t gid, const char *name)
type = H5Dget_type(dset);
H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str);
- HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
+ snprintf(type_name, sizeof(type_name), "#%s", obj_tok_str);
H5free_memory(obj_tok_str);
dump_function_table->dump_named_datatype_function(type, type_name);
@@ -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;
@@ -3181,15 +3181,15 @@ xml_print_strs(hid_t did, int source)
if (is_vlstr) {
onestring = *(char **)((void *)bp);
if (onestring)
- str_size = HDstrlen(onestring);
+ str_size = strlen(onestring);
}
else {
- HDstrncpy(onestring, bp, tsiz);
+ strncpy(onestring, bp, tsiz);
str_size = tsiz;
}
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);
@@ -3773,7 +3773,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
char *rstr = (char *)malloc((size_t)100);
char *pstr = (char *)malloc((size_t)100);
- tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(strlen(prefix) + strlen(name) + 2);
if (tmp == NULL) {
error_msg("buffer allocation failed\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -3782,9 +3782,9 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
return;
}
- HDstrcpy(tmp, prefix);
- HDstrcat(tmp, "/");
- HDstrcat(tmp, name);
+ strcpy(tmp, prefix);
+ strcat(tmp, "/");
+ strcat(tmp, name);
/* setup */
memset(&buffer, 0, sizeof(h5tools_str_t));
@@ -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..0ac4f3a 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,23 +114,23 @@ parse_command_line(int argc, const char *const *argv)
goto error;
case 'v':
- verbose_g = TRUE;
+ verbose_g = true;
break;
case 'd': /* -d dname */
if (H5_optarg != NULL && *H5_optarg)
- dname_g = HDstrdup(H5_optarg);
+ dname_g = strdup(H5_optarg);
if (dname_g == NULL) {
h5tools_setstatus(EXIT_FAILURE);
error_msg("No dataset name `%s`\n", H5_optarg);
usage(h5tools_getprogname());
goto error;
}
- dset_g = TRUE;
+ dset_g = true;
break;
case 'n': /* -n */
- noop_g = TRUE;
+ noop_g = true;
break;
case 'E':
@@ -152,7 +152,7 @@ parse_command_line(int argc, const char *const *argv)
goto error;
}
- fname_g = HDstrdup(argv[H5_optind]);
+ fname_g = strdup(argv[H5_optind]);
return 0;
@@ -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..2d3574a 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;
@@ -104,7 +104,7 @@ main(int argc, char *argv[])
if ((opt = (struct Options *)calloc(1, sizeof(struct Options))) == NULL)
goto err;
- if (argv[1] && (HDstrcmp("-V", argv[1]) == 0)) {
+ if (argv[1] && (strcmp("-V", argv[1]) == 0)) {
print_version(PROGRAMNAME);
exit(EXIT_SUCCESS);
}
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
case 1: /* counting input files */
if (opt->fcount < 29) {
- (void)HDstrcpy(opt->infiles[opt->fcount].datafile, argv[i]);
+ (void)strcpy(opt->infiles[opt->fcount].datafile, argv[i]);
in = &(opt->infiles[opt->fcount].in);
opt->infiles[opt->fcount].config = 0;
setDefaultValues(in, opt->fcount);
@@ -150,7 +150,7 @@ main(int argc, char *argv[])
break;
case 3: /* get configfile name */
- (void)HDstrcpy(opt->infiles[opt->fcount - 1].configfile, argv[i]);
+ (void)strcpy(opt->infiles[opt->fcount - 1].configfile, argv[i]);
opt->infiles[opt->fcount - 1].config = 1;
break;
@@ -158,12 +158,12 @@ main(int argc, char *argv[])
break;
case 5: /* get outfile found */
- if (HDstrlen(argv[i]) > MAX_PATH_NAME_LENGTH) {
+ if (strlen(argv[i]) > MAX_PATH_NAME_LENGTH) {
(void)fprintf(stderr, err10, argv[i]);
goto err;
}
- (void)HDstrcpy(opt->outfile, argv[i]);
- outfile_named = TRUE;
+ (void)strcpy(opt->outfile, argv[i]);
+ 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;
@@ -287,40 +287,40 @@ gtoken(char *s)
* identify the token type
*/
if (s[0] == '-') { /* option name (or negative number) */
- len = HDstrlen(&s[1]);
+ len = strlen(&s[1]);
switch (s[1]) {
case 'o':
- if (!HDstrncmp("outfile", &s[1], len))
+ if (!strncmp("outfile", &s[1], len))
token = OPT_o;
break;
case 'c':
- if (!HDstrncmp("config", &s[1], len))
+ if (!strncmp("config", &s[1], len))
token = OPT_c;
break;
case 'h':
- if (!HDstrncmp("help", &s[1], len))
+ if (!strncmp("help", &s[1], len))
token = OPT_h;
break;
case 'd':
- if (!HDstrncmp("dims", &s[1], len))
+ if (!strncmp("dims", &s[1], len))
token = OPT_d;
break;
case 'p':
- if (!HDstrncmp("path", &s[1], len))
+ if (!strncmp("path", &s[1], len))
token = OPT_p;
break;
case 't':
- if (!HDstrncmp("type", &s[1], len))
+ if (!strncmp("type", &s[1], len))
token = OPT_t;
break;
case 's':
- if (!HDstrncmp("size", &s[1], len))
+ if (!strncmp("size", &s[1], len))
token = OPT_s;
break;
default:
@@ -489,7 +489,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 0: /* TEXTIN */
in08 = (H5DT_INT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
- if (HDfscanf(strm, "%hd", &temp16) != 1) {
+ if (fscanf(strm, "%hd", &temp16) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -521,7 +521,7 @@ readIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in16++) {
- if (HDfscanf(strm, "%hd", in16) != 1) {
+ if (fscanf(strm, "%hd", in16) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -558,7 +558,7 @@ readIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in32++) {
- if (HDfscanf(strm, "%d", in32) != 1) {
+ if (fscanf(strm, "%d", in32) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -594,7 +594,7 @@ readIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in64++) {
- if (HDfscanf(strm, "%s", buffer) < 1) {
+ if (fscanf(strm, "%s", buffer) < 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -660,7 +660,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 6: /* TEXTUIN */
in08 = (H5DT_UINT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
- if (HDfscanf(strm, "%hu", &temp16) != 1) {
+ if (fscanf(strm, "%hu", &temp16) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -689,7 +689,7 @@ readUIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in16++) {
- if (HDfscanf(strm, "%hu", in16) != 1) {
+ if (fscanf(strm, "%hu", in16) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -725,7 +725,7 @@ readUIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in32++) {
- if (HDfscanf(strm, "%u", in32) != 1) {
+ if (fscanf(strm, "%u", in32) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -761,7 +761,7 @@ readUIntegerData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in64++) {
- if (HDfscanf(strm, "%s", buffer) < 1) {
+ if (fscanf(strm, "%s", buffer) < 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -826,7 +826,7 @@ readFloatData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 1: /* TEXTFP */
for (i = 0; i < len; i++, fp32++) {
- if (HDfscanf(strm, "%f", fp32) != 1) {
+ if (fscanf(strm, "%f", fp32) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -839,7 +839,7 @@ readFloatData(FILE *strm, struct Input *in)
case 2: /*TEXTFPE */
for (i = 0; i < len; i++, fp32++) {
- if (HDfscanf(strm, "%f", fp32) != 1) {
+ if (fscanf(strm, "%f", fp32) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -878,7 +878,7 @@ readFloatData(FILE *strm, struct Input *in)
switch (in->inputClass) {
case 1: /* TEXTFP */
for (i = 0; i < len; i++, fp64++) {
- if (HDfscanf(strm, "%lf", fp64) != 1) {
+ if (fscanf(strm, "%lf", fp64) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -891,7 +891,7 @@ readFloatData(FILE *strm, struct Input *in)
case 2: /*TEXTFPE */
for (i = 0; i < len; i++, fp64++) {
- if (HDfscanf(strm, "%lf", fp64) != 1) {
+ if (fscanf(strm, "%lf", fp64) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -964,7 +964,7 @@ processStrData(FILE *strm, struct Input *in, hid_t file_id)
*-------------------------------------------------------------------------
*/
- while (EOF != (c = HDfgetc(strm)))
+ while (EOF != (c = fgetc(strm)))
if (c == 10) /* eol */
nlines++;
@@ -1029,7 +1029,7 @@ processStrData(FILE *strm, struct Input *in, hid_t file_id)
line = 0;
- while (EOF != (c = HDfgetc(strm))) {
+ while (EOF != (c = fgetc(strm))) {
str[i] = (char)c;
i++;
@@ -1162,7 +1162,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
line = 0;
j = 0;
- while (HDfgets(str, sizeof(str), strm)) {
+ while (fgets(str, sizeof(str), strm)) {
str1 = str;
str2 = NULL;
str3 = NULL;
@@ -1173,24 +1173,24 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
str2 = strchr(str1, '"');
if (str2 != NULL) {
#ifdef H5DEBUGIMPORT
- printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2);
#endif
str2++;
#ifdef H5DEBUGIMPORT
- printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2);
#endif
str3 = strrchr(str2, '"');
if (str3 != NULL) {
#ifdef H5DEBUGIMPORT
- printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str3), str3);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str3), str3);
#endif
*str3 = '\0';
#ifdef H5DEBUGIMPORT
- printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", strlen(str2), str2);
#endif
- if (HDstrlen(str2) > 0) {
+ if (strlen(str2) > 0) {
hid_t fspace_id;
hsize_t start[1];
hsize_t count[1] = {1};
@@ -1461,18 +1461,18 @@ processConfigurationFile(char *infile, struct Input *in)
goto error;
}
- scanret = HDfscanf(strm, "%254s", key);
- if ((scanret == 1) && !HDstrcmp("HDF5", key)) {
+ scanret = fscanf(strm, "%254s", key);
+ if ((scanret == 1) && !strcmp("HDF5", key)) {
#ifdef H5DEBUGIMPORT
int pndx;
printf("\nh5dump file\n");
#endif
in->h5dumpInput = 1;
- scanret = HDfscanf(strm, "%254s", temp); /* filename */
- scanret = HDfscanf(strm, "%254s", temp); /* start bracket */
- scanret = HDfscanf(strm, "%254s", key); /* DATASET */
+ scanret = fscanf(strm, "%254s", temp); /* filename */
+ scanret = fscanf(strm, "%254s", temp); /* start bracket */
+ scanret = fscanf(strm, "%254s", key); /* DATASET */
while (scanret == 1) {
- if (!HDstrcmp("DATASET", key)) { /* PATH */
+ if (!strcmp("DATASET", key)) { /* PATH */
#ifdef H5DEBUGIMPORT
printf("h5dump DATASET key\n");
#endif
@@ -1480,7 +1480,7 @@ processConfigurationFile(char *infile, struct Input *in)
(void)fprintf(stderr, err3a, infile);
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1492,12 +1492,12 @@ processConfigurationFile(char *infile, struct Input *in)
goto error;
}
in->configOptionVector[PATH] = 1;
- scanret = HDfscanf(strm, "%254s", temp); /* start bracket */
+ scanret = fscanf(strm, "%254s", temp); /* start bracket */
#ifdef H5DEBUGIMPORT
printf("h5dump DATASET %s found\n", temp);
#endif
- } /* if(!HDstrcmp("DATASET", key)) PATH */
- else if (!HDstrcmp("DATATYPE", key)) { /* INPUT-CLASS */
+ } /* if(!strcmp("DATASET", key)) PATH */
+ else if (!strcmp("DATATYPE", key)) { /* INPUT-CLASS */
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE key\n");
#endif
@@ -1506,7 +1506,7 @@ processConfigurationFile(char *infile, struct Input *in)
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1542,27 +1542,27 @@ processConfigurationFile(char *infile, struct Input *in)
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING found\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* string properties */
+ if (fscanf(strm, "%254s", temp) != 1) { /* string properties */
(void)fprintf(stderr, "%s", err18);
goto error;
}
while (get_next_prop) {
- if (!HDstrcmp("STRSIZE", temp)) { /* STRSIZE */
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (!strcmp("STRSIZE", temp)) { /* STRSIZE */
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err19);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING STRSIZE %s found\n", temp);
#endif
- if (HDstrcmp("H5T_VARIABLE;", temp) != 0) {
+ if (strcmp("H5T_VARIABLE;", temp) != 0) {
char *more = temp;
ival = (int)strtol(more, &more, 10);
if (getInputSize(in, ival) == -1) {
@@ -1574,8 +1574,8 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
}
}
- else if (!HDstrcmp("STRPAD", temp)) { /* STRPAD */
- if (HDfscanf(strm, "%254s", temp) != 1) { /* STRPAD type */
+ else if (!strcmp("STRPAD", temp)) { /* STRPAD */
+ if (fscanf(strm, "%254s", temp) != 1) { /* STRPAD type */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1583,8 +1583,8 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump DATATYPE STRING STRPAD %s found\n", temp);
#endif
}
- else if (!HDstrcmp("CSET", key)) { /* CSET */
- if (HDfscanf(strm, "%254s", temp) != 1) { /* CSET type */
+ else if (!strcmp("CSET", key)) { /* CSET */
+ if (fscanf(strm, "%254s", temp) != 1) { /* CSET type */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1592,69 +1592,69 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump DATATYPE STRING CSET %s found\n", temp);
#endif
}
- else if (!HDstrcmp("CTYPE", temp)) { /* CTYPE */
- if (HDfscanf(strm, "%254s", temp) != 1) { /* CTYPE type */
+ else if (!strcmp("CTYPE", temp)) { /* CTYPE */
+ if (fscanf(strm, "%254s", temp) != 1) { /* CTYPE type */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING CTYPE %s found\n", temp);
#endif
- } /* if(!HDstrcmp("CSET", key)) */
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ } /* if(!strcmp("CSET", key)) */
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATATYPE STRING %s found\n", temp);
#endif
- if (!HDstrcmp("}", temp)) { /* end bracket */
+ if (!strcmp("}", temp)) { /* end bracket */
get_next_prop = 0;
}
- } /* while (get_next_prop) */
- } /* if(kindex == 5) STRING */
- } /* else if(!HDstrcmp("DATATYPE", key)) INPUT-CLASS */
- else if (!HDstrcmp("DATASPACE", key)) { /* RANK and DIMENSIONS */
+ } /* while (get_next_prop) */
+ } /* if(kindex == 5) STRING */
+ } /* else if(!strcmp("DATATYPE", key)) INPUT-CLASS */
+ else if (!strcmp("DATASPACE", key)) { /* RANK and DIMENSIONS */
hsize_t temp_dims[MAX_NUM_DIMENSION];
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE key\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
- if (!HDstrcmp("SCALAR", temp)) { /* SCALAR */
+ if (!strcmp("SCALAR", temp)) { /* SCALAR */
in->rank = 0;
- } /* if(!HDstrcmp("SCALAR", key)) */
- else if (!HDstrcmp("NULL", temp)) { /* NULL */
+ } /* if(!strcmp("SCALAR", key)) */
+ else if (!strcmp("NULL", temp)) { /* NULL */
(void)fprintf(stderr, err6b, infile);
goto error;
- } /* else if(!HDstrcmp("NULL", key)) */
- else if (!HDstrcmp("SIMPLE", temp)) { /* SIMPLE */
+ } /* else if(!strcmp("NULL", key)) */
+ else if (!strcmp("SIMPLE", temp)) { /* SIMPLE */
int icount = 0;
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE found\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -1664,14 +1664,14 @@ processConfigurationFile(char *infile, struct Input *in)
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = strtoull(more, &more, 10);
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp(")", temp)) { /* end paren */
+ if (!strcmp(")", temp)) { /* end paren */
in->rank = ++icount;
in->configOptionVector[RANK] = 1;
get_next_dim = 0;
@@ -1703,38 +1703,38 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
#endif
in->configOptionVector[DIM] = 1;
- } /* if(!HDstrcmp("(", key)) start paren */
+ } /* if(!strcmp("(", key)) start paren */
else {
(void)fprintf(stderr, err5b, infile);
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp("/", temp)) { /* / max dims */
+ if (!strcmp("/", temp)) { /* / max dims */
if ((in->maxsizeOfDimension =
(hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE process max dim values\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* max dim with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -1745,8 +1745,8 @@ processConfigurationFile(char *infile, struct Input *in)
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE get max dim value\n");
#endif
- if (!HDstrcmp("H5S_UNLIMITED", temp) ||
- !HDstrcmp("H5S_UNLIMITED,", temp)) { /* unlimited */
+ if (!strcmp("H5S_UNLIMITED", temp) ||
+ !strcmp("H5S_UNLIMITED,", temp)) { /* unlimited */
in->maxsizeOfDimension[i] = H5S_UNLIMITED;
in->configOptionVector[EXTEND] = 1;
}
@@ -1754,14 +1754,14 @@ processConfigurationFile(char *infile, struct Input *in)
char *more = temp;
in->maxsizeOfDimension[i] = strtoull(more, &more, 10);
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* max dim or end paren */
(void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- if (!HDstrcmp(")", temp)) { /* end paren */
+ if (!strcmp(")", temp)) { /* end paren */
get_next_dim = 0;
}
else { /* comma */
@@ -1780,57 +1780,57 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
printf("h5dump DATASPACE SIMPLE get max dim finished\n");
#endif
- } /* if(!HDstrcmp("(", key)) start paren */
+ } /* if(!strcmp("(", key)) start paren */
else {
(void)fprintf(stderr, err16c, infile);
goto error;
}
- scanret = HDfscanf(strm, "%254s", temp); /* end bracket */
+ scanret = fscanf(strm, "%254s", temp); /* end bracket */
#ifdef H5DEBUGIMPORT
printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
- } /* if(!HDstrcmp("/", key)) max dims separator */
- } /* else if(!HDstrcmp("SIMPLE", key)) */
+ } /* if(!strcmp("/", key)) max dims separator */
+ } /* else if(!strcmp("SIMPLE", key)) */
else {
(void)fprintf(stderr, err5b, infile);
goto error;
}
- } /* else if(!HDstrcmp("DATASPACE", key)) RANK and DIMENSIONS */
- else if (!HDstrcmp("STORAGE_LAYOUT", key)) { /* CHUNKED-DIMENSION-SIZES */
+ } /* else if(!strcmp("DATASPACE", key)) RANK and DIMENSIONS */
+ else if (!strcmp("STORAGE_LAYOUT", key)) { /* CHUNKED-DIMENSION-SIZES */
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT key\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* CHUNKED */
+ if (fscanf(strm, "%254s", temp) != 1) { /* CHUNKED */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT %s found\n", temp);
#endif
- if (!HDstrcmp("CHUNKED", temp)) { /* CHUNKED */
+ if (!strcmp("CHUNKED", temp)) { /* CHUNKED */
if ((in->sizeOfChunk = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
(void)fprintf(stderr, "Unable to allocate dynamic memory.\n");
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int icount = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -1840,14 +1840,14 @@ processConfigurationFile(char *infile, struct Input *in)
while (get_next_dim) {
char *more = temp;
in->sizeOfChunk[icount] = strtoull(more, &more, 10);
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
- if (!HDstrcmp(")", temp)) { /* end paren */
+ if (!strcmp(")", temp)) { /* end paren */
in->configOptionVector[RANK] = 1;
get_next_dim = 0;
}
@@ -1867,20 +1867,20 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
#endif
in->configOptionVector[DIM] = 1;
- } /* if(!HDstrcmp("(", key)) start paren */
+ } /* if(!strcmp("(", key)) start paren */
else {
(void)fprintf(stderr, err5b, infile);
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* SIZE */
+ if (fscanf(strm, "%254s", temp) != 1) { /* SIZE */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
- if (!HDstrcmp("SIZE", temp)) { /* SIZE */
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (!strcmp("SIZE", temp)) { /* SIZE */
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err19);
goto error;
}
@@ -1888,8 +1888,8 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival);
#endif
}
- while (HDstrcmp("}", temp) != 0) {
- if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
+ while (strcmp("}", temp) != 0) {
+ if (fscanf(strm, "%254s", temp) != 1) { /* end bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1898,52 +1898,52 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
}
in->configOptionVector[CHUNK] = 1;
- } /* if(!HDstrcmp("CHUNKED", key)) CHUNKED */
- } /* else if(!HDstrcmp("STORAGE_LAYOUT", key)) CHUNKED-DIMENSION-SIZES */
- else if (!HDstrcmp("FILTERS", key)) { /* FILTERS */
+ } /* if(!strcmp("CHUNKED", key)) CHUNKED */
+ } /* else if(!strcmp("STORAGE_LAYOUT", key)) CHUNKED-DIMENSION-SIZES */
+ else if (!strcmp("FILTERS", key)) { /* FILTERS */
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS key\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS %s found\n", temp);
#endif
- if (!HDstrcmp("COMPRESSION", temp)) { /* COMPRESSION */
+ if (!strcmp("COMPRESSION", temp)) { /* COMPRESSION */
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS COMPRESSION found\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* DEFLATE */
+ if (fscanf(strm, "%254s", temp) != 1) { /* DEFLATE */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* bgin bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* bgin bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* LEVEL */
+ if (fscanf(strm, "%254s", temp) != 1) { /* LEVEL */
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err19);
goto error;
}
@@ -1951,7 +1951,7 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump FILTERS COMPRESSION LEVEL %d found\n", ival);
#endif
in->compressionParam = ival;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* end bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1961,19 +1961,19 @@ processConfigurationFile(char *infile, struct Input *in)
in->compressionType = 0; /* ONLY GZIP supported */
in->configOptionVector[COMPRESS] = 1;
}
- else if (!HDstrcmp("CONTIGUOUS", temp)) { /* CONTIGUOUS */
+ else if (!strcmp("CONTIGUOUS", temp)) { /* CONTIGUOUS */
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS CONTIGUOUS found\n");
#endif
in->configOptionVector[COMPRESS] = 0;
}
- else if (!HDstrcmp("NONE", temp)) { /* NONE */
+ else if (!strcmp("NONE", temp)) { /* NONE */
#ifdef H5DEBUGIMPORT
printf("h5dump FILTERS NONE found\n");
#endif
in->configOptionVector[COMPRESS] = 0;
}
- if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* end bracket */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -1981,20 +1981,20 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump FILTERS %s found\n", temp);
#endif
}
- else if (!HDstrcmp("SUBSET", key)) { /* reduce dimensions */
+ else if (!strcmp("SUBSET", key)) { /* reduce dimensions */
hsize_t temp_dims[MAX_NUM_DIMENSION];
int get_next_prop = 1;
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET key\n");
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start bracket */
(void)fprintf(stderr, err20, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET %s found\n", temp);
#endif
- if (HDfscanf(strm, "%254s", temp) != 1) { /* SUBSET keyword */
+ if (fscanf(strm, "%254s", temp) != 1) { /* SUBSET keyword */
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -2002,20 +2002,20 @@ processConfigurationFile(char *infile, struct Input *in)
printf("h5dump SUBSET %s found\n", temp);
#endif
while (get_next_prop) {
- if (!HDstrcmp("COUNT", temp)) { /* COUNT */
+ if (!strcmp("COUNT", temp)) { /* COUNT */
int icount = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -2025,14 +2025,14 @@ processConfigurationFile(char *infile, struct Input *in)
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = strtoull(more, &more, 10);
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET COUNT %s found\n", temp);
#endif
- if (!HDstrcmp(");", temp)) { /* end paren */
+ if (!strcmp(");", temp)) { /* end paren */
in->rank = ++icount;
in->configOptionVector[RANK] = 1;
get_next_dim = 0;
@@ -2056,22 +2056,22 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
#endif
in->configOptionVector[DIM] = 1;
- } /* if(!HDstrcmp("(", key)) start paren */
- } /* if(!HDstrcmp("COUNT", temp)) COUNT */
- if (!HDstrcmp("BLOCK", temp)) { /* BLOCK */
+ } /* if(!strcmp("(", key)) start paren */
+ } /* if(!strcmp("COUNT", temp)) COUNT */
+ if (!strcmp("BLOCK", temp)) { /* BLOCK */
int icount = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* start paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET %s found\n", temp);
#endif
- if (!HDstrcmp("(", temp)) { /* start paren */
+ if (!strcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
(void)fprintf(stderr, err16c, infile);
goto error;
}
@@ -2081,14 +2081,14 @@ processConfigurationFile(char *infile, struct Input *in)
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = strtoull(more, &more, 10);
- if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
+ if (fscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET BLOCK %s found\n", temp);
#endif
- if (!HDstrcmp(");", temp)) { /* end paren */
+ if (!strcmp(");", temp)) { /* end paren */
in->rank = ++icount;
in->configOptionVector[RANK] = 1;
get_next_dim = 0;
@@ -2112,28 +2112,28 @@ processConfigurationFile(char *infile, struct Input *in)
printf("\n");
#endif
in->configOptionVector[DIM] = 1;
- } /* if(!HDstrcmp("(", key)) start paren */
- } /* if(!HDstrcmp("BLOCK", temp)) BLOCK */
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ } /* if(!strcmp("(", key)) start paren */
+ } /* if(!strcmp("BLOCK", temp)) BLOCK */
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
printf("h5dump SUBSET %s found\n", temp);
#endif
- if (!HDstrcmp("}", temp)) { /* end bracket */
+ if (!strcmp("}", temp)) { /* end bracket */
get_next_prop = 0;
}
- } /* while (get_next_prop) */
- } /* else if(!HDstrcmp("SUBSET", key)) */
- else if (!HDstrcmp("DATA", key)) { /* FINISHED */
+ } /* while (get_next_prop) */
+ } /* else if(!strcmp("SUBSET", key)) */
+ else if (!strcmp("DATA", key)) { /* FINISHED */
#ifdef H5DEBUGIMPORT
printf("h5dump DATA key\n");
#endif
scanret = 0;
break;
}
- scanret = HDfscanf(strm, "%254s", key);
+ scanret = fscanf(strm, "%254s", key);
}
#ifdef H5DEBUGIMPORT
printf("h5dump path");
@@ -2174,7 +2174,7 @@ processConfigurationFile(char *infile, struct Input *in)
(void)fprintf(stderr, err3a, infile);
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -2191,7 +2191,7 @@ processConfigurationFile(char *infile, struct Input *in)
goto error;
}
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err18);
goto error;
}
@@ -2218,7 +2218,7 @@ processConfigurationFile(char *infile, struct Input *in)
(void)fprintf(stderr, err5a, infile);
goto error;
}
- if (HDfscanf(strm, "%254d", (&ival)) != 1) {
+ if (fscanf(strm, "%254d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err19);
goto error;
}
@@ -2415,7 +2415,7 @@ processConfigurationFile(char *infile, struct Input *in)
default:
break;
}
- scanret = HDfscanf(strm, "%254s", key);
+ scanret = fscanf(strm, "%254s", key);
}
/*
@@ -2505,7 +2505,7 @@ mapKeywordToIndex(char *key)
int i;
for (i = 0; i < NUM_KEYS; i++)
- if (!HDstrcmp(keytable[i], key))
+ if (!strcmp(keytable[i], key))
return i;
return -1;
}
@@ -2518,22 +2518,22 @@ parsePathInfo(struct path_info *path, char *temp)
int i = 0;
const char *err1 = "Path string larger than MAX_PATH_NAME_LENGTH.\n";
- token = HDstrtok(temp, delimiter);
- if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
+ token = strtok(temp, delimiter);
+ if (strlen(token) >= MAX_PATH_NAME_LENGTH) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
- HDstrcpy(path->group[i++], token);
+ strcpy(path->group[i++], token);
while (1) {
- token = HDstrtok(NULL, delimiter);
+ token = strtok(NULL, delimiter);
if (token == NULL)
break;
- if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
+ if (strlen(token) >= MAX_PATH_NAME_LENGTH) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
- HDstrcpy(path->group[i++], token);
+ strcpy(path->group[i++], token);
}
path->count = i;
return (0);
@@ -2548,12 +2548,12 @@ parseDimensions(struct Input *in, char *strm)
int i = 0;
const char *err1 = "Unable to allocate dynamic memory.\n";
- HDstrncpy(temp, strm, sizeof(temp));
+ strncpy(temp, strm, sizeof(temp));
temp[sizeof(temp) - 1] = '\0';
- HDstrtok(temp, delimiter);
+ strtok(temp, delimiter);
while (1) {
- token = HDstrtok(NULL, delimiter);
+ token = strtok(NULL, delimiter);
if (token == NULL)
break;
i++;
@@ -2565,12 +2565,12 @@ parseDimensions(struct Input *in, char *strm)
}
i = 0;
- HDstrncpy(temp, strm, sizeof(temp));
+ strncpy(temp, strm, sizeof(temp));
temp[sizeof(temp) - 1] = '\0';
- in->sizeOfDimension[i++] = strtoull(HDstrtok(temp, delimiter), NULL, BASE_10);
+ in->sizeOfDimension[i++] = strtoull(strtok(temp, delimiter), NULL, BASE_10);
while (1) {
- token = HDstrtok(NULL, delimiter);
+ token = strtok(NULL, delimiter);
if (token == NULL)
break;
in->sizeOfDimension[i++] = strtoull(token, NULL, BASE_10);
@@ -2586,7 +2586,7 @@ getOutputClass(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for output class.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2606,7 +2606,7 @@ OutputClassStrToInt(char *temp)
int i;
char classKeywordTable[3][15] = {"IN", "FP", "UIN"};
for (i = 0; i < 3; i++)
- if (!HDstrcmp(classKeywordTable[i], temp))
+ if (!strcmp(classKeywordTable[i], temp))
return i;
return -1;
@@ -2621,7 +2621,7 @@ getOutputSize(struct Input *in, FILE *strm)
const char *err1 = "Unable to get integer value.\n";
const char *err2 = "Invalid value for output size.\n";
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2658,7 +2658,7 @@ getInputClassType(struct Input *in, char *buffer)
const char *err2 = "Invalid value for output architecture.\n";
const char *err3 = "Invalid value for input byte-order.\n";
- if (!HDstrcmp(buffer, "H5T_STD_I8BE")) {
+ if (!strcmp(buffer, "H5T_STD_I8BE")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2679,7 +2679,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I8LE")) {
+ else if (!strcmp(buffer, "H5T_STD_I8LE")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2700,7 +2700,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I16BE")) {
+ else if (!strcmp(buffer, "H5T_STD_I16BE")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2721,7 +2721,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I16LE")) {
+ else if (!strcmp(buffer, "H5T_STD_I16LE")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2742,7 +2742,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I32BE")) {
+ else if (!strcmp(buffer, "H5T_STD_I32BE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2763,7 +2763,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I32LE")) {
+ else if (!strcmp(buffer, "H5T_STD_I32LE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2784,7 +2784,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I64BE")) {
+ else if (!strcmp(buffer, "H5T_STD_I64BE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2805,7 +2805,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_I64LE")) {
+ else if (!strcmp(buffer, "H5T_STD_I64LE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2826,7 +2826,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U8BE")) {
+ else if (!strcmp(buffer, "H5T_STD_U8BE")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2847,7 +2847,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U8LE")) {
+ else if (!strcmp(buffer, "H5T_STD_U8LE")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2868,7 +2868,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U16BE")) {
+ else if (!strcmp(buffer, "H5T_STD_U16BE")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2889,7 +2889,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U16LE")) {
+ else if (!strcmp(buffer, "H5T_STD_U16LE")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2910,7 +2910,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U32BE")) {
+ else if (!strcmp(buffer, "H5T_STD_U32BE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2931,7 +2931,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U32LE")) {
+ else if (!strcmp(buffer, "H5T_STD_U32LE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2952,7 +2952,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U64BE")) {
+ else if (!strcmp(buffer, "H5T_STD_U64BE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2973,7 +2973,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_STD_U64LE")) {
+ else if (!strcmp(buffer, "H5T_STD_U64LE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2994,7 +2994,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_SCHAR")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_SCHAR")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3006,7 +3006,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_UCHAR")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_UCHAR")) {
in->inputSize = 8;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3018,7 +3018,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_SHORT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_SHORT")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3030,7 +3030,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_USHORT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_USHORT")) {
in->inputSize = 16;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3042,7 +3042,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_INT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_INT")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3054,7 +3054,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_UINT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_UINT")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3066,7 +3066,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_LONG")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_LONG")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3078,7 +3078,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_ULONG")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_ULONG")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3090,7 +3090,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_LLONG")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_LLONG")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3102,7 +3102,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 4;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_ULLONG")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_ULLONG")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3114,7 +3114,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 7;
}
- else if (!HDstrcmp(buffer, "H5T_IEEE_F32BE")) {
+ else if (!strcmp(buffer, "H5T_IEEE_F32BE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3135,7 +3135,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_IEEE_F32LE")) {
+ else if (!strcmp(buffer, "H5T_IEEE_F32LE")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3156,7 +3156,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_IEEE_F64BE")) {
+ else if (!strcmp(buffer, "H5T_IEEE_F64BE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3177,7 +3177,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_IEEE_F64LE")) {
+ else if (!strcmp(buffer, "H5T_IEEE_F64LE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3198,19 +3198,19 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_VAX_F32")) {
+ else if (!strcmp(buffer, "H5T_VAX_F32")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_VAX_F64")) {
+ else if (!strcmp(buffer, "H5T_VAX_F64")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_FLOAT")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_FLOAT")) {
in->inputSize = 32;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3222,7 +3222,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_DOUBLE")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_DOUBLE")) {
in->inputSize = 64;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3234,7 +3234,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_NATIVE_LDOUBLE")) {
+ else if (!strcmp(buffer, "H5T_NATIVE_LDOUBLE")) {
in->inputSize = H5_SIZEOF_LONG_DOUBLE;
in->configOptionVector[INPUT_SIZE] = 1;
@@ -3246,14 +3246,14 @@ getInputClassType(struct Input *in, char *buffer)
kindex = 3;
}
- else if (!HDstrcmp(buffer, "H5T_TIME: not yet implemented")) {
+ else if (!strcmp(buffer, "H5T_TIME: not yet implemented")) {
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STRING")) {
+ else if (!strcmp(buffer, "H5T_STRING")) {
kindex = 5;
}
/* case H5T_BITFIELD: */
- else if (!HDstrcmp(buffer, "H5T_STD_B8BE")) {
+ else if (!strcmp(buffer, "H5T_STD_B8BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3272,7 +3272,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B8LE")) {
+ else if (!strcmp(buffer, "H5T_STD_B8LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3291,7 +3291,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B16BE")) {
+ else if (!strcmp(buffer, "H5T_STD_B16BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3310,7 +3310,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B16LE")) {
+ else if (!strcmp(buffer, "H5T_STD_B16LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3329,7 +3329,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B32BE")) {
+ else if (!strcmp(buffer, "H5T_STD_B32BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3348,7 +3348,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B32LE")) {
+ else if (!strcmp(buffer, "H5T_STD_B32LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3367,7 +3367,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B64BE")) {
+ else if (!strcmp(buffer, "H5T_STD_B64BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3386,7 +3386,7 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
- else if (!HDstrcmp(buffer, "H5T_STD_B64LE")) {
+ else if (!strcmp(buffer, "H5T_STD_B64LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
(void)fprintf(stderr, "%s", err2);
@@ -3406,27 +3406,27 @@ getInputClassType(struct Input *in, char *buffer)
kindex = -1;
}
/* case H5T_OPAQUE: */
- else if (!HDstrcmp(buffer, "H5T_OPAQUE")) {
+ else if (!strcmp(buffer, "H5T_OPAQUE")) {
kindex = -1;
}
/* case H5T_COMPOUND: */
- else if (!HDstrcmp(buffer, "H5T_COMPOUND")) {
+ else if (!strcmp(buffer, "H5T_COMPOUND")) {
kindex = -1;
}
/* case H5T_REFERENCE: */
- else if (!HDstrcmp(buffer, "H5T_REFERENCE")) {
+ else if (!strcmp(buffer, "H5T_REFERENCE")) {
kindex = -1;
}
/* case H5T_ENUM: */
- else if (!HDstrcmp(buffer, "H5T_ENUM")) {
+ else if (!strcmp(buffer, "H5T_ENUM")) {
kindex = -1;
}
/* case H5T_VLEN: */
- else if (!HDstrcmp(buffer, "H5T_VLEN")) {
+ else if (!strcmp(buffer, "H5T_VLEN")) {
kindex = -1;
}
/* case H5T_ARRAY: */
- else if (!HDstrcmp(buffer, "H5T_ARRAY")) {
+ else if (!strcmp(buffer, "H5T_ARRAY")) {
kindex = -1;
}
@@ -3454,7 +3454,7 @@ InputClassStrToInt(char *temp)
int i;
char classKeywordTable[8][15] = {"TEXTIN", "TEXTFP", "TEXTFPE", "FP", "IN", "STR", "TEXTUIN", "UIN"};
for (i = 0; i < 8; i++)
- if (!HDstrcmp(classKeywordTable[i], temp))
+ if (!strcmp(classKeywordTable[i], temp))
return i;
return -1;
}
@@ -3484,7 +3484,7 @@ getInputByteOrder(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for input byte-order.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3506,7 +3506,7 @@ getRank(struct Input *in, FILE *strm)
const char *err1 = "Unable to get integer value.\n";
const char *err2 = "Invalid value for rank.\n";
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3535,7 +3535,7 @@ getDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (HDfscanf(strm, "%llu", (&ullval)) == 1)
+ while (fscanf(strm, "%llu", (&ullval)) == 1)
in->sizeOfDimension[i++] = ullval;
if (in->rank != i) {
@@ -3561,7 +3561,7 @@ getChunkedDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (HDfscanf(strm, "%llu", (&ullval)) == 1)
+ while (fscanf(strm, "%llu", (&ullval)) == 1)
in->sizeOfChunk[i++] = ullval;
if (in->rank != i) {
@@ -3594,7 +3594,7 @@ getMaximumDimensionSizes(struct Input *in, FILE *strm)
return (-1);
}
- while (HDfscanf(strm, "%lld", (&llval)) == 1) {
+ while (fscanf(strm, "%lld", (&llval)) == 1) {
if (llval == -1)
in->maxsizeOfDimension[i++] = H5S_UNLIMITED;
else
@@ -3624,7 +3624,7 @@ getOutputArchitecture(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for output architecture.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3644,7 +3644,7 @@ OutputArchStrToInt(const char *temp)
int i;
char outputArchKeywordTable[8][15] = {"NATIVE", "STD", "IEEE", "INTEL", "CRAY", "MIPS", "ALPHA", "UNIX"};
for (i = 0; i < 8; i++)
- if (!HDstrcmp(outputArchKeywordTable[i], temp))
+ if (!strcmp(outputArchKeywordTable[i], temp))
return i;
return -1;
}
@@ -3657,7 +3657,7 @@ getOutputByteOrder(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for output byte-order.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3677,7 +3677,7 @@ OutputByteOrderStrToInt(const char *temp)
int i;
char outputByteOrderKeywordTable[2][15] = {"BE", "LE"};
for (i = 0; i < 2; i++)
- if (!HDstrcmp(outputByteOrderKeywordTable[i], temp))
+ if (!strcmp(outputByteOrderKeywordTable[i], temp))
return i;
return -1;
}
@@ -3690,7 +3690,7 @@ getCompressionType(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
const char *err2 = "Invalid value for compression.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3713,7 +3713,7 @@ CompressionTypeStrToInt(char *temp)
int i;
char CompressionTypeKeywordTable[1][15] = {"GZIP"};
for (i = 0; i < 1; i++)
- if (!HDstrcmp(CompressionTypeKeywordTable[i], temp))
+ if (!strcmp(CompressionTypeKeywordTable[i], temp))
return i;
return -1;
}
@@ -3732,7 +3732,7 @@ getCompressionParameter(struct Input *in, FILE *strm)
switch (in->compressionType) {
case 0: /* GZIP */
- if (HDfscanf(strm, "%d", (&ival)) != 1) {
+ if (fscanf(strm, "%d", (&ival)) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3757,14 +3757,14 @@ getExternalFilename(struct Input *in, FILE *strm)
char temp[255];
const char *err1 = "Unable to get 'string' value.\n";
- if (HDfscanf(strm, "%254s", temp) != 1) {
+ if (fscanf(strm, "%254s", temp) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
- temp_len = HDstrlen(temp);
+ temp_len = strlen(temp);
in->externFilename = (char *)malloc((temp_len + 1) * sizeof(char));
- (void)HDstrcpy(in->externFilename, temp);
+ (void)strcpy(in->externFilename, temp);
in->externFilename[temp_len] = '\0';
return (0);
}
@@ -3785,10 +3785,10 @@ setDefaultValues(struct Input *in, int count)
in->rank = 0;
in->path.count = 1;
- HDstrcpy(temp, "dataset");
- HDsnprintf(num, sizeof(num), "%d", count);
- HDstrcat(temp, num);
- HDstrcpy(in->path.group[0], temp);
+ strcpy(temp, "dataset");
+ snprintf(num, sizeof(num), "%d", count);
+ strcat(temp, num);
+ strcpy(in->path.group[0], temp);
in->outputArchitecture = 0; /* NATIVE */
in->outputByteOrder = -1; /* use default */
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index 6f318a4..d97d339 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,22 +105,22 @@ 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) {
switch ((char)opt) {
case 'o':
- output_file = HDstrdup(H5_optarg);
+ output_file = strdup(H5_optarg);
break;
case 'i':
- input_file = HDstrdup(H5_optarg);
+ input_file = strdup(H5_optarg);
break;
case 'u':
- ub_file = HDstrdup(H5_optarg);
+ ub_file = strdup(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;
@@ -420,8 +420,8 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi
} /* end if */
while (howmuch > 0) {
- HDlseek(outfid, (off_t)to, SEEK_SET);
- HDlseek(infid, (off_t)from, SEEK_SET);
+ HDlseek(outfid, (HDoff_t)to, SEEK_SET);
+ HDlseek(infid, (HDoff_t)from, SEEK_SET);
if (howmuch > 512) {
nchars = HDread(infid, buf, (unsigned)512);
@@ -499,7 +499,7 @@ write_pad(int ofile, hsize_t old_where, hsize_t *new_where)
buf[0] = '\0';
- HDlseek(ofile, (off_t)old_where, SEEK_SET);
+ HDlseek(ofile, (HDoff_t)old_where, SEEK_SET);
psize = compute_user_block_size(old_where);
psize -= old_where;
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index d752014..b2d1e4d 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,25 +92,25 @@ 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) {
switch ((char)opt) {
case 'o':
- output_file = HDstrdup(H5_optarg);
+ output_file = strdup(H5_optarg);
if (output_file)
h5tools_set_data_output_file(output_file, 1);
break;
case 'i':
- input_file = HDstrdup(H5_optarg);
+ input_file = strdup(H5_optarg);
if (input_file)
h5tools_set_input_file(input_file, 1);
break;
case 'u':
- ub_file = HDstrdup(H5_optarg);
+ ub_file = strdup(H5_optarg);
if (ub_file)
h5tools_set_output_file(ub_file, 1);
else
@@ -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..04c5ff3 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
@@ -361,27 +361,27 @@ print_obj_name(h5tools_str_t *buffer, const iter_t *iter, const char *oname, con
int n;
if (show_file_name_g)
- HDsnprintf(fullname, sizeof(fullname), "%s/%s", iter->fname, oname + iter->name_start);
+ snprintf(fullname, sizeof(fullname), "%s/%s", iter->fname, oname + iter->name_start);
else
name = oname + iter->name_start;
/* 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 */
/* Find the last component of the path name */
- if (NULL == (last_sep = HDstrrchr(name, '/')))
+ if (NULL == (last_sep = strrchr(name, '/')))
last_sep = name;
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;
}
/*-------------------------------------------------------------------------
@@ -1381,23 +1381,23 @@ dump_dataset_values(hid_t dset)
}
outputformat.arr_linebreak = 0;
/* Floating point types should display full precision */
- HDsnprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
+ snprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
outputformat.fmt_float = fmt_float;
- HDsnprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
+ snprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
outputformat.fmt_double = fmt_double;
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);
+ snprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
outputformat.line_pre = string_prefix;
outputformat.line_suf = "\"";
}
@@ -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))) {
@@ -1550,23 +1550,23 @@ dump_attribute_values(hid_t attr)
}
outputformat.arr_linebreak = 0;
/* Floating point types should display full precision */
- HDsnprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
+ snprintf(fmt_float, sizeof(fmt_float), "%%1.%dg", FLT_DIG);
outputformat.fmt_float = fmt_float;
- HDsnprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
+ snprintf(fmt_double, sizeof(fmt_double), "%%1.%dg", DBL_DIG);
outputformat.fmt_double = fmt_double;
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);
+ snprintf(string_prefix, sizeof(string_prefix), "%s\"", outputformat.line_pre);
outputformat.line_pre = string_prefix;
outputformat.line_suf = "\"";
}
@@ -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", " ");
@@ -1995,7 +1995,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
filt_id = H5Pget_filter2(dcpl, (unsigned)i, &filt_flags, &cd_nelmts, cd_values,
sizeof(f_name), f_name, NULL);
f_name[sizeof(f_name) - 1] = '\0';
- HDsnprintf(s, sizeof(s), "Filter-%d:", i);
+ snprintf(s, sizeof(s), "Filter-%d:", i);
h5tools_str_append(&buffer, " %-10s %s-%u %s {", s, (f_name[0] ? f_name : "method"),
(unsigned)filt_id, ((filt_flags & H5Z_FLAG_OPTIONAL) ? "OPT" : ""));
for (cd_num = 0; cd_num < cd_nelmts; cd_num++)
@@ -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");
}
@@ -2182,7 +2182,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
else
tm = HDlocaltime(&(oinfo->mtime));
if (tm) {
- HDstrftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
+ strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S %Z", tm);
h5tools_str_reset(&buffer);
h5tools_str_append(&buffer, " %-10s %s\n", "Modified:", buf);
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos,
@@ -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 */
@@ -2529,7 +2529,7 @@ get_width(void)
/* Try to get it from the COLUMNS environment variable first since it's
* value is sometimes wrong. */
- if ((s = HDgetenv("COLUMNS")) && *s && isdigit((int)*s))
+ if ((s = getenv("COLUMNS")) && *s && isdigit((int)*s))
width = (int)strtol(s, NULL, 0);
#if defined(H5_HAVE_STRUCT_VIDEOCONFIG) && defined(H5_HAVE__GETVIDEOCONFIG)
@@ -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 */
@@ -2700,98 +2700,98 @@ main(int argc, char *argv[])
/* Switches come before non-switch arguments */
for (argno = 1; argno < argc && '-' == argv[argno][0]; argno++) {
- if (!HDstrcmp(argv[argno], "--")) {
+ if (!strcmp(argv[argno], "--")) {
/* Last switch */
argno++;
break;
}
- else if (!HDstrcmp(argv[argno], "--help")) {
+ else if (!strcmp(argv[argno], "--help")) {
usage();
leave(EXIT_SUCCESS);
}
- else if (!HDstrcmp(argv[argno], "--address")) {
- address_g = TRUE;
+ else if (!strcmp(argv[argno], "--address")) {
+ address_g = true;
}
- else if (!HDstrcmp(argv[argno], "--data")) {
- data_g = TRUE;
+ else if (!strcmp(argv[argno], "--data")) {
+ data_g = true;
}
- else if (!HDstrcmp(argv[argno], "--enable-error-stack")) {
+ else if (!strcmp(argv[argno], "--enable-error-stack")) {
enable_error_stack = 1;
}
- else if (!HDstrcmp(argv[argno], "--errors")) {
+ else if (!strcmp(argv[argno], "--errors")) {
/* deprecated --errors */
enable_error_stack = 1;
}
- else if (!HDstrcmp(argv[argno], "--follow-symlinks")) {
- follow_symlink_g = TRUE;
+ else if (!strcmp(argv[argno], "--follow-symlinks")) {
+ follow_symlink_g = true;
}
- else if (!HDstrcmp(argv[argno], "--no-dangling-links")) {
- no_dangling_link_g = TRUE;
+ else if (!strcmp(argv[argno], "--no-dangling-links")) {
+ no_dangling_link_g = true;
}
- else if (!HDstrcmp(argv[argno], "--external")) {
- follow_elink_g = TRUE;
+ else if (!strcmp(argv[argno], "--external")) {
+ follow_elink_g = true;
}
- else if (!HDstrcmp(argv[argno], "--full")) {
- fullname_g = TRUE;
+ else if (!strcmp(argv[argno], "--full")) {
+ fullname_g = true;
}
- else if (!HDstrcmp(argv[argno], "--group")) {
- grp_literal_g = TRUE;
+ else if (!strcmp(argv[argno], "--group")) {
+ grp_literal_g = true;
}
- else if (!HDstrcmp(argv[argno], "--label")) {
- label_g = TRUE;
+ else if (!strcmp(argv[argno], "--label")) {
+ label_g = true;
}
- else if (!HDstrcmp(argv[argno], "--recursive")) {
- recursive_g = TRUE;
- fullname_g = TRUE;
+ else if (!strcmp(argv[argno], "--recursive")) {
+ recursive_g = true;
+ fullname_g = true;
}
- else if (!HDstrcmp(argv[argno], "--simple")) {
- simple_output_g = TRUE;
+ else if (!strcmp(argv[argno], "--simple")) {
+ simple_output_g = true;
}
- else if (!HDstrcmp(argv[argno], "--string")) {
- string_g = TRUE;
+ else if (!strcmp(argv[argno], "--string")) {
+ string_g = true;
}
- else if (!HDstrncmp(argv[argno], "--vol-value=", (size_t)12)) {
+ else if (!strncmp(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)) {
+ else if (!strncmp(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)) {
+ else if (!strncmp(argv[argno], "--vol-info=", (size_t)11)) {
vol_info.info_string = argv[argno] + 11;
}
- else if (!HDstrncmp(argv[argno], "--vfd=", (size_t)6)) {
+ else if (!strncmp(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)) {
+ else if (!strncmp(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)) {
+ else if (!strncmp(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)) {
+ else if (!strncmp(argv[argno], "--vfd-info=", (size_t)11)) {
vfd_info.info = (const void *)(argv[argno] + 11);
}
- else if (!HDstrncmp(argv[argno], "--width=", (size_t)8)) {
+ else if (!strncmp(argv[argno], "--width=", (size_t)8)) {
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);
}
}
- else if (!HDstrcmp(argv[argno], "--width")) {
+ else if (!strcmp(argv[argno], "--width")) {
if ((argno + 1) >= argc) {
usage();
leave(EXIT_FAILURE);
@@ -2805,17 +2805,17 @@ main(int argc, char *argv[])
leave(EXIT_FAILURE);
}
}
- else if (!HDstrcmp(argv[argno], "--verbose")) {
+ else if (!strcmp(argv[argno], "--verbose")) {
verbose_g++;
}
- else if (!HDstrcmp(argv[argno], "--version")) {
+ else if (!strcmp(argv[argno], "--version")) {
print_version(h5tools_getprogname());
leave(EXIT_SUCCESS);
}
- else if (!HDstrcmp(argv[argno], "--hexdump")) {
- hexdump_g = TRUE;
+ else if (!strcmp(argv[argno], "--hexdump")) {
+ hexdump_g = true;
}
- else if (!HDstrncmp(argv[argno], "-w", (size_t)2)) {
+ else if (!strncmp(argv[argno], "-w", (size_t)2)) {
if (argv[argno][2]) {
s = argv[argno] + 2;
}
@@ -2829,14 +2829,14 @@ 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();
leave(EXIT_FAILURE);
}
}
- else if (!HDstrncmp(argv[argno], "--s3-cred=", (size_t)10)) {
+ else if (!strncmp(argv[argno], "--s3-cred=", (size_t)10)) {
#ifdef H5_HAVE_ROS3_VFD
char const *start = NULL;
@@ -2863,7 +2863,7 @@ main(int argc, char *argv[])
leave(EXIT_FAILURE);
#endif
}
- else if (!HDstrncmp(argv[argno], "--hdfs-attrs=", (size_t)13)) {
+ else if (!strncmp(argv[argno], "--hdfs-attrs=", (size_t)13)) {
#ifdef H5_HAVE_LIBHDFS
char const *start = NULL;
@@ -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:
@@ -2983,13 +2983,13 @@ main(int argc, char *argv[])
/* Setup a custom fapl for file accesses */
if (custom_vol_fapl || custom_vfd_fapl) {
#ifdef H5_HAVE_ROS3_VFD
- if (custom_vfd_fapl && (0 == HDstrcmp(vfd_info.u.name, drivernames[ROS3_VFD_IDX]))) {
+ if (custom_vfd_fapl && (0 == strcmp(vfd_info.u.name, drivernames[ROS3_VFD_IDX]))) {
if (!vfd_info.info)
vfd_info.info = &ros3_fa;
}
#endif
#ifdef H5_HAVE_LIBHDFS
- if (custom_vfd_fapl && (0 == HDstrcmp(vfd_info.u.name, drivernames[HDFS_VFD_IDX]))) {
+ if (custom_vfd_fapl && (0 == strcmp(vfd_info.u.name, drivernames[HDFS_VFD_IDX]))) {
if (!vfd_info.info)
vfd_info.info = &hdfs_fa;
}
@@ -3021,7 +3021,7 @@ main(int argc, char *argv[])
symlink_trav_t symlink_list;
size_t u;
- fname = HDstrdup(argv[argno++]);
+ fname = strdup(argv[argno++]);
oname = NULL;
file_id = H5I_INVALID_HID;
@@ -3037,7 +3037,7 @@ main(int argc, char *argv[])
/* Shorten the file name; lengthen the object name */
x = oname;
- oname = HDstrrchr(fname, '/');
+ oname = strrchr(fname, '/');
if (x)
*x = '/';
if (!oname)
@@ -3055,10 +3055,10 @@ main(int argc, char *argv[])
/* Always use absolute paths to avoid confusion, keep track of where
* to begin path name output */
*oname = '/';
- iter.base_len = HDstrlen(oname);
+ iter.base_len = strlen(oname);
iter.base_len -= oname[iter.base_len - 1] == '/';
x = oname;
- if (NULL == (oname = HDstrdup(oname))) {
+ if (NULL == (oname = strdup(oname))) {
fprintf(rawerrorstream, "memory allocation failed\n");
leave(EXIT_FAILURE);
}
@@ -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,16 +3081,16 @@ 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;
symlink_list.objs = NULL;
/* Check for root group as object name */
- if (HDstrcmp(oname, root_name) != 0) {
+ if (strcmp(oname, root_name) != 0) {
/* Check the type of link given */
if (H5Lget_info2(file_id, oname, &li, H5P_DEFAULT) < 0) {
hsize_t curr_pos = 0; /* total data element position */
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c
index 8830c82..fc2f0c7 100644
--- a/tools/src/h5perf/pio_engine.c
+++ b/tools/src/h5perf/pio_engine.c
@@ -278,7 +278,7 @@ do_pio(parameters param)
/* Open file for write */
char base_name[256];
- HDsnprintf(base_name, sizeof(base_name), "#pio_tmp_%lu", nf);
+ snprintf(base_name, sizeof(base_name), "#pio_tmp_%lu", nf);
pio_create_filename(iot, base_name, fname, FILENAME_MAX);
if (pio_debug_level > 0)
fprintf(output, "rank %d: data filename=%s\n", pio_mpi_rank_g, fname);
@@ -402,7 +402,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
/* First use the environment variable and then try the constant */
- prefix = HDgetenv("HDF5_PARAPREFIX");
+ prefix = getenv("HDF5_PARAPREFIX");
#ifdef HDF5_PARAPREFIX
if (!prefix)
@@ -416,8 +416,8 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
* directory instead. */
char *user, *login, *subdir;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -431,11 +431,11 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
else {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if ((HDstrlen(fullname) + HDstrlen(base_name) + 1) < size) {
+ if ((strlen(fullname) + strlen(base_name) + 1) < size) {
/* Append the base_name with a slash first. Multiple slashes are
* handled below. */
h5_stat_t buf;
@@ -445,31 +445,31 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
if (HDmkdir(fullname, (mode_t)0755) < 0 && errno != EEXIST) {
/* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
* Default to PREFIX's original prefix value. */
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
}
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
return NULL;
}
}
- else if (HDstrlen(base_name) >= size) {
+ else if (strlen(base_name) >= size) {
/* Buffer is too small */
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -887,7 +887,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
} /* end if */
} /* end else */
- HDsnprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
+ snprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
h5ds_id = H5DCREATE(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, h5dcpl);
if (h5ds_id < 0) {
@@ -1862,7 +1862,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
break;
case PHDF5:
- HDsnprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
+ snprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
h5ds_id = H5DOPEN(fd->h5fd, dname);
if (h5ds_id < 0) {
fprintf(stderr, "HDF5 Dataset open failed\n");
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index 37e6aeb..e72de32 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 */
@@ -736,10 +736,10 @@ h5_set_info_object(void)
int ret_value = 0;
/* handle any MPI INFO hints via $HDF5_MPI_INFO */
- if ((envp = HDgetenv("HDF5_MPI_INFO")) != NULL) {
+ if ((envp = getenv("HDF5_MPI_INFO")) != NULL) {
char *next, *valp;
- valp = envp = next = HDstrdup(envp);
+ valp = envp = next = strdup(envp);
if (!valp)
return 0;
@@ -764,7 +764,7 @@ h5_set_info_object(void)
if (*next == ';')
++next;
- namep = HDstrncpy(key_val, valp, len);
+ namep = strncpy(key_val, valp, len);
/* pass up any beginning whitespaces */
while (*namep && (*namep == ' ' || *namep == '\t'))
@@ -774,13 +774,13 @@ h5_set_info_object(void)
continue; /* was all white space, so move to next k/v pair */
/* eat up any ending white spaces */
- endp = &namep[HDstrlen(namep) - 1];
+ endp = &namep[strlen(namep) - 1];
while (endp && (*endp == ' ' || *endp == '\t'))
*endp-- = '\0';
/* find the '=' */
- valp = HDstrchr(namep, '=');
+ valp = strchr(namep, '=');
if (valp != NULL) { /* it's a valid key/value pairing */
char *tmp_val = valp + 1;
@@ -1049,7 +1049,7 @@ output_report(const char *fmt, ...)
va_start(ap, fmt);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDvfprintf(output, fmt, ap);
+ vfprintf(output, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
va_end(ap);
}
@@ -1072,7 +1072,7 @@ print_indent(int indent)
indent *= TAB_SPACE;
for (; indent > 0; --indent)
- HDfputc(' ', output);
+ fputc(' ', output);
}
}
@@ -1215,7 +1215,7 @@ report_parameters(struct options *opts)
fprintf(output, "Contiguous\n");
{
- char *prefix = HDgetenv("HDF5_PARAPREFIX");
+ char *prefix = getenv("HDF5_PARAPREFIX");
fprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank, (prefix ? prefix : "not set"));
}
@@ -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;
@@ -1334,7 +1334,7 @@ parse_command_line(int argc, const char *const *argv)
if (isalnum(*end) && i < 10)
buf[i++] = *end;
- if (HDstrlen(buf) > 1 || isdigit(buf[0])) {
+ if (strlen(buf) > 1 || isdigit(buf[0])) {
size_t j;
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
@@ -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..2363f6a 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -139,9 +139,7 @@ do_sio(parameters param, results *res)
/* IO type */
iot = param.io_type;
- if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
- GOTOERROR(FAIL);
-
+ /* MUST initialize fd early since we check its file IDs in cleanup code */
switch (iot) {
case POSIXIO:
fd.posixfd = -1;
@@ -157,6 +155,9 @@ do_sio(parameters param, results *res)
GOTOERROR(FAIL);
}
+ if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
+ GOTOERROR(FAIL);
+
linear_buf_size = 1;
for (i = 0; i < param.rank; i++) {
@@ -197,7 +198,7 @@ do_sio(parameters param, results *res)
*/
/* Open file for write */
- HDstrcpy(base_name, "#sio_tmp");
+ strcpy(base_name, "#sio_tmp");
sio_create_filename(iot, base_name, fname, FILENAME_MAX, &param);
if (sio_debug_level > 0)
@@ -310,7 +311,7 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
/* First use the environment variable and then try the constant */
- prefix = HDgetenv("HDF5_PREFIX");
+ prefix = getenv("HDF5_PREFIX");
#ifdef HDF5_PREFIX
if (!prefix)
@@ -324,8 +325,8 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
* directory instead. */
char *user, *login, *subdir;
- user = HDgetenv("USER");
- login = HDgetenv("LOGIN");
+ user = getenv("USER");
+ login = getenv("LOGIN");
subdir = (user ? user : login);
if (subdir) {
@@ -339,11 +340,11 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
}
else {
/* We didn't append the prefix yet */
- HDstrncpy(fullname, prefix, size);
+ strncpy(fullname, prefix, size);
fullname[size - 1] = '\0';
}
- if ((HDstrlen(fullname) + HDstrlen(base_name) + 1) < size) {
+ if ((strlen(fullname) + strlen(base_name) + 1) < size) {
/* Append the base_name with a slash first. Multiple slashes are
* handled below. */
h5_stat_t buf;
@@ -353,11 +354,11 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
if (HDmkdir(fullname, 0755) < 0 && errno != EEXIST) {
/* We couldn't make the "/tmp/${USER,LOGIN}" subdirectory.
* Default to PREFIX's original prefix value. */
- HDstrcpy(fullname, prefix);
+ strcpy(fullname, prefix);
}
- HDstrcat(fullname, "/");
- HDstrcat(fullname, base_name);
+ strcat(fullname, "/");
+ strcat(fullname, base_name);
}
else {
/* Buffer is too small */
@@ -369,15 +370,15 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
return NULL;
}
else {
- HDstrcpy(fullname, base_name);
+ strcpy(fullname, base_name);
}
/* Append a suffix */
if (suffix) {
- if (HDstrlen(fullname) + HDstrlen(suffix) >= size)
+ if (strlen(fullname) + strlen(suffix) >= size)
return NULL;
- HDstrcat(fullname, suffix);
+ strcat(fullname, suffix);
}
/* Remove any double slashes in the filename */
@@ -513,7 +514,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
} /* end if */
} /* end if */
- HDsnprintf(dname, sizeof(dname), "Dataset_%ld", (unsigned long)parms->num_bytes);
+ snprintf(dname, sizeof(dname), "Dataset_%ld", (unsigned long)parms->num_bytes);
h5ds_id =
H5Dcreate2(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, H5P_DEFAULT, h5dcpl, H5P_DEFAULT);
@@ -836,7 +837,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
break;
case HDF5:
- HDsnprintf(dname, sizeof(dname), "Dataset_%ld", (long)parms->num_bytes);
+ snprintf(dname, sizeof(dname), "Dataset_%ld", (long)parms->num_bytes);
h5ds_id = H5Dopen2(fd->h5fd, dname, H5P_DEFAULT);
if (h5ds_id < 0) {
fprintf(stderr, "HDF5 Dataset open failed\n");
@@ -1129,7 +1130,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) {
@@ -1153,18 +1154,18 @@ set_vfd(parameters *param)
memset(memb_name, 0, sizeof memb_name);
memset(memb_addr, 0, sizeof memb_addr);
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(strlen(multi_letters) == H5FD_MEM_NTYPES);
if (NULL == (sv = calloc(1, sizeof(*sv))))
return -1;
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
- HDsnprintf(sv->arr[mt], 1024, "%%s-%c.h5", multi_letters[mt]);
+ snprintf(sv->arr[mt], 1024, "%%s-%c.h5", multi_letters[mt]);
memb_name[mt] = sv->arr[mt];
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;
}
@@ -1175,7 +1176,7 @@ set_vfd(parameters *param)
hsize_t fam_size = 1 * 1024 * 1024; /*100 MB*/
/* Family of files, each 1MB and using the default driver */
- /* if ((val=HDstrtok(NULL, " \t\n\r")))
+ /* if ((val=strtok(NULL, " \t\n\r")))
fam_size = (hsize_t)(strtod(val, NULL) * 1024*1024); */
if (H5Pset_fapl_family(my_fapl, fam_size, H5P_DEFAULT) < 0)
return -1;
@@ -1259,7 +1260,7 @@ do_cleanupfile(iotype iot, char *filename)
goto done;
if (clean_file_g == -1)
- clean_file_g = (HDgetenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0;
+ clean_file_g = (getenv(HDF5_NOCLEANUP) == NULL) ? 1 : 0;
if (clean_file_g) {
@@ -1274,7 +1275,7 @@ do_cleanupfile(iotype iot, char *filename)
if (driver == H5FD_FAMILY) {
for (j = 0; /*void*/; j++) {
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDsnprintf(temp, temp_sz, filename, j);
+ snprintf(temp, temp_sz, filename, j);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
if (HDaccess(temp, F_OK) < 0)
@@ -1284,7 +1285,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);
@@ -1294,10 +1295,10 @@ do_cleanupfile(iotype iot, char *filename)
}
else if (driver == H5FD_MULTI) {
H5FD_mem_t mt;
- assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(strlen(multi_letters) == H5FD_MEM_NTYPES);
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
- HDsnprintf(temp, temp_sz, "%s-%c.h5", filename, multi_letters[mt]);
+ snprintf(temp, temp_sz, "%s-%c.h5", filename, multi_letters[mt]);
HDremove(temp); /*don't care if it fails*/
}
}
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index 5ffad71..ad536ba 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 */
@@ -203,7 +203,7 @@ main(int argc, char *argv[])
if (opts->output_file) {
if ((output = fopen(opts->output_file, "w")) == NULL) {
fprintf(stderr, "%s: cannot open output file\n", progname);
- HDperror(opts->output_file);
+ perror(opts->output_file);
goto finish;
}
}
@@ -627,7 +627,7 @@ output_report(const char *fmt, ...)
va_start(ap, fmt);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
- HDvfprintf(output, fmt, ap);
+ vfprintf(output, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
va_end(ap);
}
@@ -644,7 +644,7 @@ print_indent(int indent)
indent *= TAB_SPACE;
for (; indent > 0; --indent)
- HDfputc(' ', output);
+ fputc(' ', output);
}
static void
@@ -777,7 +777,7 @@ report_parameters(struct options *opts)
}
{
- char *prefix = HDgetenv("HDF5_PREFIX");
+ char *prefix = getenv("HDF5_PREFIX");
fprintf(output, "Env HDF5_PREFIX=%s\n", (prefix ? prefix : "not set"));
}
@@ -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) {
@@ -921,7 +921,7 @@ parse_command_line(int argc, const char *const *argv)
if (isalnum(*end) && i < 10)
buf[i++] = *end;
- if (HDstrlen(buf) > 1 || isdigit(buf[0])) {
+ if (strlen(buf) > 1 || isdigit(buf[0])) {
size_t j;
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
@@ -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 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 {
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 5cfa61d..15232e4 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)))) {
@@ -932,7 +932,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
/* Store object names */
for (u = 0; u < hand->obj_count; u++)
- if (NULL == (hand->obj[u] = HDstrdup(H5_optarg))) {
+ if (NULL == (hand->obj[u] = strdup(H5_optarg))) {
error_msg("unable to allocate memory for object name\n");
goto error;
} /* end if */
@@ -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)
@@ -1625,11 +1625,11 @@ main(int argc, char *argv[])
vfd_info.u.name = drivername;
#ifdef H5_HAVE_ROS3_VFD
- if (!HDstrcmp(drivername, drivernames[ROS3_VFD_IDX]))
+ if (!strcmp(drivername, drivernames[ROS3_VFD_IDX]))
vfd_info.info = &ros3_fa;
#endif
#ifdef H5_HAVE_LIBHDFS
- if (!HDstrcmp(drivername, drivernames[HDFS_VFD_IDX]))
+ if (!strcmp(drivername, drivernames[HDFS_VFD_IDX]))
vfd_info.info = &hdfs_fa;
#endif
@@ -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..31f7c17 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());
@@ -167,7 +167,7 @@ parse_command_line(int argc, const char *const *argv)
goto error;
} /* end if */
- fname_g = HDstrdup(argv[H5_optind]);
+ fname_g = strdup(argv[H5_optind]);
done:
return (0);
@@ -260,7 +260,7 @@ main(int argc, char *argv[])
}
/* Duplicate the file name */
- fname = HDstrdup(fname_g);
+ fname = strdup(fname_g);
/* Get a copy of the file access property list */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
@@ -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..1bba419 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;
@@ -262,7 +262,7 @@ main(int argc, char *argv[])
exit_value = 1;
goto done;
} /* end if */
- if (HDstrchr(argv[1], '%'))
+ if (strchr(argv[1], '%'))
if (H5Pset_fapl_family(fapl, (hsize_t)0, H5P_DEFAULT) < 0) {
fprintf(stderr, "cannot set file access property list\n");
exit_value = 1;
@@ -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");
@@ -772,15 +772,15 @@ main(int argc, char *argv[])
printf("%-*s ", VCOL, "Signature:");
for (u = 0; u < sizeof(sig); u++) {
if (sig[u] > ' ' && sig[u] <= '~' && '\\' != sig[u])
- HDputchar(sig[u]);
+ putchar(sig[u]);
else if ('\\' == sig[u]) {
- HDputchar('\\');
- HDputchar('\\');
+ putchar('\\');
+ putchar('\\');
}
else
printf("\\%03o", sig[u]);
}
- HDputchar('\n');
+ putchar('\n');
fprintf(stderr, "unknown signature\n");
exit_value = 4;
@@ -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..42a5eaa 100644
--- a/tools/src/misc/h5delete.c
+++ b/tools/src/misc/h5delete.c
@@ -31,17 +31,17 @@ usage(void)
int
main(int argc, char *argv[])
{
- hbool_t quiet = FALSE;
+ bool quiet = false;
const char *name = NULL;
int ret = 0;
switch (argc) {
case 3:
- if (HDstrcmp(argv[1], "-f") != 0) {
+ if (strcmp(argv[1], "-f") != 0) {
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..92e3042 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':
@@ -228,7 +228,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
}
/* Retrieve file name */
- options->fname = HDstrdup(argv[H5_optind]);
+ options->fname = strdup(argv[H5_optind]);
H5_optind++;
/* Check for group(s) to be created */
@@ -245,7 +245,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
/* Retrieve the group names */
curr_group = 0;
while (H5_optind < argc) {
- options->groups[curr_group] = HDstrdup(argv[H5_optind]);
+ options->groups[curr_group] = strdup(argv[H5_optind]);
curr_group++;
H5_optind++;
}
@@ -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..feb447f 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,12 +172,12 @@ 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.
*/
- if ((prog_name = HDstrrchr(argv[0], '/')))
+ if ((prog_name = strrchr(argv[0], '/')))
prog_name++;
else
prog_name = argv[0];
@@ -186,21 +186,21 @@ main(int argc, char *argv[])
* Parse switches.
*/
while (argno < argc && '-' == argv[argno][0]) {
- if (!HDstrcmp(argv[argno], "-v")) {
- verbose = TRUE;
+ if (!strcmp(argv[argno], "-v")) {
+ verbose = true;
argno++;
}
- else if (!HDstrcmp(argv[argno], "-V")) {
+ else if (!strcmp(argv[argno], "-V")) {
printf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR,
H5_VERS_RELEASE);
exit(EXIT_SUCCESS);
}
- else if (!HDstrcmp(argv[argno], "-family_to_sec2")) {
- family_to_single = TRUE;
+ else if (!strcmp(argv[argno], "-family_to_sec2")) {
+ family_to_single = true;
argno++;
}
- else if (!HDstrcmp(argv[argno], "-family_to_single")) {
- family_to_single = TRUE;
+ else if (!strcmp(argv[argno], "-family_to_single")) {
+ family_to_single = true;
argno++;
}
else if ('b' == argv[argno][1]) {
@@ -227,16 +227,16 @@ main(int argc, char *argv[])
if (argno >= argc)
usage(prog_name);
src_gen_name = argv[argno++];
- HDsnprintf(src_name, NAMELEN, src_gen_name, src_membno);
+ snprintf(src_name, NAMELEN, src_gen_name, src_membno);
src_is_family = strcmp(src_name, src_gen_name);
if ((src = HDopen(src_name, O_RDONLY)) < 0) {
- HDperror(src_name);
+ perror(src_name);
exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
- HDperror("fstat");
+ perror("fstat");
exit(EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
@@ -249,11 +249,11 @@ main(int argc, char *argv[])
if (argno >= argc)
usage(prog_name);
dst_gen_name = argv[argno++];
- HDsnprintf(dst_name, NAMELEN, dst_gen_name, dst_membno);
- dst_is_family = HDstrcmp(dst_name, dst_gen_name);
+ snprintf(dst_name, NAMELEN, dst_gen_name, dst_membno);
+ dst_is_family = strcmp(dst_name, dst_gen_name);
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
- HDperror(dst_name);
+ perror(dst_name);
exit(EXIT_FAILURE);
}
if (verbose)
@@ -278,12 +278,12 @@ 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);
if ((nio = HDread(src, buf, n)) < 0) {
- HDperror("read");
+ perror("read");
exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
@@ -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;
}
/*
@@ -309,21 +309,21 @@ main(int argc, char *argv[])
*/
if (need_write) {
if (need_seek && HDlseek(dst, dst_offset, SEEK_SET) < 0) {
- HDperror("HDlseek");
+ perror("HDlseek");
exit(EXIT_FAILURE);
}
if ((nio = HDwrite(dst, buf, n)) < 0) {
- HDperror("write");
+ perror("write");
exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
fprintf(stderr, "%s: short write\n", dst_name);
exit(EXIT_FAILURE);
}
- need_seek = FALSE;
+ need_seek = false;
}
else {
- need_seek = TRUE;
+ need_seek = true;
}
/*
@@ -341,17 +341,17 @@ main(int argc, char *argv[])
dst_offset = dst_offset + (off_t)n;
break;
}
- HDsnprintf(src_name, NAMELEN, src_gen_name, ++src_membno);
+ snprintf(src_name, NAMELEN, src_gen_name, ++src_membno);
if ((src = HDopen(src_name, O_RDONLY)) < 0 && ENOENT == errno) {
dst_offset = dst_offset + (off_t)n;
break;
}
else if (src < 0) {
- HDperror(src_name);
+ perror(src_name);
exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
- HDperror("fstat");
+ perror("fstat");
exit(EXIT_FAILURE);
}
src_act_size = sb.st_size;
@@ -372,30 +372,30 @@ main(int argc, char *argv[])
if (dst_is_family && dst_offset == dst_size) {
if (0 == dst_membno) {
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
- HDperror("HDHDlseek");
+ perror("HDHDlseek");
exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
- HDperror("read");
+ perror("read");
exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
- HDperror("HDlseek");
+ perror("HDlseek");
exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
- HDperror("write");
+ perror("write");
exit(EXIT_FAILURE);
}
}
HDclose(dst);
- HDsnprintf(dst_name, NAMELEN, dst_gen_name, ++dst_membno);
+ snprintf(dst_name, NAMELEN, dst_gen_name, ++dst_membno);
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
- HDperror(dst_name);
+ perror(dst_name);
exit(EXIT_FAILURE);
}
dst_offset = 0;
- need_seek = FALSE;
+ need_seek = false;
if (verbose)
fprintf(stderr, "> %s\n", dst_name);
}
@@ -408,19 +408,19 @@ main(int argc, char *argv[])
*/
if (need_seek) {
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
- HDperror("HDlseek");
+ perror("HDlseek");
exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
- HDperror("read");
+ perror("read");
exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
- HDperror("HDlseek");
+ perror("HDlseek");
exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
- HDperror("write");
+ perror("write");
exit(EXIT_FAILURE);
}
}
@@ -429,7 +429,7 @@ main(int argc, char *argv[])
/* Modify family driver information saved in superblock through private property.
* These private properties are for this tool only. */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDperror("H5Pcreate");
+ perror("H5Pcreate");
exit(EXIT_FAILURE);
}
@@ -439,7 +439,7 @@ main(int argc, char *argv[])
* the library to ignore the family driver information saved in the superblock.
*/
if (H5Pset(fapl, H5F_ACS_FAMILY_TO_SINGLE_NAME, &family_to_single) < 0) {
- HDperror("H5Pset");
+ perror("H5Pset");
exit(EXIT_FAILURE);
}
}
@@ -448,14 +448,14 @@ main(int argc, char *argv[])
* library to save the new member size(specified in command line) in superblock.
* This private property is for this tool only. */
if (H5Pset_fapl_family(fapl, H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) {
- HDperror("H5Pset_fapl_family");
+ perror("H5Pset_fapl_family");
exit(EXIT_FAILURE);
}
/* Set the property of the new member size as hsize_t */
hdsize = (hsize_t)dst_size;
if (H5Pset(fapl, H5F_ACS_FAMILY_NEWSIZE_NAME, &hdsize) < 0) {
- HDperror("H5Pset");
+ perror("H5Pset");
exit(EXIT_FAILURE);
}
}
@@ -476,13 +476,13 @@ main(int argc, char *argv[])
if (file >= 0) {
if (H5Fclose(file) < 0) {
- HDperror("H5Fclose");
+ perror("H5Fclose");
exit(EXIT_FAILURE);
} /* end if */
} /* end if */
if (H5Pclose(fapl) < 0) {
- HDperror("H5Pclose");
+ perror("H5Pclose");
exit(EXIT_FAILURE);
} /* end if */