summaryrefslogtreecommitdiffstats
path: root/tools/src
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /tools/src
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'tools/src')
-rw-r--r--tools/src/h5copy/h5copy.c36
-rw-r--r--tools/src/h5diff/h5diff_common.c56
-rw-r--r--tools/src/h5diff/h5diff_main.c12
-rw-r--r--tools/src/h5diff/ph5diff_main.c28
-rw-r--r--tools/src/h5dump/h5dump.c72
-rw-r--r--tools/src/h5dump/h5dump_ddl.c78
-rw-r--r--tools/src/h5dump/h5dump_xml.c266
-rw-r--r--tools/src/h5format_convert/h5format_convert.c107
-rw-r--r--tools/src/h5import/h5import.c1612
-rw-r--r--tools/src/h5jam/h5jam.c64
-rw-r--r--tools/src/h5jam/h5unjam.c71
-rw-r--r--tools/src/h5ls/h5ls.c130
-rw-r--r--tools/src/h5perf/pio_engine.c172
-rw-r--r--tools/src/h5perf/pio_perf.c412
-rw-r--r--tools/src/h5perf/sio_engine.c126
-rw-r--r--tools/src/h5perf/sio_perf.c302
-rw-r--r--tools/src/h5repack/h5repack.c88
-rw-r--r--tools/src/h5repack/h5repack_copy.c92
-rw-r--r--tools/src/h5repack/h5repack_main.c50
-rw-r--r--tools/src/h5repack/h5repack_opttable.c14
-rw-r--r--tools/src/h5repack/h5repack_parse.c116
-rw-r--r--tools/src/h5repack/h5repack_refs.c117
-rw-r--r--tools/src/h5stat/h5stat.c420
-rw-r--r--tools/src/misc/h5clear.c12
-rw-r--r--tools/src/misc/h5debug.c293
-rw-r--r--tools/src/misc/h5delete.c4
-rw-r--r--tools/src/misc/h5mkgrp.c26
-rw-r--r--tools/src/misc/h5repart.c118
28 files changed, 2442 insertions, 2452 deletions
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 9756d11..2deba02 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -52,18 +52,18 @@ static void
leave(int ret)
{
if (fname_src)
- HDfree(fname_src);
+ free(fname_src);
if (fname_dst)
- HDfree(fname_dst);
+ free(fname_dst);
if (oname_dst)
- HDfree(oname_dst);
+ free(oname_dst);
if (oname_src)
- HDfree(oname_src);
+ free(oname_src);
if (str_flag)
- HDfree(str_flag);
+ free(str_flag);
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -226,7 +226,7 @@ main(int argc, char *argv[])
h5tools_init();
/* init linkinfo struct */
- HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t));
+ memset(&linkinfo, 0, sizeof(h5tool_link_info_t));
/* Check for no command line parameters */
if (argc == 1) {
@@ -282,7 +282,7 @@ main(int argc, char *argv[])
case 'E':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
@@ -369,10 +369,10 @@ main(int argc, char *argv[])
*-------------------------------------------------------------------------*/
if (verbose) {
- HDprintf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n", fname_src, oname_src,
- fname_dst, oname_dst);
+ printf("Copying file <%s> and object <%s> to file <%s> and object <%s>\n", fname_src, oname_src,
+ fname_dst, oname_dst);
if (flag) {
- HDprintf("Using %s flag\n", str_flag);
+ printf("Using %s flag\n", str_flag);
}
}
@@ -406,7 +406,7 @@ main(int argc, char *argv[])
/* Display some output if requested */
if (verbose)
- HDprintf("%s: Creating parent groups\n", h5tools_getprogname());
+ printf("%s: Creating parent groups\n", h5tools_getprogname());
} /* end if */
else {
/* error, if parent groups doesn't already exist in destination file */
@@ -419,15 +419,15 @@ main(int argc, char *argv[])
if ('/' == oname_dst[i]) {
char *str_ptr;
- str_ptr = (char *)HDcalloc(i + 1, sizeof(char));
+ str_ptr = (char *)calloc(i + 1, sizeof(char));
HDstrncpy(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);
- HDfree(str_ptr);
+ free(str_ptr);
H5TOOLS_GOTO_ERROR(EXIT_FAILURE, "H5Lexists failed");
}
- HDfree(str_ptr);
+ free(str_ptr);
}
}
}
@@ -458,7 +458,7 @@ main(int argc, char *argv[])
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ free(linkinfo.trg_path);
/* close propertis */
if (H5Pclose(ocpl_id) < 0)
@@ -475,11 +475,11 @@ main(int argc, char *argv[])
leave(EXIT_SUCCESS);
done:
- HDprintf("Error in copy...Exiting\n");
+ printf("Error in copy...Exiting\n");
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ free(linkinfo.trg_path);
H5E_BEGIN_TRY
{
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index a2fe5d9..51bc050 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -95,11 +95,11 @@ check_options(diff_opt_t *opts)
* These options are mutually exclusive.
*/
if ((opts->delta_bool + opts->percent_bool + opts->use_system_epsilon) > 1) {
- HDprintf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
- HDprintf("use no more than one.\n");
- HDprintf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 "
- "Reference Manual'.\n",
- PROGRAMNAME);
+ printf("%s error: -d, -p and --use-system-epsilon options are mutually-exclusive;\n", PROGRAMNAME);
+ printf("use no more than one.\n");
+ printf("Try '-h' or '--help' option for more information or see the %s entry in the 'HDF5 "
+ "Reference Manual'.\n",
+ PROGRAMNAME);
h5diff_exit(EXIT_FAILURE);
}
}
@@ -122,7 +122,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
H5TOOLS_START_DEBUG(" ");
/* process the command-line */
- HDmemset(opts, 0, sizeof(diff_opt_t));
+ memset(opts, 0, sizeof(diff_opt_t));
/* assume equal contents initially */
opts->contents = 1;
@@ -181,7 +181,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
}
else {
if (H5_optarg != NULL)
- opts->mode_verbose_level = HDatoi(H5_optarg);
+ opts->mode_verbose_level = atoi(H5_optarg);
else
opts->mode_verbose_level = 0;
}
@@ -207,7 +207,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case 'S':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
@@ -216,9 +216,9 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
opts->exclude_path = 1;
/* create linked list of excluding objects */
- if ((exclude_node = (struct exclude_path_list *)HDmalloc(sizeof(struct exclude_path_list))) ==
+ if ((exclude_node = (struct exclude_path_list *)malloc(sizeof(struct exclude_path_list))) ==
NULL) {
- HDprintf("Error: lack of memory!\n");
+ printf("Error: lack of memory!\n");
h5diff_exit(EXIT_FAILURE);
}
@@ -249,8 +249,8 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
/* create linked list of excluding objects */
if ((exclude_attr_node =
- (struct exclude_path_list *)HDmalloc(sizeof(struct exclude_path_list))) == NULL) {
- HDprintf("Error: lack of memory!\n");
+ (struct exclude_path_list *)malloc(sizeof(struct exclude_path_list))) == NULL) {
+ printf("Error: lack of memory!\n");
h5diff_exit(EXIT_FAILURE);
}
@@ -276,7 +276,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
opts->delta_bool = 1;
if (check_d_input(H5_optarg) == -1) {
- HDprintf("<-d %s> is not a valid option\n", H5_optarg);
+ printf("<-d %s> is not a valid option\n", H5_optarg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -287,7 +287,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case 'p':
opts->percent_bool = 1;
if (check_p_input(H5_optarg) == -1) {
- HDprintf("<-p %s> is not a valid option\n", H5_optarg);
+ printf("<-p %s> is not a valid option\n", H5_optarg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -301,7 +301,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
case 'n':
opts->count_bool = 1;
if (check_n_input(H5_optarg) == -1) {
- HDprintf("<-n %s> is not a valid option\n", H5_optarg);
+ printf("<-n %s> is not a valid option\n", H5_optarg);
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -322,7 +322,7 @@ 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)HDatoi(H5_optarg);
+ opts->vol_info[0].u.value = (H5VL_class_value_t)atoi(H5_optarg);
opts->custom_vol[0] = TRUE;
break;
@@ -338,7 +338,7 @@ 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)HDatoi(H5_optarg);
+ opts->vol_info[1].u.value = (H5VL_class_value_t)atoi(H5_optarg);
opts->custom_vol[1] = TRUE;
break;
@@ -354,7 +354,7 @@ 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)HDatoi(H5_optarg);
+ opts->vfd_info[0].u.value = (H5FD_class_value_t)atoi(H5_optarg);
opts->custom_vfd[0] = TRUE;
break;
@@ -370,7 +370,7 @@ 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)HDatoi(H5_optarg);
+ opts->vfd_info[1].u.value = (H5FD_class_value_t)atoi(H5_optarg);
opts->custom_vfd[1] = TRUE;
break;
@@ -392,7 +392,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
errno = 0;
onion_fa_g_1.revision_num = HDstrtoull(opts->vfd_info[0].info, NULL, 10);
if (errno == ERANGE) {
- HDprintf("Invalid onion revision specified for file 1\n");
+ printf("Invalid onion revision specified for file 1\n");
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -409,7 +409,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
errno = 0;
onion_fa_g_2.revision_num = HDstrtoull(opts->vfd_info[1].info, NULL, 10);
if (errno == ERANGE) {
- HDprintf("Invalid onion revision specified for file 2\n");
+ printf("Invalid onion revision specified for file 2\n");
usage();
h5diff_exit(EXIT_FAILURE);
}
@@ -480,20 +480,20 @@ print_info(diff_opt_t *opts)
return;
if (opts->cmn_objs == 0) {
- HDprintf("No common objects found. Files are not comparable.\n");
+ printf("No common objects found. Files are not comparable.\n");
if (!opts->mode_verbose)
- HDprintf("Use -v for a list of objects.\n");
+ printf("Use -v for a list of objects.\n");
}
if (opts->not_cmp == 1) {
if (opts->mode_list_not_cmp == 0) {
- HDprintf("--------------------------------\n");
- HDprintf("Some objects are not comparable\n");
- HDprintf("--------------------------------\n");
+ printf("--------------------------------\n");
+ printf("Some objects are not comparable\n");
+ printf("--------------------------------\n");
if (opts->mode_verbose)
- HDprintf("Use -c for a list of objects without details of differences.\n");
+ printf("Use -c for a list of objects without details of differences.\n");
else
- HDprintf("Use -c for a list of objects.\n");
+ printf("Use -c for a list of objects.\n");
}
}
}
diff --git a/tools/src/h5diff/h5diff_main.c b/tools/src/h5diff/h5diff_main.c
index 561f139..f2ab2f9 100644
--- a/tools/src/h5diff/h5diff_main.c
+++ b/tools/src/h5diff/h5diff_main.c
@@ -89,15 +89,15 @@ main(int argc, char *argv[])
for (i = 0; i < 2; i++) {
if (opts.sset[i]) {
if (opts.sset[i]->start.data)
- HDfree(opts.sset[i]->start.data);
+ free(opts.sset[i]->start.data);
if (opts.sset[i]->stride.data)
- HDfree(opts.sset[i]->stride.data);
+ free(opts.sset[i]->stride.data);
if (opts.sset[i]->count.data)
- HDfree(opts.sset[i]->count.data);
+ free(opts.sset[i]->count.data);
if (opts.sset[i]->block.data)
- HDfree(opts.sset[i]->block.data);
+ free(opts.sset[i]->block.data);
- HDfree(opts.sset[i]);
+ free(opts.sset[i]);
opts.sset[i] = NULL;
}
}
@@ -124,5 +124,5 @@ h5diff_exit(int status)
{
h5tools_close();
- HDexit(status);
+ exit(status);
}
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 64b1f28..82cb876 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -67,7 +67,7 @@ main(int argc, char *argv[])
MPI_Comm_size(MPI_COMM_WORLD, &g_nTasks);
if (g_nTasks == 1) {
- HDprintf("Only 1 task available...doing serial diff\n");
+ printf("Only 1 task available...doing serial diff\n");
g_Parallel = 0;
@@ -141,11 +141,11 @@ ph5diff_worker(int nID)
{
/* Open the files */
if ((file1_id = H5Fopen(filenames[0], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
- HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]);
+ printf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[0]);
MPI_Abort(MPI_COMM_WORLD, 0);
}
if ((file2_id = H5Fopen(filenames[1], H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
- HDprintf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]);
+ printf("h5diff Task [%d]: <%s>: unable to open file\n", nID, filenames[1]);
MPI_Abort(MPI_COMM_WORLD, 0);
}
/* enable error reporting */
@@ -160,7 +160,7 @@ ph5diff_worker(int nID)
/* Make certain we've received the filenames and opened the files already */
if (file1_id < 0 || file2_id < 0) {
- HDprintf("ph5diff_worker: ERROR: work received before/without filenames\n");
+ printf("ph5diff_worker: ERROR: work received before/without filenames\n");
break;
}
@@ -188,7 +188,7 @@ ph5diff_worker(int nID)
char out_data[PRINT_DATA_MAX_SIZE];
int tmp;
- HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE);
+ memset(out_data, 0, PRINT_DATA_MAX_SIZE);
i = 0;
rewind(overflow_file);
@@ -198,7 +198,7 @@ ph5diff_worker(int nID)
MPI_Send(out_data, PRINT_DATA_MAX_SIZE, MPI_BYTE, 0, MPI_TAG_PRINT_DATA,
MPI_COMM_WORLD);
i = 0;
- HDmemset(out_data, 0, PRINT_DATA_MAX_SIZE);
+ memset(out_data, 0, PRINT_DATA_MAX_SIZE);
}
}
@@ -210,8 +210,8 @@ ph5diff_worker(int nID)
overflow_file = NULL;
}
- HDfflush(stdout);
- HDmemset(outBuff, 0, OUTBUFF_SIZE);
+ fflush(stdout);
+ memset(outBuff, 0, OUTBUFF_SIZE);
outBuffOffset = 0;
MPI_Send(&diffs, sizeof(diffs), MPI_BYTE, 0, MPI_TAG_TOK_RETURN, MPI_COMM_WORLD);
@@ -225,7 +225,7 @@ ph5diff_worker(int nID)
break;
}
else {
- HDprintf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG);
+ printf("ph5diff_worker: ERROR: invalid tag (%d) received\n", Status.MPI_TAG);
break;
}
}
@@ -252,7 +252,7 @@ print_manager_output(void)
{
/* If there was something we buffered, let's print it now */
if ((outBuffOffset > 0) && g_Parallel) {
- HDprintf("%s", outBuff);
+ printf("%s", outBuff);
if (overflow_file) {
int tmp;
@@ -263,12 +263,12 @@ print_manager_output(void)
overflow_file = NULL;
}
- HDfflush(stdout);
- HDmemset(outBuff, 0, OUTBUFF_SIZE);
+ fflush(stdout);
+ memset(outBuff, 0, OUTBUFF_SIZE);
outBuffOffset = 0;
}
else if ((outBuffOffset > 0) && !g_Parallel) {
- HDfprintf(stderr, "h5diff error: outBuffOffset>0, but we're not in parallel!\n");
+ fprintf(stderr, "h5diff error: outBuffOffset>0, but we're not in parallel!\n");
}
}
@@ -303,5 +303,5 @@ h5diff_exit(int status)
/* Always exit(0), since MPI implementations do weird stuff when they
* receive a non-zero exit value. - QAK
*/
- HDexit(status);
+ exit(status);
}
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 2a5eeb7..73309cd 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -159,7 +159,7 @@ leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -408,7 +408,7 @@ table_list_add(hid_t oid, unsigned long file_no)
h5dump_table_items_t *tmp_ptr;
table_list.nalloc = MAX(1, table_list.nalloc * 2);
- if (NULL == (tmp_ptr = (h5dump_table_items_t *)HDrealloc(
+ if (NULL == (tmp_ptr = (h5dump_table_items_t *)realloc(
table_list.tables, table_list.nalloc * sizeof(table_list.tables[0]))))
return -1;
table_list.tables = tmp_ptr;
@@ -485,7 +485,7 @@ table_list_free(void)
}
/* Free the table list */
- HDfree(table_list.tables);
+ free(table_list.tables);
table_list.tables = NULL;
table_list.nalloc = table_list.nused = 0;
} /* end table_list_free() */
@@ -587,7 +587,7 @@ parse_mask_list(const char *h_list)
/* sanity check */
if (h_list) {
- HDmemset(packed_mask, 0, sizeof(packed_mask));
+ memset(packed_mask, 0, sizeof(packed_mask));
packed_bits_num = 0;
/* scan in pair of offset,length separated by commas. */
@@ -598,7 +598,7 @@ parse_mask_list(const char *h_list)
error_msg("Bad mask list(%s)\n", h_list);
return FAIL;
}
- soffset_value = HDatoi(ptr);
+ soffset_value = atoi(ptr);
offset_value = (unsigned)soffset_value;
if (soffset_value < 0 || offset_value >= PACKED_BITS_SIZE_MAX) {
error_msg("Packed Bit offset value(%d) must be between 0 and %u\n", soffset_value,
@@ -620,7 +620,7 @@ parse_mask_list(const char *h_list)
error_msg("Bad mask list(%s)\n", h_list);
return FAIL;
}
- slength_value = HDatoi(ptr);
+ slength_value = atoi(ptr);
if (slength_value <= 0) {
error_msg("Packed Bit length value(%d) must be positive.\n", slength_value);
return FAIL;
@@ -700,26 +700,26 @@ free_handler(struct handler_t *hand, int len)
if (hand) {
for (i = 0; i < len; i++) {
if (hand[i].obj) {
- HDfree(hand[i].obj);
+ free(hand[i].obj);
hand[i].obj = NULL;
}
if (hand[i].subset_info) {
if (hand[i].subset_info->start.data)
- HDfree(hand[i].subset_info->start.data);
+ free(hand[i].subset_info->start.data);
if (hand[i].subset_info->stride.data)
- HDfree(hand[i].subset_info->stride.data);
+ free(hand[i].subset_info->stride.data);
if (hand[i].subset_info->count.data)
- HDfree(hand[i].subset_info->count.data);
+ free(hand[i].subset_info->count.data);
if (hand[i].subset_info->block.data)
- HDfree(hand[i].subset_info->block.data);
+ free(hand[i].subset_info->block.data);
- HDfree(hand[i].subset_info);
+ free(hand[i].subset_info);
hand[i].subset_info = NULL;
}
}
- HDfree(hand);
+ free(hand);
}
}
@@ -750,7 +750,7 @@ parse_command_line(int argc, const char *const *argv)
}
/* this will be plenty big enough to hold the info */
- if ((hand = (struct handler_t *)HDcalloc((size_t)argc, sizeof(struct handler_t))) == NULL) {
+ if ((hand = (struct handler_t *)calloc((size_t)argc, sizeof(struct handler_t))) == NULL) {
goto error;
}
@@ -770,7 +770,7 @@ parse_start:
dump_opts.display_fi = TRUE;
last_was_dset = FALSE;
if (H5_optarg != NULL)
- h5trav_set_verbose(HDatoi(H5_optarg));
+ h5trav_set_verbose(atoi(H5_optarg));
break;
case 'p':
dump_opts.display_dcpl = TRUE;
@@ -788,7 +788,7 @@ parse_start:
break;
case 'A':
if (H5_optarg != NULL) {
- if (0 == HDatoi(H5_optarg))
+ if (0 == atoi(H5_optarg))
dump_opts.include_attrs = FALSE;
}
else {
@@ -812,7 +812,7 @@ parse_start:
goto done;
break;
case 'w': {
- int sh5tools_nCols = HDatoi(H5_optarg);
+ int sh5tools_nCols = atoi(H5_optarg);
if (sh5tools_nCols <= 0)
h5tools_nCols = 65535;
@@ -998,7 +998,7 @@ parse_start:
dump_opts.display_vds_first = TRUE;
break;
case 'G':
- dump_opts.vds_gap_size = HDatoi(H5_optarg);
+ dump_opts.vds_gap_size = atoi(H5_optarg);
if (dump_opts.vds_gap_size < 0) {
usage(h5tools_getprogname());
goto error;
@@ -1070,7 +1070,7 @@ parse_start:
s = last_dset->subset_info;
}
else {
- last_dset->subset_info = s = (struct subset_t *)HDcalloc(1, sizeof(struct subset_t));
+ last_dset->subset_info = s = (struct subset_t *)calloc(1, sizeof(struct subset_t));
}
/*
@@ -1088,28 +1088,28 @@ parse_start:
switch ((char)opt) {
case 's':
if (s->start.data) {
- HDfree(s->start.data);
+ free(s->start.data);
s->start.data = NULL;
}
parse_hsize_list(H5_optarg, &s->start);
break;
case 'S':
if (s->stride.data) {
- HDfree(s->stride.data);
+ free(s->stride.data);
s->stride.data = NULL;
}
parse_hsize_list(H5_optarg, &s->stride);
break;
case 'c':
if (s->count.data) {
- HDfree(s->count.data);
+ free(s->count.data);
s->count.data = NULL;
}
parse_hsize_list(H5_optarg, &s->count);
break;
case 'k':
if (s->block.data) {
- HDfree(s->block.data);
+ free(s->block.data);
s->block.data = NULL;
}
parse_hsize_list(H5_optarg, &s->block);
@@ -1131,7 +1131,7 @@ end_collect:
case 'E':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
@@ -1185,7 +1185,7 @@ end_collect:
case '1':
vol_info_g.type = VOL_BY_VALUE;
- vol_info_g.u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ vol_info_g.u.value = (H5VL_class_value_t)atoi(H5_optarg);
use_custom_vol_g = TRUE;
break;
@@ -1201,7 +1201,7 @@ end_collect:
case '4':
vfd_info_g.type = VFD_BY_VALUE;
- vfd_info_g.u.value = (H5FD_class_value_t)HDatoi(H5_optarg);
+ vfd_info_g.u.value = (H5FD_class_value_t)atoi(H5_optarg);
use_custom_vfd_g = TRUE;
break;
@@ -1232,11 +1232,11 @@ end_collect:
errno = 0;
onion_fa_g.revision_num = HDstrtoull(vfd_info_g.info, NULL, 10);
if (errno == ERANGE) {
- HDprintf("Invalid onion revision specified\n");
+ printf("Invalid onion revision specified\n");
goto error;
}
- HDprintf("Using revision %" PRIu64 "\n", onion_fa_g.revision_num);
+ printf("Using revision %" PRIu64 "\n", onion_fa_g.revision_num);
}
}
else
@@ -1374,7 +1374,7 @@ main(int argc, char *argv[])
goto done;
}
- HDprintf("The number of revisions for the onion file is %" PRIu64 "\n", revision_count);
+ printf("The number of revisions for the onion file is %" PRIu64 "\n", revision_count);
goto done;
}
else
@@ -1473,7 +1473,7 @@ main(int argc, char *argv[])
"xsi:schemaLocation=\"http://hdfgroup.org/HDF5/XML/schema/HDF5-File "
"http://www.hdfgroup.org/HDF5/XML/schema/HDF5-File.xsd\">\n",
xmlnsprefix, ns);
- HDfree(ns);
+ free(ns);
}
}
else {
@@ -1546,11 +1546,11 @@ main(int argc, char *argv[])
h5tools_setstatus(EXIT_FAILURE);
if (prefix) {
- HDfree(prefix);
+ free(prefix);
prefix = NULL;
}
if (fname) {
- HDfree(fname);
+ free(fname);
fname = NULL;
}
} /* end while */
@@ -1576,11 +1576,11 @@ done:
h5tools_setstatus(EXIT_FAILURE);
if (prefix) {
- HDfree(prefix);
+ free(prefix);
prefix = NULL;
}
if (fname) {
- HDfree(fname);
+ free(fname);
fname = NULL;
}
@@ -1605,7 +1605,7 @@ static void
init_prefix(char **prfx, size_t prfx_len)
{
if (prfx_len > 0)
- *prfx = (char *)HDcalloc(prfx_len, 1);
+ *prfx = (char *)calloc(prfx_len, 1);
else
error_msg("unable to allocate prefix buffer\n");
}
@@ -1627,7 +1627,7 @@ add_prefix(char **prfx, size_t *prfx_len, const char *name)
/* Check if we need more space */
if (*prfx_len <= new_len) {
*prfx_len = new_len + 1;
- *prfx = (char *)HDrealloc(*prfx, *prfx_len);
+ *prfx = (char *)realloc(*prfx, *prfx_len);
}
/* Append object name to prefix */
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index 3eaa2f9..a69aeac 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -48,7 +48,7 @@ dump_datatype(hid_t type)
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -72,7 +72,7 @@ dump_dataspace(hid_t space)
h5tools_context_t ctx; /* print context */
h5tool_format_t *outputformat = &h5tools_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -99,7 +99,7 @@ dump_attr_cb(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *
hid_t attr_id;
herr_t ret = SUCCEED;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.display_index = dump_opts.display_ai;
@@ -163,9 +163,9 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -187,7 +187,7 @@ 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 *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ obj_path = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (!obj_path) {
ret = FAIL;
goto done;
@@ -229,7 +229,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
/* Restore old prefix name */
HDstrcpy(prefix, old_prefix);
- HDfree(old_prefix);
+ free(old_prefix);
}
else
error_msg("warning: null prefix\n");
@@ -386,7 +386,7 @@ dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5_ATT
switch (linfo->type) {
case H5L_TYPE_SOFT:
- if ((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) {
+ if ((targbuf = (char *)malloc(linfo->u.val_size)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -436,12 +436,12 @@ 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);
- HDfree(targbuf);
+ free(targbuf);
}
break;
case H5L_TYPE_EXTERNAL:
- if ((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) {
+ if ((targbuf = (char *)malloc(linfo->u.val_size)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -510,7 +510,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);
- HDfree(targbuf);
+ free(targbuf);
}
break;
@@ -560,7 +560,7 @@ done:
h5tools_str_close(&buffer);
if (obj_path)
- HDfree(obj_path);
+ free(obj_path);
return ret;
}
@@ -634,9 +634,9 @@ dump_named_datatype(hid_t tid, const char *name)
h5tool_format_t string_dataformat;
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -790,9 +790,9 @@ dump_group(hid_t gid, const char *name)
}
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -925,7 +925,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
h5tools_str_t buffer; /* string into which to render */
hsize_t curr_pos = 0; /* total data element position */
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -958,7 +958,7 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset)
}
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
ctx.need_prefix = TRUE;
h5tools_simple_prefix(rawoutstream, outputformat, &ctx, (hsize_t)0, 0);
@@ -1112,7 +1112,7 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.sset = sset;
@@ -1336,7 +1336,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
u = HDstrlen(buf);
v = HDstrlen(op_name);
w = u + 1 + v + 1 + 2;
- obj_name = (char *)HDmalloc(w);
+ obj_name = (char *)malloc(w);
if (obj_name == NULL) {
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -1344,7 +1344,7 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
else {
size_t buffer_space = w - 1;
- HDmemset(obj_name, '\0', w);
+ memset(obj_name, '\0', w);
if (op_name[0] != '/') {
HDstrncat(obj_name, buf, buffer_space);
buffer_space -= MIN(buffer_space, u);
@@ -1359,10 +1359,10 @@ attr_search(hid_t oid, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *a
buffer_space -= MIN(buffer_space, v);
handle_attributes(oid, obj_name, NULL, 0, NULL);
- HDfree(obj_name);
+ free(obj_name);
}
}
- HDfree(obj_op_name);
+ free(obj_op_name);
}
return ret;
} /* end attr_search() */
@@ -1420,7 +1420,7 @@ lnk_search(const char *path, const H5L_info2_t *li, void *_op_data)
k = 2;
else
k = 1;
- search_name = (char *)HDmalloc(search_len + k);
+ search_name = (char *)malloc(search_len + k);
if (search_name == NULL) {
error_msg("creating temporary link\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -1450,7 +1450,7 @@ lnk_search(const char *path, const H5L_info2_t *li, void *_op_data)
break;
} /* end switch() */
}
- HDfree(search_name);
+ free(search_name);
}
return 0;
} /* end lnk_search() */
@@ -1534,7 +1534,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
hsize_t curr_pos = 0; /* total data element position */
j = (int)HDstrlen(attr) - 1;
- obj_name = (char *)HDmalloc((size_t)j + 2);
+ obj_name = (char *)malloc((size_t)j + 2);
if (obj_name == NULL)
goto error;
@@ -1554,7 +1554,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
} /* end else */
dump_indent += COL;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
ctx.display_index = dump_opts.display_ai;
@@ -1582,7 +1582,7 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
/* handle error case: cannot open the object with the attribute */
if ((oid = H5Oopen(fid, obj_name, H5P_DEFAULT)) < 0) {
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
ctx.need_prefix = TRUE;
@@ -1631,18 +1631,18 @@ handle_attributes(hid_t fid, const char *attr, void H5_ATTR_UNUSED *data, int H5
goto error;
} /* end if */
- HDfree(obj_name);
- HDfree(attr_name);
+ free(obj_name);
+ free(attr_name);
dump_indent -= COL;
return;
error:
h5tools_setstatus(EXIT_FAILURE);
if (obj_name)
- HDfree(obj_name);
+ free(obj_name);
if (attr_name)
- HDfree(attr_name);
+ free(attr_name);
H5E_BEGIN_TRY
{
@@ -1709,7 +1709,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if (!sset->start.data) {
/* default to (0, 0, ...) for the start coord */
if (ndims > 0)
- sset->start.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t));
+ sset->start.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t));
else
sset->start.data = NULL;
sset->start.len = ndims;
@@ -1717,7 +1717,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if (!sset->stride.data) {
if (ndims > 0)
- sset->stride.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t));
+ sset->stride.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t));
else
sset->stride.data = NULL;
sset->stride.len = ndims;
@@ -1727,7 +1727,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if (!sset->count.data) {
if (ndims > 0)
- sset->count.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t));
+ sset->count.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t));
else
sset->count.data = NULL;
sset->count.len = ndims;
@@ -1737,7 +1737,7 @@ handle_datasets(hid_t fid, const char *dset, void *data, int pe, const char *dis
if (!sset->block.data) {
if (ndims > 0)
- sset->block.data = (hsize_t *)HDcalloc((size_t)ndims, sizeof(hsize_t));
+ sset->block.data = (hsize_t *)calloc((size_t)ndims, sizeof(hsize_t));
else
sset->block.data = NULL;
sset->block.len = ndims;
@@ -1856,7 +1856,7 @@ handle_groups(hid_t fid, const char *group, void H5_ATTR_UNUSED *data, int pe, c
if (prefix_len <= new_len) {
prefix_len = new_len;
- prefix = (char *)HDrealloc(prefix, prefix_len);
+ prefix = (char *)realloc(prefix, prefix_len);
} /* end if */
HDstrcpy(prefix, group);
@@ -1893,7 +1893,7 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED *data, int H5_ATT
h5tools_setstatus(EXIT_FAILURE);
}
else {
- char *buf = (char *)HDmalloc(linfo.u.val_size);
+ char *buf = (char *)malloc(linfo.u.val_size);
PRINTVALSTREAM(rawoutstream, "\n");
switch (linfo.type) {
@@ -1951,7 +1951,7 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED *data, int H5_ATT
end_obj(h5tools_dump_header_format->udlinkend, h5tools_dump_header_format->udlinkblockend);
break;
} /* end switch */
- HDfree(buf);
+ free(buf);
} /* end else */
}
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index d0bc7e4..6d3f6c8 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -141,9 +141,9 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -165,7 +165,7 @@ 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 *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ obj_path = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (!obj_path) {
ret = FAIL;
goto done;
@@ -211,7 +211,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
/* Restore old prefix name */
HDstrcpy(prefix, old_prefix);
- HDfree(old_prefix);
+ free(old_prefix);
}
/* Close group */
@@ -316,10 +316,10 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_name);
- HDfree(t_obj_path);
- HDfree(t_prefix);
- HDfree(t_objname);
+ free(t_name);
+ free(t_obj_path);
+ free(t_prefix);
+ free(t_objname);
H5Dclose(obj);
goto done;
@@ -364,7 +364,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
switch (linfo->type) {
case H5L_TYPE_SOFT:
- if ((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) {
+ if ((targbuf = (char *)malloc(linfo->u.val_size)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -388,7 +388,7 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
char *t_link_path;
int res;
- t_link_path = (char *)HDmalloc(HDstrlen(prefix) + linfo->u.val_size + 1);
+ t_link_path = (char *)malloc(HDstrlen(prefix) + linfo->u.val_size + 1);
if (targbuf[0] == '/')
HDstrcpy(t_link_path, targbuf);
else {
@@ -446,19 +446,19 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
}
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(t_targbuf);
- HDfree(t_obj_path);
- HDfree(t_link_path);
+ free(t_prefix);
+ free(t_name);
+ free(t_targbuf);
+ free(t_obj_path);
+ free(t_link_path);
}
- HDfree(targbuf);
+ free(targbuf);
}
break;
case H5L_TYPE_EXTERNAL:
- if ((targbuf = (char *)HDmalloc(linfo->u.val_size)) == NULL) {
+ if ((targbuf = (char *)malloc(linfo->u.val_size)) == NULL) {
error_msg("unable to allocate buffer\n");
h5tools_setstatus(EXIT_FAILURE);
ret = FAIL;
@@ -512,14 +512,14 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(t_filename);
- HDfree(t_targname);
- HDfree(t_obj_path);
+ free(t_prefix);
+ free(t_name);
+ free(t_filename);
+ free(t_targname);
+ free(t_obj_path);
} /* end else */
} /* end else */
- HDfree(targbuf);
+ free(targbuf);
}
break;
@@ -556,9 +556,9 @@ xml_dump_all_cb(hid_t group, const char *name, const H5L_info2_t *linfo, void H5
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(t_obj_path);
+ free(t_prefix);
+ free(t_name);
+ free(t_obj_path);
} break;
} /* end switch */
@@ -569,7 +569,7 @@ done:
h5tools_str_close(&buffer);
if (obj_path)
- HDfree(obj_path);
+ free(obj_path);
return ret;
}
@@ -689,7 +689,7 @@ xml_escape_the_name(const char *str)
cp = str;
ncp_len = len + extra + 1;
- rcp = ncp = (char *)HDmalloc(ncp_len);
+ rcp = ncp = (char *)malloc(ncp_len);
if (!ncp)
return NULL; /* ?? */
@@ -782,7 +782,7 @@ xml_escape_the_string(const char *str, int slen)
cp = str;
ncp_len = len + extra + 1;
- rcp = ncp = (char *)HDcalloc(ncp_len, sizeof(char));
+ rcp = ncp = (char *)calloc(ncp_len, sizeof(char));
if (ncp == NULL)
return NULL; /* ?? */
@@ -877,9 +877,9 @@ xml_print_datatype(hid_t type, unsigned in_group)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -912,7 +912,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
/* This should be defined somewhere else */
/* These 2 cases are handled the same right now, but
probably will have something different eventually */
- char *dtxid = (char *)HDmalloc((size_t)100);
+ char *dtxid = (char *)malloc((size_t)100);
xml_name_to_XID(type, found_obj->objname, dtxid, 100, 1);
if (!found_obj->recorded) {
@@ -939,9 +939,9 @@ xml_print_datatype(hid_t type, unsigned in_group)
dtxid, t_objname);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_objname);
+ free(t_objname);
}
- HDfree(dtxid);
+ free(dtxid);
}
else {
ctx.need_prefix = TRUE;
@@ -1286,7 +1286,7 @@ xml_print_datatype(hid_t type, unsigned in_group)
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
H5free_memory(mname);
- HDfree(t_fname);
+ free(t_fname);
dump_indent += COL;
ctx.indent_level++;
@@ -1575,9 +1575,9 @@ xml_dump_datatype(hid_t type)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -1612,7 +1612,7 @@ xml_dump_datatype(hid_t type)
if (found_obj) {
/* Shared datatype, must be entered as an object */
/* These 2 cases are the same now, but may change */
- char *dtxid = (char *)HDmalloc((size_t)100);
+ char *dtxid = (char *)malloc((size_t)100);
xml_name_to_XID(type, found_obj->objname, dtxid, 100, 1);
if (!found_obj->recorded) {
@@ -1642,9 +1642,9 @@ xml_dump_datatype(hid_t type)
xmlnsprefix, dtxid, t_objname);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_objname);
+ free(t_objname);
}
- HDfree(dtxid);
+ free(dtxid);
}
else {
ctx.need_prefix = TRUE;
@@ -1710,9 +1710,9 @@ xml_dump_dataspace(hid_t space)
H5S_class_t space_type = H5Sget_simple_extent_type(space);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -1881,13 +1881,13 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
h5tool_format_t *outputformat = &xml_dataformat;
h5tool_format_t string_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
/* Print all the values. */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
string_dataformat = *outputformat;
@@ -1941,7 +1941,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
status = xml_print_strs(obj_id, DATASET_DATA);
else {
h5tools_context_t datactx;
- HDmemset(&datactx, 0, sizeof(datactx));
+ memset(&datactx, 0, sizeof(datactx));
datactx.need_prefix = TRUE;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
@@ -1971,7 +1971,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset,
}
else {
h5tools_context_t datactx;
- HDmemset(&datactx, 0, sizeof(datactx));
+ memset(&datactx, 0, sizeof(datactx));
datactx.need_prefix = TRUE;
datactx.indent_level = ctx.indent_level;
datactx.cur_column = ctx.cur_column;
@@ -2051,9 +2051,9 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
char *t_aname = xml_escape_the_name(attr_name);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -2081,7 +2081,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED
h5tools_str_append(&buffer, "<%sAttribute Name=\"%s\">", xmlnsprefix, t_aname);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_aname);
+ free(t_aname);
if ((attr_id = H5Aopen(attr, attr_name, H5P_DEFAULT)) >= 0) {
type = H5Aget_type(attr_id);
@@ -2370,7 +2370,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
char *t_prefix = NULL;
char *t_name = NULL;
- tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (tmp == NULL) {
indentation(dump_indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
@@ -2383,9 +2383,9 @@ xml_dump_named_datatype(hid_t type, const char *name)
HDstrcat(tmp, name);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -2406,8 +2406,8 @@ xml_dump_named_datatype(hid_t type, const char *name)
string_dataformat.do_escape = dump_opts.display_escape;
outputformat = &string_dataformat;
- dtxid = (char *)HDmalloc((size_t)100);
- parentxid = (char *)HDmalloc((size_t)100);
+ dtxid = (char *)malloc((size_t)100);
+ parentxid = (char *)malloc((size_t)100);
t_tmp = xml_escape_the_name(tmp);
t_prefix = xml_escape_the_name(prefix);
t_name = xml_escape_the_name(name);
@@ -2493,7 +2493,7 @@ xml_dump_named_datatype(hid_t type, const char *name)
h5tools_str_append(&buffer, "</%sNamedDataType>", xmlnsprefix);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_objname);
+ free(t_objname);
goto done;
}
else
@@ -2541,12 +2541,12 @@ done:
h5tools_str_close(&buffer);
- HDfree(dtxid);
- HDfree(parentxid);
- HDfree(t_tmp);
- HDfree(t_prefix);
- HDfree(t_name);
- HDfree(tmp);
+ free(dtxid);
+ free(parentxid);
+ free(t_tmp);
+ free(t_prefix);
+ free(t_name);
+ free(tmp);
}
/*-------------------------------------------------------------------------
@@ -2603,9 +2603,9 @@ xml_dump_group(hid_t gid, const char *name)
}
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -2631,7 +2631,7 @@ xml_dump_group(hid_t gid, const char *name)
tmp = HDstrdup("/");
}
else {
- tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (tmp == NULL) {
indentation(dump_indent);
error_msg("internal error (file %s:line %d)\n", __FILE__, __LINE__);
@@ -2665,11 +2665,11 @@ xml_dump_group(hid_t gid, const char *name)
}
else {
char *t_name = xml_escape_the_name(name);
- char *grpxid = (char *)HDmalloc((size_t)100);
- char *parentxid = (char *)HDmalloc((size_t)100);
+ char *grpxid = (char *)malloc((size_t)100);
+ char *parentxid = (char *)malloc((size_t)100);
if (found_obj->displayed) {
- char *ptrstr = (char *)HDmalloc((size_t)100);
+ char *ptrstr = (char *)malloc((size_t)100);
/* already seen: enter a groupptr */
if (isRoot) {
@@ -2702,8 +2702,8 @@ xml_dump_group(hid_t gid, const char *name)
par_name);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_objname);
- HDfree(par_name);
+ free(t_objname);
+ free(par_name);
ctx.indent_level++;
@@ -2725,10 +2725,10 @@ xml_dump_group(hid_t gid, const char *name)
ctx.indent_level--;
- HDfree(t_objname);
- HDfree(par_name);
+ free(t_objname);
+ free(par_name);
}
- HDfree(ptrstr);
+ free(ptrstr);
}
else {
@@ -2763,8 +2763,8 @@ xml_dump_group(hid_t gid, const char *name)
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_tmp);
- HDfree(par_name);
+ free(t_tmp);
+ free(par_name);
}
found_obj->displayed = TRUE;
@@ -2820,16 +2820,16 @@ xml_dump_group(hid_t gid, const char *name)
dump_indent -= COL;
ctx.indent_level--;
}
- HDfree(t_name);
- HDfree(grpxid);
- HDfree(parentxid);
+ free(t_name);
+ free(grpxid);
+ free(parentxid);
}
}
else {
/* only link -- must be first time! */
char *t_name = xml_escape_the_name(name);
- char *grpxid = (char *)HDmalloc((size_t)100);
- char *parentxid = (char *)HDmalloc((size_t)100);
+ char *grpxid = (char *)malloc((size_t)100);
+ char *parentxid = (char *)malloc((size_t)100);
ctx.need_prefix = TRUE;
@@ -2851,15 +2851,15 @@ xml_dump_group(hid_t gid, const char *name)
"<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" "
"Parents=\"%s\" H5ParentPaths=\"%s\" >",
xmlnsprefix, t_name, grpxid, t_tmp, parentxid, par_name);
- HDfree(t_tmp);
- HDfree(par_name);
+ free(t_tmp);
+ free(par_name);
}
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_name);
- HDfree(grpxid);
- HDfree(parentxid);
+ free(t_name);
+ free(grpxid);
+ free(parentxid);
/* 1. do all the attributes of the group */
@@ -2928,9 +2928,9 @@ xml_dump_group(hid_t gid, const char *name)
h5tools_str_close(&buffer);
if (par)
- HDfree(par);
+ free(par);
if (tmp)
- HDfree(tmp);
+ free(tmp);
}
/*-------------------------------------------------------------------------
@@ -2983,7 +2983,7 @@ xml_print_refs(hid_t did, int source)
if ((ssiz = H5Sget_simple_extent_npoints(space)) < 0)
goto error;
- buf = (char *)HDcalloc((size_t)ssiz, sizeof(H5R_ref_t));
+ buf = (char *)calloc((size_t)ssiz, sizeof(H5R_ref_t));
if (buf == NULL)
goto error;
e = H5Dread(did, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf);
@@ -2996,7 +2996,7 @@ xml_print_refs(hid_t did, int source)
if ((ssiz = H5Sget_simple_extent_npoints(space)) < 0)
goto error;
- buf = (char *)HDcalloc((size_t)ssiz, sizeof(H5R_ref_t));
+ buf = (char *)calloc((size_t)ssiz, sizeof(H5R_ref_t));
if (buf == NULL)
goto error;
e = H5Aread(did, H5T_STD_REF, buf);
@@ -3008,9 +3008,9 @@ xml_print_refs(hid_t did, int source)
refbuf = (H5R_ref_t *)((void *)buf);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3054,7 +3054,7 @@ xml_print_refs(hid_t did, int source)
h5tools_str_append(&buffer, "\"%s\"", t_path);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_path);
+ free(t_path);
}
ctx.indent_level--;
@@ -3065,14 +3065,14 @@ xml_print_refs(hid_t did, int source)
h5tools_str_close(&buffer);
- HDfree(buf);
+ free(buf);
H5Tclose(type);
H5Sclose(space);
return SUCCEED;
error:
if (buf)
- HDfree(buf);
+ free(buf);
H5E_BEGIN_TRY
{
@@ -3133,7 +3133,7 @@ xml_print_strs(hid_t did, int source)
if ((tsiz = H5Tget_size(type)) == 0)
goto error;
- buf = HDmalloc((size_t)ssiz * tsiz);
+ buf = malloc((size_t)ssiz * tsiz);
if (buf == NULL)
goto error;
@@ -3148,7 +3148,7 @@ xml_print_strs(hid_t did, int source)
if ((tsiz = H5Tget_size(type)) == 0)
goto error;
- buf = HDmalloc((size_t)ssiz * tsiz);
+ buf = malloc((size_t)ssiz * tsiz);
if (buf == NULL)
goto error;
@@ -3159,15 +3159,15 @@ xml_print_strs(hid_t did, int source)
bp = (char *)buf;
if (!is_vlstr) {
- onestring = (char *)HDcalloc(tsiz, sizeof(char));
+ onestring = (char *)calloc(tsiz, sizeof(char));
if (onestring == NULL)
goto error;
}
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3219,7 +3219,7 @@ xml_print_strs(hid_t did, int source)
h5tools_str_append(&buffer, "\"%s\"", t_onestring);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_onestring);
+ free(t_onestring);
}
}
bp += tsiz;
@@ -3230,11 +3230,11 @@ xml_print_strs(hid_t did, int source)
/* Reclaim any VL memory, if necessary */
if (!is_vlstr)
if (onestring)
- HDfree(onestring);
+ free(onestring);
if (buf) {
if (is_vlstr)
H5Treclaim(type, space, H5P_DEFAULT, buf);
- HDfree(buf);
+ free(buf);
}
H5Tclose(type);
H5Sclose(space);
@@ -3242,7 +3242,7 @@ xml_print_strs(hid_t did, int source)
error:
if (buf)
- HDfree(buf);
+ free(buf);
H5E_BEGIN_TRY
{
@@ -3281,9 +3281,9 @@ check_filters(hid_t dcpl)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3422,9 +3422,9 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3459,7 +3459,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
dump_indent += COL;
space = H5Tget_size(type);
- buf = HDmalloc((size_t)space);
+ buf = malloc((size_t)space);
H5Pget_fill_value(dcpl, type, buf);
@@ -3492,7 +3492,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
h5tools_str_append(&buffer, "\"%s\"", t_path);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_path);
+ free(t_path);
}
ctx.need_prefix = TRUE;
@@ -3732,7 +3732,7 @@ xml_dump_fill_value(hid_t dcpl, hid_t type)
break;
}
}
- HDfree(buf);
+ free(buf);
ctx.indent_level--;
dump_indent -= COL;
@@ -3782,15 +3782,15 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tool_format_t string_dataformat;
hsize_t curr_pos = 0; /* total data element position */
- char *rstr = (char *)HDmalloc((size_t)100);
- char *pstr = (char *)HDmalloc((size_t)100);
+ char *rstr = (char *)malloc((size_t)100);
+ char *pstr = (char *)malloc((size_t)100);
- tmp = (char *)HDmalloc(HDstrlen(prefix) + HDstrlen(name) + 2);
+ tmp = (char *)malloc(HDstrlen(prefix) + HDstrlen(name) + 2);
if (tmp == NULL) {
error_msg("buffer allocation failed\n");
h5tools_setstatus(EXIT_FAILURE);
- HDfree(rstr);
- HDfree(pstr);
+ free(rstr);
+ free(pstr);
return;
}
@@ -3799,9 +3799,9 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
HDstrcat(tmp, name);
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -3839,12 +3839,12 @@ 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);
- HDfree(t_name);
- HDfree(t_tmp);
- HDfree(t_prefix);
- HDfree(rstr);
- HDfree(pstr);
- HDfree(tmp);
+ free(t_name);
+ free(t_tmp);
+ free(t_prefix);
+ free(rstr);
+ free(pstr);
+ free(tmp);
dcpl = H5Dget_create_plist(did);
type = H5Dget_type(did);
@@ -3860,7 +3860,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t H5_ATTR_UNUSED *ss
h5tools_setstatus(EXIT_FAILURE);
}
else {
- chsize = (hsize_t *)HDmalloc((size_t)maxdims * sizeof(hsize_t));
+ chsize = (hsize_t *)malloc((size_t)maxdims * sizeof(hsize_t));
ctx.indent_level++;
dump_indent += COL;
@@ -3943,7 +3943,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--;
dump_indent -= COL;
- HDfree(chsize);
+ free(chsize);
}
}
else if (H5D_CONTIGUOUS == H5Pget_layout(dcpl)) {
@@ -4391,9 +4391,9 @@ xml_print_enum(hid_t type)
hsize_t curr_pos = 0; /* total data element position */
/* setup */
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
- HDmemset(&ctx, 0, sizeof(ctx));
+ memset(&ctx, 0, sizeof(ctx));
ctx.indent_level = dump_indent / COL;
ctx.cur_column = dump_indent;
@@ -4457,8 +4457,8 @@ xml_print_enum(hid_t type)
}
/* Get the names and raw values of all members */
- name = (char **)HDcalloc((size_t)nmembs, sizeof(char *));
- value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
+ name = (char **)calloc((size_t)nmembs, sizeof(char *));
+ value = (unsigned char *)calloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
for (i = 0; i < nmembs; i++) {
name[i] = H5Tget_member_name(type, i);
@@ -4494,7 +4494,7 @@ xml_print_enum(hid_t type)
h5tools_str_append(&buffer, "%s", t_name);
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
(size_t)outputformat->line_ncols, (hsize_t)0, (hsize_t)0);
- HDfree(t_name);
+ free(t_name);
ctx.indent_level--;
ctx.need_prefix = TRUE;
@@ -4527,13 +4527,13 @@ xml_print_enum(hid_t type)
else if (H5T_SGN_NONE == H5Tget_sign(native)) {
unsigned long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(&buffer, "%llu", copy);
}
else {
long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(&buffer, "%lld", copy);
}
h5tools_render_element(rawoutstream, outputformat, &ctx, &buffer, &curr_pos,
@@ -4557,7 +4557,7 @@ xml_print_enum(hid_t type)
for (i = 0; i < nmembs; i++)
H5free_memory(name[i]);
- HDfree(name);
- HDfree(value);
+ free(name);
+ free(value);
H5Tclose(super);
}
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 200f735..87e9acb 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -55,31 +55,31 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"version",
static void
usage(const char *prog)
{
- HDfprintf(stdout, "usage: %s [OPTIONS] file_name\n", prog);
- HDfprintf(stdout, " OPTIONS\n");
- HDfprintf(stdout, " -h, --help Print a usage message and exit\n");
- HDfprintf(stdout, " -V, --version Print version number and exit\n");
- HDfprintf(stdout, " -v, --verbose Turn on verbose mode\n");
- HDfprintf(stdout, " -d dname, --dname=dataset_name Pathname for the dataset\n");
- HDfprintf(stdout, " -n, --noop Perform all the steps except the actual conversion\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Examples of use:\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "h5format_convert -d /group/dataset file_name\n");
- HDfprintf(stdout, " Convert the dataset </group/dataset> in the HDF5 file <file_name>:\n");
- HDfprintf(stdout, " a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
- HDfprintf(stdout, " b. compact/contiguous dataset: downgrade the layout version to 3\n");
- HDfprintf(stdout, " c. virtual dataset: no action\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "h5format_convert file_name\n");
- HDfprintf(stdout, " Convert all datasets in the HDF5 file <file_name>:\n");
- HDfprintf(stdout, " a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
- HDfprintf(stdout, " b. compact/contiguous dataset: downgrade the layout version to 3\n");
- HDfprintf(stdout, " c. virtual dataset: no action\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "h5format_convert -n -d /group/dataset file_name\n");
- HDfprintf(stdout, " Go through all the steps except the actual conversion when \n");
- HDfprintf(stdout, " converting the dataset </group/dataset> in the HDF5 file <file_name>.\n");
+ fprintf(stdout, "usage: %s [OPTIONS] file_name\n", prog);
+ fprintf(stdout, " OPTIONS\n");
+ fprintf(stdout, " -h, --help Print a usage message and exit\n");
+ fprintf(stdout, " -V, --version Print version number and exit\n");
+ fprintf(stdout, " -v, --verbose Turn on verbose mode\n");
+ fprintf(stdout, " -d dname, --dname=dataset_name Pathname for the dataset\n");
+ fprintf(stdout, " -n, --noop Perform all the steps except the actual conversion\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Examples of use:\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "h5format_convert -d /group/dataset file_name\n");
+ fprintf(stdout, " Convert the dataset </group/dataset> in the HDF5 file <file_name>:\n");
+ fprintf(stdout, " a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
+ fprintf(stdout, " b. compact/contiguous dataset: downgrade the layout version to 3\n");
+ fprintf(stdout, " c. virtual dataset: no action\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "h5format_convert file_name\n");
+ fprintf(stdout, " Convert all datasets in the HDF5 file <file_name>:\n");
+ fprintf(stdout, " a. chunked dataset: convert the chunk indexing type to version 1 B-tree\n");
+ fprintf(stdout, " b. compact/contiguous dataset: downgrade the layout version to 3\n");
+ fprintf(stdout, " c. virtual dataset: no action\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "h5format_convert -n -d /group/dataset file_name\n");
+ fprintf(stdout, " Go through all the steps except the actual conversion when \n");
+ fprintf(stdout, " converting the dataset </group/dataset> in the HDF5 file <file_name>.\n");
} /* usage() */
/*-------------------------------------------------------------------------
@@ -179,7 +179,7 @@ leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
} /* leave() */
/*-------------------------------------------------------------------------
@@ -215,7 +215,7 @@ convert(hid_t fid, const char *dname)
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Open the dataset\n");
+ fprintf(stdout, "Open the dataset\n");
/* Get the dataset's creation property list */
if ((dcpl = H5Dget_create_plist(did)) < 0) {
@@ -231,12 +231,12 @@ convert(hid_t fid, const char *dname)
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Retrieve the dataset's layout\n");
+ fprintf(stdout, "Retrieve the dataset's layout\n");
switch (layout_type) {
case H5D_CHUNKED:
if (verbose_g)
- HDfprintf(stdout, "Dataset is a chunked dataset\n");
+ fprintf(stdout, "Dataset is a chunked dataset\n");
/* Get the dataset's chunk indexing type */
if (H5Dget_chunk_index_type(did, &idx_type) < 0) {
@@ -245,34 +245,33 @@ convert(hid_t fid, const char *dname)
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Retrieve the dataset's chunk indexing type\n");
+ fprintf(stdout, "Retrieve the dataset's chunk indexing type\n");
if (idx_type == H5D_CHUNK_IDX_BTREE) {
if (verbose_g)
- HDfprintf(
- stdout,
- "Dataset's chunk indexing type is already version 1 B-tree: no further action\n");
+ fprintf(stdout,
+ "Dataset's chunk indexing type is already version 1 B-tree: no further action\n");
h5tools_setstatus(EXIT_SUCCESS);
goto done;
}
else if (verbose_g)
- HDfprintf(stdout, "Dataset's chunk indexing type is not version 1 B-tree\n");
+ fprintf(stdout, "Dataset's chunk indexing type is not version 1 B-tree\n");
break;
case H5D_CONTIGUOUS:
if (verbose_g)
- HDfprintf(stdout, "Dataset is a contiguous dataset: downgrade layout version as needed\n");
+ fprintf(stdout, "Dataset is a contiguous dataset: downgrade layout version as needed\n");
break;
case H5D_COMPACT:
if (verbose_g)
- HDfprintf(stdout, "Dataset is a compact dataset: downgrade layout version as needed\n");
+ fprintf(stdout, "Dataset is a compact dataset: downgrade layout version as needed\n");
break;
case H5D_VIRTUAL:
if (verbose_g)
- HDfprintf(stdout, "No further action for virtual dataset\n");
+ fprintf(stdout, "No further action for virtual dataset\n");
goto done;
case H5D_NLAYOUTS:
@@ -287,13 +286,13 @@ convert(hid_t fid, const char *dname)
/* No further action if it is a noop */
if (noop_g) {
if (verbose_g)
- HDfprintf(stdout, "Not converting the dataset\n");
+ fprintf(stdout, "Not converting the dataset\n");
h5tools_setstatus(EXIT_SUCCESS);
goto done;
}
if (verbose_g)
- HDfprintf(stdout, "Converting the dataset...\n");
+ fprintf(stdout, "Converting the dataset...\n");
/* Downgrade the dataset */
if (H5Dformat_convert(did) < 0) {
@@ -302,7 +301,7 @@ convert(hid_t fid, const char *dname)
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Done\n");
+ fprintf(stdout, "Done\n");
done:
/* Close the dataset */
@@ -312,7 +311,7 @@ done:
goto error;
}
else if (verbose_g)
- HDfprintf(stdout, "Close the dataset\n");
+ fprintf(stdout, "Close the dataset\n");
/* Close the dataset creation property list */
if (H5Pclose(dcpl) < 0) {
@@ -321,13 +320,13 @@ done:
goto error;
}
else if (verbose_g)
- HDprintf("Close the dataset creation property list\n");
+ printf("Close the dataset creation property list\n");
return 0;
error:
if (verbose_g)
- HDfprintf(stdout, "Error encountered\n");
+ fprintf(stdout, "Error encountered\n");
H5E_BEGIN_TRY
{
@@ -358,7 +357,7 @@ convert_dsets_cb(const char *path, const H5O_info2_t *oi, const char *already_vi
if (NULL == already_visited) {
if (oi->type == H5O_TYPE_DATASET) {
if (verbose_g)
- HDfprintf(stdout, "Going to process dataset:%s...\n", path);
+ fprintf(stdout, "Going to process dataset:%s...\n", path);
if (convert(fid, path) < 0)
goto error;
} /* end if */
@@ -396,10 +395,10 @@ main(int argc, char *argv[])
if (parse_command_line(argc, (const char *const *)argv) < 0)
goto done;
else if (verbose_g)
- HDfprintf(stdout, "Process command line options\n");
+ fprintf(stdout, "Process command line options\n");
if (noop_g && verbose_g)
- HDfprintf(stdout, "It is noop...\n");
+ fprintf(stdout, "It is noop...\n");
/* enable error reporting if command line option */
h5tools_error_report();
@@ -411,28 +410,28 @@ main(int argc, char *argv[])
goto done;
}
else if (verbose_g)
- HDfprintf(stdout, "Open the file %s\n", fname_g);
+ fprintf(stdout, "Open the file %s\n", fname_g);
if (dset_g) { /* Convert a specified dataset in the file */
if (verbose_g)
- HDfprintf(stdout, "Going to process dataset: %s...\n", dname_g);
+ fprintf(stdout, "Going to process dataset: %s...\n", dname_g);
if (convert(fid, dname_g) < 0)
goto done;
}
else { /* Convert all datasets in the file */
if (verbose_g)
- HDfprintf(stdout, "Processing all datasets in the file...\n");
+ fprintf(stdout, "Processing all datasets in the file...\n");
if (h5trav_visit(fid, "/", TRUE, TRUE, convert_dsets_cb, NULL, &fid, H5O_INFO_BASIC) < 0)
goto done;
} /* end else */
if (verbose_g) {
if (noop_g) {
- HDfprintf(stdout, "Not processing the file's superblock...\n");
+ fprintf(stdout, "Not processing the file's superblock...\n");
h5tools_setstatus(EXIT_SUCCESS);
goto done;
} /* end if */
- HDfprintf(stdout, "Processing the file's superblock...\n");
+ fprintf(stdout, "Processing the file's superblock...\n");
} /* end if */
/* Process superblock */
@@ -450,14 +449,14 @@ done:
h5tools_setstatus(EXIT_FAILURE);
}
else if (verbose_g) {
- HDfprintf(stdout, "Close the file\n");
+ fprintf(stdout, "Close the file\n");
}
} /* end if */
if (fname_g)
- HDfree(fname_g);
+ free(fname_g);
if (dname_g)
- HDfree(dname_g);
+ free(dname_g);
leave(h5tools_getstatus());
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 5a2fae3..b7d18a1 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -101,19 +101,19 @@ main(int argc, char *argv[])
(void)HDsetvbuf(stderr, (char *)NULL, _IOLBF, 0);
(void)HDsetvbuf(stdout, (char *)NULL, _IOLBF, 0);
- if ((opt = (struct Options *)HDcalloc(1, sizeof(struct Options))) == NULL)
+ if ((opt = (struct Options *)calloc(1, sizeof(struct Options))) == NULL)
goto err;
if (argv[1] && (HDstrcmp("-V", argv[1]) == 0)) {
print_version(PROGRAMNAME);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
/*
* validate the number of command line arguments
*/
if (argc < 2) {
- (void)HDfprintf(stderr, err1, argc);
+ (void)fprintf(stderr, err1, argc);
usage(argv[0]);
goto err;
}
@@ -140,7 +140,7 @@ main(int argc, char *argv[])
opt->fcount++;
}
else {
- (void)HDfprintf(stderr, err9, argv[i]);
+ (void)fprintf(stderr, err9, argv[i]);
goto err;
}
@@ -159,7 +159,7 @@ main(int argc, char *argv[])
case 5: /* get outfile found */
if (HDstrlen(argv[i]) > MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, err10, argv[i]);
+ (void)fprintf(stderr, err10, argv[i]);
goto err;
}
(void)HDstrcpy(opt->outfile, argv[i]);
@@ -168,7 +168,7 @@ main(int argc, char *argv[])
case 6: /* -h found; help, then exit */
help(argv[0]);
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
break;
case 7: /* -d found; look for dimensions */
@@ -176,7 +176,7 @@ main(int argc, char *argv[])
case 8: /* read dimensions */
if (parseDimensions(in, argv[i]) == -1) {
- (void)HDfprintf(stderr, err6, argv[i]);
+ (void)fprintf(stderr, err6, argv[i]);
goto err;
}
break;
@@ -186,7 +186,7 @@ main(int argc, char *argv[])
case 10: /* read path name */
if (parsePathInfo(&in->path, argv[i]) == -1) {
- (void)HDfprintf(stderr, err5, argv[i]);
+ (void)fprintf(stderr, err5, argv[i]);
goto err;
}
break;
@@ -196,7 +196,7 @@ main(int argc, char *argv[])
case 12: /* read data type */
if (getInputClass(in, argv[i]) == -1) {
- (void)HDfprintf(stderr, err7, argv[i]);
+ (void)fprintf(stderr, err7, argv[i]);
goto err;
}
@@ -213,7 +213,7 @@ main(int argc, char *argv[])
case 14: /* read data size */
if (getInputSize(in, (int)HDstrtol(argv[i], NULL, BASE_10)) == -1) {
- (void)HDfprintf(stderr, err8, argv[i]);
+ (void)fprintf(stderr, err8, argv[i]);
goto err;
}
/*set default value for output-size */
@@ -222,14 +222,14 @@ main(int argc, char *argv[])
case ERR: /* command syntax error */
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
usage(argv[0]);
goto err;
}
}
if (FALSE == outfile_named) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
usage(argv[0]);
goto err;
}
@@ -242,35 +242,35 @@ main(int argc, char *argv[])
for (i = 0; i < opt->fcount; i++) {
in = &(opt->infiles[i].in);
if (in->sizeOfDimension)
- HDfree(in->sizeOfDimension);
+ free(in->sizeOfDimension);
if (in->sizeOfChunk)
- HDfree(in->sizeOfChunk);
+ free(in->sizeOfChunk);
if (in->maxsizeOfDimension)
- HDfree(in->maxsizeOfDimension);
+ free(in->maxsizeOfDimension);
if (in->externFilename)
- HDfree(in->externFilename);
+ free(in->externFilename);
if (in->data)
- HDfree(in->data);
+ free(in->data);
}
- HDfree(opt);
+ free(opt);
return EXIT_SUCCESS;
err:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
for (i = 0; i < opt->fcount; i++) {
in = &(opt->infiles[i].in);
if (in->sizeOfDimension)
- HDfree(in->sizeOfDimension);
+ free(in->sizeOfDimension);
if (in->sizeOfChunk)
- HDfree(in->sizeOfChunk);
+ free(in->sizeOfChunk);
if (in->maxsizeOfDimension)
- HDfree(in->maxsizeOfDimension);
+ free(in->maxsizeOfDimension);
if (in->externFilename)
- HDfree(in->externFilename);
+ free(in->externFilename);
if (in->data)
- HDfree(in->data);
+ free(in->data);
}
- HDfree(opt);
+ free(opt);
return EXIT_FAILURE;
}
@@ -329,7 +329,7 @@ gtoken(char *s)
}
if (token == ERR)
- (void)HDfprintf(stderr, err1, s);
+ (void)fprintf(stderr, err1, s);
}
else { /* filename */
token = FILNAME;
@@ -375,8 +375,8 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
*/
if (in->inputClass == 4 /* "IN" */ || in->inputClass == 3 /* "FP" */ || in->inputClass == 7 /* "UIN" */) {
- if ((strm = HDfopen(infile, READ_OPEN_FLAGS)) == NULL) {
- (void)HDfprintf(stderr, err1, infile);
+ if ((strm = fopen(infile, READ_OPEN_FLAGS)) == NULL) {
+ (void)fprintf(stderr, err1, infile);
goto error;
}
}
@@ -385,8 +385,8 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
*-------------------------------------------------------------------------
*/
else {
- if ((strm = HDfopen(infile, "r")) == NULL) {
- (void)HDfprintf(stderr, err1, infile);
+ if ((strm = fopen(infile, "r")) == NULL) {
+ (void)fprintf(stderr, err1, infile);
goto error;
}
}
@@ -395,12 +395,12 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
case 0: /* TEXTIN */
case 4: /* IN */
if (allocateIntegerStorage(in) == -1) {
- (void)HDfprintf(stderr, err2, infile);
+ (void)fprintf(stderr, err2, infile);
goto error;
}
if (readIntegerData(strm, in) == -1) {
- (void)HDfprintf(stderr, err4, infile);
+ (void)fprintf(stderr, err4, infile);
goto error;
}
break;
@@ -409,12 +409,12 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
case 2: /* TEXTFPE */
case 3: /* FP */
if (allocateFloatStorage(in) == -1) {
- (void)HDfprintf(stderr, err3, infile);
+ (void)fprintf(stderr, err3, infile);
goto error;
}
if (readFloatData(strm, in) == -1) {
- (void)HDfprintf(stderr, err5, infile);
+ (void)fprintf(stderr, err5, infile);
goto error;
}
break;
@@ -422,13 +422,13 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
case 5: /* STR */
if (in->h5dumpInput) {
if (processStrHDFData(strm, in, file_id) == -1) {
- (void)HDfprintf(stderr, err11, infile);
+ (void)fprintf(stderr, err11, infile);
goto error;
}
}
else {
if (processStrData(strm, in, file_id) == -1) {
- (void)HDfprintf(stderr, err11, infile);
+ (void)fprintf(stderr, err11, infile);
goto error;
}
}
@@ -438,17 +438,17 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
case 6: /* TEXTUIN */
case 7: /* UIN */
if (allocateUIntegerStorage(in) == -1) {
- (void)HDfprintf(stderr, err6, infile);
+ (void)fprintf(stderr, err6, infile);
goto error;
}
if (readUIntegerData(strm, in) == -1) {
- (void)HDfprintf(stderr, err7, infile);
+ (void)fprintf(stderr, err7, infile);
goto error;
}
break;
default:
- (void)HDfprintf(stderr, "%s", err10);
+ (void)fprintf(stderr, "%s", err10);
goto error;
}
@@ -492,7 +492,7 @@ readIntegerData(FILE *strm, struct Input *in)
in08 = (H5DT_INT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
if (HDfscanf(strm, "%hd", &temp16) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
(*in08) = (H5DT_INT8)temp16;
@@ -503,17 +503,17 @@ readIntegerData(FILE *strm, struct Input *in)
in08 = (H5DT_INT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
if (HDfread((char *)in08, sizeof(H5DT_INT8), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
#ifdef H5DEBUGIMPORT
- HDprintf("readIntegerData %d (0x%.8X)\n", *in08, *in08);
+ printf("readIntegerData %d (0x%.8X)\n", *in08, *in08);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -524,7 +524,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in16++) {
if (HDfscanf(strm, "%hd", in16) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -534,7 +534,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 4: /* IN */
for (i = 0; i < len; i++, in16++) {
if (HDfread((char *)&temp16, sizeof(H5DT_INT16), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -544,13 +544,13 @@ readIntegerData(FILE *strm, struct Input *in)
*/
*in16 = temp16;
#ifdef H5DEBUGIMPORT
- HDprintf("readIntegerData %d (0x%.8X)\n", *in16, temp16);
+ printf("readIntegerData %d (0x%.8X)\n", *in16, temp16);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -561,7 +561,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in32++) {
if (HDfscanf(strm, "%d", in32) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -570,7 +570,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 4: /* IN */
for (i = 0; i < len; i++, in32++) {
if (HDfread((char *)&temp32, sizeof(H5DT_INT32), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -580,13 +580,13 @@ readIntegerData(FILE *strm, struct Input *in)
*/
*in32 = temp32;
#ifdef H5DEBUGIMPORT
- HDprintf("readIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32);
+ printf("readIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -597,7 +597,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 0: /* TEXTIN */
for (i = 0; i < len; i++, in64++) {
if (HDfscanf(strm, "%s", buffer) < 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
*in64 = (H5DT_INT64)HDstrtoll(buffer, NULL, 10);
@@ -607,7 +607,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 4: /* IN */
for (i = 0; i < len; i++, in64++) {
if (HDfread((char *)&temp64, sizeof(H5DT_INT64), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -617,19 +617,19 @@ readIntegerData(FILE *strm, struct Input *in)
*/
*in64 = temp64;
#ifdef H5DEBUGIMPORT
- HDprintf("readIntegerData %d (0x%.8X)\n", *in64, temp64);
+ printf("readIntegerData %d (0x%.8X)\n", *in64, temp64);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
break;
}
return (0);
@@ -663,7 +663,7 @@ readUIntegerData(FILE *strm, struct Input *in)
in08 = (H5DT_UINT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
if (HDfscanf(strm, "%hu", &temp16) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
(*in08) = (H5DT_UINT8)temp16;
@@ -674,14 +674,14 @@ readUIntegerData(FILE *strm, struct Input *in)
in08 = (H5DT_UINT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
if (HDfread((char *)in08, sizeof(H5DT_UINT8), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -692,7 +692,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in16++) {
if (HDfscanf(strm, "%hu", in16) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -701,7 +701,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 7: /* UIN */
for (i = 0; i < len; i++, in16++) {
if (HDfread((char *)&temp16, sizeof(H5DT_UINT16), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -711,13 +711,13 @@ readUIntegerData(FILE *strm, struct Input *in)
*/
*in16 = temp16;
#ifdef H5DEBUGIMPORT
- HDprintf("readUIntegerData %d (0x%.4X = 0x%.4X)\n", *in16, *in16, temp16);
+ printf("readUIntegerData %d (0x%.4X = 0x%.4X)\n", *in16, *in16, temp16);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -728,7 +728,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in32++) {
if (HDfscanf(strm, "%u", in32) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -737,7 +737,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 7: /* UIN */
for (i = 0; i < len; i++, in32++) {
if (HDfread((char *)&temp32, sizeof(H5DT_UINT32), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -747,13 +747,13 @@ readUIntegerData(FILE *strm, struct Input *in)
*/
*in32 = temp32;
#ifdef H5DEBUGIMPORT
- HDprintf("readUIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32);
+ printf("readUIntegerData %d (0x%.8X = 0x%.8X)\n", *in32, *in32, temp32);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -764,7 +764,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 6: /* TEXTUIN */
for (i = 0; i < len; i++, in64++) {
if (HDfscanf(strm, "%s", buffer) < 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
*in64 = (H5DT_UINT64)HDstrtoll(buffer, NULL, 10);
@@ -774,7 +774,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 7: /* UIN */
for (i = 0; i < len; i++, in64++) {
if (HDfread((char *)&temp64, sizeof(H5DT_UINT64), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -784,19 +784,19 @@ readUIntegerData(FILE *strm, struct Input *in)
*/
*in64 = temp64;
#ifdef H5DEBUGIMPORT
- HDprintf("readUIntegerData %ld (0x%.8X = 0x%.8X)\n", *in64, *in64, temp64);
+ printf("readUIntegerData %ld (0x%.8X = 0x%.8X)\n", *in64, *in64, temp64);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
break;
}
return (0);
@@ -829,7 +829,7 @@ readFloatData(FILE *strm, struct Input *in)
case 1: /* TEXTFP */
for (i = 0; i < len; i++, fp32++) {
if (HDfscanf(strm, "%f", fp32) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -842,7 +842,7 @@ readFloatData(FILE *strm, struct Input *in)
for (i = 0; i < len; i++, fp32++) {
if (HDfscanf(strm, "%f", fp32) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -854,7 +854,7 @@ readFloatData(FILE *strm, struct Input *in)
bfp32 = (uint32_t *)in->data;
for (i = 0; i < len; i++, bfp32++) {
if (HDfread((char *)&temp32, sizeof(uint32_t), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -864,13 +864,13 @@ readFloatData(FILE *strm, struct Input *in)
*/
*bfp32 = temp32;
#ifdef H5DEBUGIMPORT
- HDprintf("readFloatData %ld (0x%.8X = 0x%.8X)\n", *bfp32, *bfp32, temp32);
+ printf("readFloatData %ld (0x%.8X = 0x%.8X)\n", *bfp32, *bfp32, temp32);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -881,7 +881,7 @@ readFloatData(FILE *strm, struct Input *in)
case 1: /* TEXTFP */
for (i = 0; i < len; i++, fp64++) {
if (HDfscanf(strm, "%lf", fp64) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -894,7 +894,7 @@ readFloatData(FILE *strm, struct Input *in)
for (i = 0; i < len; i++, fp64++) {
if (HDfscanf(strm, "%lf", fp64) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -906,7 +906,7 @@ readFloatData(FILE *strm, struct Input *in)
bfp64 = (uint64_t *)in->data;
for (i = 0; i < len; i++, bfp64++) {
if (HDfread((char *)&temp64, sizeof(uint64_t), 1, strm) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
/*
@@ -916,19 +916,19 @@ readFloatData(FILE *strm, struct Input *in)
*/
*bfp64 = temp64;
#ifdef H5DEBUGIMPORT
- HDprintf("readFloatData %ld (0x%.16lX)\n", *bfp64, temp64);
+ printf("readFloatData %ld (0x%.16lX)\n", *bfp64, temp64);
#endif
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
break;
}
return (0);
@@ -1111,7 +1111,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
*-------------------------------------------------------------------------
*/
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING\n");
+ printf("processStrHDFData DATATYPE STRING\n");
#endif
if ((type_id = H5Tcopy(H5T_C_S1)) < 0)
@@ -1149,7 +1149,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
}
H5E_END_TRY;
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING groups created\n");
+ printf("processStrHDFData DATATYPE STRING groups created\n");
#endif
if ((space_id = H5Screate_simple(in->rank, in->sizeOfDimension, NULL)) < 0)
@@ -1163,7 +1163,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
goto out;
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING ready to process strings\n");
+ printf("processStrHDFData DATATYPE STRING ready to process strings\n");
#endif
line = 0;
j = 0;
@@ -1173,27 +1173,27 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
str2 = NULL;
str3 = NULL;
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING[%llu]={%s}\n", (unsigned long long)line, str1);
+ printf("processStrHDFData DATATYPE STRING[%llu]={%s}\n", (unsigned long long)line, str1);
#endif
/* process string to remove the first and last quote char */
str2 = strchr(str1, '"');
if (str2 != NULL) {
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
#endif
str2++;
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
#endif
str3 = strrchr(str2, '"');
if (str3 != NULL) {
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str3), str3);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str3), str3);
#endif
*str3 = '\0';
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
+ printf("processStrHDFData DATATYPE STRING len:%d for {%s}\n", HDstrlen(str2), str2);
#endif
if (HDstrlen(str2) > 0) {
@@ -1202,8 +1202,8 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
hsize_t count[1] = {1};
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING[%llu] store %s\n", (unsigned long long)line,
- str2);
+ printf("processStrHDFData DATATYPE STRING[%llu] store %s\n", (unsigned long long)line,
+ str2);
#endif
if ((fspace_id = H5Dget_space(dset_id)) < 0)
goto out;
@@ -1225,7 +1225,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
j++;
}
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING eof reached\n");
+ printf("processStrHDFData DATATYPE STRING eof reached\n");
#endif
/* close */
@@ -1238,7 +1238,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
out:
#ifdef H5DEBUGIMPORT
- HDprintf("processStrHDFData DATATYPE STRING error exit\n");
+ printf("processStrHDFData DATATYPE STRING error exit\n");
#endif
/* disable error reporting */
H5E_BEGIN_TRY
@@ -1267,35 +1267,35 @@ allocateIntegerStorage(struct Input *in)
switch (in->inputSize) {
case 8:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_INT8))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_INT8))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 16:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_INT16))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_INT16))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 32:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_INT32))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_INT32))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 64:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_INT64))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_INT64))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
break;
}
return (0);
@@ -1314,35 +1314,35 @@ allocateUIntegerStorage(struct Input *in)
switch (in->inputSize) {
case 8:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_UINT8))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_UINT8))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 16:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_UINT16))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_UINT16))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 32:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_UINT32))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_UINT32))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 64:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_UINT64))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_UINT64))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
break;
}
return (0);
@@ -1361,21 +1361,21 @@ allocateFloatStorage(struct Input *in)
switch (in->inputSize) {
case 32:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_FLOAT32))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_FLOAT32))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
case 64:
- if ((in->data = (VOIDP)HDmalloc((size_t)len * sizeof(H5DT_FLOAT64))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->data = (VOIDP)malloc((size_t)len * sizeof(H5DT_FLOAT64))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
break;
}
return (0);
@@ -1446,24 +1446,24 @@ processConfigurationFile(char *infile, struct Input *in)
/* 0 for big endian, 1 for little endian. */
if ((*((volatile uint8_t *)(&ibyte))) == 0x67) {
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err11e);
+ (void)fprintf(stderr, "%s", err11e);
return (-1);
}
}
else {
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err11e);
+ (void)fprintf(stderr, "%s", err11e);
return (-1);
}
}
in->inputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
in->inputArchitecture = 0; /* default to NATIVE */
- if ((strm = HDfopen(infile, "r")) == NULL) {
- (void)HDfprintf(stderr, err1, infile);
+ if ((strm = fopen(infile, "r")) == NULL) {
+ (void)fprintf(stderr, err1, infile);
goto error;
}
@@ -1471,7 +1471,7 @@ processConfigurationFile(char *infile, struct Input *in)
if ((scanret == 1) && !HDstrcmp("HDF5", key)) {
#ifdef H5DEBUGIMPORT
int pndx;
- HDprintf("\nh5dump file\n");
+ printf("\nh5dump file\n");
#endif
in->h5dumpInput = 1;
scanret = HDfscanf(strm, "%254s", temp); /* filename */
@@ -1480,51 +1480,51 @@ processConfigurationFile(char *infile, struct Input *in)
while (scanret == 1) {
if (!HDstrcmp("DATASET", key)) { /* PATH */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASET key\n");
+ printf("h5dump DATASET key\n");
#endif
if (in->configOptionVector[PATH] == 1) {
- (void)HDfprintf(stderr, err3a, infile);
+ (void)fprintf(stderr, err3a, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASET %s found\n", temp);
+ printf("h5dump DATASET %s found\n", temp);
#endif
if (parsePathInfo(&in->path, temp) == -1) {
- (void)HDfprintf(stderr, err3b, infile);
+ (void)fprintf(stderr, err3b, infile);
goto error;
}
in->configOptionVector[PATH] = 1;
scanret = HDfscanf(strm, "%254s", temp); /* start bracket */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASET %s found\n", temp);
+ printf("h5dump DATASET %s found\n", temp);
#endif
} /* if(!HDstrcmp("DATASET", key)) PATH */
else if (!HDstrcmp("DATATYPE", key)) { /* INPUT-CLASS */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE key\n");
+ printf("h5dump DATATYPE key\n");
#endif
if (in->configOptionVector[INPUT_CLASS] == 1) {
- (void)HDfprintf(stderr, err4a, infile);
+ (void)fprintf(stderr, err4a, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE %s found\n", temp);
+ printf("h5dump DATATYPE %s found\n", temp);
#endif
if ((kindex = getInputClassType(in, temp)) == -1) {
- (void)HDfprintf(stderr, err4b, infile);
+ (void)fprintf(stderr, err4b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE type %d inputClass\n", in->inputClass);
+ printf("h5dump DATATYPE type %d inputClass\n", in->inputClass);
#endif
in->configOptionVector[INPUT_CLASS] = 1;
@@ -1539,80 +1539,80 @@ processConfigurationFile(char *infile, struct Input *in)
in->outputClass = 2;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE type %d outputClass\n", in->outputClass);
+ printf("h5dump DATATYPE type %d outputClass\n", in->outputClass);
#endif
if (in->inputClass == 5) { /* STRING */
int get_next_prop = 1;
in->outputClass = -1;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING found\n");
+ printf("h5dump DATATYPE STRING found\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING %s found\n", temp);
+ printf("h5dump DATATYPE STRING %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* string properties */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
while (get_next_prop) {
if (!HDstrcmp("STRSIZE", temp)) { /* STRSIZE */
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err19);
+ (void)fprintf(stderr, "%s", err19);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING STRSIZE %s found\n", temp);
+ printf("h5dump DATATYPE STRING STRSIZE %s found\n", temp);
#endif
if (HDstrcmp("H5T_VARIABLE;", temp) != 0) {
char *more = temp;
ival = (int)HDstrtol(more, &more, 10);
if (getInputSize(in, ival) == -1) {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING %d InputSize\n", in->inputSize);
+ printf("h5dump DATATYPE STRING %d InputSize\n", in->inputSize);
#endif
}
}
else if (!HDstrcmp("STRPAD", temp)) { /* STRPAD */
if (HDfscanf(strm, "%254s", temp) != 1) { /* STRPAD type */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING STRPAD %s found\n", temp);
+ printf("h5dump DATATYPE STRING STRPAD %s found\n", temp);
#endif
}
else if (!HDstrcmp("CSET", key)) { /* CSET */
if (HDfscanf(strm, "%254s", temp) != 1) { /* CSET type */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING CSET %s found\n", temp);
+ printf("h5dump DATATYPE STRING CSET %s found\n", temp);
#endif
}
else if (!HDstrcmp("CTYPE", temp)) { /* CTYPE */
if (HDfscanf(strm, "%254s", temp) != 1) { /* CTYPE type */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING CTYPE %s found\n", temp);
+ printf("h5dump DATATYPE STRING CTYPE %s found\n", temp);
#endif
} /* if(!HDstrcmp("CSET", key)) */
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE STRING %s found\n", temp);
+ printf("h5dump DATATYPE STRING %s found\n", temp);
#endif
if (!HDstrcmp("}", temp)) { /* end bracket */
get_next_prop = 0;
@@ -1624,58 +1624,58 @@ processConfigurationFile(char *infile, struct Input *in)
hsize_t temp_dims[MAX_NUM_DIMENSION];
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE key\n");
+ printf("h5dump DATASPACE key\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
if (!HDstrcmp("SCALAR", temp)) { /* SCALAR */
in->rank = 0;
} /* if(!HDstrcmp("SCALAR", key)) */
else if (!HDstrcmp("NULL", temp)) { /* NULL */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
} /* else if(!HDstrcmp("NULL", key)) */
else if (!HDstrcmp("SIMPLE", temp)) { /* SIMPLE */
int icount = 0;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE found\n");
+ printf("h5dump DATASPACE SIMPLE found\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = HDstrtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp(")", temp)) { /* end paren */
in->rank = ++icount;
@@ -1685,71 +1685,71 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* Dimension */
icount++;
if (icount > MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
} /* while (get_next_dim) */
- if ((in->sizeOfDimension = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) ==
+ if ((in->sizeOfDimension = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) ==
NULL) {
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %ld rank\n", in->rank);
+ printf("h5dump DATASPACE SIMPLE %ld rank\n", in->rank);
#endif
for (i = 0; i < in->rank; i++) {
in->sizeOfDimension[i] = temp_dims[i];
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE dims[%ld]:", in->rank);
+ printf("h5dump DATASPACE SIMPLE dims[%ld]:", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->sizeOfDimension[pndx]);
+ printf(" %ld", in->sizeOfDimension[pndx]);
}
- HDprintf("\n");
+ printf("\n");
#endif
in->configOptionVector[DIM] = 1;
} /* if(!HDstrcmp("(", key)) start paren */
else {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp("/", temp)) { /* / max dims */
if ((in->maxsizeOfDimension =
- (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE process max dim values\n");
+ printf("h5dump DATASPACE SIMPLE process max dim values\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
while (get_next_dim) {
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE get max dim value\n");
+ printf("h5dump DATASPACE SIMPLE get max dim value\n");
#endif
if (!HDstrcmp("H5S_UNLIMITED", temp) ||
!HDstrcmp("H5S_UNLIMITED,", temp)) { /* unlimited */
@@ -1761,11 +1761,11 @@ processConfigurationFile(char *infile, struct Input *in)
in->maxsizeOfDimension[i] = HDstrtoull(more, &more, 10);
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim or end paren */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
if (!HDstrcmp(")", temp)) { /* end paren */
get_next_dim = 0;
@@ -1773,85 +1773,85 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* comma */
i++;
if (i >= MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
} /* while (get_next_dim) */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE maxdims[%ld]:", in->rank);
+ printf("h5dump DATASPACE SIMPLE maxdims[%ld]:", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->maxsizeOfDimension[pndx]);
+ printf(" %ld", in->maxsizeOfDimension[pndx]);
}
- HDprintf("\n");
- HDprintf("h5dump DATASPACE SIMPLE get max dim finished\n");
+ printf("\n");
+ printf("h5dump DATASPACE SIMPLE get max dim finished\n");
#endif
} /* if(!HDstrcmp("(", key)) start paren */
else {
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
scanret = HDfscanf(strm, "%254s", temp); /* end bracket */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATASPACE SIMPLE %s found\n", temp);
+ printf("h5dump DATASPACE SIMPLE %s found\n", temp);
#endif
} /* if(!HDstrcmp("/", key)) max dims separator */
} /* else if(!HDstrcmp("SIMPLE", key)) */
else {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
} /* else if(!HDstrcmp("DATASPACE", key)) RANK and DIMENSIONS */
else if (!HDstrcmp("STORAGE_LAYOUT", key)) { /* CHUNKED-DIMENSION-SIZES */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT key\n");
+ printf("h5dump STORAGE_LAYOUT key\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* CHUNKED */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT %s found\n", temp);
#endif
if (!HDstrcmp("CHUNKED", temp)) { /* CHUNKED */
- if ((in->sizeOfChunk = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "Unable to allocate dynamic memory.\n");
+ 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 */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int icount = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
while (get_next_dim) {
char *more = temp;
in->sizeOfChunk[icount] = HDstrtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
if (!HDstrcmp(")", temp)) { /* end paren */
in->configOptionVector[RANK] = 1;
@@ -1860,47 +1860,47 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* Dimension */
icount++;
if (icount > MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
} /* while (get_next_dim) */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED dims [%ld]:", in->rank);
+ printf("h5dump STORAGE_LAYOUT CHUNKED dims [%ld]:", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->sizeOfChunk[pndx]);
+ printf(" %ld", in->sizeOfChunk[pndx]);
}
- HDprintf("\n");
+ printf("\n");
#endif
in->configOptionVector[DIM] = 1;
} /* if(!HDstrcmp("(", key)) start paren */
else {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* SIZE */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
if (!HDstrcmp("SIZE", temp)) { /* SIZE */
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err19);
+ (void)fprintf(stderr, "%s", err19);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival);
+ printf("h5dump STORAGE_LAYOUT CHUNKED SIZE %d found\n", ival);
#endif
}
while (HDstrcmp("}", temp) != 0) {
if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
+ printf("h5dump STORAGE_LAYOUT CHUNKED %s found\n", temp);
#endif
}
in->configOptionVector[CHUNK] = 1;
@@ -1908,135 +1908,135 @@ processConfigurationFile(char *infile, struct Input *in)
} /* else if(!HDstrcmp("STORAGE_LAYOUT", key)) CHUNKED-DIMENSION-SIZES */
else if (!HDstrcmp("FILTERS", key)) { /* FILTERS */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS key\n");
+ printf("h5dump FILTERS key\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS %s found\n", temp);
+ printf("h5dump FILTERS %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS %s found\n", temp);
+ printf("h5dump FILTERS %s found\n", temp);
#endif
if (!HDstrcmp("COMPRESSION", temp)) { /* COMPRESSION */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION found\n");
+ printf("h5dump FILTERS COMPRESSION found\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* DEFLATE */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp);
+ printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* bgin bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp);
+ printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* LEVEL */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp);
+ printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err19);
+ (void)fprintf(stderr, "%s", err19);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION LEVEL %d found\n", ival);
+ printf("h5dump FILTERS COMPRESSION LEVEL %d found\n", ival);
#endif
in->compressionParam = ival;
if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS COMPRESSION %s found\n", temp);
+ printf("h5dump FILTERS COMPRESSION %s found\n", temp);
#endif
in->compressionType = 0; /* ONLY GZIP supported */
in->configOptionVector[COMPRESS] = 1;
}
else if (!HDstrcmp("CONTIGUOUS", temp)) { /* CONTIGUOUS */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS CONTIGUOUS found\n");
+ printf("h5dump FILTERS CONTIGUOUS found\n");
#endif
in->configOptionVector[COMPRESS] = 0;
}
else if (!HDstrcmp("NONE", temp)) { /* NONE */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS NONE found\n");
+ printf("h5dump FILTERS NONE found\n");
#endif
in->configOptionVector[COMPRESS] = 0;
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* end bracket */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump FILTERS %s found\n", temp);
+ printf("h5dump FILTERS %s found\n", temp);
#endif
}
else if (!HDstrcmp("SUBSET", key)) { /* reduce dimensions */
hsize_t temp_dims[MAX_NUM_DIMENSION];
int get_next_prop = 1;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET key\n");
+ printf("h5dump SUBSET key\n");
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* start bracket */
- (void)HDfprintf(stderr, err20, infile);
+ (void)fprintf(stderr, err20, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
if (HDfscanf(strm, "%254s", temp) != 1) { /* SUBSET keyword */
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
while (get_next_prop) {
if (!HDstrcmp("COUNT", temp)) { /* COUNT */
int icount = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET COUNT [%s] found\n", temp);
+ printf("h5dump SUBSET COUNT [%s] found\n", temp);
#endif
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = HDstrtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET COUNT %s found\n", temp);
+ printf("h5dump SUBSET COUNT %s found\n", temp);
#endif
if (!HDstrcmp(");", temp)) { /* end paren */
in->rank = ++icount;
@@ -2046,7 +2046,7 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* Dimension */
icount++;
if (icount >= MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
@@ -2055,11 +2055,11 @@ processConfigurationFile(char *infile, struct Input *in)
in->sizeOfDimension[i] = temp_dims[i];
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET COUNT dims: [%d]", in->rank);
+ printf("h5dump SUBSET COUNT dims: [%d]", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->sizeOfDimension[pndx]);
+ printf(" %ld", in->sizeOfDimension[pndx]);
}
- HDprintf("\n");
+ printf("\n");
#endif
in->configOptionVector[DIM] = 1;
} /* if(!HDstrcmp("(", key)) start paren */
@@ -2067,32 +2067,32 @@ processConfigurationFile(char *infile, struct Input *in)
if (!HDstrcmp("BLOCK", temp)) { /* BLOCK */
int icount = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* start paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
if (!HDstrcmp("(", temp)) { /* start paren */
int get_next_dim = 1;
int i = 0;
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension with optional comma */
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET BLOCK [%s] found\n", temp);
+ printf("h5dump SUBSET BLOCK [%s] found\n", temp);
#endif
while (get_next_dim) {
char *more = temp;
temp_dims[icount] = HDstrtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET BLOCK %s found\n", temp);
+ printf("h5dump SUBSET BLOCK %s found\n", temp);
#endif
if (!HDstrcmp(");", temp)) { /* end paren */
in->rank = ++icount;
@@ -2102,7 +2102,7 @@ processConfigurationFile(char *infile, struct Input *in)
else { /* Dimension */
icount++;
if (icount > MAX_NUM_DIMENSION) {
- (void)HDfprintf(stderr, "Invalid value for rank.\n");
+ (void)fprintf(stderr, "Invalid value for rank.\n");
goto error;
}
}
@@ -2111,21 +2111,21 @@ processConfigurationFile(char *infile, struct Input *in)
in->sizeOfDimension[i] = in->sizeOfDimension[i] * temp_dims[i];
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET BLOCK dims: [%d]", in->rank);
+ printf("h5dump SUBSET BLOCK dims: [%d]", in->rank);
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld", in->sizeOfDimension[pndx]);
+ printf(" %ld", in->sizeOfDimension[pndx]);
}
- HDprintf("\n");
+ printf("\n");
#endif
in->configOptionVector[DIM] = 1;
} /* if(!HDstrcmp("(", key)) start paren */
} /* if(!HDstrcmp("BLOCK", temp)) BLOCK */
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump SUBSET %s found\n", temp);
+ printf("h5dump SUBSET %s found\n", temp);
#endif
if (!HDstrcmp("}", temp)) { /* end bracket */
get_next_prop = 0;
@@ -2134,7 +2134,7 @@ processConfigurationFile(char *infile, struct Input *in)
} /* else if(!HDstrcmp("SUBSET", key)) */
else if (!HDstrcmp("DATA", key)) { /* FINISHED */
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATA key\n");
+ printf("h5dump DATA key\n");
#endif
scanret = 0;
break;
@@ -2142,50 +2142,50 @@ processConfigurationFile(char *infile, struct Input *in)
scanret = HDfscanf(strm, "%254s", key);
}
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump path");
+ printf("h5dump path");
for (pndx = 0; pndx < in->path.count; pndx++) {
- HDprintf(" : %s", in->path.group[pndx]);
+ printf(" : %s", in->path.group[pndx]);
}
- HDprintf("\n");
- HDprintf("h5dump inputClass=%d\n", in->inputClass);
- HDprintf("h5dump inputSize=%d\n", in->inputSize);
- HDprintf("h5dump inputArchitecture=%d\n", in->inputArchitecture);
- HDprintf("h5dump inputByteOrder=%d\n", in->inputByteOrder);
- HDprintf("h5dump rank=%d\n", in->rank);
- HDprintf("h5dump outputClass=%d\n", in->outputClass);
- HDprintf("h5dump outputSize=%d\n", in->outputSize);
- HDprintf("h5dump outputArchitecture=%d\n", in->outputArchitecture);
- HDprintf("h5dump outputByteOrder=%d\n", in->outputByteOrder);
- HDprintf("h5dump compressionType=%d\n", in->compressionType);
- HDprintf("h5dump compressionParam=%d\n", in->compressionParam);
- HDprintf("h5dump externFilename=%s\n", in->externFilename);
- HDprintf("h5dump sizeOfDimensions:\n");
+ printf("\n");
+ printf("h5dump inputClass=%d\n", in->inputClass);
+ printf("h5dump inputSize=%d\n", in->inputSize);
+ printf("h5dump inputArchitecture=%d\n", in->inputArchitecture);
+ printf("h5dump inputByteOrder=%d\n", in->inputByteOrder);
+ printf("h5dump rank=%d\n", in->rank);
+ printf("h5dump outputClass=%d\n", in->outputClass);
+ printf("h5dump outputSize=%d\n", in->outputSize);
+ printf("h5dump outputArchitecture=%d\n", in->outputArchitecture);
+ printf("h5dump outputByteOrder=%d\n", in->outputByteOrder);
+ printf("h5dump compressionType=%d\n", in->compressionType);
+ printf("h5dump compressionParam=%d\n", in->compressionParam);
+ printf("h5dump externFilename=%s\n", in->externFilename);
+ printf("h5dump sizeOfDimensions:\n");
for (pndx = 0; pndx < in->rank; pndx++) {
- HDprintf(" %ld\n", in->sizeOfDimension[pndx]);
+ printf(" %ld\n", in->sizeOfDimension[pndx]);
}
#endif
}
else {
#ifdef H5DEBUGIMPORT
- HDprintf("original option keyword parsing\n");
+ printf("original option keyword parsing\n");
#endif
while (scanret == 1) {
if ((kindex = mapKeywordToIndex(key)) == -1) {
- (void)HDfprintf(stderr, err2, key, infile);
+ (void)fprintf(stderr, err2, key, infile);
goto error;
}
switch (kindex) {
case 0: /* PATH */
if (in->configOptionVector[PATH] == 1) {
- (void)HDfprintf(stderr, err3a, infile);
+ (void)fprintf(stderr, err3a, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
if (parsePathInfo(&in->path, temp) == -1) {
- (void)HDfprintf(stderr, err3b, infile);
+ (void)fprintf(stderr, err3b, infile);
goto error;
}
in->configOptionVector[PATH] = 1;
@@ -2193,16 +2193,16 @@ processConfigurationFile(char *infile, struct Input *in)
case 1: /* INPUT-CLASS */
if (in->configOptionVector[INPUT_CLASS] == 1) {
- (void)HDfprintf(stderr, err4a, infile);
+ (void)fprintf(stderr, err4a, infile);
goto error;
}
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err18);
+ (void)fprintf(stderr, "%s", err18);
goto error;
}
if (getInputClass(in, temp) == -1) {
- (void)HDfprintf(stderr, err4b, infile);
+ (void)fprintf(stderr, err4b, infile);
goto error;
}
@@ -2221,15 +2221,15 @@ processConfigurationFile(char *infile, struct Input *in)
case 2: /* INPUT-SIZE */
if (in->configOptionVector[INPUT_SIZE] == 1) {
- (void)HDfprintf(stderr, err5a, infile);
+ (void)fprintf(stderr, err5a, infile);
goto error;
}
if (HDfscanf(strm, "%254d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err19);
+ (void)fprintf(stderr, "%s", err19);
goto error;
}
if (getInputSize(in, ival) == -1) {
- (void)HDfprintf(stderr, err5b, infile);
+ (void)fprintf(stderr, err5b, infile);
goto error;
}
in->configOptionVector[INPUT_SIZE] = 1;
@@ -2241,12 +2241,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 3: /* RANK */
if (in->configOptionVector[RANK] == 1) {
- (void)HDfprintf(stderr, err6a, infile);
+ (void)fprintf(stderr, err6a, infile);
goto error;
}
if (getRank(in, strm) == -1) {
- (void)HDfprintf(stderr, err6b, infile);
+ (void)fprintf(stderr, err6b, infile);
goto error;
}
in->configOptionVector[RANK] = 1;
@@ -2254,16 +2254,16 @@ processConfigurationFile(char *infile, struct Input *in)
case 4: /* DIMENSION-SIZES */
if (in->configOptionVector[DIM] == 1) {
- (void)HDfprintf(stderr, err7a, infile);
+ (void)fprintf(stderr, err7a, infile);
goto error;
}
if (in->configOptionVector[RANK] == 0) {
- (void)HDfprintf(stderr, err7b, infile);
+ (void)fprintf(stderr, err7b, infile);
goto error;
}
if (getDimensionSizes(in, strm) == -1) {
- (void)HDfprintf(stderr, err7c, infile);
+ (void)fprintf(stderr, err7c, infile);
goto error;
}
in->configOptionVector[DIM] = 1;
@@ -2271,12 +2271,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 5: /* OUTPUT-CLASS */
if (in->configOptionVector[OUTPUT_CLASS] == 1) {
- (void)HDfprintf(stderr, err8a, infile);
+ (void)fprintf(stderr, err8a, infile);
goto error;
}
if (getOutputClass(in, strm) == -1) {
- (void)HDfprintf(stderr, err8b, infile);
+ (void)fprintf(stderr, err8b, infile);
goto error;
}
in->configOptionVector[OUTPUT_CLASS] = 1;
@@ -2284,12 +2284,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 6: /* OUTPUT-SIZE */
if (in->configOptionVector[OUTPUT_SIZE] == 1) {
- (void)HDfprintf(stderr, err9a, infile);
+ (void)fprintf(stderr, err9a, infile);
goto error;
}
if (getOutputSize(in, strm) == -1) {
- (void)HDfprintf(stderr, err9b, infile);
+ (void)fprintf(stderr, err9b, infile);
goto error;
}
in->configOptionVector[OUTPUT_SIZE] = 1;
@@ -2297,12 +2297,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 7: /* OUTPUT-ARCHITECTURE */
if (in->configOptionVector[OUTPUT_ARCH] == 1) {
- (void)HDfprintf(stderr, err10a, infile);
+ (void)fprintf(stderr, err10a, infile);
goto error;
}
if (getOutputArchitecture(in, strm) == -1) {
- (void)HDfprintf(stderr, err10b, infile);
+ (void)fprintf(stderr, err10b, infile);
goto error;
}
in->configOptionVector[OUTPUT_ARCH] = 1;
@@ -2310,12 +2310,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 8: /* OUTPUT-BYTE-ORDER */
if (in->configOptionVector[OUTPUT_B_ORDER] == 1) {
- (void)HDfprintf(stderr, err11a, infile);
+ (void)fprintf(stderr, err11a, infile);
goto error;
}
if (getOutputByteOrder(in, strm) == -1) {
- (void)HDfprintf(stderr, err11b, infile);
+ (void)fprintf(stderr, err11b, infile);
goto error;
}
in->configOptionVector[OUTPUT_B_ORDER] = 1;
@@ -2323,17 +2323,17 @@ processConfigurationFile(char *infile, struct Input *in)
case 9: /* CHUNKED-DIMENSION-SIZES */
if (in->configOptionVector[CHUNK] == 1) {
- (void)HDfprintf(stderr, err12a, infile);
+ (void)fprintf(stderr, err12a, infile);
goto error;
}
/* can't appear before dimension sizes have been provided */
if (in->configOptionVector[DIM] == 0) {
- (void)HDfprintf(stderr, err12b, infile);
+ (void)fprintf(stderr, err12b, infile);
goto error;
}
if (getChunkedDimensionSizes(in, strm) == -1) {
- (void)HDfprintf(stderr, err12c, infile);
+ (void)fprintf(stderr, err12c, infile);
goto error;
}
in->configOptionVector[CHUNK] = 1;
@@ -2341,12 +2341,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 10: /* COMPRESSION-TYPE */
if (in->configOptionVector[COMPRESS] == 1) {
- (void)HDfprintf(stderr, err13a, infile);
+ (void)fprintf(stderr, err13a, infile);
goto error;
}
if (getCompressionType(in, strm) == -1) {
- (void)HDfprintf(stderr, err13b, infile);
+ (void)fprintf(stderr, err13b, infile);
goto error;
}
in->configOptionVector[COMPRESS] = 1;
@@ -2359,12 +2359,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 11: /* COMPRESSION-PARAM */
if (in->configOptionVector[COMPRESS_PARAM] == 1) {
- (void)HDfprintf(stderr, err14a, infile);
+ (void)fprintf(stderr, err14a, infile);
goto error;
}
if (getCompressionParameter(in, strm) == -1) {
- (void)HDfprintf(stderr, err14b, infile);
+ (void)fprintf(stderr, err14b, infile);
goto error;
}
@@ -2377,12 +2377,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 12: /* EXTERNAL-STORAGE */
if (in->configOptionVector[EXTERNALSTORE] == 1) {
- (void)HDfprintf(stderr, err15a, infile);
+ (void)fprintf(stderr, err15a, infile);
goto error;
}
if (getExternalFilename(in, strm) == -1) {
- (void)HDfprintf(stderr, err15b, infile);
+ (void)fprintf(stderr, err15b, infile);
goto error;
}
in->configOptionVector[EXTERNALSTORE] = 1;
@@ -2390,16 +2390,16 @@ processConfigurationFile(char *infile, struct Input *in)
case 13: /* MAXIMUM-DIMENSIONS */
if (in->configOptionVector[EXTEND] == 1) {
- (void)HDfprintf(stderr, err16a, infile);
+ (void)fprintf(stderr, err16a, infile);
goto error;
}
/* can't appear before dimension sizes have been provided */
if (in->configOptionVector[DIM] == 0) {
- (void)HDfprintf(stderr, err16b, infile);
+ (void)fprintf(stderr, err16b, infile);
goto error;
}
if (getMaximumDimensionSizes(in, strm) == -1) {
- (void)HDfprintf(stderr, err16c, infile);
+ (void)fprintf(stderr, err16c, infile);
goto error;
}
in->configOptionVector[EXTEND] = 1;
@@ -2407,12 +2407,12 @@ processConfigurationFile(char *infile, struct Input *in)
case 14: /* INPUT-BYTE-ORDER */
if (in->configOptionVector[INPUT_B_ORDER] == 1) {
- (void)HDfprintf(stderr, err11c, infile);
+ (void)fprintf(stderr, err11c, infile);
goto error;
}
if (getInputByteOrder(in, strm) == -1) {
- (void)HDfprintf(stderr, err11d, infile);
+ (void)fprintf(stderr, err11d, infile);
goto error;
}
in->configOptionVector[INPUT_B_ORDER] = 1;
@@ -2430,7 +2430,7 @@ processConfigurationFile(char *infile, struct Input *in)
*/
if (validateConfigurationParameters(in) == -1) {
- (void)HDfprintf(stderr, err17, infile);
+ (void)fprintf(stderr, err17, infile);
goto error;
}
}
@@ -2463,21 +2463,21 @@ validateConfigurationParameters(struct Input *in)
return (0);
if ((in->configOptionVector[DIM] != 1) || (in->configOptionVector[RANK] != 1)) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if (in->configOptionVector[EXTERNALSTORE] == 1) {
if ((in->configOptionVector[COMPRESS] == 1) || (in->configOptionVector[CHUNK] == 1) ||
(in->configOptionVector[EXTEND] == 1)) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
}
if ((in->configOptionVector[COMPRESS] == 1) || (in->configOptionVector[EXTEND] == 1)) {
if (in->configOptionVector[CHUNK] != 1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -2485,20 +2485,20 @@ validateConfigurationParameters(struct Input *in)
/* Arch can't be STD if O/p class is FP */
if (in->outputArchitecture == 1)
if (in->outputClass == 1) {
- (void)HDfprintf(stderr, "%s", err4a);
+ (void)fprintf(stderr, "%s", err4a);
return (-1);
}
/* Arch can't be IEEE if O/p class is IN */
if (in->outputArchitecture == 2)
if (in->outputClass == 0) {
- (void)HDfprintf(stderr, "%s", err4b);
+ (void)fprintf(stderr, "%s", err4b);
return (-1);
}
if (in->outputClass == 1)
if (in->outputSize != 32 && in->outputSize != 64) {
- (void)HDfprintf(stderr, "%s", err5);
+ (void)fprintf(stderr, "%s", err5);
return (-1);
}
@@ -2526,7 +2526,7 @@ parsePathInfo(struct path_info *path, char *temp)
token = HDstrtok(temp, delimiter);
if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
HDstrcpy(path->group[i++], token);
@@ -2536,7 +2536,7 @@ parsePathInfo(struct path_info *path, char *temp)
if (token == NULL)
break;
if (HDstrlen(token) >= MAX_PATH_NAME_LENGTH) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
HDstrcpy(path->group[i++], token);
@@ -2565,8 +2565,8 @@ parseDimensions(struct Input *in, char *strm)
i++;
}
in->rank = i + 1;
- if ((in->sizeOfDimension = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->sizeOfDimension = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2593,12 +2593,12 @@ getOutputClass(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for output class.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputClassStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -2628,7 +2628,7 @@ getOutputSize(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for output size.\n";
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2637,7 +2637,7 @@ getOutputSize(struct Input *in, FILE *strm)
in->outputSize = ival;
return (0);
}
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -2648,7 +2648,7 @@ getInputClass(struct Input *in, char *temp)
const char *err1 = "Invalid value for input class.\n";
if ((kindex = InputClassStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -2669,18 +2669,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2690,18 +2690,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2711,18 +2711,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2732,18 +2732,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2753,18 +2753,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2774,18 +2774,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2795,18 +2795,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2816,18 +2816,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 4;
@@ -2837,18 +2837,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2858,18 +2858,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2879,18 +2879,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2900,18 +2900,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2921,18 +2921,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2942,18 +2942,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2963,18 +2963,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -2984,18 +2984,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 7;
@@ -3005,7 +3005,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3017,7 +3017,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3029,7 +3029,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3041,7 +3041,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3053,7 +3053,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3065,7 +3065,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3077,7 +3077,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3089,7 +3089,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3101,7 +3101,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3113,7 +3113,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3125,18 +3125,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("IEEE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
@@ -3146,18 +3146,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("IEEE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
@@ -3167,18 +3167,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("IEEE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
@@ -3188,18 +3188,18 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("IEEE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = 3;
@@ -3221,7 +3221,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3233,7 +3233,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3245,7 +3245,7 @@ getInputClassType(struct Input *in, char *buffer)
in->configOptionVector[INPUT_SIZE] = 1;
if ((kindex = OutputArchStrToInt("NATIVE")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
@@ -3262,18 +3262,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B8BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3281,18 +3281,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B8LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3300,18 +3300,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B16BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3319,18 +3319,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B16LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3338,18 +3338,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B32BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3357,18 +3357,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B32LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3376,18 +3376,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B64BE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("BE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3395,18 +3395,18 @@ getInputClassType(struct Input *in, char *buffer)
else if (!HDstrcmp(buffer, "H5T_STD_B64LE")) {
if ((kindex = OutputArchStrToInt("STD")) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->outputArchitecture = kindex;
if ((kindex = OutputByteOrderStrToInt("LE")) == -1) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
in->outputByteOrder = kindex;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump inputByteOrder %d\n", in->inputByteOrder);
+ printf("h5dump inputByteOrder %d\n", in->inputByteOrder);
#endif
kindex = -1;
@@ -3437,7 +3437,7 @@ getInputClassType(struct Input *in, char *buffer)
}
if (kindex == -1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3445,9 +3445,9 @@ getInputClassType(struct Input *in, char *buffer)
if (in->configOptionVector[OUTPUT_SIZE] == 0)
in->outputSize = in->inputSize;
#ifdef H5DEBUGIMPORT
- HDprintf("h5dump DATATYPE InClass %d inputSize\n", in->inputSize);
- HDprintf("h5dump DATATYPE InClass %d outputSize\n", in->outputSize);
- HDprintf("h5dump DATATYPE InClass %d outputArchitecture\n", in->outputArchitecture);
+ printf("h5dump DATATYPE InClass %d inputSize\n", in->inputSize);
+ printf("h5dump DATATYPE InClass %d outputSize\n", in->outputSize);
+ printf("h5dump DATATYPE InClass %d outputArchitecture\n", in->outputArchitecture);
#endif
in->inputClass = kindex;
@@ -3478,7 +3478,7 @@ getInputSize(struct Input *in, int ival)
in->inputSize = ival;
return (0);
}
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3491,12 +3491,12 @@ getInputByteOrder(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for input byte-order.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputByteOrderStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3513,7 +3513,7 @@ getRank(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for rank.\n";
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if (ival >= MIN_NUM_DIMENSION && ival <= MAX_NUM_DIMENSION) {
@@ -3521,7 +3521,7 @@ getRank(struct Input *in, FILE *strm)
return (0);
}
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3536,8 +3536,8 @@ getDimensionSizes(struct Input *in, FILE *strm)
const char *err2 =
"No. of dimensions for which dimension sizes provided is not equal to provided rank.\n";
- if ((in->sizeOfDimension = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->sizeOfDimension = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3545,7 +3545,7 @@ getDimensionSizes(struct Input *in, FILE *strm)
in->sizeOfDimension[i++] = ullval;
if (in->rank != i) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
return (0);
@@ -3562,8 +3562,8 @@ getChunkedDimensionSizes(struct Input *in, FILE *strm)
"No. of dimensions for which chunked dimension sizes provided is not equal to provided rank.\n";
const char *err3 = "The CHUNKED-DIMENSION-SIZES cannot exceed the sizes of DIMENSION-SIZES\n";
- if ((in->sizeOfChunk = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->sizeOfChunk = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3571,13 +3571,13 @@ getChunkedDimensionSizes(struct Input *in, FILE *strm)
in->sizeOfChunk[i++] = ullval;
if (in->rank != i) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
for (i = 0; i < in->rank; i++)
if (in->sizeOfChunk[i] > in->sizeOfDimension[i]) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
return (0);
@@ -3595,8 +3595,8 @@ getMaximumDimensionSizes(struct Input *in, FILE *strm)
const char *err3 = "The MAXIMUM-DIMENSIONS cannot be less than the sizes of DIMENSION-SIZES. Exception: "
"can be -1 to indicate unlimited size\n";
- if ((in->maxsizeOfDimension = (hsize_t *)HDmalloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
- (void)HDfprintf(stderr, "%s", err1);
+ if ((in->maxsizeOfDimension = (hsize_t *)malloc((size_t)in->rank * sizeof(hsize_t))) == NULL) {
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -3608,14 +3608,14 @@ getMaximumDimensionSizes(struct Input *in, FILE *strm)
}
if (in->rank != i) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
for (i = 0; i < in->rank; i++) {
if (in->maxsizeOfDimension[i] != H5S_UNLIMITED)
if (in->maxsizeOfDimension[i] < in->sizeOfDimension[i]) {
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -3631,12 +3631,12 @@ getOutputArchitecture(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for output architecture.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputArchStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3664,12 +3664,12 @@ getOutputByteOrder(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for output byte-order.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = OutputByteOrderStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3697,12 +3697,12 @@ getCompressionType(struct Input *in, FILE *strm)
const char *err2 = "Invalid value for compression.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if ((kindex = CompressionTypeStrToInt(temp)) == -1) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
@@ -3739,19 +3739,19 @@ getCompressionParameter(struct Input *in, FILE *strm)
switch (in->compressionType) {
case 0: /* GZIP */
if (HDfscanf(strm, "%d", (&ival)) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
if (ival < 0 || ival > 9) {
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
in->compressionParam = ival;
return (0);
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
}
@@ -3764,12 +3764,12 @@ getExternalFilename(struct Input *in, FILE *strm)
const char *err1 = "Unable to get 'string' value.\n";
if (HDfscanf(strm, "%254s", temp) != 1) {
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
temp_len = HDstrlen(temp);
- in->externFilename = (char *)HDmalloc((temp_len + 1) * sizeof(char));
+ in->externFilename = (char *)malloc((temp_len + 1) * sizeof(char));
(void)HDstrcpy(in->externFilename, temp);
in->externFilename[temp_len] = '\0';
return (0);
@@ -3836,7 +3836,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->outputByteOrder) {
@@ -3851,7 +3851,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -3870,7 +3870,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -3887,7 +3887,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -3904,7 +3904,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -3921,19 +3921,19 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
@@ -3951,7 +3951,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->outputByteOrder) {
@@ -3966,13 +3966,13 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
case 1:
- (void)HDfprintf(stderr, "%s", err5);
+ (void)fprintf(stderr, "%s", err5);
return (-1);
case 2:
@@ -3989,7 +3989,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4006,19 +4006,19 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
@@ -4044,7 +4044,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->outputByteOrder) {
@@ -4059,7 +4059,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4078,7 +4078,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4095,7 +4095,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4112,7 +4112,7 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4129,29 +4129,29 @@ createOutputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
case 2:
- (void)HDfprintf(stderr, "%s", err6);
+ (void)fprintf(stderr, "%s", err6);
return (-1);
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
return new_type;
@@ -4191,7 +4191,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->inputByteOrder) {
@@ -4206,7 +4206,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4225,7 +4225,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4242,7 +4242,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4259,7 +4259,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4276,19 +4276,19 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
@@ -4306,7 +4306,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->inputByteOrder) {
@@ -4321,13 +4321,13 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
case 1:
- (void)HDfprintf(stderr, "%s", err5);
+ (void)fprintf(stderr, "%s", err5);
return (-1);
case 2:
@@ -4344,7 +4344,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4361,19 +4361,19 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
@@ -4399,7 +4399,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
switch (in->inputByteOrder) {
@@ -4414,7 +4414,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4433,7 +4433,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4450,7 +4450,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4467,7 +4467,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
@@ -4484,29 +4484,29 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err3);
+ (void)fprintf(stderr, "%s", err3);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
case 2:
- (void)HDfprintf(stderr, "%s", err6);
+ (void)fprintf(stderr, "%s", err6);
return (-1);
default:
- (void)HDfprintf(stderr, "%s", err4);
+ (void)fprintf(stderr, "%s", err4);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -4532,7 +4532,7 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
@@ -4550,13 +4550,13 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
case 5:
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
break;
@@ -4580,13 +4580,13 @@ createInputDataType(struct Input *in)
break;
default:
- (void)HDfprintf(stderr, "%s", err2);
+ (void)fprintf(stderr, "%s", err2);
return (-1);
}
break;
default:
- (void)HDfprintf(stderr, "%s", err1);
+ (void)fprintf(stderr, "%s", err1);
return (-1);
}
}
@@ -4624,7 +4624,7 @@ process(struct Options *opt)
{
if ((file_id = H5Fopen(opt->outfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) {
if ((file_id = H5Fcreate(opt->outfile, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) == FAIL) {
- (void)HDfprintf(stderr, err1, opt->outfile);
+ (void)fprintf(stderr, err1, opt->outfile);
return (-1);
}
}
@@ -4635,13 +4635,13 @@ process(struct Options *opt)
in = &(opt->infiles[k].in);
if (opt->infiles[k].config == 1) {
if (processConfigurationFile(opt->infiles[k].configfile, in) == -1) {
- (void)HDfprintf(stderr, err2, opt->infiles[k].configfile);
+ (void)fprintf(stderr, err2, opt->infiles[k].configfile);
return (-1);
}
}
if (processDataFile(opt->infiles[k].datafile, in, file_id) == -1) {
- (void)HDfprintf(stderr, err3, opt->infiles[k].datafile);
+ (void)fprintf(stderr, err3, opt->infiles[k].datafile);
return (-1);
}
@@ -4683,7 +4683,7 @@ process(struct Options *opt)
intype = createInputDataType(in);
outtype = createOutputDataType(in);
#ifdef H5DEBUGIMPORT
- HDprintf("process intype %ld outtype %ld\n", intype, outtype);
+ printf("process intype %ld outtype %ld\n", intype, outtype);
#endif
/* create property list */
@@ -4700,8 +4700,8 @@ process(struct Options *opt)
if (in->configOptionVector[EXTERNALSTORE] == 1) {
/* creating the external file if it doesn't exist */
- if ((extfile = HDfopen(in->externFilename, "ab")) == NULL) {
- (void)HDfprintf(stderr, "%s", err4);
+ if ((extfile = fopen(in->externFilename, "ab")) == NULL) {
+ (void)fprintf(stderr, "%s", err4);
H5Pclose(proplist);
H5Sclose(dataspace);
H5Fclose(file_id);
@@ -4724,7 +4724,7 @@ process(struct Options *opt)
/* create data set */
if ((dataset = H5Dcreate2(handle, in->path.group[j], outtype, dataspace, H5P_DEFAULT,
proplist, H5P_DEFAULT)) < 0) {
- (void)HDfprintf(stderr, "%s", err5);
+ (void)fprintf(stderr, "%s", err5);
H5Pclose(proplist);
H5Sclose(dataspace);
H5Fclose(file_id);
@@ -4737,7 +4737,7 @@ process(struct Options *opt)
/* write dataset */
if (H5Dwrite(dataset, intype, H5S_ALL, H5S_ALL, H5P_DEFAULT, (VOIDP)in->data) < 0) {
- (void)HDfprintf(stderr, "%s", err6);
+ (void)fprintf(stderr, "%s", err6);
H5Dclose(dataset);
H5Pclose(proplist);
H5Sclose(dataspace);
@@ -4813,292 +4813,292 @@ swap_uint64(uint64_t val)
void
help(char *name)
{
- (void)HDfprintf(stdout, "Name:\n\n");
- (void)HDfprintf(stdout, "\t%s\n\n", name);
- (void)HDfprintf(stdout, "\t TOOL NAME:\n");
- (void)HDfprintf(stdout, "\t %s\n", name);
- (void)HDfprintf(stdout, "\t SYNTAX:\n");
- (void)HDfprintf(stdout, "\t %s -h[elp], OR\n", name);
- (void)HDfprintf(stdout, "\t %s <infile> -c[onfig] <configfile> [<infile> -c[config] <configfile>...]",
- name);
- (void)HDfprintf(stdout, "\t\t\t\t -o[utfile] <outfile>\n\n");
- (void)HDfprintf(stdout, "\t PURPOSE:\n");
- (void)HDfprintf(stdout, "\t To convert data stored in one or more ASCII or binary files\n");
- (void)HDfprintf(stdout, "\t into one or more datasets (in accordance with the \n");
- (void)HDfprintf(stdout, "\t user-specified type and storage properties) in an existing \n");
- (void)HDfprintf(stdout, "\t or new HDF5 file.\n\n");
- (void)HDfprintf(stdout, "\t DESCRIPTION:\n");
- (void)HDfprintf(stdout, "\t The primary objective of the utility is to convert floating\n");
- (void)HDfprintf(stdout, "\t point or integer data stored in ASCII text or binary form \n");
- (void)HDfprintf(stdout, "\t into a data-set according to the type and storage properties\n");
- (void)HDfprintf(stdout, "\t specified by the user. The utility can also accept ASCII\n");
- (void)HDfprintf(stdout, "\t text files and store the contents in a compact form as an\n");
- (void)HDfprintf(stdout, "\t array of one-dimensional strings.\n\n");
- (void)HDfprintf(stdout, "\t The input data to be written as a data-set can be provided\n");
- (void)HDfprintf(stdout, "\t to the utility in one of the following forms:\n");
- (void)HDfprintf(stdout, "\t 1. ASCII text file with numeric data (floating point or \n");
- (void)HDfprintf(stdout, "\t integer data). \n");
- (void)HDfprintf(stdout, "\t 2. Binary file with native floating point data (32-bit or \n");
- (void)HDfprintf(stdout, "\t 64-bit) \n");
- (void)HDfprintf(stdout, "\t 3. Binary file with native integer (signed or unsigned)\n");
- (void)HDfprintf(stdout, "\t data (8-bit or 16-bit or 32-bit or 64-bit). \n");
- (void)HDfprintf(stdout, "\t 4. ASCII text file containing strings (text data).\n");
- (void)HDfprintf(stdout, "\t \n");
- (void)HDfprintf(stdout, "\t Every input file is associated with a configuration file \n");
- (void)HDfprintf(stdout, "\t also provided as an input to the utility. (See Section \n");
- (void)HDfprintf(stdout, "\t \"CONFIGURATION FILE\" to know how it is to be organized).\n");
- (void)HDfprintf(stdout, "\t The class, size and dimensions of the input data is \n");
- (void)HDfprintf(stdout, "\t specified in this configuration file. A point to note is\n");
- (void)HDfprintf(stdout, "\t that the floating point data in the ASCII text file may be\n");
- (void)HDfprintf(stdout, "\t organized in the fixed floating form (for example 323.56)\n");
- (void)HDfprintf(stdout, "\t or in a scientific notation (for example 3.23E+02). A \n");
- (void)HDfprintf(stdout, "\t different input-class specification is to be used for both\n");
- (void)HDfprintf(stdout, "\t forms.\n\n");
- (void)HDfprintf(stdout, "\t The utility extracts the input data from the input file \n");
- (void)HDfprintf(stdout, "\t according to the specified parameters and saves it into \n");
- (void)HDfprintf(stdout, "\t an H5 dataset. \n\n");
- (void)HDfprintf(stdout, "\t The user can specify output type and storage properties in \n");
- (void)HDfprintf(stdout, "\t the configuration file. The user is required to specify the \n");
- (void)HDfprintf(stdout, "\t path of the dataset. If the groups in the path leading to \n");
- (void)HDfprintf(stdout, "\t the data-set do not exist, the groups will be created by the\n");
- (void)HDfprintf(stdout, "\t utility. If no group is specified, the dataset will be\n");
- (void)HDfprintf(stdout, "\t created under the root group.\n\n");
- (void)HDfprintf(stdout, "\t In addition to the name, the user is also required to \n");
- (void)HDfprintf(stdout, "\t provide the class and size of output data to be written to \n");
- (void)HDfprintf(stdout, "\t the dataset and may optionally specify the output-architecture,\n");
- (void)HDfprintf(stdout, "\t and the output-byte-order. If output-architecture is not \n");
- (void)HDfprintf(stdout, "\t specified the default is NATIVE. Output-byte-orders are fixed\n");
- (void)HDfprintf(stdout, "\t for some architectures and may be specified only if output-\n");
- (void)HDfprintf(stdout, "\t architecture is IEEE, UNIX or STD.\n\n");
- (void)HDfprintf(stdout, "\t Also, layout and other storage properties such as \n");
- (void)HDfprintf(stdout, "\t compression, external storage and extendible data-sets may be\n");
- (void)HDfprintf(stdout, "\t optionally specified. The layout and storage properties \n");
- (void)HDfprintf(stdout, "\t denote how raw data is to be organized on the disk. If these \n");
- (void)HDfprintf(stdout, "\t options are not specified the default is Contiguous layout \n");
- (void)HDfprintf(stdout, "\t and storage.\n\n");
- (void)HDfprintf(stdout, "\t The dataset can be organized in any of the following ways:\n");
- (void)HDfprintf(stdout, "\t 1. Contiguous.\n");
- (void)HDfprintf(stdout, "\t 2. Chunked.\n");
- (void)HDfprintf(stdout, "\t 3. External Storage File (has to be contiguous)\n");
- (void)HDfprintf(stdout, "\t 4. Extendible data sets (has to be chunked)\n");
- (void)HDfprintf(stdout, "\t 5. Compressed. (has to be chunked)\n");
- (void)HDfprintf(stdout, "\t 6. Compressed & Extendible (has to be chunked)\n\n");
- (void)HDfprintf(stdout, "\t If the user wants to store raw data in a non-HDF file then \n");
- (void)HDfprintf(stdout, "\t the external storage file option is to be used and the name \n");
- (void)HDfprintf(stdout, "\t of the file is to be specified. \n\n");
- (void)HDfprintf(stdout, "\t If the user wants the dimensions of the data-set to be\n");
- (void)HDfprintf(stdout, "\t unlimited, the extendible data set option can be chosen. \n\n");
- (void)HDfprintf(stdout, "\t The user may also specify the type of compression and the \n");
- (void)HDfprintf(stdout, "\t level to which the data set must be compresses by setting \n");
- (void)HDfprintf(stdout, "\t the compressed option.\n\n");
- (void)HDfprintf(stdout, "\t SYNOPSIS:\n");
- (void)HDfprintf(stdout, "\t h5import -h[elp], OR\n");
- (void)HDfprintf(stdout, "\t h5import <infile> -c[onfig] <configfile> \
+ (void)fprintf(stdout, "Name:\n\n");
+ (void)fprintf(stdout, "\t%s\n\n", name);
+ (void)fprintf(stdout, "\t TOOL NAME:\n");
+ (void)fprintf(stdout, "\t %s\n", name);
+ (void)fprintf(stdout, "\t SYNTAX:\n");
+ (void)fprintf(stdout, "\t %s -h[elp], OR\n", name);
+ (void)fprintf(stdout, "\t %s <infile> -c[onfig] <configfile> [<infile> -c[config] <configfile>...]",
+ name);
+ (void)fprintf(stdout, "\t\t\t\t -o[utfile] <outfile>\n\n");
+ (void)fprintf(stdout, "\t PURPOSE:\n");
+ (void)fprintf(stdout, "\t To convert data stored in one or more ASCII or binary files\n");
+ (void)fprintf(stdout, "\t into one or more datasets (in accordance with the \n");
+ (void)fprintf(stdout, "\t user-specified type and storage properties) in an existing \n");
+ (void)fprintf(stdout, "\t or new HDF5 file.\n\n");
+ (void)fprintf(stdout, "\t DESCRIPTION:\n");
+ (void)fprintf(stdout, "\t The primary objective of the utility is to convert floating\n");
+ (void)fprintf(stdout, "\t point or integer data stored in ASCII text or binary form \n");
+ (void)fprintf(stdout, "\t into a data-set according to the type and storage properties\n");
+ (void)fprintf(stdout, "\t specified by the user. The utility can also accept ASCII\n");
+ (void)fprintf(stdout, "\t text files and store the contents in a compact form as an\n");
+ (void)fprintf(stdout, "\t array of one-dimensional strings.\n\n");
+ (void)fprintf(stdout, "\t The input data to be written as a data-set can be provided\n");
+ (void)fprintf(stdout, "\t to the utility in one of the following forms:\n");
+ (void)fprintf(stdout, "\t 1. ASCII text file with numeric data (floating point or \n");
+ (void)fprintf(stdout, "\t integer data). \n");
+ (void)fprintf(stdout, "\t 2. Binary file with native floating point data (32-bit or \n");
+ (void)fprintf(stdout, "\t 64-bit) \n");
+ (void)fprintf(stdout, "\t 3. Binary file with native integer (signed or unsigned)\n");
+ (void)fprintf(stdout, "\t data (8-bit or 16-bit or 32-bit or 64-bit). \n");
+ (void)fprintf(stdout, "\t 4. ASCII text file containing strings (text data).\n");
+ (void)fprintf(stdout, "\t \n");
+ (void)fprintf(stdout, "\t Every input file is associated with a configuration file \n");
+ (void)fprintf(stdout, "\t also provided as an input to the utility. (See Section \n");
+ (void)fprintf(stdout, "\t \"CONFIGURATION FILE\" to know how it is to be organized).\n");
+ (void)fprintf(stdout, "\t The class, size and dimensions of the input data is \n");
+ (void)fprintf(stdout, "\t specified in this configuration file. A point to note is\n");
+ (void)fprintf(stdout, "\t that the floating point data in the ASCII text file may be\n");
+ (void)fprintf(stdout, "\t organized in the fixed floating form (for example 323.56)\n");
+ (void)fprintf(stdout, "\t or in a scientific notation (for example 3.23E+02). A \n");
+ (void)fprintf(stdout, "\t different input-class specification is to be used for both\n");
+ (void)fprintf(stdout, "\t forms.\n\n");
+ (void)fprintf(stdout, "\t The utility extracts the input data from the input file \n");
+ (void)fprintf(stdout, "\t according to the specified parameters and saves it into \n");
+ (void)fprintf(stdout, "\t an H5 dataset. \n\n");
+ (void)fprintf(stdout, "\t The user can specify output type and storage properties in \n");
+ (void)fprintf(stdout, "\t the configuration file. The user is required to specify the \n");
+ (void)fprintf(stdout, "\t path of the dataset. If the groups in the path leading to \n");
+ (void)fprintf(stdout, "\t the data-set do not exist, the groups will be created by the\n");
+ (void)fprintf(stdout, "\t utility. If no group is specified, the dataset will be\n");
+ (void)fprintf(stdout, "\t created under the root group.\n\n");
+ (void)fprintf(stdout, "\t In addition to the name, the user is also required to \n");
+ (void)fprintf(stdout, "\t provide the class and size of output data to be written to \n");
+ (void)fprintf(stdout, "\t the dataset and may optionally specify the output-architecture,\n");
+ (void)fprintf(stdout, "\t and the output-byte-order. If output-architecture is not \n");
+ (void)fprintf(stdout, "\t specified the default is NATIVE. Output-byte-orders are fixed\n");
+ (void)fprintf(stdout, "\t for some architectures and may be specified only if output-\n");
+ (void)fprintf(stdout, "\t architecture is IEEE, UNIX or STD.\n\n");
+ (void)fprintf(stdout, "\t Also, layout and other storage properties such as \n");
+ (void)fprintf(stdout, "\t compression, external storage and extendible data-sets may be\n");
+ (void)fprintf(stdout, "\t optionally specified. The layout and storage properties \n");
+ (void)fprintf(stdout, "\t denote how raw data is to be organized on the disk. If these \n");
+ (void)fprintf(stdout, "\t options are not specified the default is Contiguous layout \n");
+ (void)fprintf(stdout, "\t and storage.\n\n");
+ (void)fprintf(stdout, "\t The dataset can be organized in any of the following ways:\n");
+ (void)fprintf(stdout, "\t 1. Contiguous.\n");
+ (void)fprintf(stdout, "\t 2. Chunked.\n");
+ (void)fprintf(stdout, "\t 3. External Storage File (has to be contiguous)\n");
+ (void)fprintf(stdout, "\t 4. Extendible data sets (has to be chunked)\n");
+ (void)fprintf(stdout, "\t 5. Compressed. (has to be chunked)\n");
+ (void)fprintf(stdout, "\t 6. Compressed & Extendible (has to be chunked)\n\n");
+ (void)fprintf(stdout, "\t If the user wants to store raw data in a non-HDF file then \n");
+ (void)fprintf(stdout, "\t the external storage file option is to be used and the name \n");
+ (void)fprintf(stdout, "\t of the file is to be specified. \n\n");
+ (void)fprintf(stdout, "\t If the user wants the dimensions of the data-set to be\n");
+ (void)fprintf(stdout, "\t unlimited, the extendible data set option can be chosen. \n\n");
+ (void)fprintf(stdout, "\t The user may also specify the type of compression and the \n");
+ (void)fprintf(stdout, "\t level to which the data set must be compresses by setting \n");
+ (void)fprintf(stdout, "\t the compressed option.\n\n");
+ (void)fprintf(stdout, "\t SYNOPSIS:\n");
+ (void)fprintf(stdout, "\t h5import -h[elp], OR\n");
+ (void)fprintf(stdout, "\t h5import <infile> -c[onfig] <configfile> \
[<infile> -c[config] <confile2>...] -o[utfile] <outfile>\n\n");
- (void)HDfprintf(stdout, "\t -h[elp]:\n");
- (void)HDfprintf(stdout, "\t Prints this summary of usage, and exits.\n\n");
- (void)HDfprintf(stdout, "\t <infile(s)>:\n");
- (void)HDfprintf(stdout, "\t Name of the Input file(s), containing a \n");
- (void)HDfprintf(stdout, "\t single n-dimensional floating point or integer array \n");
- (void)HDfprintf(stdout, "\t in either ASCII text, native floating point(32-bit \n");
- (void)HDfprintf(stdout, "\t or 64-bit) or native integer(8-bit or 16-bit or \n");
- (void)HDfprintf(stdout, "\t 32-bit or 64-bit). Data to be specified in the order\n");
- (void)HDfprintf(stdout, "\t of fastest changing dimensions first.\n\n");
- (void)HDfprintf(stdout, "\t -c[config] <configfile>:\n");
- (void)HDfprintf(stdout, "\t Every input file should be associated with a \n");
- (void)HDfprintf(stdout, "\t configuration file and this is done by the -c option.\n");
- (void)HDfprintf(stdout, "\t <configfile> is the name of the configuration file.\n");
- (void)HDfprintf(stdout, "\t (See Section \"CONFIGURATION FILE\")\n\n");
- (void)HDfprintf(stdout, "\t -o[utfile] <outfile>:\n");
- (void)HDfprintf(stdout, "\t Name of the HDF5 output file. Data from one or more \n");
- (void)HDfprintf(stdout, "\t input files are stored as one or more data sets in \n");
- (void)HDfprintf(stdout, "\t <outfile>. The output file may be an existing file or \n");
- (void)HDfprintf(stdout, "\t it maybe new in which case it will be created.\n\n\n");
- (void)HDfprintf(stdout, "\t CONFIGURATION FILE:\n");
- (void)HDfprintf(stdout, "\t The configuration file is an ASCII text file and must be \n");
- (void)HDfprintf(stdout, "\t the ddl formatted file (without data values) produced by h5dump \n");
- (void)HDfprintf(stdout, "\t when used with the options '-o outfilename -b' of a single dataset (-d) \n");
- (void)HDfprintf(stdout, "\t OR organized as \"CONFIG-KEYWORD VALUE\" pairs, one pair on each \n");
- (void)HDfprintf(stdout, "\t line.\n\n");
- (void)HDfprintf(stdout, "\t The configuration file may have the following keywords each \n");
- (void)HDfprintf(stdout, "\t followed by an acceptable value.\n\n");
- (void)HDfprintf(stdout, "\t Required KEYWORDS:\n");
- (void)HDfprintf(stdout, "\t PATH\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS\n");
- (void)HDfprintf(stdout, "\t INPUT-SIZE\n");
- (void)HDfprintf(stdout, "\t INPUT-BYTE-ORDER\n");
- (void)HDfprintf(stdout, "\t RANK\n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES\n");
- (void)HDfprintf(stdout, "\t OUTPUT-CLASS\n");
- (void)HDfprintf(stdout, "\t OUTPUT-SIZE\n\n");
- (void)HDfprintf(stdout, "\t Optional KEYWORDS:\n");
- (void)HDfprintf(stdout, "\t OUTPUT-ARCHITECTURE\n");
- (void)HDfprintf(stdout, "\t OUTPUT-BYTE-ORDER\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-TYPE\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-PARAM\n");
- (void)HDfprintf(stdout, "\t EXTERNAL-STORAGE\n");
- (void)HDfprintf(stdout, "\t MAXIMUM-DIMENSIONS\n\n\n");
- (void)HDfprintf(stdout, "\t Values for keywords:\n");
- (void)HDfprintf(stdout, "\t PATH:\n");
- (void)HDfprintf(stdout, "\t Strings separated by spaces to represent\n");
- (void)HDfprintf(stdout, "\t the path of the data-set. If the groups in\n");
- (void)HDfprintf(stdout, "\t the path do not exist, they will be created. \n");
- (void)HDfprintf(stdout, "\t For example,\n");
- (void)HDfprintf(stdout, "\t PATH grp1/grp2/dataset1\n");
- (void)HDfprintf(stdout, "\t PATH: keyword\n");
- (void)HDfprintf(stdout, "\t grp1: group under the root. If\n");
- (void)HDfprintf(stdout, "\t non-existent will be created.\n");
- (void)HDfprintf(stdout, "\t grp2: group under grp1. If \n");
- (void)HDfprintf(stdout, "\t non-existent will be created \n");
- (void)HDfprintf(stdout, "\t under grp1.\n");
- (void)HDfprintf(stdout, "\t dataset1: the name of the data-set \n");
- (void)HDfprintf(stdout, "\t to be created.\n\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS:\n");
- (void)HDfprintf(stdout, "\t String denoting the type of input data.\n");
- (void)HDfprintf(stdout, "\t (\"TEXTIN\", \"TEXTFP\", \"FP\", \"IN\", \n");
- (void)HDfprintf(stdout, "\t \"STR\", \"TEXTUIN\", \"UIN\"). \n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n");
- (void)HDfprintf(stdout, "\t file with signed integer data in ASCII form,\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS \"TEXTUIN\" denotes an ASCII text \n");
- (void)HDfprintf(stdout, "\t file with unsigned integer data in ASCII form,\n");
- (void)HDfprintf(stdout, "\t \"TEXTFP\" denotes an ASCII text file containing\n");
- (void)HDfprintf(stdout, "\t floating point data in the fixed notation\n");
- (void)HDfprintf(stdout, "\t (325.34),\n");
- (void)HDfprintf(stdout, "\t \"FP\" denotes a floating point binary file,\n");
- (void)HDfprintf(stdout, "\t \"IN\" denotes a signed integer binary file,\n");
- (void)HDfprintf(stdout, "\t \"UIN\" denotes an unsigned integer binary file,\n");
- (void)HDfprintf(stdout, "\t & \"STR\" denotes an ASCII text file the \n");
- (void)HDfprintf(stdout, "\t contents of which should be stored as an 1-D \n");
- (void)HDfprintf(stdout, "\t array of strings.\n");
- (void)HDfprintf(stdout, "\t If INPUT-CLASS is \"STR\", then RANK, \n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES, OUTPUT-CLASS, OUTPUT-SIZE, \n");
- (void)HDfprintf(stdout, "\t OUTPUT-ARCHITECTURE and OUTPUT-BYTE-ORDER \n");
- (void)HDfprintf(stdout, "\t will be ignored.\n\n\n");
- (void)HDfprintf(stdout, "\t INPUT-SIZE:\n");
- (void)HDfprintf(stdout, "\t Integer denoting the size of the input data \n");
- (void)HDfprintf(stdout, "\t (8, 16, 32, 64). \n\n");
- (void)HDfprintf(stdout, "\t For floating point,\n");
- (void)HDfprintf(stdout, "\t INPUT-SIZE can be 32 or 64.\n");
- (void)HDfprintf(stdout, "\t For integers (signed and unsigned)\n");
- (void)HDfprintf(stdout, "\t INPUT-SIZE can be 8, 16, 32 or 64.\n\n");
- (void)HDfprintf(stdout, "\t RANK:\n");
- (void)HDfprintf(stdout, "\t Integer denoting the number of dimensions.\n\n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES:\n");
- (void)HDfprintf(stdout, "\t Integers separated by spaces to denote the \n");
- (void)HDfprintf(stdout, "\t dimension sizes for the no. of dimensions \n");
- (void)HDfprintf(stdout, "\t determined by rank.\n\n");
- (void)HDfprintf(stdout, "\t OUTPUT-CLASS:\n");
- (void)HDfprintf(stdout, "\t String dentoting data type of the dataset to \n");
- (void)HDfprintf(stdout, "\t be written (\"IN\",\"FP\", \"UIN\")\n\n");
- (void)HDfprintf(stdout, "\t OUTPUT-SIZE:\n");
- (void)HDfprintf(stdout, "\t Integer denoting the size of the data in the \n");
- (void)HDfprintf(stdout, "\t output dataset to be written.\n");
- (void)HDfprintf(stdout, "\t If OUTPUT-CLASS is \"FP\", OUTPUT-SIZE can be \n");
- (void)HDfprintf(stdout, "\t 32 or 64.\n");
- (void)HDfprintf(stdout, "\t If OUTPUT-CLASS is \"IN\" or \"UIN\", OUTPUT-SIZE\n");
- (void)HDfprintf(stdout, "\t can be 8, 16, 32 or 64.\n\n");
- (void)HDfprintf(stdout, "\t OUTPUT-ARCHITECTURE:\n");
- (void)HDfprintf(stdout, "\t STRING denoting the type of output \n");
- (void)HDfprintf(stdout, "\t architecture. Can accept the following values\n");
- (void)HDfprintf(stdout, "\t STD\n");
- (void)HDfprintf(stdout, "\t IEEE\n");
- (void)HDfprintf(stdout, "\t INTEL\n");
- (void)HDfprintf(stdout, "\t CRAY\n");
- (void)HDfprintf(stdout, "\t MIPS\n");
- (void)HDfprintf(stdout, "\t ALPHA\n");
- (void)HDfprintf(stdout, "\t NATIVE (default)\n");
- (void)HDfprintf(stdout, "\t UNIX\n\n");
- (void)HDfprintf(stdout, "\t OUTPUT-BYTE-ORDER:\n");
- (void)HDfprintf(stdout, "\t String denoting the output-byte-order. Ignored\n");
- (void)HDfprintf(stdout, "\t if the OUTPUT-ARCHITECTURE is not specified or\n");
- (void)HDfprintf(stdout, "\t if it is IEEE, UNIX or STD. Can accept the \n");
- (void)HDfprintf(stdout, "\t following values.\n");
- (void)HDfprintf(stdout, "\t BE (default)\n");
- (void)HDfprintf(stdout, "\t LE\n\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES:\n");
- (void)HDfprintf(stdout, "\t Integers separated by spaces to denote the \n");
- (void)HDfprintf(stdout, "\t dimension sizes of the chunk for the no. of \n");
- (void)HDfprintf(stdout, "\t dimensions determined by rank. Required field\n");
- (void)HDfprintf(stdout, "\t to denote that the dataset will be stored with\n");
- (void)HDfprintf(stdout, "\t chunked storage. If this field is absent the\n");
- (void)HDfprintf(stdout, "\t dataset will be stored with contiguous storage.\n\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-TYPE:\n");
- (void)HDfprintf(stdout, "\t String denoting the type of compression to be\n");
- (void)HDfprintf(stdout, "\t used with the chunked storage. Requires the\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. The only \n");
- (void)HDfprintf(stdout, "\t currently supported compression method is GZIP. \n");
- (void)HDfprintf(stdout, "\t Will accept the following value\n");
- (void)HDfprintf(stdout, "\t GZIP\n\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-PARAM:\n");
- (void)HDfprintf(stdout, "\t Integer used to denote compression level and \n");
- (void)HDfprintf(stdout, "\t this option is to be always specified when \n");
- (void)HDfprintf(stdout, "\t the COMPRESSION-TYPE option is specified. The\n");
- (void)HDfprintf(stdout, "\t values are applicable only to GZIP \n");
- (void)HDfprintf(stdout, "\t compression.\n");
- (void)HDfprintf(stdout, "\t Value 1-9: The level of Compression. \n");
- (void)HDfprintf(stdout, "\t 1 will result in the fastest \n");
- (void)HDfprintf(stdout, "\t compression while 9 will result in \n");
- (void)HDfprintf(stdout, "\t the best compression ratio. The default\n");
- (void)HDfprintf(stdout, "\t level of compression is 6.\n\n");
- (void)HDfprintf(stdout, "\t EXTERNAL-STORAGE:\n");
- (void)HDfprintf(stdout, "\t String to denote the name of the non-HDF5 file \n");
- (void)HDfprintf(stdout, "\t to store data to. Cannot be used if CHUNKED-\n");
- (void)HDfprintf(stdout, "\t DIMENSIONS or COMPRESSION-TYPE or EXTENDIBLE-\n");
- (void)HDfprintf(stdout, "\t DATASET is specified.\n");
- (void)HDfprintf(stdout, "\t Value <external-filename>: the name of the \n");
- (void)HDfprintf(stdout, "\t external file as a string to be used.\n\n");
- (void)HDfprintf(stdout, "\t MAXIMUM-DIMENSIONS:\n");
- (void)HDfprintf(stdout, "\t Integers separated by spaces to denote the \n");
- (void)HDfprintf(stdout, "\t maximum dimension sizes of all the \n");
- (void)HDfprintf(stdout, "\t dimensions determined by rank. Requires the\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. A value of \n");
- (void)HDfprintf(stdout, "\t -1 for any dimension implies UNLIMITED \n");
- (void)HDfprintf(stdout, "\t DIMENSION size for that particular dimension.\n\n");
- (void)HDfprintf(stdout, "\t EXAMPLES:\n");
- (void)HDfprintf(stdout, "\t 1. Configuration File may look like:\n\n");
- (void)HDfprintf(stdout, "\t PATH work h5 pkamat First-set\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS TEXTFP\n");
- (void)HDfprintf(stdout, "\t RANK 3\n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES 5 2 4\n");
- (void)HDfprintf(stdout, "\t OUTPUT-CLASS FP\n");
- (void)HDfprintf(stdout, "\t OUTPUT-SIZE 64\n");
- (void)HDfprintf(stdout, "\t OUTPUT-ARCHITECTURE IEEE\n");
- (void)HDfprintf(stdout, "\t OUTPUT-BYTE-ORDER LE\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 \n\n");
- (void)HDfprintf(stdout, "\t The above configuration will accept a floating point array \n");
- (void)HDfprintf(stdout, "\t (5 x 2 x 4) in an ASCII file with the rank and dimension sizes \n");
- (void)HDfprintf(stdout, "\t specified and will save it in a chunked data-set (of pattern \n");
- (void)HDfprintf(stdout, "\t 2 X 2 X 2) of 64-bit floating point in the little-endian order \n");
- (void)HDfprintf(stdout, "\t and IEEE architecture. The dataset will be stored at\n");
- (void)HDfprintf(stdout, "\t \"/work/h5/pkamat/First-set\"\n\n");
- (void)HDfprintf(stdout, "\t 2. Another configuration could be:\n\n");
- (void)HDfprintf(stdout, "\t PATH Second-set\n");
- (void)HDfprintf(stdout, "\t INPUT-CLASS IN \n");
- (void)HDfprintf(stdout, "\t RANK 5\n");
- (void)HDfprintf(stdout, "\t DIMENSION-SIZES 6 3 5 2 4\n");
- (void)HDfprintf(stdout, "\t OUTPUT-CLASS IN\n");
- (void)HDfprintf(stdout, "\t OUTPUT-SIZE 32\n");
- (void)HDfprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 2 2\n");
- (void)HDfprintf(stdout, "\t EXTENDIBLE-DATASET 1 3 \n");
- (void)HDfprintf(stdout, "\t COMPRESSION-TYPE GZIP\n");
- (void)HDfprintf(stdout, "\t COMPRESSION-PARAM 7\n\n\n");
- (void)HDfprintf(stdout, "\t The above configuration will accept an integer array \n");
- (void)HDfprintf(stdout, "\t (6 X 3 X 5 x 2 x 4) in a binary file with the rank and \n");
- (void)HDfprintf(stdout, "\t dimension sizes specified and will save it in a chunked data-set\n");
- (void)HDfprintf(stdout, "\t (of pattern 2 X 2 X 2 X 2 X 2) of 32-bit floating point in \n");
- (void)HDfprintf(stdout, "\t native format (as output-architecture is not specified). The \n");
- (void)HDfprintf(stdout, "\t first and the third dimension will be defined as unlimited. The \n");
- (void)HDfprintf(stdout, "\t data-set will be compressed using GZIP and a compression level \n");
- (void)HDfprintf(stdout, "\t of 7.\n");
- (void)HDfprintf(stdout, "\t The dataset will be stored at \"/Second-set\"\n\n");
+ (void)fprintf(stdout, "\t -h[elp]:\n");
+ (void)fprintf(stdout, "\t Prints this summary of usage, and exits.\n\n");
+ (void)fprintf(stdout, "\t <infile(s)>:\n");
+ (void)fprintf(stdout, "\t Name of the Input file(s), containing a \n");
+ (void)fprintf(stdout, "\t single n-dimensional floating point or integer array \n");
+ (void)fprintf(stdout, "\t in either ASCII text, native floating point(32-bit \n");
+ (void)fprintf(stdout, "\t or 64-bit) or native integer(8-bit or 16-bit or \n");
+ (void)fprintf(stdout, "\t 32-bit or 64-bit). Data to be specified in the order\n");
+ (void)fprintf(stdout, "\t of fastest changing dimensions first.\n\n");
+ (void)fprintf(stdout, "\t -c[config] <configfile>:\n");
+ (void)fprintf(stdout, "\t Every input file should be associated with a \n");
+ (void)fprintf(stdout, "\t configuration file and this is done by the -c option.\n");
+ (void)fprintf(stdout, "\t <configfile> is the name of the configuration file.\n");
+ (void)fprintf(stdout, "\t (See Section \"CONFIGURATION FILE\")\n\n");
+ (void)fprintf(stdout, "\t -o[utfile] <outfile>:\n");
+ (void)fprintf(stdout, "\t Name of the HDF5 output file. Data from one or more \n");
+ (void)fprintf(stdout, "\t input files are stored as one or more data sets in \n");
+ (void)fprintf(stdout, "\t <outfile>. The output file may be an existing file or \n");
+ (void)fprintf(stdout, "\t it maybe new in which case it will be created.\n\n\n");
+ (void)fprintf(stdout, "\t CONFIGURATION FILE:\n");
+ (void)fprintf(stdout, "\t The configuration file is an ASCII text file and must be \n");
+ (void)fprintf(stdout, "\t the ddl formatted file (without data values) produced by h5dump \n");
+ (void)fprintf(stdout, "\t when used with the options '-o outfilename -b' of a single dataset (-d) \n");
+ (void)fprintf(stdout, "\t OR organized as \"CONFIG-KEYWORD VALUE\" pairs, one pair on each \n");
+ (void)fprintf(stdout, "\t line.\n\n");
+ (void)fprintf(stdout, "\t The configuration file may have the following keywords each \n");
+ (void)fprintf(stdout, "\t followed by an acceptable value.\n\n");
+ (void)fprintf(stdout, "\t Required KEYWORDS:\n");
+ (void)fprintf(stdout, "\t PATH\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS\n");
+ (void)fprintf(stdout, "\t INPUT-SIZE\n");
+ (void)fprintf(stdout, "\t INPUT-BYTE-ORDER\n");
+ (void)fprintf(stdout, "\t RANK\n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES\n");
+ (void)fprintf(stdout, "\t OUTPUT-CLASS\n");
+ (void)fprintf(stdout, "\t OUTPUT-SIZE\n\n");
+ (void)fprintf(stdout, "\t Optional KEYWORDS:\n");
+ (void)fprintf(stdout, "\t OUTPUT-ARCHITECTURE\n");
+ (void)fprintf(stdout, "\t OUTPUT-BYTE-ORDER\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES\n");
+ (void)fprintf(stdout, "\t COMPRESSION-TYPE\n");
+ (void)fprintf(stdout, "\t COMPRESSION-PARAM\n");
+ (void)fprintf(stdout, "\t EXTERNAL-STORAGE\n");
+ (void)fprintf(stdout, "\t MAXIMUM-DIMENSIONS\n\n\n");
+ (void)fprintf(stdout, "\t Values for keywords:\n");
+ (void)fprintf(stdout, "\t PATH:\n");
+ (void)fprintf(stdout, "\t Strings separated by spaces to represent\n");
+ (void)fprintf(stdout, "\t the path of the data-set. If the groups in\n");
+ (void)fprintf(stdout, "\t the path do not exist, they will be created. \n");
+ (void)fprintf(stdout, "\t For example,\n");
+ (void)fprintf(stdout, "\t PATH grp1/grp2/dataset1\n");
+ (void)fprintf(stdout, "\t PATH: keyword\n");
+ (void)fprintf(stdout, "\t grp1: group under the root. If\n");
+ (void)fprintf(stdout, "\t non-existent will be created.\n");
+ (void)fprintf(stdout, "\t grp2: group under grp1. If \n");
+ (void)fprintf(stdout, "\t non-existent will be created \n");
+ (void)fprintf(stdout, "\t under grp1.\n");
+ (void)fprintf(stdout, "\t dataset1: the name of the data-set \n");
+ (void)fprintf(stdout, "\t to be created.\n\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS:\n");
+ (void)fprintf(stdout, "\t String denoting the type of input data.\n");
+ (void)fprintf(stdout, "\t (\"TEXTIN\", \"TEXTFP\", \"FP\", \"IN\", \n");
+ (void)fprintf(stdout, "\t \"STR\", \"TEXTUIN\", \"UIN\"). \n");
+ (void)fprintf(stdout, "\t INPUT-CLASS \"TEXTIN\" denotes an ASCII text \n");
+ (void)fprintf(stdout, "\t file with signed integer data in ASCII form,\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS \"TEXTUIN\" denotes an ASCII text \n");
+ (void)fprintf(stdout, "\t file with unsigned integer data in ASCII form,\n");
+ (void)fprintf(stdout, "\t \"TEXTFP\" denotes an ASCII text file containing\n");
+ (void)fprintf(stdout, "\t floating point data in the fixed notation\n");
+ (void)fprintf(stdout, "\t (325.34),\n");
+ (void)fprintf(stdout, "\t \"FP\" denotes a floating point binary file,\n");
+ (void)fprintf(stdout, "\t \"IN\" denotes a signed integer binary file,\n");
+ (void)fprintf(stdout, "\t \"UIN\" denotes an unsigned integer binary file,\n");
+ (void)fprintf(stdout, "\t & \"STR\" denotes an ASCII text file the \n");
+ (void)fprintf(stdout, "\t contents of which should be stored as an 1-D \n");
+ (void)fprintf(stdout, "\t array of strings.\n");
+ (void)fprintf(stdout, "\t If INPUT-CLASS is \"STR\", then RANK, \n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES, OUTPUT-CLASS, OUTPUT-SIZE, \n");
+ (void)fprintf(stdout, "\t OUTPUT-ARCHITECTURE and OUTPUT-BYTE-ORDER \n");
+ (void)fprintf(stdout, "\t will be ignored.\n\n\n");
+ (void)fprintf(stdout, "\t INPUT-SIZE:\n");
+ (void)fprintf(stdout, "\t Integer denoting the size of the input data \n");
+ (void)fprintf(stdout, "\t (8, 16, 32, 64). \n\n");
+ (void)fprintf(stdout, "\t For floating point,\n");
+ (void)fprintf(stdout, "\t INPUT-SIZE can be 32 or 64.\n");
+ (void)fprintf(stdout, "\t For integers (signed and unsigned)\n");
+ (void)fprintf(stdout, "\t INPUT-SIZE can be 8, 16, 32 or 64.\n\n");
+ (void)fprintf(stdout, "\t RANK:\n");
+ (void)fprintf(stdout, "\t Integer denoting the number of dimensions.\n\n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES:\n");
+ (void)fprintf(stdout, "\t Integers separated by spaces to denote the \n");
+ (void)fprintf(stdout, "\t dimension sizes for the no. of dimensions \n");
+ (void)fprintf(stdout, "\t determined by rank.\n\n");
+ (void)fprintf(stdout, "\t OUTPUT-CLASS:\n");
+ (void)fprintf(stdout, "\t String dentoting data type of the dataset to \n");
+ (void)fprintf(stdout, "\t be written (\"IN\",\"FP\", \"UIN\")\n\n");
+ (void)fprintf(stdout, "\t OUTPUT-SIZE:\n");
+ (void)fprintf(stdout, "\t Integer denoting the size of the data in the \n");
+ (void)fprintf(stdout, "\t output dataset to be written.\n");
+ (void)fprintf(stdout, "\t If OUTPUT-CLASS is \"FP\", OUTPUT-SIZE can be \n");
+ (void)fprintf(stdout, "\t 32 or 64.\n");
+ (void)fprintf(stdout, "\t If OUTPUT-CLASS is \"IN\" or \"UIN\", OUTPUT-SIZE\n");
+ (void)fprintf(stdout, "\t can be 8, 16, 32 or 64.\n\n");
+ (void)fprintf(stdout, "\t OUTPUT-ARCHITECTURE:\n");
+ (void)fprintf(stdout, "\t STRING denoting the type of output \n");
+ (void)fprintf(stdout, "\t architecture. Can accept the following values\n");
+ (void)fprintf(stdout, "\t STD\n");
+ (void)fprintf(stdout, "\t IEEE\n");
+ (void)fprintf(stdout, "\t INTEL\n");
+ (void)fprintf(stdout, "\t CRAY\n");
+ (void)fprintf(stdout, "\t MIPS\n");
+ (void)fprintf(stdout, "\t ALPHA\n");
+ (void)fprintf(stdout, "\t NATIVE (default)\n");
+ (void)fprintf(stdout, "\t UNIX\n\n");
+ (void)fprintf(stdout, "\t OUTPUT-BYTE-ORDER:\n");
+ (void)fprintf(stdout, "\t String denoting the output-byte-order. Ignored\n");
+ (void)fprintf(stdout, "\t if the OUTPUT-ARCHITECTURE is not specified or\n");
+ (void)fprintf(stdout, "\t if it is IEEE, UNIX or STD. Can accept the \n");
+ (void)fprintf(stdout, "\t following values.\n");
+ (void)fprintf(stdout, "\t BE (default)\n");
+ (void)fprintf(stdout, "\t LE\n\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES:\n");
+ (void)fprintf(stdout, "\t Integers separated by spaces to denote the \n");
+ (void)fprintf(stdout, "\t dimension sizes of the chunk for the no. of \n");
+ (void)fprintf(stdout, "\t dimensions determined by rank. Required field\n");
+ (void)fprintf(stdout, "\t to denote that the dataset will be stored with\n");
+ (void)fprintf(stdout, "\t chunked storage. If this field is absent the\n");
+ (void)fprintf(stdout, "\t dataset will be stored with contiguous storage.\n\n");
+ (void)fprintf(stdout, "\t COMPRESSION-TYPE:\n");
+ (void)fprintf(stdout, "\t String denoting the type of compression to be\n");
+ (void)fprintf(stdout, "\t used with the chunked storage. Requires the\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. The only \n");
+ (void)fprintf(stdout, "\t currently supported compression method is GZIP. \n");
+ (void)fprintf(stdout, "\t Will accept the following value\n");
+ (void)fprintf(stdout, "\t GZIP\n\n");
+ (void)fprintf(stdout, "\t COMPRESSION-PARAM:\n");
+ (void)fprintf(stdout, "\t Integer used to denote compression level and \n");
+ (void)fprintf(stdout, "\t this option is to be always specified when \n");
+ (void)fprintf(stdout, "\t the COMPRESSION-TYPE option is specified. The\n");
+ (void)fprintf(stdout, "\t values are applicable only to GZIP \n");
+ (void)fprintf(stdout, "\t compression.\n");
+ (void)fprintf(stdout, "\t Value 1-9: The level of Compression. \n");
+ (void)fprintf(stdout, "\t 1 will result in the fastest \n");
+ (void)fprintf(stdout, "\t compression while 9 will result in \n");
+ (void)fprintf(stdout, "\t the best compression ratio. The default\n");
+ (void)fprintf(stdout, "\t level of compression is 6.\n\n");
+ (void)fprintf(stdout, "\t EXTERNAL-STORAGE:\n");
+ (void)fprintf(stdout, "\t String to denote the name of the non-HDF5 file \n");
+ (void)fprintf(stdout, "\t to store data to. Cannot be used if CHUNKED-\n");
+ (void)fprintf(stdout, "\t DIMENSIONS or COMPRESSION-TYPE or EXTENDIBLE-\n");
+ (void)fprintf(stdout, "\t DATASET is specified.\n");
+ (void)fprintf(stdout, "\t Value <external-filename>: the name of the \n");
+ (void)fprintf(stdout, "\t external file as a string to be used.\n\n");
+ (void)fprintf(stdout, "\t MAXIMUM-DIMENSIONS:\n");
+ (void)fprintf(stdout, "\t Integers separated by spaces to denote the \n");
+ (void)fprintf(stdout, "\t maximum dimension sizes of all the \n");
+ (void)fprintf(stdout, "\t dimensions determined by rank. Requires the\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES to be specified. A value of \n");
+ (void)fprintf(stdout, "\t -1 for any dimension implies UNLIMITED \n");
+ (void)fprintf(stdout, "\t DIMENSION size for that particular dimension.\n\n");
+ (void)fprintf(stdout, "\t EXAMPLES:\n");
+ (void)fprintf(stdout, "\t 1. Configuration File may look like:\n\n");
+ (void)fprintf(stdout, "\t PATH work h5 pkamat First-set\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS TEXTFP\n");
+ (void)fprintf(stdout, "\t RANK 3\n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES 5 2 4\n");
+ (void)fprintf(stdout, "\t OUTPUT-CLASS FP\n");
+ (void)fprintf(stdout, "\t OUTPUT-SIZE 64\n");
+ (void)fprintf(stdout, "\t OUTPUT-ARCHITECTURE IEEE\n");
+ (void)fprintf(stdout, "\t OUTPUT-BYTE-ORDER LE\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 \n\n");
+ (void)fprintf(stdout, "\t The above configuration will accept a floating point array \n");
+ (void)fprintf(stdout, "\t (5 x 2 x 4) in an ASCII file with the rank and dimension sizes \n");
+ (void)fprintf(stdout, "\t specified and will save it in a chunked data-set (of pattern \n");
+ (void)fprintf(stdout, "\t 2 X 2 X 2) of 64-bit floating point in the little-endian order \n");
+ (void)fprintf(stdout, "\t and IEEE architecture. The dataset will be stored at\n");
+ (void)fprintf(stdout, "\t \"/work/h5/pkamat/First-set\"\n\n");
+ (void)fprintf(stdout, "\t 2. Another configuration could be:\n\n");
+ (void)fprintf(stdout, "\t PATH Second-set\n");
+ (void)fprintf(stdout, "\t INPUT-CLASS IN \n");
+ (void)fprintf(stdout, "\t RANK 5\n");
+ (void)fprintf(stdout, "\t DIMENSION-SIZES 6 3 5 2 4\n");
+ (void)fprintf(stdout, "\t OUTPUT-CLASS IN\n");
+ (void)fprintf(stdout, "\t OUTPUT-SIZE 32\n");
+ (void)fprintf(stdout, "\t CHUNKED-DIMENSION-SIZES 2 2 2 2 2\n");
+ (void)fprintf(stdout, "\t EXTENDIBLE-DATASET 1 3 \n");
+ (void)fprintf(stdout, "\t COMPRESSION-TYPE GZIP\n");
+ (void)fprintf(stdout, "\t COMPRESSION-PARAM 7\n\n\n");
+ (void)fprintf(stdout, "\t The above configuration will accept an integer array \n");
+ (void)fprintf(stdout, "\t (6 X 3 X 5 x 2 x 4) in a binary file with the rank and \n");
+ (void)fprintf(stdout, "\t dimension sizes specified and will save it in a chunked data-set\n");
+ (void)fprintf(stdout, "\t (of pattern 2 X 2 X 2 X 2 X 2) of 32-bit floating point in \n");
+ (void)fprintf(stdout, "\t native format (as output-architecture is not specified). The \n");
+ (void)fprintf(stdout, "\t first and the third dimension will be defined as unlimited. The \n");
+ (void)fprintf(stdout, "\t data-set will be compressed using GZIP and a compression level \n");
+ (void)fprintf(stdout, "\t of 7.\n");
+ (void)fprintf(stdout, "\t The dataset will be stored at \"/Second-set\"\n\n");
}
void
usage(char *name)
{
- (void)HDfprintf(stdout, "\nusage:\t%s -h[elp], OR\n", name);
- (void)HDfprintf(stdout, "\t%s <infile> -c[onfig] <configfile> \
+ (void)fprintf(stdout, "\nusage:\t%s -h[elp], OR\n", name);
+ (void)fprintf(stdout, "\t%s <infile> -c[onfig] <configfile> \
[<infile> -c[config] <configfile>...] -o[utfile] <outfile> \n\n",
- name);
+ name);
}
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index c7ede3c..4043c73 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -49,31 +49,31 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", requir
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s -i <in_file.h5> -u <in_user_file> [-o <out_file.h5>] [--clobber]\n", prog);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Adds user block to front of an HDF5 file and creates a new concatenated file.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "OPTIONS\n");
- HDfprintf(stdout, " -i in_file.h5 Specifies the input HDF5 file.\n");
- HDfprintf(stdout, " -u in_user_file Specifies the file to be inserted into the user block.\n");
- HDfprintf(stdout, " Can be any file format except an HDF5 format.\n");
- HDfprintf(stdout, " -o out_file.h5 Specifies the output HDF5 file.\n");
- HDfprintf(stdout, " If not specified, the user block will be concatenated in\n");
- HDfprintf(stdout, " place to the input HDF5 file.\n");
- HDfprintf(stdout, " --clobber Wipes out any existing user block before concatenating\n");
- HDfprintf(stdout, " the given user block.\n");
- HDfprintf(stdout, " The size of the new user block will be the larger of;\n");
- HDfprintf(stdout, " - the size of existing user block in the input HDF5 file\n");
- HDfprintf(stdout, " - the size of user block required by new input user file\n");
- HDfprintf(stdout, " (size = 512 x 2N, N is positive integer.)\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " -h Prints a usage message and exits.\n");
- HDfprintf(stdout, " -V Prints the HDF5 library version and exits.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Exit Status:\n");
- HDfprintf(stdout, " 0 Succeeded.\n");
- HDfprintf(stdout, " >0 An error occurred.\n");
+ fflush(stdout);
+ fprintf(stdout, "usage: %s -i <in_file.h5> -u <in_user_file> [-o <out_file.h5>] [--clobber]\n", prog);
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Adds user block to front of an HDF5 file and creates a new concatenated file.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "OPTIONS\n");
+ fprintf(stdout, " -i in_file.h5 Specifies the input HDF5 file.\n");
+ fprintf(stdout, " -u in_user_file Specifies the file to be inserted into the user block.\n");
+ fprintf(stdout, " Can be any file format except an HDF5 format.\n");
+ fprintf(stdout, " -o out_file.h5 Specifies the output HDF5 file.\n");
+ fprintf(stdout, " If not specified, the user block will be concatenated in\n");
+ fprintf(stdout, " place to the input HDF5 file.\n");
+ fprintf(stdout, " --clobber Wipes out any existing user block before concatenating\n");
+ fprintf(stdout, " the given user block.\n");
+ fprintf(stdout, " The size of the new user block will be the larger of;\n");
+ fprintf(stdout, " - the size of existing user block in the input HDF5 file\n");
+ fprintf(stdout, " - the size of user block required by new input user file\n");
+ fprintf(stdout, " (size = 512 x 2N, N is positive integer.)\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " -h Prints a usage message and exits.\n");
+ fprintf(stdout, " -V Prints the HDF5 library version and exits.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Exit Status:\n");
+ fprintf(stdout, " 0 Succeeded.\n");
+ fprintf(stdout, " >0 An error occurred.\n");
}
/*-------------------------------------------------------------------------
@@ -89,7 +89,7 @@ leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -330,11 +330,11 @@ main(int argc, char *argv[])
done:
if (ub_file)
- HDfree(ub_file);
+ free(ub_file);
if (input_file)
- HDfree(input_file);
+ free(input_file);
if (output_file)
- HDfree(output_file);
+ free(output_file);
if (plist >= 0)
H5Pclose(plist);
@@ -395,7 +395,7 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi
res = HDfstat(infid, &sbuf);
if (res < 0) {
error_msg("Can't stat file \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
howmuch = (ssize_t)sbuf.st_size;
@@ -432,12 +432,12 @@ copy_some_to_file(int infid, int outfid, hsize_t starting, hsize_t startout, ssi
if (nchars <= 0) {
error_msg("Read error \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
if (HDwrite(outfid, buf, (unsigned)nchars) < 0) {
error_msg("Write error \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
tot += nchars;
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index d130b38..d606e94 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -50,35 +50,34 @@ static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", require
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s -i <in_file.h5> [-o <out_file.h5> ] [-u <out_user_file> | --delete]\n",
- prog);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Splits user file and HDF5 file into two files: user block data and HDF5 data.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "OPTIONS\n");
- HDfprintf(stdout, " -i in_file.h5 Specifies the HDF5 as input. If the input HDF5 file\n");
- HDfprintf(stdout, " contains no user block, exit with an error message.\n");
- HDfprintf(stdout, " -o out_file.h5 Specifies output HDF5 file without a user block.\n");
- HDfprintf(stdout, " If not specified, the user block will be removed from the\n");
- HDfprintf(stdout, " input HDF5 file.\n");
- HDfprintf(stdout, " -u out_user_file\n");
- HDfprintf(stdout, " Specifies the output file containing the data from the\n");
- HDfprintf(stdout, " user block.\n");
- HDfprintf(stdout, " Cannot be used with --delete option.\n");
- HDfprintf(stdout, " --delete Remove the user block from the input HDF5 file. The content\n");
- HDfprintf(stdout, " of the user block is discarded.\n");
- HDfprintf(stdout, " Cannot be used with the -u option.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " -h Prints a usage message and exits.\n");
- HDfprintf(stdout, " -V Prints the HDF5 library version and exits.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " If neither --delete nor -u is specified, the user block from the input file\n");
- HDfprintf(stdout, " will be displayed to stdout.\n");
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, "Exit Status:\n");
- HDfprintf(stdout, " 0 Succeeded.\n");
- HDfprintf(stdout, " >0 An error occurred.\n");
+ fflush(stdout);
+ fprintf(stdout, "usage: %s -i <in_file.h5> [-o <out_file.h5> ] [-u <out_user_file> | --delete]\n", prog);
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Splits user file and HDF5 file into two files: user block data and HDF5 data.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "OPTIONS\n");
+ fprintf(stdout, " -i in_file.h5 Specifies the HDF5 as input. If the input HDF5 file\n");
+ fprintf(stdout, " contains no user block, exit with an error message.\n");
+ fprintf(stdout, " -o out_file.h5 Specifies output HDF5 file without a user block.\n");
+ fprintf(stdout, " If not specified, the user block will be removed from the\n");
+ fprintf(stdout, " input HDF5 file.\n");
+ fprintf(stdout, " -u out_user_file\n");
+ fprintf(stdout, " Specifies the output file containing the data from the\n");
+ fprintf(stdout, " user block.\n");
+ fprintf(stdout, " Cannot be used with --delete option.\n");
+ fprintf(stdout, " --delete Remove the user block from the input HDF5 file. The content\n");
+ fprintf(stdout, " of the user block is discarded.\n");
+ fprintf(stdout, " Cannot be used with the -u option.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " -h Prints a usage message and exits.\n");
+ fprintf(stdout, " -V Prints the HDF5 library version and exits.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, " If neither --delete nor -u is specified, the user block from the input file\n");
+ fprintf(stdout, " will be displayed to stdout.\n");
+ fprintf(stdout, "\n");
+ fprintf(stdout, "Exit Status:\n");
+ fprintf(stdout, " 0 Succeeded.\n");
+ fprintf(stdout, " >0 An error occurred.\n");
}
/*-------------------------------------------------------------------------
@@ -145,11 +144,11 @@ parse_command_line(int argc, const char *const *argv)
done:
if (input_file)
- HDfree(input_file);
+ free(input_file);
if (output_file)
- HDfree(output_file);
+ free(output_file);
if (ub_file)
- HDfree(ub_file);
+ free(ub_file);
return EXIT_FAILURE;
}
@@ -158,7 +157,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -283,13 +282,13 @@ main(int argc, char *argv[])
done:
if (input_file)
- HDfree(input_file);
+ free(input_file);
if (output_file)
- HDfree(output_file);
+ free(output_file);
if (ub_file) {
- HDfree(ub_file);
+ free(ub_file);
}
leave(h5tools_getstatus());
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 5d9e184..719c296 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -916,8 +916,8 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
dst_size = H5Tget_size(type);
/* Get the names and raw values of all members */
- name = (char **)HDcalloc((size_t)nmembs, sizeof(char *));
- value = (unsigned char *)HDcalloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
+ name = (char **)calloc((size_t)nmembs, sizeof(char *));
+ value = (unsigned char *)calloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size));
for (i = 0; i < (unsigned)nmembs; i++) {
name[i] = H5Tget_member_name(type, i);
H5Tget_member_value(type, i, value + i * H5Tget_size(type));
@@ -929,8 +929,8 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
/* Release resources */
for (i = 0; i < (unsigned)nmembs; i++)
H5free_memory(name[i]);
- HDfree(name);
- HDfree(value);
+ free(name);
+ free(value);
H5Tclose(super);
return FALSE;
@@ -957,13 +957,13 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
else if (H5T_SGN_NONE == H5Tget_sign(native)) {
unsigned long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(buffer, "%llu", copy);
}
else {
long long copy;
- HDmemcpy(&copy, value + i * dst_size, sizeof(copy));
+ memcpy(&copy, value + i * dst_size, sizeof(copy));
h5tools_str_append(buffer, "%lld", copy);
}
}
@@ -971,8 +971,8 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
/* Release resources */
for (i = 0; i < (unsigned)nmembs; i++)
H5free_memory(name[i]);
- HDfree(name);
- HDfree(value);
+ free(name);
+ free(value);
}
else
h5tools_str_append(buffer, "\n%*s <empty>", ind + 4, "");
@@ -1178,7 +1178,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
return FALSE;
ndims = H5Tget_array_ndims(type);
if (ndims) {
- dims = (hsize_t *)HDmalloc((unsigned)ndims * sizeof(dims[0]));
+ dims = (hsize_t *)malloc((unsigned)ndims * sizeof(dims[0]));
H5Tget_array_dims2(type, dims);
/* Print dimensions */
@@ -1186,7 +1186,7 @@ print_array_type(h5tools_str_t *buffer, hid_t type, int ind)
h5tools_str_append(buffer, "%s%" PRIuHSIZE, i ? "," : "[", dims[i]);
h5tools_str_append(buffer, "]");
- HDfree(dims);
+ free(dims);
}
else
h5tools_str_append(buffer, " [SCALAR]\n");
@@ -1324,8 +1324,8 @@ dump_dataset_values(hid_t dset)
f_type = H5Dget_type(dset);
space = H5Dget_space(dset);
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
outputformat = *info;
outputformat.line_1st = NULL;
@@ -1431,17 +1431,17 @@ dump_dataset_values(hid_t dset)
ctx.need_prefix = TRUE;
if (NULL !=
- (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
+ (ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
H5TOOLS_DEBUG("H5Dread reference read");
if (H5Dread(dset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) {
- HDfree(ref_buf);
+ free(ref_buf);
H5TOOLS_INFO("H5Dread reference failed");
H5TOOLS_GOTO_DONE_NO_RET();
}
h5tools_dump_reference(rawoutstream, info, &ctx, dset, ref_buf, ndims);
PRINTVALSTREAM(rawoutstream, "\n");
- HDfree(ref_buf);
+ free(ref_buf);
}
}
else {
@@ -1493,8 +1493,8 @@ dump_attribute_values(hid_t attr)
f_type = H5Aget_type(attr);
space = H5Aget_space(attr);
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
outputformat = *info;
outputformat.line_1st = NULL;
@@ -1601,10 +1601,10 @@ dump_attribute_values(hid_t attr)
ctx.need_prefix = TRUE;
if (NULL !=
- (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
+ (ref_buf = (H5R_ref_t *)calloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), (size_t)ndims))) {
H5TOOLS_DEBUG("H5Aread reference read");
if (H5Aread(attr, H5T_STD_REF, ref_buf) < 0) {
- HDfree(ref_buf);
+ free(ref_buf);
H5TOOLS_INFO("H5Aread reference failed");
H5TOOLS_GOTO_DONE_NO_RET();
}
@@ -1613,7 +1613,7 @@ dump_attribute_values(hid_t attr)
PRINTVALSTREAM(rawoutstream, "\n");
ctx.indent_level--;
- HDfree(ref_buf);
+ free(ref_buf);
}
}
else {
@@ -1666,8 +1666,8 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
H5TOOLS_START_DEBUG(" ");
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
ctx.indent_level = 2;
ctx.cur_column = (size_t)curr_pos;
@@ -1772,8 +1772,8 @@ dataset_list1(hid_t dset)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -1844,8 +1844,8 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -2051,8 +2051,8 @@ datatype_list2(hid_t type, const char H5_ATTR_UNUSED *name)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -2088,8 +2088,8 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
H5TOOLS_START_DEBUG(" ");
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -2203,7 +2203,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
*/
if (cmt_bufsize > 0) {
comment =
- (char *)HDmalloc((size_t)cmt_bufsize + 1); /* new_size including null terminator */
+ (char *)malloc((size_t)cmt_bufsize + 1); /* new_size including null terminator */
if (comment) {
cmt_bufsize = H5Oget_comment(obj_id, comment, (size_t)cmt_bufsize);
if (cmt_bufsize > 0) {
@@ -2215,7 +2215,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos,
(size_t)info->line_ncols, (hsize_t)0, (hsize_t)0);
} /* end if */
- HDfree(comment);
+ free(comment);
}
}
}
@@ -2266,13 +2266,13 @@ list_lnk(const char *name, const H5L_info2_t *linfo, void *_iter)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
/* init linkinfo struct */
- HDmemset(&lnk_info, 0, sizeof(h5tool_link_info_t));
+ memset(&lnk_info, 0, sizeof(h5tool_link_info_t));
/* if verbose, make H5tools_get_symlink_info() display more */
if (verbose_g)
@@ -2429,7 +2429,7 @@ done:
h5tools_str_close(&buffer);
if (buf)
- HDfree(buf);
+ free(buf);
return 0;
} /* end list_lnk() */
@@ -2452,8 +2452,8 @@ visit_obj(hid_t file, const char *oname, iter_t *iter)
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
@@ -2596,14 +2596,14 @@ is_valid_args(void)
hbool_t ret = TRUE;
if (recursive_g && grp_literal_g) {
- HDfprintf(rawerrorstream, "Error: 'recursive' option not compatible with 'group info' option!\n\n");
+ fprintf(rawerrorstream, "Error: 'recursive' option not compatible with 'group info' option!\n\n");
ret = FALSE;
goto out;
}
if (no_dangling_link_g && !follow_symlink_g) {
- HDfprintf(rawerrorstream,
- "Error: --no-dangling-links must be used along with --follow-symlinks option!\n\n");
+ fprintf(rawerrorstream,
+ "Error: --no-dangling-links must be used along with --follow-symlinks option!\n\n");
ret = FALSE;
goto out;
}
@@ -2625,7 +2625,7 @@ leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -2684,8 +2684,8 @@ main(int argc, char *argv[])
h5tools_init();
/* Initialize fapl info structs */
- HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t));
- HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t));
+ memset(&vol_info, 0, sizeof(h5tools_vol_info_t));
+ memset(&vfd_info, 0, sizeof(h5tools_vfd_info_t));
/* Build object display table */
DISPATCH(H5O_TYPE_GROUP, "Group", NULL, NULL);
@@ -2749,7 +2749,7 @@ main(int argc, char *argv[])
}
else if (!HDstrncmp(argv[argno], "--vol-value=", (size_t)12)) {
vol_info.type = VOL_BY_VALUE;
- vol_info.u.value = (H5VL_class_value_t)HDatoi(argv[argno] + 12);
+ vol_info.u.value = (H5VL_class_value_t)atoi(argv[argno] + 12);
custom_vol_fapl = TRUE;
}
else if (!HDstrncmp(argv[argno], "--vol-name=", (size_t)11)) {
@@ -2767,7 +2767,7 @@ main(int argc, char *argv[])
}
else if (!HDstrncmp(argv[argno], "--vfd-value=", (size_t)12)) {
vfd_info.type = VFD_BY_VALUE;
- vfd_info.u.value = (H5FD_class_value_t)HDatoi(argv[argno] + 12);
+ vfd_info.u.value = (H5FD_class_value_t)atoi(argv[argno] + 12);
custom_vfd_fapl = TRUE;
}
else if (!HDstrncmp(argv[argno], "--vfd-name=", (size_t)11)) {
@@ -2839,23 +2839,23 @@ main(int argc, char *argv[])
start = strchr(argv[argno], '=');
if (start == NULL) {
- HDfprintf(rawerrorstream,
- "Error: Unable to parse null credentials tuple\n"
- " For anonymous access, omit \"--s3-cred\" and use only \"--vfd=ros3\"\n\n");
+ fprintf(rawerrorstream,
+ "Error: Unable to parse null credentials tuple\n"
+ " For anonymous access, omit \"--s3-cred\" and use only \"--vfd=ros3\"\n\n");
usage();
leave(EXIT_FAILURE);
}
start++;
if (h5tools_parse_ros3_fapl_tuple(start, ',', &ros3_fa) < 0) {
- HDfprintf(rawerrorstream, "Error: failed to parse S3 VFD credential info\n\n");
+ fprintf(rawerrorstream, "Error: failed to parse S3 VFD credential info\n\n");
usage();
leave(EXIT_FAILURE);
}
vfd_info.info = &ros3_fa;
#else
- HDfprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
+ fprintf(rawerrorstream, "Error: Read-Only S3 VFD is not enabled\n\n");
usage();
leave(EXIT_FAILURE);
#endif
@@ -2871,14 +2871,14 @@ main(int argc, char *argv[])
}
if (h5tools_parse_hdfs_fapl_tuple(start, ',', &hdfs_fa) < 0) {
- HDfprintf(rawerrorstream, "Error: failed to parse HDFS VFD configuration info\n\n");
+ fprintf(rawerrorstream, "Error: failed to parse HDFS VFD configuration info\n\n");
usage();
leave(EXIT_FAILURE);
}
vfd_info.info = &hdfs_fa;
#else
- HDfprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
+ fprintf(rawerrorstream, "Error: The HDFS VFD is not enabled\n\n");
usage();
leave(EXIT_FAILURE);
#endif
@@ -2955,7 +2955,7 @@ main(int argc, char *argv[])
} /* end for */
}
else {
- HDfprintf(stderr, "Unknown argument: %s\n", argv[argno]);
+ fprintf(stderr, "Unknown argument: %s\n", argv[argno]);
usage();
leave(EXIT_FAILURE);
}
@@ -3043,8 +3043,8 @@ main(int argc, char *argv[])
} /* end while */
if (file_id < 0) {
- HDfprintf(rawerrorstream, "%s: unable to open file\n", argv[argno - 1]);
- HDfree(fname);
+ fprintf(rawerrorstream, "%s: unable to open file\n", argv[argno - 1]);
+ free(fname);
err_exit = 1;
continue;
} /* end if */
@@ -3056,7 +3056,7 @@ main(int argc, char *argv[])
iter.base_len -= oname[iter.base_len - 1] == '/';
x = oname;
if (NULL == (oname = HDstrdup(oname))) {
- HDfprintf(rawerrorstream, "memory allocation failed\n");
+ fprintf(rawerrorstream, "memory allocation failed\n");
leave(EXIT_FAILURE);
}
*x = '\0';
@@ -3095,8 +3095,8 @@ main(int argc, char *argv[])
h5tools_context_t ctx; /* print context */
h5tool_format_t *info = &ls_dataformat;
- HDmemset(&ctx, 0, sizeof(ctx));
- HDmemset(&buffer, 0, sizeof(h5tools_str_t));
+ memset(&ctx, 0, sizeof(ctx));
+ memset(&buffer, 0, sizeof(h5tools_str_t));
h5tools_str_reset(&buffer);
print_obj_name(&buffer, &iter, oname, "**NOT FOUND**");
@@ -3121,17 +3121,17 @@ main(int argc, char *argv[])
list_lnk(oname, &li, &iter);
}
H5Fclose(file_id);
- HDfree(fname);
+ free(fname);
if (x)
- HDfree(oname);
+ free(oname);
for (u = 0; u < symlink_list.nused; u++) {
if (symlink_list.objs[u].type == H5L_TYPE_EXTERNAL)
- HDfree(symlink_list.objs[u].file);
+ free(symlink_list.objs[u].file);
- HDfree(symlink_list.objs[u].path);
+ free(symlink_list.objs[u].path);
}
- HDfree(symlink_list.objs);
+ free(symlink_list.objs);
/* if no-dangling-links option specified and dangling link found */
if (no_dangling_link_g && iter.symlink_list->dangle_link)
@@ -3140,7 +3140,7 @@ main(int argc, char *argv[])
if (fapl_id != H5P_DEFAULT) {
if (0 < H5Pclose(fapl_id)) {
- HDfprintf(rawerrorstream, "Error: Unable to set close fapl entry\n\n");
+ fprintf(rawerrorstream, "Error: Unable to set close fapl entry\n\n");
leave(EXIT_FAILURE);
}
}
diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c
index 2238aac..d6d075f 100644
--- a/tools/src/h5perf/pio_engine.c
+++ b/tools/src/h5perf/pio_engine.c
@@ -62,8 +62,8 @@
}
#define ERRMSG(mesg) \
{ \
- HDfprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
- HDfprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \
+ fprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \
+ fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \
}
/* verify: if val is false (0), print mesg. */
@@ -166,7 +166,7 @@ do_pio(parameters param)
/* IO type */
iot = param.io_type;
- if (NULL == (fname = HDcalloc(FILENAME_MAX, sizeof(char))))
+ if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
GOTOERROR(FAIL);
switch (iot) {
@@ -184,7 +184,7 @@ do_pio(parameters param)
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", iot);
+ fprintf(stderr, "Unknown IO type request (%d)\n", iot);
GOTOERROR(FAIL);
}
@@ -203,66 +203,66 @@ do_pio(parameters param)
}
if (param.num_files < 0) {
- HDfprintf(stderr, "number of files must be >= 0 (%ld)\n", param.num_files);
+ fprintf(stderr, "number of files must be >= 0 (%ld)\n", param.num_files);
GOTOERROR(FAIL);
}
if (ndsets < 0) {
- HDfprintf(stderr, "number of datasets per file must be >= 0 (%ld)\n", ndsets);
+ fprintf(stderr, "number of datasets per file must be >= 0 (%ld)\n", ndsets);
GOTOERROR(FAIL);
}
if (param.num_procs <= 0) {
- HDfprintf(stderr, "maximum number of process to use must be > 0 (%d)\n", param.num_procs);
+ fprintf(stderr, "maximum number of process to use must be > 0 (%d)\n", param.num_procs);
GOTOERROR(FAIL);
}
/* Validate transfer buffer size & block size*/
if (blk_size <= 0) {
- HDfprintf(stderr, "Transfer block size (%zu) must be > 0\n", blk_size);
+ fprintf(stderr, "Transfer block size (%zu) must be > 0\n", blk_size);
GOTOERROR(FAIL);
}
if (buf_size <= 0) {
- HDfprintf(stderr, "Transfer buffer size (%zu) must be > 0\n", buf_size);
+ fprintf(stderr, "Transfer buffer size (%zu) must be > 0\n", buf_size);
GOTOERROR(FAIL);
}
if ((buf_size % blk_size) != 0) {
- HDfprintf(stderr,
- "Transfer buffer size (%zu) must be a multiple of the "
- "interleaved I/O block size (%zu)\n",
- buf_size, blk_size);
+ fprintf(stderr,
+ "Transfer buffer size (%zu) must be a multiple of the "
+ "interleaved I/O block size (%zu)\n",
+ buf_size, blk_size);
GOTOERROR(FAIL);
}
if ((snbytes % pio_mpi_nprocs_g) != 0) {
- HDfprintf(stderr,
- "Dataset size (%lld) must be a multiple of the "
- "number of processes (%d)\n",
- (long long)snbytes, pio_mpi_nprocs_g);
+ fprintf(stderr,
+ "Dataset size (%lld) must be a multiple of the "
+ "number of processes (%d)\n",
+ (long long)snbytes, pio_mpi_nprocs_g);
GOTOERROR(FAIL);
}
if (!param.dim2d) {
if (((size_t)(snbytes / pio_mpi_nprocs_g) % buf_size) != 0) {
- HDfprintf(stderr,
- "Dataset size/process (%lld) must be a multiple of the "
- "transfer buffer size (%zu)\n",
- (long long)(snbytes / pio_mpi_nprocs_g), buf_size);
+ fprintf(stderr,
+ "Dataset size/process (%lld) must be a multiple of the "
+ "transfer buffer size (%zu)\n",
+ (long long)(snbytes / pio_mpi_nprocs_g), buf_size);
GOTOERROR(FAIL);
}
}
else {
if (((size_t)snbytes % buf_size) != 0) {
- HDfprintf(stderr,
- "Dataset side size (%lld) must be a multiple of the "
- "transfer buffer size (%zu)\n",
- (long long)snbytes, buf_size);
+ fprintf(stderr,
+ "Dataset side size (%lld) must be a multiple of the "
+ "transfer buffer size (%zu)\n",
+ (long long)snbytes, buf_size);
GOTOERROR(FAIL);
}
}
/* Allocate transfer buffer */
if ((buffer = malloc(bsize)) == NULL) {
- HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", bsize);
+ fprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", bsize);
GOTOERROR(FAIL);
}
@@ -273,7 +273,7 @@ do_pio(parameters param)
/* output all of the times for all iterations */
if (myrank == 0)
- HDfprintf(output, "Timer details:\n");
+ fprintf(output, "Timer details:\n");
}
for (nf = 1; nf <= param.num_files; nf++) {
@@ -286,7 +286,7 @@ do_pio(parameters param)
HDsnprintf(base_name, sizeof(base_name), "#pio_tmp_%lu", nf);
pio_create_filename(iot, base_name, fname, FILENAME_MAX);
if (pio_debug_level > 0)
- HDfprintf(output, "rank %d: data filename=%s\n", pio_mpi_rank_g, fname);
+ fprintf(output, "rank %d: data filename=%s\n", pio_mpi_rank_g, fname);
/* Need barrier to make sure everyone starts at the same time */
MPI_Barrier(pio_comm_g);
@@ -366,8 +366,8 @@ done:
}
/* release generic resources */
- HDfree(buffer);
- HDfree(fname);
+ free(buffer);
+ free(fname);
res.ret_code = ret_code;
return res;
}
@@ -391,7 +391,7 @@ pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
if (!base_name || !fullname || size < 1)
return NULL;
- HDmemset(fullname, 0, size);
+ memset(fullname, 0, size);
switch (iot) {
case POSIXIO:
@@ -601,7 +601,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
/* Prepare buffer for verifying data */
if (parms->verify)
- HDmemset(buffer, pio_mpi_rank_g + 1, buf_size * blk_size);
+ memset(buffer, pio_mpi_rank_g + 1, buf_size * blk_size);
} /* end else */
/* Calculate the total number of bytes (bytes_count) to be
@@ -621,17 +621,17 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
if (pio_debug_level >= 4) {
HDprint_rank(output);
if (!parms->dim2d) {
- HDfprintf(output,
- "Debug(do_write): "
- "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
- buf_size, (long long)bytes_begin[0], (long long)bytes_count);
+ fprintf(output,
+ "Debug(do_write): "
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
+ buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
- HDfprintf(output,
- "Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
- buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
- (long long)bytes_count);
+ fprintf(output,
+ "Debug(do_write): "
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
+ buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
+ (long long)bytes_count);
}
}
@@ -831,7 +831,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -839,7 +839,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
if (parms->collective) {
hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -864,7 +864,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
case PHDF5:
h5dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (h5dcpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
/* 1D dataspace */
@@ -875,7 +875,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
h5dims[0] = blk_size;
hrc = H5Pset_chunk(h5dcpl, 1, h5dims);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -888,7 +888,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
h5dims[1] = blk_size;
hrc = H5Pset_chunk(h5dcpl, 2, h5dims);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -898,14 +898,14 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
h5ds_id = H5DCREATE(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, h5dcpl);
if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset Create failed\n");
+ fprintf(stderr, "HDF5 Dataset Create failed\n");
GOTOERROR(FAIL);
}
hrc = H5Pclose(h5dcpl);
/* verifying the close of the dcpl */
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Close failed\n");
+ fprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
break;
@@ -1407,7 +1407,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -1464,7 +1464,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -1475,7 +1475,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
+ fprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -1486,7 +1486,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
}
else {
@@ -1631,17 +1631,17 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (pio_debug_level >= 4) {
HDprint_rank(output);
if (!parms->dim2d) {
- HDfprintf(output,
- "Debug(do_write): "
- "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
- buf_size, (long long)bytes_begin[0], (long long)bytes_count);
+ fprintf(output,
+ "Debug(do_write): "
+ "buf_size=%zu, bytes_begin=%lld, bytes_count=%lld\n",
+ buf_size, (long long)bytes_begin[0], (long long)bytes_count);
}
else {
- HDfprintf(output,
- "Debug(do_write): "
- "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
- buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
- (long long)bytes_count);
+ fprintf(output,
+ "Debug(do_write): "
+ "linear buf_size=%zu, bytes_begin=(%lld,%lld), bytes_count=%lld\n",
+ buf_size * blk_size, (long long)bytes_begin[0], (long long)bytes_begin[1],
+ (long long)bytes_count);
}
}
@@ -1839,7 +1839,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -1847,7 +1847,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (parms->collective) {
hrc = H5Pset_dxpl_mpio(h5dxpl, H5FD_MPIO_COLLECTIVE);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -1873,7 +1873,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
HDsnprintf(dname, sizeof(dname), "Dataset_%ld", ndset);
h5ds_id = H5DOPEN(fd->h5fd, dname);
if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset open failed\n");
+ fprintf(stderr, "HDF5 Dataset open failed\n");
GOTOERROR(FAIL);
}
break;
@@ -2369,17 +2369,17 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
if (++nerror < 20) {
/* report at most 20 errors */
HDprint_rank(output);
- HDfprintf(output,
- "read data error, expected (%d), "
- "got (%d)\n",
- pio_mpi_rank_g + 1, (int)*(ucharptr - 1));
+ fprintf(output,
+ "read data error, expected (%d), "
+ "got (%d)\n",
+ pio_mpi_rank_g + 1, (int)*(ucharptr - 1));
} /* end if */
} /* end if */
} /* end for */
if (nerror >= 20) {
HDprint_rank(output);
- HDfprintf(output, "...");
- HDfprintf(output, "total read data errors=%d\n", nerror);
+ fprintf(output, "...");
+ fprintf(output, "total read data errors=%d\n", nerror);
} /* end if */
} /* if (parms->verify) */
@@ -2395,7 +2395,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -2452,7 +2452,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -2463,7 +2463,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
+ fprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -2474,7 +2474,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
}
else {
@@ -2505,7 +2505,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fd->posixfd = POSIXOPEN(fname, O_RDONLY);
if (fd->posixfd < 0) {
- HDfprintf(stderr, "POSIX File Open failed(%s)\n", fname);
+ fprintf(stderr, "POSIX File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -2528,7 +2528,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
&fd->mpifd);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI File Open failed(%s)\n", fname);
+ fprintf(stderr, "MPI File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -2536,14 +2536,14 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
/*filesize , set size to 0 explicitedly. */
mrc = MPI_File_set_size(fd->mpifd, (MPI_Offset)0);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI_File_set_size failed\n");
+ fprintf(stderr, "MPI_File_set_size failed\n");
GOTOERROR(FAIL);
}
}
else {
mrc = MPI_File_open(pio_comm_g, fname, MPI_MODE_RDONLY, h5_io_info_g, &fd->mpifd);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI File Open failed(%s)\n", fname);
+ fprintf(stderr, "MPI File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
}
@@ -2552,19 +2552,19 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
case PHDF5:
if ((acc_tpl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
/* Set the file driver to the MPI-IO driver */
if (H5Pset_fapl_mpio(acc_tpl, pio_comm_g, h5_io_info_g) < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
}
/* Set the alignment of objects in HDF5 file */
if (H5Pset_alignment(acc_tpl, param->h5_thresh, param->h5_align) < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
}
@@ -2574,13 +2574,13 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
else
fd->h5fd = H5Fopen(fname, H5F_ACC_RDONLY, acc_tpl);
if (fd->h5fd < 0) {
- HDfprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
+ fprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
GOTOERROR(FAIL);
}
/* verifying the close of the acc_tpl */
if (H5Pclose(acc_tpl) < 0) {
- HDfprintf(stderr, "HDF5 Property List Close failed\n");
+ fprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
@@ -2611,7 +2611,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
rc = POSIXCLOSE(fd->posixfd);
if (rc != 0) {
- HDfprintf(stderr, "POSIX File Close failed\n");
+ fprintf(stderr, "POSIX File Close failed\n");
GOTOERROR(FAIL);
}
@@ -2622,7 +2622,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
mrc = MPI_File_close(&fd->mpifd);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI File close failed\n");
+ fprintf(stderr, "MPI File close failed\n");
GOTOERROR(FAIL);
}
@@ -2633,7 +2633,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
hrc = H5Fclose(fd->h5fd);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 File Close failed\n");
+ fprintf(stderr, "HDF5 File Close failed\n");
GOTOERROR(FAIL);
}
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index d4b302e..fee0a61 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -224,12 +224,12 @@ main(int argc, char *argv[])
ret = MPI_Comm_size(MPI_COMM_WORLD, &comm_world_nprocs_g);
if (ret != MPI_SUCCESS) {
- HDfprintf(stderr, "%s: MPI_Comm_size call failed\n", progname);
+ fprintf(stderr, "%s: MPI_Comm_size call failed\n", progname);
if (ret == MPI_ERR_COMM)
- HDfprintf(stderr, "invalid MPI communicator\n");
+ fprintf(stderr, "invalid MPI communicator\n");
else
- HDfprintf(stderr, "invalid argument\n");
+ fprintf(stderr, "invalid argument\n");
exit_value = EXIT_FAILURE;
goto finish;
@@ -238,12 +238,12 @@ main(int argc, char *argv[])
ret = MPI_Comm_rank(MPI_COMM_WORLD, &comm_world_rank_g);
if (ret != MPI_SUCCESS) {
- HDfprintf(stderr, "%s: MPI_Comm_rank call failed\n", progname);
+ fprintf(stderr, "%s: MPI_Comm_rank call failed\n", progname);
if (ret == MPI_ERR_COMM)
- HDfprintf(stderr, "invalid MPI communicator\n");
+ fprintf(stderr, "invalid MPI communicator\n");
else
- HDfprintf(stderr, "invalid argument\n");
+ fprintf(stderr, "invalid argument\n");
exit_value = EXIT_FAILURE;
goto finish;
@@ -260,8 +260,8 @@ main(int argc, char *argv[])
}
if (opts->output_file) {
- if ((output = HDfopen(opts->output_file, "w")) == NULL) {
- HDfprintf(stderr, "%s: cannot open output file\n", progname);
+ if ((output = fopen(opts->output_file, "w")) == NULL) {
+ fprintf(stderr, "%s: cannot open output file\n", progname);
perror(opts->output_file);
goto finish;
}
@@ -763,7 +763,7 @@ h5_set_info_object(void)
/* copy key/value pair into temporary buffer */
len = strcspn(valp, ";");
next = &valp[len];
- key_val = (char *)HDcalloc(1, len + 1);
+ key_val = (char *)calloc(1, len + 1);
/* increment the next pointer past the terminating semicolon */
if (*next == ';')
@@ -805,16 +805,16 @@ h5_set_info_object(void)
/* actually set the darned thing */
if (MPI_SUCCESS != MPI_Info_set(h5_io_info_g, namep, valp)) {
- HDprintf("MPI_Info_set failed\n");
+ printf("MPI_Info_set failed\n");
ret_value = -1;
}
}
valp = next;
- HDfree(key_val);
+ free(key_val);
} while (next && *next);
- HDfree(envp);
+ free(envp);
}
return ret_value;
@@ -834,17 +834,17 @@ h5_dump_info_object(MPI_Info info)
int flag;
int i, nkeys;
- HDprintf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
+ printf("Dumping MPI Info Object (up to %d bytes per item):\n", MPI_MAX_INFO_VAL);
if (info == MPI_INFO_NULL) {
- HDprintf("object is MPI_INFO_NULL\n");
+ printf("object is MPI_INFO_NULL\n");
}
else {
MPI_Info_get_nkeys(info, &nkeys);
- HDprintf("object has %d items\n", nkeys);
+ printf("object has %d items\n", nkeys);
for (i = 0; i < nkeys; i++) {
MPI_Info_get_nthkey(info, i, key);
MPI_Info_get(info, key, MPI_MAX_INFO_VAL, value, &flag);
- HDprintf("%s=%s\n", key, value);
+ printf("%s=%s\n", key, value);
}
}
}
@@ -926,8 +926,8 @@ create_comm_world(int num_procs, int *doing_pio)
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
if (num_procs > nprocs) {
- HDfprintf(stderr, "number of process(%d) must be <= number of processes in MPI_COMM_WORLD(%d)\n",
- num_procs, nprocs);
+ fprintf(stderr, "number of process(%d) must be <= number of processes in MPI_COMM_WORLD(%d)\n",
+ num_procs, nprocs);
goto error_done;
}
@@ -936,7 +936,7 @@ create_comm_world(int num_procs, int *doing_pio)
mrc = MPI_Comm_split(MPI_COMM_WORLD, color, myrank, &pio_comm_g);
if (mrc != MPI_SUCCESS) {
- HDfprintf(stderr, "MPI_Comm_split failed\n");
+ fprintf(stderr, "MPI_Comm_split failed\n");
goto error_done;
}
@@ -1059,11 +1059,11 @@ output_report(const char *fmt, ...)
if (myrank == 0) {
va_list ap;
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
HDvfprintf(output, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
- HDva_end(ap);
+ va_end(ap);
}
}
@@ -1095,28 +1095,28 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_KB && (val % ONE_KB) == 0) {
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
- HDfprintf(output,
- "%lld"
- "GB%s",
- val / ONE_GB, end);
+ fprintf(output,
+ "%lld"
+ "GB%s",
+ val / ONE_GB, end);
else
- HDfprintf(output,
- "%lld"
- "MB%s",
- val / ONE_MB, end);
+ fprintf(output,
+ "%lld"
+ "MB%s",
+ val / ONE_MB, end);
}
else {
- HDfprintf(output,
- "%lld"
- "KB%s",
- val / ONE_KB, end);
+ fprintf(output,
+ "%lld"
+ "KB%s",
+ val / ONE_KB, end);
}
}
else {
- HDfprintf(output,
- "%lld"
- "%s",
- val, end);
+ fprintf(output,
+ "%lld"
+ "%s",
+ val, end);
}
}
@@ -1124,12 +1124,12 @@ static void
print_io_api(long io_types)
{
if (io_types & PIO_POSIX)
- HDfprintf(output, "posix ");
+ fprintf(output, "posix ");
if (io_types & PIO_MPI)
- HDfprintf(output, "mpiio ");
+ fprintf(output, "mpiio ");
if (io_types & PIO_HDF5)
- HDfprintf(output, "phdf5 ");
- HDfprintf(output, "\n");
+ fprintf(output, "phdf5 ");
+ fprintf(output, "\n");
}
static void
@@ -1138,34 +1138,34 @@ report_parameters(struct options *opts)
int rank = comm_world_rank_g;
print_version("HDF5 Library"); /* print library version */
- HDfprintf(output, "rank %d: ==== Parameters ====\n", rank);
+ fprintf(output, "rank %d: ==== Parameters ====\n", rank);
- HDfprintf(output, "rank %d: IO API=", rank);
+ fprintf(output, "rank %d: IO API=", rank);
print_io_api(opts->io_types);
- HDfprintf(output, "rank %d: Number of files=%ld\n", rank, opts->num_files);
- HDfprintf(output, "rank %d: Number of datasets=%ld\n", rank, opts->num_dsets);
- HDfprintf(output, "rank %d: Number of iterations=%d\n", rank, opts->num_iters);
- HDfprintf(output, "rank %d: Number of processes=%d:%d\n", rank, opts->min_num_procs, opts->max_num_procs);
+ fprintf(output, "rank %d: Number of files=%ld\n", rank, opts->num_files);
+ fprintf(output, "rank %d: Number of datasets=%ld\n", rank, opts->num_dsets);
+ fprintf(output, "rank %d: Number of iterations=%d\n", rank, opts->num_iters);
+ fprintf(output, "rank %d: Number of processes=%d:%d\n", rank, opts->min_num_procs, opts->max_num_procs);
if (opts->dim2d) {
- HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
+ fprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->min_num_procs), ":");
recover_size_and_print((long long)(opts->num_bpp * opts->num_bpp * opts->max_num_procs), "\n");
- HDfprintf(output, "rank %d: Size of dataset(s)=", rank);
+ fprintf(output, "rank %d: Size of dataset(s)=", rank);
recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), "x");
recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":");
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "x");
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
- HDfprintf(output, "rank %d: File size=", rank);
+ fprintf(output, "rank %d: File size=", rank);
recover_size_and_print((long long)(squareo(opts->num_bpp * opts->min_num_procs) * opts->num_dsets),
":");
recover_size_and_print((long long)(squareo(opts->num_bpp * opts->max_num_procs) * opts->num_dsets),
"\n");
- HDfprintf(output, "rank %d: Transfer buffer size=", rank);
+ fprintf(output, "rank %d: Transfer buffer size=", rank);
if (opts->interleaved) {
recover_size_and_print((long long)opts->min_xfer_size, "x");
recover_size_and_print((long long)opts->blk_size, ":");
@@ -1178,66 +1178,66 @@ report_parameters(struct options *opts)
recover_size_and_print((long long)opts->blk_size, "x");
recover_size_and_print((long long)opts->max_xfer_size, "\n");
}
- HDfprintf(output, "rank %d: Block size=", rank);
+ fprintf(output, "rank %d: Block size=", rank);
recover_size_and_print((long long)opts->blk_size, "x");
recover_size_and_print((long long)opts->blk_size, "\n");
}
else {
- HDfprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
+ fprintf(output, "rank %d: Number of bytes per process per dataset=", rank);
recover_size_and_print((long long)opts->num_bpp, "\n");
- HDfprintf(output, "rank %d: Size of dataset(s)=", rank);
+ fprintf(output, "rank %d: Size of dataset(s)=", rank);
recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs), ":");
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs), "\n");
- HDfprintf(output, "rank %d: File size=", rank);
+ fprintf(output, "rank %d: File size=", rank);
recover_size_and_print((long long)(opts->num_bpp * opts->min_num_procs * opts->num_dsets), ":");
recover_size_and_print((long long)(opts->num_bpp * opts->max_num_procs * opts->num_dsets), "\n");
- HDfprintf(output, "rank %d: Transfer buffer size=", rank);
+ fprintf(output, "rank %d: Transfer buffer size=", rank);
recover_size_and_print((long long)opts->min_xfer_size, ":");
recover_size_and_print((long long)opts->max_xfer_size, "\n");
- HDfprintf(output, "rank %d: Block size=", rank);
+ fprintf(output, "rank %d: Block size=", rank);
recover_size_and_print((long long)opts->blk_size, "\n");
}
- HDfprintf(output, "rank %d: Block Pattern in Dataset=", rank);
+ fprintf(output, "rank %d: Block Pattern in Dataset=", rank);
if (opts->interleaved)
- HDfprintf(output, "Interleaved\n");
+ fprintf(output, "Interleaved\n");
else
- HDfprintf(output, "Contiguous\n");
+ fprintf(output, "Contiguous\n");
- HDfprintf(output, "rank %d: I/O Method for MPI and HDF5=", rank);
+ fprintf(output, "rank %d: I/O Method for MPI and HDF5=", rank);
if (opts->collective)
- HDfprintf(output, "Collective\n");
+ fprintf(output, "Collective\n");
else
- HDfprintf(output, "Independent\n");
+ fprintf(output, "Independent\n");
- HDfprintf(output, "rank %d: Geometry=", rank);
+ fprintf(output, "rank %d: Geometry=", rank);
if (opts->dim2d)
- HDfprintf(output, "2D\n");
+ fprintf(output, "2D\n");
else
- HDfprintf(output, "1D\n");
+ fprintf(output, "1D\n");
- HDfprintf(output, "rank %d: VFL used for HDF5 I/O=%s\n", rank, "MPI-IO driver");
+ fprintf(output, "rank %d: VFL used for HDF5 I/O=%s\n", rank, "MPI-IO driver");
- HDfprintf(output, "rank %d: Data storage method in HDF5=", rank);
+ fprintf(output, "rank %d: Data storage method in HDF5=", rank);
if (opts->h5_use_chunks)
- HDfprintf(output, "Chunked\n");
+ fprintf(output, "Chunked\n");
else
- HDfprintf(output, "Contiguous\n");
+ fprintf(output, "Contiguous\n");
{
char *prefix = HDgetenv("HDF5_PARAPREFIX");
- HDfprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank, (prefix ? prefix : "not set"));
+ fprintf(output, "rank %d: Env HDF5_PARAPREFIX=%s\n", rank, (prefix ? prefix : "not set"));
}
- HDfprintf(output, "rank %d: ", rank);
+ fprintf(output, "rank %d: ", rank);
h5_dump_info_object(h5_io_info_g);
- HDfprintf(output, "rank %d: ==== End of Parameters ====\n", rank);
- HDfprintf(output, "\n");
+ fprintf(output, "rank %d: ==== End of Parameters ====\n", rank);
+ fprintf(output, "\n");
}
/*
@@ -1289,7 +1289,7 @@ parse_command_line(int argc, const char *const *argv)
char buf[10];
int i;
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (isalnum(*end) && i < 10)
@@ -1305,8 +1305,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->io_types |= PIO_POSIX;
}
else {
- HDfprintf(stderr, "pio_perf: invalid --api option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "pio_perf: invalid --api option %s\n", buf);
+ exit(EXIT_FAILURE);
}
if (*end == '\0')
@@ -1342,7 +1342,7 @@ parse_command_line(int argc, const char *const *argv)
char buf[10];
int i;
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -1353,8 +1353,8 @@ parse_command_line(int argc, const char *const *argv)
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
if (!isdigit(buf[j])) {
- HDfprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
+ exit(EXIT_FAILURE);
}
pio_debug_level = atoi(buf);
@@ -1379,8 +1379,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->verify = TRUE;
break;
default:
- HDfprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf);
+ exit(EXIT_FAILURE);
}
}
@@ -1396,13 +1396,13 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->num_bpp = parse_size_directive(H5_optarg);
break;
case 'F':
- cl_opts->num_files = HDatoi(H5_optarg);
+ cl_opts->num_files = atoi(H5_optarg);
break;
case 'g':
cl_opts->dim2d = 1;
break;
case 'i':
- cl_opts->num_iters = HDatoi(H5_optarg);
+ cl_opts->num_iters = atoi(H5_optarg);
break;
case 'I':
cl_opts->interleaved = 1;
@@ -1411,10 +1411,10 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->output_file = H5_optarg;
break;
case 'p':
- cl_opts->min_num_procs = HDatoi(H5_optarg);
+ cl_opts->min_num_procs = atoi(H5_optarg);
break;
case 'P':
- cl_opts->max_num_procs = HDatoi(H5_optarg);
+ cl_opts->max_num_procs = atoi(H5_optarg);
break;
case 'T':
cl_opts->h5_threshold = parse_size_directive(H5_optarg);
@@ -1432,7 +1432,7 @@ parse_command_line(int argc, const char *const *argv)
case '?':
default:
usage(progname);
- HDfree(cl_opts);
+ free(cl_opts);
return NULL;
}
}
@@ -1523,8 +1523,8 @@ parse_size_directive(const char *size)
s *= ONE_GB;
break;
default:
- HDfprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
+ exit(EXIT_FAILURE);
}
}
@@ -1546,124 +1546,124 @@ usage(const char *prog)
if (myrank == 0) {
print_version(prog);
- HDprintf("usage: %s [OPTIONS]\n", prog);
- HDprintf(" OPTIONS\n");
- HDprintf(" -h, --help Print a usage message and exit\n");
- HDprintf(" -a S, --align=S Alignment of objects in HDF5 file [default: 1]\n");
- HDprintf(" -A AL, --api=AL Which APIs to test [default: all of them]\n");
+ printf("usage: %s [OPTIONS]\n", prog);
+ printf(" OPTIONS\n");
+ printf(" -h, --help Print a usage message and exit\n");
+ printf(" -a S, --align=S Alignment of objects in HDF5 file [default: 1]\n");
+ printf(" -A AL, --api=AL Which APIs to test [default: all of them]\n");
#if 0
- HDprintf(" -b, --binary The elusive binary option\n");
+ printf(" -b, --binary The elusive binary option\n");
#endif /* 0 */
- HDprintf(" -B S, --block-size=S Block size within transfer buffer\n");
- HDprintf(" (see below for description)\n");
- HDprintf(" [default: half the number of bytes per process\n");
- HDprintf(" per dataset]\n");
- HDprintf(" -c, --chunk Create HDF5 datasets using chunked storage\n");
- HDprintf(" [default: contiguous storage]\n");
- HDprintf(" -C, --collective Use collective I/O for MPI and HDF5 APIs\n");
- HDprintf(" [default: independent I/O)\n");
- HDprintf(" -d N, --num-dsets=N Number of datasets per file [default: 1]\n");
- HDprintf(" -D DL, --debug=DL Indicate the debugging level\n");
- HDprintf(" [default: no debugging]\n");
- HDprintf(" -e S, --num-bytes=S Number of bytes per process per dataset\n");
- HDprintf(" (see below for description)\n");
- HDprintf(" [default: 256K for 1D, 8K for 2D]\n");
- HDprintf(" -F N, --num-files=N Number of files [default: 1]\n");
- HDprintf(" -g, --geometry Use 2D geometry [default: 1D geometry]\n");
- HDprintf(" -i N, --num-iterations=N Number of iterations to perform [default: 1]\n");
- HDprintf(" -I, --interleaved Interleaved access pattern\n");
- HDprintf(" (see below for example)\n");
- HDprintf(" [default: Contiguous access pattern]\n");
- HDprintf(" -o F, --output=F Output raw data into file F [default: none]\n");
- HDprintf(" -p N, --min-num-processes=N Minimum number of processes to use [default: 1]\n");
- HDprintf(" -P N, --max-num-processes=N Maximum number of processes to use\n");
- HDprintf(" [default: all MPI_COMM_WORLD processes ]\n");
- HDprintf(" -T S, --threshold=S Threshold for alignment of objects in HDF5 file\n");
- HDprintf(" [default: 1]\n");
- HDprintf(" -w, --write-only Perform write tests not the read tests\n");
- HDprintf(" -x S, --min-xfer-size=S Minimum transfer buffer size\n");
- HDprintf(" (see below for description)\n");
- HDprintf(" [default: half the number of bytes per process\n");
- HDprintf(" per dataset]\n");
- HDprintf(" -X S, --max-xfer-size=S Maximum transfer buffer size\n");
- HDprintf(" [default: the number of bytes per process per\n");
- HDprintf(" dataset]\n");
- HDprintf("\n");
- HDprintf(" F - is a filename.\n");
- HDprintf(" N - is an integer >=0.\n");
- HDprintf(" S - is a size specifier, an integer >=0 followed by a size indicator:\n");
- HDprintf(" K - Kilobyte (%d)\n", ONE_KB);
- HDprintf(" M - Megabyte (%d)\n", ONE_MB);
- HDprintf(" G - Gigabyte (%d)\n", ONE_GB);
- HDprintf("\n");
- HDprintf(" Example: '37M' is 37 megabytes or %d bytes\n", 37 * ONE_MB);
- HDprintf("\n");
- HDprintf(" AL - is an API list. Valid values are:\n");
- HDprintf(" phdf5 - Parallel HDF5\n");
- HDprintf(" mpiio - MPI-I/O\n");
- HDprintf(" posix - POSIX\n");
- HDprintf("\n");
- HDprintf(" Example: --api=mpiio,phdf5\n");
- HDprintf("\n");
- HDprintf(" Dataset size:\n");
- HDprintf(" Depending on the selected geometry, each test dataset is either a linear\n");
- HDprintf(" array of size bytes-per-process * num-processes, or a square array of size\n");
- HDprintf(" (bytes-per-process * num-processes) x (bytes-per-process * num-processes).\n");
- HDprintf("\n");
- HDprintf(" Block size vs. Transfer buffer size:\n");
- HDprintf(" buffer-size controls the size of the memory buffer, which is broken into\n");
- HDprintf(" blocks and written to the file. Depending on the selected geometry, each\n");
- HDprintf(" block can be a linear array of size block-size or a square array of size\n");
- HDprintf(" block-size x block-size. The arrangement in which blocks are written is\n");
- HDprintf(" determined by the access pattern.\n");
- HDprintf("\n");
- HDprintf(" In 1D geometry, the transfer buffer is a linear array of size buffer-size.\n");
- HDprintf(" In 2D geometry, it is a rectangular array of size block-size x buffer-size\n");
- HDprintf(" or buffer-size x block-size if interleaved pattern is selected.\n");
- HDprintf("\n");
- HDprintf(" Interleaved and Contiguous patterns in 1D geometry:\n");
- HDprintf(" When contiguous access pattern is chosen, the dataset is evenly divided\n");
- HDprintf(" into num-processes regions and each process writes data to its own region.\n");
- HDprintf(" When interleaved blocks are written to a dataset, space for the first\n");
- HDprintf(" block of the first process is allocated in the dataset, then space is\n");
- HDprintf(" allocated for the first block of the second process, etc. until space is\n");
- HDprintf(" allocated for the first block of each process, then space is allocated for\n");
- HDprintf(" the second block of the first process, the second block of the second\n");
- HDprintf(" process, etc.\n");
- HDprintf("\n");
- HDprintf(" For example, with a 3 process run, 512KB bytes-per-process, 256KB transfer\n");
- HDprintf(" buffer size, and 64KB block size, each process must issue 2 transfer\n");
- HDprintf(" requests to complete access to the dataset.\n");
- HDprintf(" Contiguous blocks of the first transfer request are written like so:\n");
- HDprintf(" 1111----2222----3333----\n");
- HDprintf(" Interleaved blocks of the first transfer request are written like so:\n");
- HDprintf(" 123123123123------------\n");
- HDprintf(" The actual number of I/O operations involved in a transfer request\n");
- HDprintf(" depends on the access pattern and communication mode.\n");
- HDprintf(" When using independent I/O with interleaved pattern, each process\n");
- HDprintf(" performs 4 small non-contiguous I/O operations per transfer request.\n");
- HDprintf(" If collective I/O is turned on, the combined content of the buffers of\n");
- HDprintf(" the 3 processes will be written using one collective I/O operation\n");
- HDprintf(" per transfer request.\n");
- HDprintf("\n");
- HDprintf(" For information about access patterns in 2D geometry, please refer to the\n");
- HDprintf(" HDF5 Reference Manual.\n");
- HDprintf("\n");
- HDprintf(" DL - is a list of debugging flags. Valid values are:\n");
- HDprintf(" 1 - Minimal\n");
- HDprintf(" 2 - Not quite everything\n");
- HDprintf(" 3 - Everything\n");
- HDprintf(" 4 - The kitchen sink\n");
- HDprintf(" r - Raw data I/O throughput information\n");
- HDprintf(" t - Times as well as throughputs\n");
- HDprintf(" v - Verify data correctness\n");
- HDprintf("\n");
- HDprintf(" Example: --debug=2,r,t\n");
- HDprintf("\n");
- HDprintf(" Environment variables:\n");
- HDprintf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
- HDprintf(" HDF5_MPI_INFO MPI INFO object key=value separated by ;\n");
- HDprintf(" HDF5_PARAPREFIX Parallel data files prefix\n");
+ printf(" -B S, --block-size=S Block size within transfer buffer\n");
+ printf(" (see below for description)\n");
+ printf(" [default: half the number of bytes per process\n");
+ printf(" per dataset]\n");
+ printf(" -c, --chunk Create HDF5 datasets using chunked storage\n");
+ printf(" [default: contiguous storage]\n");
+ printf(" -C, --collective Use collective I/O for MPI and HDF5 APIs\n");
+ printf(" [default: independent I/O)\n");
+ printf(" -d N, --num-dsets=N Number of datasets per file [default: 1]\n");
+ printf(" -D DL, --debug=DL Indicate the debugging level\n");
+ printf(" [default: no debugging]\n");
+ printf(" -e S, --num-bytes=S Number of bytes per process per dataset\n");
+ printf(" (see below for description)\n");
+ printf(" [default: 256K for 1D, 8K for 2D]\n");
+ printf(" -F N, --num-files=N Number of files [default: 1]\n");
+ printf(" -g, --geometry Use 2D geometry [default: 1D geometry]\n");
+ printf(" -i N, --num-iterations=N Number of iterations to perform [default: 1]\n");
+ printf(" -I, --interleaved Interleaved access pattern\n");
+ printf(" (see below for example)\n");
+ printf(" [default: Contiguous access pattern]\n");
+ printf(" -o F, --output=F Output raw data into file F [default: none]\n");
+ printf(" -p N, --min-num-processes=N Minimum number of processes to use [default: 1]\n");
+ printf(" -P N, --max-num-processes=N Maximum number of processes to use\n");
+ printf(" [default: all MPI_COMM_WORLD processes ]\n");
+ printf(" -T S, --threshold=S Threshold for alignment of objects in HDF5 file\n");
+ printf(" [default: 1]\n");
+ printf(" -w, --write-only Perform write tests not the read tests\n");
+ printf(" -x S, --min-xfer-size=S Minimum transfer buffer size\n");
+ printf(" (see below for description)\n");
+ printf(" [default: half the number of bytes per process\n");
+ printf(" per dataset]\n");
+ printf(" -X S, --max-xfer-size=S Maximum transfer buffer size\n");
+ printf(" [default: the number of bytes per process per\n");
+ printf(" dataset]\n");
+ printf("\n");
+ printf(" F - is a filename.\n");
+ printf(" N - is an integer >=0.\n");
+ printf(" S - is a size specifier, an integer >=0 followed by a size indicator:\n");
+ printf(" K - Kilobyte (%d)\n", ONE_KB);
+ printf(" M - Megabyte (%d)\n", ONE_MB);
+ printf(" G - Gigabyte (%d)\n", ONE_GB);
+ printf("\n");
+ printf(" Example: '37M' is 37 megabytes or %d bytes\n", 37 * ONE_MB);
+ printf("\n");
+ printf(" AL - is an API list. Valid values are:\n");
+ printf(" phdf5 - Parallel HDF5\n");
+ printf(" mpiio - MPI-I/O\n");
+ printf(" posix - POSIX\n");
+ printf("\n");
+ printf(" Example: --api=mpiio,phdf5\n");
+ printf("\n");
+ printf(" Dataset size:\n");
+ printf(" Depending on the selected geometry, each test dataset is either a linear\n");
+ printf(" array of size bytes-per-process * num-processes, or a square array of size\n");
+ printf(" (bytes-per-process * num-processes) x (bytes-per-process * num-processes).\n");
+ printf("\n");
+ printf(" Block size vs. Transfer buffer size:\n");
+ printf(" buffer-size controls the size of the memory buffer, which is broken into\n");
+ printf(" blocks and written to the file. Depending on the selected geometry, each\n");
+ printf(" block can be a linear array of size block-size or a square array of size\n");
+ printf(" block-size x block-size. The arrangement in which blocks are written is\n");
+ printf(" determined by the access pattern.\n");
+ printf("\n");
+ printf(" In 1D geometry, the transfer buffer is a linear array of size buffer-size.\n");
+ printf(" In 2D geometry, it is a rectangular array of size block-size x buffer-size\n");
+ printf(" or buffer-size x block-size if interleaved pattern is selected.\n");
+ printf("\n");
+ printf(" Interleaved and Contiguous patterns in 1D geometry:\n");
+ printf(" When contiguous access pattern is chosen, the dataset is evenly divided\n");
+ printf(" into num-processes regions and each process writes data to its own region.\n");
+ printf(" When interleaved blocks are written to a dataset, space for the first\n");
+ printf(" block of the first process is allocated in the dataset, then space is\n");
+ printf(" allocated for the first block of the second process, etc. until space is\n");
+ printf(" allocated for the first block of each process, then space is allocated for\n");
+ printf(" the second block of the first process, the second block of the second\n");
+ printf(" process, etc.\n");
+ printf("\n");
+ printf(" For example, with a 3 process run, 512KB bytes-per-process, 256KB transfer\n");
+ printf(" buffer size, and 64KB block size, each process must issue 2 transfer\n");
+ printf(" requests to complete access to the dataset.\n");
+ printf(" Contiguous blocks of the first transfer request are written like so:\n");
+ printf(" 1111----2222----3333----\n");
+ printf(" Interleaved blocks of the first transfer request are written like so:\n");
+ printf(" 123123123123------------\n");
+ printf(" The actual number of I/O operations involved in a transfer request\n");
+ printf(" depends on the access pattern and communication mode.\n");
+ printf(" When using independent I/O with interleaved pattern, each process\n");
+ printf(" performs 4 small non-contiguous I/O operations per transfer request.\n");
+ printf(" If collective I/O is turned on, the combined content of the buffers of\n");
+ printf(" the 3 processes will be written using one collective I/O operation\n");
+ printf(" per transfer request.\n");
+ printf("\n");
+ printf(" For information about access patterns in 2D geometry, please refer to the\n");
+ printf(" HDF5 Reference Manual.\n");
+ printf("\n");
+ printf(" DL - is a list of debugging flags. Valid values are:\n");
+ printf(" 1 - Minimal\n");
+ printf(" 2 - Not quite everything\n");
+ printf(" 3 - Everything\n");
+ printf(" 4 - The kitchen sink\n");
+ printf(" r - Raw data I/O throughput information\n");
+ printf(" t - Times as well as throughputs\n");
+ printf(" v - Verify data correctness\n");
+ printf("\n");
+ printf(" Example: --debug=2,r,t\n");
+ printf("\n");
+ printf(" Environment variables:\n");
+ printf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
+ printf(" HDF5_MPI_INFO MPI INFO object key=value separated by ;\n");
+ printf(" HDF5_PARAPREFIX Parallel data files prefix\n");
fflush(stdout);
} /* end if */
} /* end usage() */
@@ -1680,7 +1680,7 @@ usage(const char *prog)
int
main(void)
{
- HDprintf("No parallel IO performance because parallel is not configured\n");
+ printf("No parallel IO performance because parallel is not configured\n");
return EXIT_SUCCESS;
} /* end main */
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index b80189b..511957b 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -44,7 +44,7 @@
}
#define ERRMSG(mesg) \
{ \
- HDfprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \
+ fprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", mesg, (int)__LINE__, __FILE__); \
}
/* verify: if val is false (0), print mesg. */
@@ -144,7 +144,7 @@ do_sio(parameters param, results *res)
/* IO type */
iot = param.io_type;
- if (NULL == (fname = HDcalloc(FILENAME_MAX, sizeof(char))))
+ if (NULL == (fname = calloc(FILENAME_MAX, sizeof(char))))
GOTOERROR(FAIL);
switch (iot) {
@@ -158,7 +158,7 @@ do_sio(parameters param, results *res)
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
GOTOERROR(FAIL);
}
@@ -173,29 +173,29 @@ do_sio(parameters param, results *res)
/* Validate transfer buffer size */
if (param.buf_size[i] <= 0) {
- HDfprintf(stderr, "Transfer buffer size[%d] (%zu) must be > 0\n", i, buf_size[i]);
+ fprintf(stderr, "Transfer buffer size[%d] (%zu) must be > 0\n", i, buf_size[i]);
GOTOERROR(FAIL);
}
if ((param.dset_size[i] % param.buf_size[i]) != 0) {
- HDfprintf(stderr,
- "Dataset size[%d] (%lld) must be a multiple of the "
- "transfer buffer size[%d] (%zu)\n",
- param.rank, (long long)param.dset_size[i], param.rank, param.buf_size[i]);
+ fprintf(stderr,
+ "Dataset size[%d] (%lld) must be a multiple of the "
+ "transfer buffer size[%d] (%zu)\n",
+ param.rank, (long long)param.dset_size[i], param.rank, param.buf_size[i]);
GOTOERROR(FAIL);
}
}
/* Allocate transfer buffer */
if ((buffer = (char *)malloc(linear_buf_size)) == NULL) {
- HDfprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", linear_buf_size);
+ fprintf(stderr, "malloc for transfer buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
}
if (sio_debug_level >= 4)
/* output all of the times for all iterations */
- HDfprintf(output, "Timer details:\n");
+ fprintf(output, "Timer details:\n");
/*
* Write performance measurement
@@ -206,7 +206,7 @@ do_sio(parameters param, results *res)
sio_create_filename(iot, base_name, fname, FILENAME_MAX, &param);
if (sio_debug_level > 0)
- HDfprintf(output, "data filename=%s\n", fname);
+ fprintf(output, "data filename=%s\n", fname);
io_time_set(res->timers, HDF5_GROSS_WRITE_FIXED_DIMS, TSTART);
hrc = do_fopen(&param, fname, &fd, SIO_CREATE | SIO_WRITE);
@@ -263,13 +263,13 @@ done:
break;
default:
/* unknown request */
- HDassert(0 && "Unknown IO type");
+ assert(0 && "Unknown IO type");
break;
}
/* release generic resources */
- HDfree(buffer);
- HDfree(fname);
+ free(buffer);
+ free(fname);
res->ret_code = ret_code;
}
@@ -310,8 +310,8 @@ sio_create_filename(iotype iot, const char *base_name, char *fullname, size_t si
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
- HDassert(0 && "Unknown IO type");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ assert(0 && "Unknown IO type");
break;
}
@@ -486,14 +486,14 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
break;
default:
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
GOTOERROR(FAIL);
break;
} /* end switch */
@@ -507,7 +507,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
h5dcpl = H5Pcreate(H5P_DATASET_CREATE);
if (h5dcpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -515,7 +515,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Set the chunk size to be the same as the buffer size */
hrc = H5Pset_chunk(h5dcpl, rank, h5chunk);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Set failed\n");
+ fprintf(stderr, "HDF5 Property List Set failed\n");
GOTOERROR(FAIL);
} /* end if */
} /* end if */
@@ -525,21 +525,21 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
H5Dcreate2(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, H5P_DEFAULT, h5dcpl, H5P_DEFAULT);
if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset Create failed\n");
+ fprintf(stderr, "HDF5 Dataset Create failed\n");
GOTOERROR(FAIL);
}
hrc = H5Pclose(h5dcpl);
/* verifying the close of the dcpl */
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Property List Close failed\n");
+ fprintf(stderr, "HDF5 Property List Close failed\n");
GOTOERROR(FAIL);
}
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
GOTOERROR(FAIL);
break;
}
@@ -551,7 +551,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = dset_write(rank - 1, fd, parms, buffer);
if (hrc < 0) {
- HDfprintf(stderr, "Error in dataset write\n");
+ fprintf(stderr, "Error in dataset write\n");
GOTOERROR(FAIL);
}
@@ -565,7 +565,7 @@ do_write(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -578,7 +578,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -589,7 +589,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
+ fprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -600,7 +600,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
}
else {
@@ -660,7 +660,7 @@ dset_write(int local_dim, file_descr *fd, parameters *parms, void *buffer)
for (k = 0; k < parms->rank; k++) {
- HDassert(h5offset[k] >= 0);
+ assert(h5offset[k] >= 0);
if (dims[k] <= (hsize_t)h5offset[k]) {
dims[k] = dims[k] + h5count[k];
hrc = H5Sset_extent_simple(h5dset_space_id, parms->rank, dims, maxdims);
@@ -683,8 +683,8 @@ dset_write(int local_dim, file_descr *fd, parameters *parms, void *buffer)
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
- HDassert(0 && "Unknown IO type");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ assert(0 && "Unknown IO type");
break;
} /* switch (parms->io_type) */
}
@@ -777,7 +777,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Allocate data verification buffer */
if (NULL == (buffer2 = (char *)malloc(linear_buf_size))) {
- HDfprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size);
+ fprintf(stderr, "malloc for data verification buffer size (%zu) failed\n", linear_buf_size);
GOTOERROR(FAIL);
} /* end if */
@@ -828,14 +828,14 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
/* Create the dataset transfer property list */
h5dxpl = H5Pcreate(H5P_DATASET_XFER);
if (h5dxpl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
GOTOERROR(FAIL);
break;
} /* end switch */
@@ -849,14 +849,14 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
HDsnprintf(dname, sizeof(dname), "Dataset_%ld", (long)parms->num_bytes);
h5ds_id = H5Dopen2(fd->h5fd, dname, H5P_DEFAULT);
if (h5ds_id < 0) {
- HDfprintf(stderr, "HDF5 Dataset open failed\n");
+ fprintf(stderr, "HDF5 Dataset open failed\n");
GOTOERROR(FAIL);
}
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
GOTOERROR(FAIL);
break;
} /* end switch */
@@ -866,7 +866,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = dset_read(rank - 1, fd, parms, buffer, buffer2);
if (hrc < 0) {
- HDfprintf(stderr, "Error in dataset read\n");
+ fprintf(stderr, "Error in dataset read\n");
GOTOERROR(FAIL);
}
@@ -880,7 +880,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
hrc = H5Dclose(h5ds_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Close failed\n");
GOTOERROR(FAIL);
}
@@ -893,7 +893,7 @@ done:
if (h5dset_space_id != -1) {
hrc = H5Sclose(h5dset_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Space Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -904,7 +904,7 @@ done:
if (h5mem_space_id != -1) {
hrc = H5Sclose(h5mem_space_id);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Memory Space Close failed\n");
+ fprintf(stderr, "HDF5 Memory Space Close failed\n");
ret_code = FAIL;
}
else {
@@ -915,7 +915,7 @@ done:
if (h5dxpl != -1) {
hrc = H5Pclose(h5dxpl);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
+ fprintf(stderr, "HDF5 Dataset Transfer Property List Close failed\n");
ret_code = FAIL;
}
else {
@@ -981,8 +981,8 @@ dset_read(int local_dim, file_descr *fd, parameters *parms, void *buffer, const
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
- HDassert(0 && "Unknown IO type");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
+ assert(0 && "Unknown IO type");
break;
} /* switch (parms->io_type) */
}
@@ -1065,7 +1065,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fd->posixfd = POSIXOPEN(fname, O_RDONLY);
if (fd->posixfd < 0) {
- HDfprintf(stderr, "POSIX File Open failed(%s)\n", fname);
+ fprintf(stderr, "POSIX File Open failed(%s)\n", fname);
GOTOERROR(FAIL);
}
@@ -1076,7 +1076,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
fapl = set_vfd(param);
if (fapl < 0) {
- HDfprintf(stderr, "HDF5 Property List Create failed\n");
+ fprintf(stderr, "HDF5 Property List Create failed\n");
GOTOERROR(FAIL);
}
@@ -1097,14 +1097,14 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
}
if (fd->h5fd < 0) {
- HDfprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
+ fprintf(stderr, "HDF5 File Create failed(%s)\n", fname);
GOTOERROR(FAIL);
}
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)param->io_type);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)param->io_type);
GOTOERROR(FAIL);
break;
}
@@ -1162,14 +1162,14 @@ set_vfd(parameters *param)
char arr[H5FD_MEM_NTYPES][1024];
} *sv = NULL;
- HDmemset(memb_map, 0, sizeof memb_map);
- HDmemset(memb_fapl, 0, sizeof memb_fapl);
- HDmemset(memb_name, 0, sizeof memb_name);
- HDmemset(memb_addr, 0, sizeof memb_addr);
+ memset(memb_map, 0, sizeof memb_map);
+ memset(memb_fapl, 0, sizeof memb_fapl);
+ memset(memb_name, 0, sizeof memb_name);
+ memset(memb_addr, 0, sizeof memb_addr);
- HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
- if (NULL == (sv = HDcalloc(1, sizeof(*sv))))
+ if (NULL == (sv = calloc(1, sizeof(*sv))))
return -1;
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) {
memb_fapl[mt] = H5P_DEFAULT;
@@ -1179,11 +1179,11 @@ set_vfd(parameters *param)
}
if (H5Pset_fapl_multi(my_fapl, memb_map, memb_fapl, memb_name, memb_addr, FALSE) < 0) {
- HDfree(sv);
+ free(sv);
return -1;
}
- HDfree(sv);
+ free(sv);
}
else if (vfd == family) {
hsize_t fam_size = 1 * 1024 * 1024; /*100 MB*/
@@ -1227,7 +1227,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
rc = POSIXCLOSE(fd->posixfd);
if (rc != 0) {
- HDfprintf(stderr, "POSIX File Close failed\n");
+ fprintf(stderr, "POSIX File Close failed\n");
GOTOERROR(FAIL);
}
@@ -1238,7 +1238,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
hrc = H5Fclose(fd->h5fd);
if (hrc < 0) {
- HDfprintf(stderr, "HDF5 File Close failed\n");
+ fprintf(stderr, "HDF5 File Close failed\n");
GOTOERROR(FAIL);
}
@@ -1247,7 +1247,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
GOTOERROR(FAIL);
break;
}
@@ -1271,7 +1271,7 @@ do_cleanupfile(iotype iot, char *filename)
hid_t driver;
temp_sz = (4096 + sizeof("-?.h5")) * sizeof(char);
- if (NULL == (temp = HDcalloc(1, temp_sz)))
+ if (NULL == (temp = calloc(1, temp_sz)))
goto done;
if (clean_file_g == -1)
@@ -1310,7 +1310,7 @@ do_cleanupfile(iotype iot, char *filename)
}
else if (driver == H5FD_MULTI) {
H5FD_mem_t mt;
- HDassert(HDstrlen(multi_letters) == H5FD_MEM_NTYPES);
+ assert(HDstrlen(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]);
@@ -1325,12 +1325,12 @@ do_cleanupfile(iotype iot, char *filename)
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
- HDassert(0 && "Unknown IO type");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ assert(0 && "Unknown IO type");
break;
}
}
done:
- HDfree(temp);
+ free(temp);
}
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index ef9e7db..a06e1fe 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -202,8 +202,8 @@ main(int argc, char *argv[])
}
if (opts->output_file) {
- if ((output = HDfopen(opts->output_file, "w")) == NULL) {
- HDfprintf(stderr, "%s: cannot open output file\n", progname);
+ if ((output = fopen(opts->output_file, "w")) == NULL) {
+ fprintf(stderr, "%s: cannot open output file\n", progname);
HDperror(opts->output_file);
goto finish;
}
@@ -214,7 +214,7 @@ main(int argc, char *argv[])
run_test_loop(opts);
finish:
- HDfree(opts);
+ free(opts);
return exit_value;
}
@@ -327,8 +327,8 @@ run_test(iotype iot, parameters parms, struct options *opts)
break;
default:
/* unknown request */
- HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
- HDassert(0 && "Unknown IO tpe");
+ fprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
+ assert(0 && "Unknown IO tpe");
break;
}
@@ -500,16 +500,16 @@ run_test(iotype iot, parameters parms, struct options *opts)
}
/* clean up our mess */
- HDfree(write_sys_mm_table);
- HDfree(write_mm_table);
- HDfree(write_gross_mm_table);
- HDfree(write_raw_mm_table);
+ free(write_sys_mm_table);
+ free(write_mm_table);
+ free(write_gross_mm_table);
+ free(write_raw_mm_table);
if (!parms.h5_write_only) {
- HDfree(read_sys_mm_table);
- HDfree(read_mm_table);
- HDfree(read_gross_mm_table);
- HDfree(read_raw_mm_table);
+ free(read_sys_mm_table);
+ free(read_mm_table);
+ free(read_gross_mm_table);
+ free(read_raw_mm_table);
}
return ret_value;
@@ -633,11 +633,11 @@ output_report(const char *fmt, ...)
{
va_list ap;
- HDva_start(ap, fmt);
+ va_start(ap, fmt);
H5_GCC_CLANG_DIAG_OFF("format-nonliteral")
HDvfprintf(output, fmt, ap);
H5_GCC_CLANG_DIAG_ON("format-nonliteral")
- HDva_end(ap);
+ va_end(ap);
}
/*
@@ -662,28 +662,28 @@ recover_size_and_print(long long val, const char *end)
if (val >= ONE_KB && (val % ONE_KB) == 0) {
if (val >= ONE_MB && (val % ONE_MB) == 0) {
if (val >= ONE_GB && (val % ONE_GB) == 0)
- HDfprintf(output,
- "%lld"
- "GB%s",
- val / ONE_GB, end);
+ fprintf(output,
+ "%lld"
+ "GB%s",
+ val / ONE_GB, end);
else
- HDfprintf(output,
- "%lld"
- "MB%s",
- val / ONE_MB, end);
+ fprintf(output,
+ "%lld"
+ "MB%s",
+ val / ONE_MB, end);
}
else {
- HDfprintf(output,
- "%lld"
- "KB%s",
- val / ONE_KB, end);
+ fprintf(output,
+ "%lld"
+ "KB%s",
+ val / ONE_KB, end);
}
}
else {
- HDfprintf(output,
- "%lld"
- "%s",
- val, end);
+ fprintf(output,
+ "%lld"
+ "%s",
+ val, end);
}
}
@@ -691,10 +691,10 @@ static void
print_io_api(long io_types)
{
if (io_types & SIO_POSIX)
- HDfprintf(output, "posix ");
+ fprintf(output, "posix ");
if (io_types & SIO_HDF5)
- HDfprintf(output, "hdf5 ");
- HDfprintf(output, "\n");
+ fprintf(output, "hdf5 ");
+ fprintf(output, "\n");
}
static void
@@ -704,95 +704,95 @@ report_parameters(struct options *opts)
rank = opts->dset_rank;
print_version("HDF5 Library"); /* print library version */
- HDfprintf(output, "==== Parameters ====\n");
+ fprintf(output, "==== Parameters ====\n");
- HDfprintf(output, "IO API=");
+ fprintf(output, "IO API=");
print_io_api(opts->io_types);
- HDfprintf(output, "Number of iterations=%d\n", opts->num_iters);
+ fprintf(output, "Number of iterations=%d\n", opts->num_iters);
- HDfprintf(output, "Dataset size=");
+ fprintf(output, "Dataset size=");
for (i = 0; i < rank; i++)
recover_size_and_print((long long)opts->dset_size[i], " ");
- HDfprintf(output, "\n");
+ fprintf(output, "\n");
- HDfprintf(output, "Transfer buffer size=");
+ fprintf(output, "Transfer buffer size=");
for (i = 0; i < rank; i++)
recover_size_and_print((long long)opts->buf_size[i], " ");
- HDfprintf(output, "\n");
+ fprintf(output, "\n");
if (opts->page_size) {
- HDfprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size);
+ fprintf(output, "Page Aggregation Enabled. Page size = %zu\n", opts->page_size);
if (opts->page_buffer_size)
- HDfprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size);
+ fprintf(output, "Page Buffering Enabled. Page Buffer size = %zu\n", opts->page_buffer_size);
else
- HDfprintf(output, "Page Buffering Disabled\n");
+ fprintf(output, "Page Buffering Disabled\n");
}
else
- HDfprintf(output, "Page Aggregation Disabled\n");
+ fprintf(output, "Page Aggregation Disabled\n");
- HDfprintf(output, "Dimension access order=");
+ fprintf(output, "Dimension access order=");
for (i = 0; i < rank; i++)
recover_size_and_print((long long)opts->order[i], " ");
- HDfprintf(output, "\n");
+ fprintf(output, "\n");
if (opts->io_types & SIO_HDF5) {
- HDfprintf(output, "HDF5 data storage method=");
+ fprintf(output, "HDF5 data storage method=");
if (opts->h5_use_chunks) {
- HDfprintf(output, "Chunked\n");
- HDfprintf(output, "HDF5 chunk size=");
+ fprintf(output, "Chunked\n");
+ fprintf(output, "HDF5 chunk size=");
for (i = 0; i < rank; i++)
recover_size_and_print((long long)opts->chk_size[i], " ");
- HDfprintf(output, "\n");
+ fprintf(output, "\n");
- HDfprintf(output, "HDF5 dataset dimensions=");
+ fprintf(output, "HDF5 dataset dimensions=");
if (opts->h5_extendable) {
- HDfprintf(output, "Extendable\n");
+ fprintf(output, "Extendable\n");
}
else {
- HDfprintf(output, "Fixed\n");
+ fprintf(output, "Fixed\n");
}
}
else {
- HDfprintf(output, "Contiguous\n");
+ fprintf(output, "Contiguous\n");
}
- HDfprintf(output, "HDF5 file driver=");
+ fprintf(output, "HDF5 file driver=");
if (opts->vfd == sec2) {
- HDfprintf(output, "sec2\n");
+ fprintf(output, "sec2\n");
}
else if (opts->vfd == stdio) {
- HDfprintf(output, "stdio\n");
+ fprintf(output, "stdio\n");
}
else if (opts->vfd == core) {
- HDfprintf(output, "core\n");
+ fprintf(output, "core\n");
}
else if (opts->vfd == split) {
- HDfprintf(output, "split\n");
+ fprintf(output, "split\n");
}
else if (opts->vfd == multi) {
- HDfprintf(output, "multi\n");
+ fprintf(output, "multi\n");
}
else if (opts->vfd == family) {
- HDfprintf(output, "family\n");
+ fprintf(output, "family\n");
}
else if (opts->vfd == direct) {
- HDfprintf(output, "direct\n");
+ fprintf(output, "direct\n");
}
}
{
char *prefix = HDgetenv("HDF5_PREFIX");
- HDfprintf(output, "Env HDF5_PREFIX=%s\n", (prefix ? prefix : "not set"));
+ fprintf(output, "Env HDF5_PREFIX=%s\n", (prefix ? prefix : "not set"));
}
- HDfprintf(output, "==== End of Parameters ====\n");
- HDfprintf(output, "\n");
+ fprintf(output, "==== End of Parameters ====\n");
+ fprintf(output, "\n");
}
/*
@@ -809,7 +809,7 @@ parse_command_line(int argc, const char *const *argv)
struct options *cl_opts;
int i, default_rank, actual_rank, ranks[4];
- cl_opts = (struct options *)HDmalloc(sizeof(struct options));
+ cl_opts = (struct options *)malloc(sizeof(struct options));
cl_opts->page_buffer_size = 0;
cl_opts->page_size = 0;
@@ -859,7 +859,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -872,8 +872,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->io_types |= SIO_POSIX;
}
else {
- HDfprintf(stderr, "sio_perf: invalid --api option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "sio_perf: invalid --api option %s\n", buf);
+ exit(EXIT_FAILURE);
}
if (*end == '\0')
@@ -899,7 +899,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -925,7 +925,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -936,8 +936,8 @@ parse_command_line(int argc, const char *const *argv)
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
if (!HDisdigit(buf[j])) {
- HDfprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
+ exit(EXIT_FAILURE);
}
sio_debug_level = atoi(buf);
@@ -962,8 +962,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->verify = TRUE;
break;
default:
- HDfprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
+ exit(EXIT_FAILURE);
}
}
@@ -982,7 +982,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -1003,7 +1003,7 @@ parse_command_line(int argc, const char *const *argv)
break;
case 'i':
- cl_opts->num_iters = HDatoi(H5_optarg);
+ cl_opts->num_iters = atoi(H5_optarg);
break;
case 'o':
cl_opts->output_file = H5_optarg;
@@ -1034,8 +1034,8 @@ parse_command_line(int argc, const char *const *argv)
cl_opts->vfd = direct;
}
else {
- HDfprintf(stderr, "sio_perf: invalid --api option %s\n", H5_optarg);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "sio_perf: invalid --api option %s\n", H5_optarg);
+ exit(EXIT_FAILURE);
}
break;
case 'w':
@@ -1051,7 +1051,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -1078,7 +1078,7 @@ parse_command_line(int argc, const char *const *argv)
while (end && *end != '\0') {
char buf[10];
- HDmemset(buf, '\0', sizeof(buf));
+ memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
if (HDisalnum(*end) && i < 10)
@@ -1103,7 +1103,7 @@ parse_command_line(int argc, const char *const *argv)
case '?':
default:
usage(progname);
- HDfree(cl_opts);
+ free(cl_opts);
return NULL;
}
}
@@ -1198,8 +1198,8 @@ parse_size_directive(const char *size)
break;
default:
- HDfprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "Illegal size specifier '%c'\n", *endptr);
+ exit(EXIT_FAILURE);
}
}
@@ -1216,70 +1216,70 @@ static void
usage(const char *prog)
{
print_version(prog);
- HDprintf("usage: %s [OPTIONS]\n", prog);
- HDprintf(" OPTIONS\n");
- HDprintf(" -h Print an usage message and exit\n");
- HDprintf(" -A AL Which APIs to test\n");
- HDprintf(" [default: all of them]\n");
- HDprintf(" -c SL Selects chunked storage and defines chunks dimensions\n");
- HDprintf(" and sizes\n");
- HDprintf(" [default: Off]\n");
- HDprintf(" -e SL Dimensions and sizes of dataset\n");
- HDprintf(" [default: 100,200]\n");
- HDprintf(" -i N Number of iterations to perform\n");
- HDprintf(" [default: 1]\n");
- HDprintf(" -r NL Dimension access order (see below for description)\n");
- HDprintf(" [default: 1,2]\n");
- HDprintf(" -t Selects extendable dimensions for HDF5 dataset\n");
- HDprintf(" [default: Off]\n");
- HDprintf(" -v VFD Selects file driver for HDF5 access\n");
- HDprintf(" [default: sec2]\n");
- HDprintf(" -w Perform write tests, not the read tests\n");
- HDprintf(" [default: Off]\n");
- HDprintf(" -x SL Dimensions and sizes of the transfer buffer\n");
- HDprintf(" [default: 10,20]\n");
- HDprintf("\n");
- HDprintf(" N - is an integer > 0.\n");
- HDprintf("\n");
- HDprintf(" S - is a size specifier, an integer > 0 followed by a size indicator:\n");
- HDprintf(" K - Kilobyte (%d)\n", ONE_KB);
- HDprintf(" M - Megabyte (%d)\n", ONE_MB);
- HDprintf(" G - Gigabyte (%d)\n", ONE_GB);
- HDprintf("\n");
- HDprintf(" Example: '37M' is 37 megabytes or %d bytes\n", 37 * ONE_MB);
- HDprintf("\n");
- HDprintf(" AL - is an API list. Valid values are:\n");
- HDprintf(" hdf5 - HDF5\n");
- HDprintf(" posix - POSIX\n");
- HDprintf("\n");
- HDprintf(" Example: -A posix,hdf5\n");
- HDprintf("\n");
- HDprintf(" NL - is list of integers (N) separated by commas.\n");
- HDprintf("\n");
- HDprintf(" Example: 1,2,3\n");
- HDprintf("\n");
- HDprintf(" SL - is list of size specifiers (S) separated by commas.\n");
- HDprintf("\n");
- HDprintf(" Example: 2K,2K,3K\n");
- HDprintf("\n");
- HDprintf(" The example defines an object (dataset, transfer buffer) with three\n");
- HDprintf(" dimensions. Be aware that as the number of dimensions increases, the\n");
- HDprintf(" the total size of the object increases exponentially.\n");
- HDprintf("\n");
- HDprintf(" VFD - is an HDF5 file driver specifier. Valid values are:\n");
- HDprintf(" sec2, stdio, core, split, multi, family, direct\n");
- HDprintf("\n");
- HDprintf(" Dimension access order:\n");
- HDprintf(" Data access starts at the cardinal origin of the dataset using the\n");
- HDprintf(" transfer buffer. The next access occurs on a dataset region next to\n");
- HDprintf(" the previous one. For a multidimensional dataset, there are several\n");
- HDprintf(" directions as to where to proceed. This can be specified in the dimension\n");
- HDprintf(" access order. For example, -r 1,2 states that the tool should traverse\n");
- HDprintf(" dimension 1 first, and then dimension 2.\n");
- HDprintf("\n");
- HDprintf(" Environment variables:\n");
- HDprintf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
- HDprintf(" HDF5_PREFIX Data file prefix\n");
- HDprintf("\n");
- HDfflush(stdout);
+ printf("usage: %s [OPTIONS]\n", prog);
+ printf(" OPTIONS\n");
+ printf(" -h Print an usage message and exit\n");
+ printf(" -A AL Which APIs to test\n");
+ printf(" [default: all of them]\n");
+ printf(" -c SL Selects chunked storage and defines chunks dimensions\n");
+ printf(" and sizes\n");
+ printf(" [default: Off]\n");
+ printf(" -e SL Dimensions and sizes of dataset\n");
+ printf(" [default: 100,200]\n");
+ printf(" -i N Number of iterations to perform\n");
+ printf(" [default: 1]\n");
+ printf(" -r NL Dimension access order (see below for description)\n");
+ printf(" [default: 1,2]\n");
+ printf(" -t Selects extendable dimensions for HDF5 dataset\n");
+ printf(" [default: Off]\n");
+ printf(" -v VFD Selects file driver for HDF5 access\n");
+ printf(" [default: sec2]\n");
+ printf(" -w Perform write tests, not the read tests\n");
+ printf(" [default: Off]\n");
+ printf(" -x SL Dimensions and sizes of the transfer buffer\n");
+ printf(" [default: 10,20]\n");
+ printf("\n");
+ printf(" N - is an integer > 0.\n");
+ printf("\n");
+ printf(" S - is a size specifier, an integer > 0 followed by a size indicator:\n");
+ printf(" K - Kilobyte (%d)\n", ONE_KB);
+ printf(" M - Megabyte (%d)\n", ONE_MB);
+ printf(" G - Gigabyte (%d)\n", ONE_GB);
+ printf("\n");
+ printf(" Example: '37M' is 37 megabytes or %d bytes\n", 37 * ONE_MB);
+ printf("\n");
+ printf(" AL - is an API list. Valid values are:\n");
+ printf(" hdf5 - HDF5\n");
+ printf(" posix - POSIX\n");
+ printf("\n");
+ printf(" Example: -A posix,hdf5\n");
+ printf("\n");
+ printf(" NL - is list of integers (N) separated by commas.\n");
+ printf("\n");
+ printf(" Example: 1,2,3\n");
+ printf("\n");
+ printf(" SL - is list of size specifiers (S) separated by commas.\n");
+ printf("\n");
+ printf(" Example: 2K,2K,3K\n");
+ printf("\n");
+ printf(" The example defines an object (dataset, transfer buffer) with three\n");
+ printf(" dimensions. Be aware that as the number of dimensions increases, the\n");
+ printf(" the total size of the object increases exponentially.\n");
+ printf("\n");
+ printf(" VFD - is an HDF5 file driver specifier. Valid values are:\n");
+ printf(" sec2, stdio, core, split, multi, family, direct\n");
+ printf("\n");
+ printf(" Dimension access order:\n");
+ printf(" Data access starts at the cardinal origin of the dataset using the\n");
+ printf(" transfer buffer. The next access occurs on a dataset region next to\n");
+ printf(" the previous one. For a multidimensional dataset, there are several\n");
+ printf(" directions as to where to proceed. This can be specified in the dimension\n");
+ printf(" access order. For example, -r 1,2 states that the tool should traverse\n");
+ printf(" dimension 1 first, and then dimension 2.\n");
+ printf("\n");
+ printf(" Environment variables:\n");
+ printf(" HDF5_NOCLEANUP Do not remove data files if set [default remove]\n");
+ printf(" HDF5_PREFIX Data file prefix\n");
+ printf("\n");
+ fflush(stdout);
} /* end usage() */
diff --git a/tools/src/h5repack/h5repack.c b/tools/src/h5repack/h5repack.c
index c58943b..0ced980 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -71,7 +71,7 @@ h5repack_init(pack_opt_t *options, int verbose, hbool_t latest)
{
int k, n;
- HDmemset(options, 0, sizeof(pack_opt_t));
+ memset(options, 0, sizeof(pack_opt_t));
options->min_comp = 0;
options->verbose = verbose;
options->latest = latest;
@@ -132,7 +132,7 @@ h5repack_addfilter(const char *str, pack_opt_t *options)
n = options->n_filter_g++; /* increase # of global filters */
if (options->n_filter_g > H5_REPACK_MAX_NFILTERS) {
error_msg("maximum number of filters exceeded for <%s>\n", str);
- HDfree(obj_list);
+ free(obj_list);
return -1;
}
@@ -141,7 +141,7 @@ h5repack_addfilter(const char *str, pack_opt_t *options)
else
options_add_filter(obj_list, n_objs, filter, options->op_tbl);
- HDfree(obj_list);
+ free(obj_list);
return 0;
} /* end h5repack_addfilter() */
@@ -195,7 +195,7 @@ h5repack_addlayout(const char *str, pack_opt_t *options)
if (options->all_layout == 0)
ret_value = options_add_layout(obj_list, n_objs, &pack, options->op_tbl);
- HDfree(obj_list);
+ free(obj_list);
ret_value = 0;
} /* end if obj_list exists */
@@ -253,13 +253,13 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
for (i = 0; i < travt->nobjs; i++) {
if (travt->objs[i].type == H5TRAV_TYPE_NAMED_DATATYPE) {
/* Push onto the stack */
- if (NULL == (dt = (named_dt_t *)HDmalloc(sizeof(named_dt_t))))
+ if (NULL == (dt = (named_dt_t *)malloc(sizeof(named_dt_t))))
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "buffer allocation failed failed");
dt->next = *named_dt_head_p;
*named_dt_head_p = dt;
/* Update the token/address and id */
- HDmemcpy(&dt->obj_token, &travt->objs[i].obj_token, sizeof(H5O_token_t));
+ memcpy(&dt->obj_token, &travt->objs[i].obj_token, sizeof(H5O_token_t));
dt->id_out = H5I_INVALID_HID;
/* Check if this type is the one requested */
@@ -276,13 +276,13 @@ copy_named_datatype(hid_t type_in, hid_t fidout, named_dt_t **named_dt_head_p, t
*/
if (!dt_ret) {
/* Push the new datatype onto the stack */
- if (NULL == (dt_ret = (named_dt_t *)HDmalloc(sizeof(named_dt_t))))
+ if (NULL == (dt_ret = (named_dt_t *)malloc(sizeof(named_dt_t))))
H5TOOLS_GOTO_ERROR(H5I_INVALID_HID, "buffer allocation failed failed");
dt_ret->next = *named_dt_head_p;
*named_dt_head_p = dt_ret;
/* Update the token/address and id */
- HDmemcpy(&dt_ret->obj_token, &oinfo.token, sizeof(H5O_token_t));
+ memcpy(&dt_ret->obj_token, &oinfo.token, sizeof(H5O_token_t));
dt_ret->id_out = H5I_INVALID_HID;
} /* end if requested datatype not found */
@@ -330,7 +330,7 @@ named_datatype_free(named_dt_t **named_dt_head_p, int ignore_err)
if (H5Tclose(dt->id_out) < 0 && !ignore_err)
H5TOOLS_GOTO_ERROR((-1), "H5Tclose failed");
dt = dt->next;
- HDfree(*named_dt_head_p);
+ free(*named_dt_head_p);
*named_dt_head_p = dt;
}
@@ -481,9 +481,9 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
*-----------------------------------------------------------------
*/
- buf = (void *)HDmalloc((size_t)(nelmts * msize));
+ buf = (void *)malloc((size_t)(nelmts * msize));
if (buf == NULL) {
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (options->verbose == 2) {
H5_timer_init(&timer);
@@ -526,15 +526,15 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
if (TRUE == h5tools_detect_vlen(wtype_id))
H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
- HDfree(buf);
+ free(buf);
buf = NULL;
} /*H5T_REFERENCE*/
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_ATTR_TIME, "attr", read_time, write_time, name);
+ printf(FORMAT_OBJ_ATTR_TIME, "attr", read_time, write_time, name);
else
- HDprintf(FORMAT_OBJ_ATTR, "attr", name);
+ printf(FORMAT_OBJ_ATTR, "attr", name);
}
/*---------------------------------------------------------------------
@@ -566,7 +566,7 @@ done:
H5Treclaim(wtype_id, space_id, H5P_DEFAULT, buf);
/* Free buf */
- HDfree(buf);
+ free(buf);
}
H5Aclose(attr_out);
@@ -602,7 +602,7 @@ check_options(pack_opt_t *options)
*/
if (options->verbose > 0 && have_request(options)) {
if (options->all_layout == 1) {
- HDprintf("All objects to modify layout are...\n");
+ printf("All objects to modify layout are...\n");
switch (options->layout_g) {
case H5D_COMPACT:
strcpy(slayout, "compact");
@@ -624,17 +624,17 @@ check_options(pack_opt_t *options)
strcpy(slayout, "invalid layout\n");
H5TOOLS_GOTO_DONE((-1));
}
- HDprintf(" Apply %s layout to all", slayout);
+ printf(" Apply %s layout to all", slayout);
if (H5D_CHUNKED == options->layout_g) {
- HDprintf("with dimension [ ");
+ printf("with dimension [ ");
for (j = 0; j < options->chunk_g.rank; j++)
- HDprintf("%d ", (int)options->chunk_g.chunk_lengths[j]);
- HDprintf("]");
+ printf("%d ", (int)options->chunk_g.chunk_lengths[j]);
+ printf("]");
}
- HDprintf("\n");
+ printf("\n");
}
else
- HDprintf("No all objects to modify layout\n");
+ printf("No all objects to modify layout\n");
} /* end if verbose */
for (i = 0; i < options->op_tbl->nelems; i++) {
@@ -642,16 +642,16 @@ check_options(pack_opt_t *options)
if (options->op_tbl->objs[i].chunk.rank > 0) {
if (options->verbose > 0) {
- HDprintf(" <%s> with chunk size ", name);
+ printf(" <%s> with chunk size ", name);
for (k = 0; k < options->op_tbl->objs[i].chunk.rank; k++)
- HDprintf("%d ", (int)options->op_tbl->objs[i].chunk.chunk_lengths[k]);
- HDprintf("\n");
+ printf("%d ", (int)options->op_tbl->objs[i].chunk.chunk_lengths[k]);
+ printf("\n");
}
has_ck = 1;
}
else if (options->op_tbl->objs[i].chunk.rank == -2) { /* TODO: replace 'magic number' */
if (options->verbose > 0)
- HDprintf(" <%s> %s\n", name, "NONE (contiguous)");
+ printf(" <%s> %s\n", name, "NONE (contiguous)");
has_ck = 1;
}
} /* end for each object in options */
@@ -666,34 +666,34 @@ check_options(pack_opt_t *options)
if (options->verbose > 0 && have_request(options)) {
if (options->all_filter == 1) {
- HDprintf("All objects to apply filter are...\n");
+ printf("All objects to apply filter are...\n");
for (k = 0; k < options->n_filter_g; k++) {
H5Z_filter_t filtn = options->filter_g[k].filtn;
if (filtn < 0) {
- HDprintf(" Unknown\n");
+ printf(" Unknown\n");
continue;
}
switch (filtn) {
case H5Z_FILTER_NONE:
- HDprintf(" Uncompress all\n");
+ printf(" Uncompress all\n");
break;
case H5Z_FILTER_SHUFFLE:
case H5Z_FILTER_FLETCHER32:
- HDprintf(" All with %s\n", get_sfilter(filtn));
+ printf(" All with %s\n", get_sfilter(filtn));
break;
case H5Z_FILTER_SZIP:
case H5Z_FILTER_DEFLATE:
- HDprintf(" All with %s, parameter %d\n", get_sfilter(filtn),
- options->filter_g[k].cd_values[0]);
+ printf(" All with %s, parameter %d\n", get_sfilter(filtn),
+ options->filter_g[k].cd_values[0]);
break;
default:
- HDprintf(" User Defined %d\n", filtn);
+ printf(" User Defined %d\n", filtn);
break;
} /* end switch */
} /* end for each filter */
} /* end if options->all_filter == 1 (TODO: meaning) */
else
- HDprintf("No all objects to apply filter\n");
+ printf("No all objects to apply filter\n");
} /* end if verbose */
for (i = 0; i < options->op_tbl->nelems; i++) {
@@ -704,11 +704,11 @@ check_options(pack_opt_t *options)
if (options->verbose > 0) {
if (pack.filter[j].filtn >= 0) {
if (pack.filter[j].filtn > H5Z_FILTER_SCALEOFFSET) {
- HDprintf(" <%s> with %s filter %d\n", name, get_sfilter(pack.filter[j].filtn),
- pack.filter[j].filtn);
+ printf(" <%s> with %s filter %d\n", name, get_sfilter(pack.filter[j].filtn),
+ pack.filter[j].filtn);
}
else {
- HDprintf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn));
+ printf(" <%s> with %s filter\n", name, get_sfilter(pack.filter[j].filtn));
}
}
}
@@ -740,8 +740,8 @@ check_options(pack_opt_t *options)
*/
if (options->ublock_filename != NULL && options->ublock_size == 0) {
if (options->verbose > 0) {
- HDprintf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n",
- options->ublock_filename);
+ printf("Warning: user block size missing for file %s. Assigning a default size of 1024...\n",
+ options->ublock_filename);
options->ublock_size = 1024;
}
}
@@ -813,21 +813,21 @@ check_objects(const char *fname, pack_opt_t *options)
*/
if (options->verbose > 0)
- HDprintf("Opening file. Searching %zu objects to modify ...\n", travt->nobjs);
+ printf("Opening file. Searching %zu objects to modify ...\n", travt->nobjs);
for (i = 0; i < options->op_tbl->nelems; i++) {
pack_info_t obj = options->op_tbl->objs[i];
char *name = obj.path;
if (options->verbose > 0)
- HDprintf(" <%s>", name);
+ printf(" <%s>", name);
/* the input object names are present in the file and are valid */
if (h5trav_getindext(name, travt) < 0)
H5TOOLS_GOTO_ERROR((-1), "%s Could not find <%s> in file <%s>. Exiting...\n",
(options->verbose > 0 ? "\n" : ""), name, fname);
if (options->verbose > 0)
- HDprintf("...Found\n");
+ printf("...Found\n");
for (ifil = 0; ifil < obj.nfilters; ifil++) {
if (obj.filter[ifil].filtn < 0)
@@ -854,7 +854,7 @@ check_objects(const char *fname, pack_opt_t *options)
H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed");
if ((rank = H5Sget_simple_extent_ndims(sid)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_ndims failed");
- HDmemset(dims, 0, sizeof dims);
+ memset(dims, 0, sizeof dims);
if (H5Sget_simple_extent_dims(sid, dims, NULL) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_dims failed");
for (j = 0; j < rank; j++)
@@ -866,7 +866,7 @@ check_objects(const char *fname, pack_opt_t *options)
}
if (csize < ppb) {
- HDprintf(" <warning: SZIP settings, chunk size is smaller than pixels per block>\n");
+ printf(" <warning: SZIP settings, chunk size is smaller than pixels per block>\n");
H5TOOLS_GOTO_DONE(0);
}
} /* end case SZIP */
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 42c393b..172ba26 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -299,7 +299,7 @@ copy_objects(const char *fnamein, const char *fnameout, pack_opt_t *options)
*-------------------------------------------------------------------------
*/
if (options->verbose > 0)
- HDprintf("Making new file ...\n");
+ printf("Making new file ...\n");
if ((fidout = H5Fcreate(fnameout, H5F_ACC_TRUNC, fcpl, options->fout_fapl)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Fcreate could not create file <%s>:", fnameout);
@@ -658,7 +658,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
int ret_value = 0;
/* init linkinfo struct */
- HDmemset(&linkinfo, 0, sizeof(h5tool_link_info_t));
+ memset(&linkinfo, 0, sizeof(h5tool_link_info_t));
/*-------------------------------------------------------------------------
* copy the supplied object list
@@ -667,14 +667,14 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (options->verbose > 0) {
if (options->verbose == 2) {
- HDprintf("-----------------------------------------------------------------\n");
- HDprintf(" Type Filter (Compression) Timing read/write Name\n");
- HDprintf("-----------------------------------------------------------------\n");
+ printf("-----------------------------------------------------------------\n");
+ printf(" Type Filter (Compression) Timing read/write Name\n");
+ printf("-----------------------------------------------------------------\n");
}
else {
- HDprintf("-----------------------------------------\n");
- HDprintf(" Type Filter (Compression) Name\n");
- HDprintf("-----------------------------------------\n");
+ printf("-----------------------------------------\n");
+ printf(" Type Filter (Compression) Name\n");
+ printf("-----------------------------------------\n");
}
}
@@ -695,9 +695,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
case H5TRAV_TYPE_GROUP:
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_NOTIME, "group", travt->objs[i].name);
+ printf(FORMAT_OBJ_NOTIME, "group", travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "group", travt->objs[i].name);
+ printf(FORMAT_OBJ, "group", travt->objs[i].name);
}
/* open input group */
@@ -877,7 +877,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Dget_create_plist failed");
if ((rank = H5Sget_simple_extent_ndims(f_space_id)) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_ndims failed");
- HDmemset(dims, 0, sizeof dims);
+ memset(dims, 0, sizeof dims);
if (H5Sget_simple_extent_dims(f_space_id, dims, NULL) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sget_simple_extent_dims failed");
if (H5Dget_space_status(dset_in, &space_status) < 0)
@@ -991,9 +991,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (dset_out == H5I_INVALID_HID) {
H5TOOLS_INFO("H5Dcreate2 failed");
if (options->verbose > 0)
- HDprintf(" warning: could not create dataset <%s>. Applying original "
- "settings\n",
- travt->objs[i].name);
+ printf(" warning: could not create dataset <%s>. Applying original "
+ "settings\n",
+ travt->objs[i].name);
if ((dset_out =
H5Dcreate2(fidout, travt->objs[i].name, wtype_id, f_space_id,
@@ -1012,7 +1012,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* have to read the whole dataset if there is only one element in the
* dataset */
if (need < H5TOOLS_MALLOCSIZE)
- buf = HDmalloc(need);
+ buf = malloc(need);
/* Set up collective write if using filters in parallel */
{
@@ -1061,7 +1061,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (buf != NULL) { /* TODO: is buf potentially released by
H5Dvlen_reclaim()? */
- HDfree(buf);
+ free(buf);
buf = NULL;
}
}
@@ -1108,7 +1108,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
&hslab_nbytes) < 0)
H5TOOLS_GOTO_ERROR((-1), "get_hyperslab failed");
- hslab_buf = HDmalloc((size_t)hslab_nbytes);
+ hslab_buf = malloc((size_t)hslab_nbytes);
if (hslab_buf == NULL)
H5TOOLS_GOTO_ERROR((-1), "can't allocate space for hyperslab");
@@ -1116,8 +1116,8 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
hslab_space = H5Screate_simple(1, &hslab_nelmts, NULL);
/* the hyperslab selection loop */
- HDmemset(hs_sel_offset, 0, sizeof hs_sel_offset);
- HDmemset(zero, 0, sizeof zero);
+ memset(hs_sel_offset, 0, sizeof hs_sel_offset);
+ memset(zero, 0, sizeof zero);
for (elmtno = 0; elmtno < p_nelmts; elmtno += hs_select_nelmts) {
if (rank > 0) {
@@ -1189,7 +1189,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5Sclose(hslab_space);
if (hslab_buf != NULL) {
- HDfree(hslab_buf);
+ free(hslab_buf);
hslab_buf = NULL;
}
} /* end if reading/writing by hyperslab */
@@ -1221,13 +1221,13 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
* (in case there was a filter)
*/
if (has_filter && apply_s == 0)
- HDprintf(" <warning: filter not applied to %s. dataset smaller than "
- "%d bytes>\n",
- travt->objs[i].name, (int)options->min_comp);
+ printf(" <warning: filter not applied to %s. dataset smaller than "
+ "%d bytes>\n",
+ travt->objs[i].name, (int)options->min_comp);
if (has_filter && apply_f == 0)
- HDprintf(" <warning: could not apply the filter to %s>\n",
- travt->objs[i].name);
+ printf(" <warning: could not apply the filter to %s>\n",
+ travt->objs[i].name);
} /* end if verbose (print compression) */
/*-------------------------------------------------------------------------
@@ -1310,9 +1310,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_TIME, "dset", 0.0, write_time, travt->objs[i].name);
+ printf(FORMAT_OBJ_TIME, "dset", 0.0, write_time, travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name);
+ printf(FORMAT_OBJ, "dset", travt->objs[i].name);
}
} /* end whether we have request for filter/chunking */
@@ -1327,9 +1327,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
case H5TRAV_TYPE_NAMED_DATATYPE:
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_NOTIME, "type", travt->objs[i].name);
+ printf(FORMAT_OBJ_NOTIME, "type", travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "type", travt->objs[i].name);
+ printf(FORMAT_OBJ, "type", travt->objs[i].name);
}
if ((type_in = H5Topen2(fidin, travt->objs[i].name, H5P_DEFAULT)) < 0)
@@ -1371,9 +1371,9 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
case H5TRAV_TYPE_UDLINK:
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_NOTIME, "link", travt->objs[i].name);
+ printf(FORMAT_OBJ_NOTIME, "link", travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "link", travt->objs[i].name);
+ printf(FORMAT_OBJ, "link", travt->objs[i].name);
}
/* Check -X option. */
@@ -1381,7 +1381,7 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (H5tools_get_symlink_info(fidin, travt->objs[i].name, &linkinfo, 1) == 0) {
/* dangling link */
if (options->prune) {
- HDprintf("Pruned %s.\n", travt->objs[i].name);
+ printf("Pruned %s.\n", travt->objs[i].name);
}
else {
if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name,
@@ -1421,12 +1421,12 @@ do_copy_objects(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ free(linkinfo.trg_path);
linkinfo.trg_path = NULL;
} /* options->merge */
else {
if (options->prune) {
- HDprintf("Pruned %s.\n", travt->objs[i].name);
+ printf("Pruned %s.\n", travt->objs[i].name);
}
else {
if (H5Lcopy(fidin, travt->objs[i].name, fidout, travt->objs[i].name, H5P_DEFAULT,
@@ -1460,7 +1460,7 @@ done:
/* free link info path */
if (linkinfo.trg_path)
- HDfree(linkinfo.trg_path);
+ free(linkinfo.trg_path);
H5E_BEGIN_TRY
{
@@ -1484,9 +1484,9 @@ done:
/* free */
if (buf != NULL)
- HDfree(buf);
+ free(buf);
if (hslab_buf != NULL)
- HDfree(hslab_buf);
+ free(hslab_buf);
return ret_value;
} /* end do_copy_objects() */
@@ -1589,9 +1589,9 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
if (!pr)
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_TIME, "dset", read_time, write_time, objname);
+ printf(FORMAT_OBJ_TIME, "dset", read_time, write_time, objname);
else
- HDprintf(FORMAT_OBJ, "dset", objname);
+ printf(FORMAT_OBJ, "dset", objname);
else {
char str[512], temp[512];
@@ -1600,9 +1600,9 @@ print_dataset_info(hid_t dcpl_id, char *objname, double ratio, int pr, pack_opt_
HDsnprintf(temp, sizeof(temp), " (%.3f:1)", ratio);
HDstrcat(str, temp);
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_TIME, str, read_time, write_time, objname);
+ printf(FORMAT_OBJ_TIME, str, read_time, write_time, objname);
else
- HDprintf(FORMAT_OBJ, str, objname);
+ printf(FORMAT_OBJ, str, objname);
}
} /* end print_dataset_info() */
@@ -1654,13 +1654,13 @@ copy_user_block(const char *infile, const char *outfile, hsize_t size)
} while (-1 == nwritten && EINTR == errno);
if (-1 == nwritten) /* error */
H5TOOLS_GOTO_ERROR((-1), "HDwrite failed");
- HDassert(nwritten > 0);
- HDassert(nwritten <= nbytes);
+ assert(nwritten > 0);
+ assert(nwritten <= nbytes);
/* Update # of bytes left & offset in buffer */
nbytes -= nwritten;
wbuf += nwritten;
- HDassert(nbytes == 0 || wbuf < (rbuf + USERBLOCK_XFER_SIZE));
+ assert(nbytes == 0 || wbuf < (rbuf + USERBLOCK_XFER_SIZE));
} /* end while */
/* Update size of userblock left to transfer */
@@ -1728,9 +1728,9 @@ print_user_block(const char *filename, hid_t fid)
for (i = 0; i < nread; i++) {
- HDprintf("%c ", rbuf[i]);
+ printf("%c ", rbuf[i]);
}
- HDprintf("\n");
+ printf("\n");
if (nread < 0) {
H5TOOLS_GOTO_ERROR((-1), "nread < 0");
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 5ecb423..0621c7a 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -370,7 +370,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -391,7 +391,7 @@ read_info(const char *filename, pack_opt_t *options)
int i;
int ret_value = EXIT_SUCCESS;
- if (NULL == (fp = HDfopen(filename, "r"))) {
+ if (NULL == (fp = fopen(filename, "r"))) {
error_msg("cannot open options file %s\n", filename);
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
@@ -534,10 +534,10 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
int ret_value = 0;
/* Initialize fapl info structs */
- HDmemset(&in_vol_info, 0, sizeof(h5tools_vol_info_t));
- HDmemset(&out_vol_info, 0, sizeof(h5tools_vol_info_t));
- HDmemset(&in_vfd_info, 0, sizeof(h5tools_vfd_info_t));
- HDmemset(&out_vfd_info, 0, sizeof(h5tools_vfd_info_t));
+ memset(&in_vol_info, 0, sizeof(h5tools_vol_info_t));
+ memset(&out_vol_info, 0, sizeof(h5tools_vol_info_t));
+ memset(&in_vfd_info, 0, sizeof(h5tools_vfd_info_t));
+ memset(&out_vfd_info, 0, sizeof(h5tools_vfd_info_t));
/* parse command line options */
while (EOF != (opt = H5_get_option(argc, argv, s_opts, l_opts))) {
@@ -569,7 +569,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case 'v':
if (H5_optarg != NULL) {
- if (2 == HDatoi(H5_optarg))
+ if (2 == atoi(H5_optarg))
options->verbose = 2;
}
else
@@ -624,7 +624,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'j':
- bound = HDatoi(H5_optarg);
+ bound = atoi(H5_optarg);
if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing low bound\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -635,7 +635,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'k':
- bound = HDatoi(H5_optarg);
+ bound = atoi(H5_optarg);
if (bound < H5F_LIBVER_EARLIEST || bound > H5F_LIBVER_LATEST) {
error_msg("in parsing high bound\n");
h5tools_setstatus(EXIT_FAILURE);
@@ -654,13 +654,13 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'c':
- options->grp_compact = HDatoi(H5_optarg);
+ options->grp_compact = atoi(H5_optarg);
if (options->grp_compact > 0)
options->latest = TRUE; /* must use latest format */
break;
case 'd':
- options->grp_indexed = HDatoi(H5_optarg);
+ options->grp_indexed = atoi(H5_optarg);
if (options->grp_indexed > 0)
options->latest = TRUE; /* must use latest format */
break;
@@ -671,7 +671,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
char *msgPtr = HDstrchr(H5_optarg, ':');
options->latest = TRUE; /* must use latest format */
if (msgPtr == NULL) {
- ssize = HDatoi(H5_optarg);
+ ssize = atoi(H5_optarg);
for (idx = 0; idx < 5; idx++)
options->msg_size[idx] = ssize;
}
@@ -680,7 +680,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
HDstrcpy(msgType, msgPtr + 1);
msgPtr[0] = '\0';
- ssize = HDatoi(H5_optarg);
+ ssize = atoi(H5_optarg);
if (!HDstrncmp(msgType, "dspace", 6))
options->msg_size[0] = ssize;
else if (!HDstrncmp(msgType, "dtype", 5))
@@ -744,7 +744,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
} break;
case 'P':
- options->fs_persist = HDatoi(H5_optarg);
+ options->fs_persist = atoi(H5_optarg);
if (options->fs_persist == 0)
/* To distinguish the "specified" zero value */
options->fs_persist = -1;
@@ -784,14 +784,14 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
case 'E':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
case '1':
in_vol_info.type = VOL_BY_VALUE;
- in_vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ in_vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
custom_in_vol = TRUE;
break;
@@ -807,7 +807,7 @@ 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)HDatoi(H5_optarg);
+ out_vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
custom_out_vol = TRUE;
break;
@@ -823,7 +823,7 @@ 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)HDatoi(H5_optarg);
+ in_vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
custom_in_vfd = TRUE;
break;
@@ -839,7 +839,7 @@ 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)HDatoi(H5_optarg);
+ out_vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
custom_out_vfd = TRUE;
break;
@@ -891,7 +891,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
errno = 0;
onion_fa_in_g.revision_num = HDstrtoull(in_vfd_info.info, NULL, 10);
if (errno == ERANGE) {
- HDprintf("Invalid onion revision specified for the input file\n");
+ printf("Invalid onion revision specified for the input file\n");
usage(h5tools_getprogname());
exit(EXIT_FAILURE);
}
@@ -965,7 +965,7 @@ main(int argc, char **argv)
pack_opt_t options; /*the global options */
int parse_ret;
- HDmemset(&options, 0, sizeof(pack_opt_t));
+ memset(&options, 0, sizeof(pack_opt_t));
/* Initialize h5tools lib */
h5tools_init();
@@ -975,14 +975,14 @@ main(int argc, char **argv)
/* update hyperslab buffer size from H5TOOLS_BUFSIZE env if exist */
if (h5tools_getenv_update_hyperslab_bufsize() < 0) {
- HDprintf("Error occurred while retrieving H5TOOLS_BUFSIZE value\n");
+ printf("Error occurred while retrieving H5TOOLS_BUFSIZE value\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
/* initialize options */
if (h5repack_init(&options, 0, FALSE) < 0) {
- HDprintf("Error occurred while initializing repack options\n");
+ printf("Error occurred while initializing repack options\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
@@ -992,7 +992,7 @@ main(int argc, char **argv)
parse_ret = parse_command_line(argc, (const char *const *)argv, &options);
if (parse_ret < 0) {
- HDprintf("Error occurred while parsing command-line options\n");
+ printf("Error occurred while parsing command-line options\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
@@ -1007,7 +1007,7 @@ main(int argc, char **argv)
/* pack it */
if (h5repack(infile, outfile, &options) < 0) {
- HDprintf("Error occurred while repacking\n");
+ printf("Error occurred while repacking\n");
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
diff --git a/tools/src/h5repack/h5repack_opttable.c b/tools/src/h5repack/h5repack_opttable.c
index 4e6e0f4..2018527 100644
--- a/tools/src/h5repack/h5repack_opttable.c
+++ b/tools/src/h5repack/h5repack_opttable.c
@@ -104,7 +104,7 @@ aux_inctable(pack_opttbl_t *table, unsigned n_objs)
int ret_value = 0;
table->size += n_objs;
- table->objs = (pack_info_t *)HDrealloc(table->objs, table->size * sizeof(pack_info_t));
+ table->objs = (pack_info_t *)realloc(table->objs, table->size * sizeof(pack_info_t));
if (table->objs == NULL) {
H5TOOLS_INFO("not enough memory for options table");
ret_value = -1;
@@ -132,14 +132,14 @@ options_table_init(pack_opttbl_t **tbl)
pack_opttbl_t *table;
int ret_value = 0;
- if (NULL == (table = (pack_opttbl_t *)HDmalloc(sizeof(pack_opttbl_t)))) {
+ if (NULL == (table = (pack_opttbl_t *)malloc(sizeof(pack_opttbl_t)))) {
H5TOOLS_GOTO_ERROR((-1), "not enough memory for options table");
}
table->size = 30;
table->nelems = 0;
- if (NULL == (table->objs = (pack_info_t *)HDmalloc(table->size * sizeof(pack_info_t)))) {
- HDfree(table);
+ if (NULL == (table->objs = (pack_info_t *)malloc(table->size * sizeof(pack_info_t)))) {
+ free(table);
H5TOOLS_GOTO_ERROR((-1), "not enough memory for options table");
}
@@ -163,8 +163,8 @@ done:
int
options_table_free(pack_opttbl_t *table)
{
- HDfree(table->objs);
- HDfree(table);
+ free(table->objs);
+ free(table);
return 0;
}
@@ -200,7 +200,7 @@ options_add_layout(obj_list_t *obj_list, unsigned n_objs, pack_info_t *pack, pac
/* 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);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* insert the layout info */
else {
diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c
index 9ffee0a..9ee4d07 100644
--- a/tools/src/h5repack/h5repack_parse.c
+++ b/tools/src/h5repack/h5repack_parse.c
@@ -52,7 +52,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
unsigned pixels_per_block;
/* initialize compression info */
- HDmemset(filt, 0, sizeof(filter_info_t));
+ memset(filt, 0, sizeof(filter_info_t));
*is_glb = 0;
/* check for the end of object list and number of objects */
@@ -77,7 +77,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
else
*n_objs = n;
- obj_list = (obj_list_t *)HDmalloc(n * sizeof(obj_list_t));
+ obj_list = (obj_list_t *)malloc(n * sizeof(obj_list_t));
if (obj_list == NULL) {
error_msg("could not allocate object list\n");
return NULL;
@@ -95,7 +95,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
sobj[k + 1] = '\0';
HDstrcpy(obj_list[n].obj, sobj);
- HDmemset(sobj, 0, sizeof(sobj));
+ memset(sobj, 0, sizeof(sobj));
n++;
k = -1;
}
@@ -103,9 +103,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
/* nothing after : */
if (end_obj + 1 == (int)len) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("input Error: Invalid compression type in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* get filter additional parameters */
@@ -134,9 +134,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
c = str[u];
if (!HDisdigit(c) && l == -1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("compression parameter not digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (l == -1)
stype[m] = c;
@@ -152,7 +152,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_values[j++] = H5_SZIP_EC_OPTION_MASK;
else {
error_msg("szip mask must be 'NN' or 'EC' \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
}
@@ -184,9 +184,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
c = str[u];
if (!HDisdigit(c) && l == -1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("compression parameter is not a digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (l == -1)
stype[m] = c;
@@ -202,7 +202,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_values[j++] = H5Z_SO_FLOAT_DSCALE;
else {
error_msg("scale type must be 'IN' or 'DS' \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
}
@@ -224,7 +224,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
if (str[u] == ',') {
stype[q] = '\0'; /* end digit */
if (l == -1) {
- filt->filtn = HDatoi(stype);
+ filt->filtn = atoi(stype);
l = 0;
}
else if (f == -1) {
@@ -244,15 +244,15 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
c = str[u];
if (!HDisdigit(c) && l == -1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("filter number parameter is not a digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
else if (!HDisdigit(c) && f == -1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("filter flag parameter is not a digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
stype[q] = c;
} /* for u */
@@ -269,9 +269,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
c = str[u];
if (!HDisdigit(c)) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("compression parameter is not a digit in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
stype[m] = c;
} /* u */
@@ -312,9 +312,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 1;
if (no_param) { /*no more parameters, GZIP must have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
@@ -327,9 +327,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 2;
if (no_param) { /*no more parameters, SZIP must have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
@@ -342,9 +342,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 0;
if (m > 0) { /*shuffle does not have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("extra parameter in SHUF <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -356,9 +356,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 0;
if (m > 0) { /*shuffle does not have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("extra parameter in FLET <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -370,9 +370,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 0;
if (m > 0) { /*nbit does not have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("extra parameter in NBIT <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -384,9 +384,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
filt->cd_nelmts = 2;
if (no_param) { /*no more parameters, SOFF must have parameter */
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("missing compression parameter in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
/*-------------------------------------------------------------------------
@@ -397,16 +397,16 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
/* parameters does not match count */
if (filt->cd_nelmts != j) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("incorrect number of compression parameters in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("invalid filter type in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
}
@@ -425,9 +425,9 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
case H5Z_FILTER_DEFLATE:
if (filt->cd_values[0] > 9) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("invalid compression parameter in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
/*-------------------------------------------------------------------------
@@ -438,21 +438,21 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
pixels_per_block = filt->cd_values[0];
if ((pixels_per_block % 2) == 1) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("pixels_per_block is not even in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (pixels_per_block > H5_SZIP_MAX_PIXELS_PER_BLOCK) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("pixels_per_block is too large in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if ((HDstrcmp(smask, "NN") != 0) && (HDstrcmp(smask, "EC") != 0)) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("szip mask must be 'NN' or 'EC' \n");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
default:
@@ -496,9 +496,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
char sdim[10];
char slayout[10];
- HDmemset(sdim, '\0', sizeof(sdim));
- HDmemset(sobj, '\0', sizeof(sobj));
- HDmemset(slayout, '\0', sizeof(slayout));
+ memset(sdim, '\0', sizeof(sdim));
+ memset(sobj, '\0', sizeof(sobj));
+ memset(slayout, '\0', sizeof(slayout));
/* check for the end of object list and number of objects */
for (i = 0, n = 0; i < len; i++) {
@@ -514,7 +514,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
}
n++;
- obj_list = (obj_list_t *)HDmalloc(n * sizeof(obj_list_t));
+ obj_list = (obj_list_t *)malloc(n * sizeof(obj_list_t));
if (obj_list == NULL) {
error_msg("could not allocate object list\n");
return NULL;
@@ -532,7 +532,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
else
sobj[k + 1] = '\0';
HDstrcpy(obj_list[n].obj, sobj);
- HDmemset(sobj, 0, sizeof(sobj));
+ memset(sobj, 0, sizeof(sobj));
n++;
k = -1;
}
@@ -541,9 +541,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
/* nothing after : */
if (end_obj + 1 == (int)len) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, no characters after : in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/* get layout info */
@@ -558,7 +558,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
pack->layout = H5D_CHUNKED;
else {
error_msg("in parse layout, not a valid layout in <%s>\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else {
@@ -575,9 +575,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
k = 0;
if (j > len) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, <%s> Chunk dimensions missing\n", str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
for (i = j, c_index = 0; i < len; i++) {
@@ -587,9 +587,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
if (!HDisdigit(c) && c != 'x' && c != 'N' && c != 'O' && c != 'N' && c != 'E') {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, <%s> Not a valid character in <%s>\n", sdim, str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (c == 'x' || i == len - 1) {
@@ -599,9 +599,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
pack->chunk.chunk_lengths[c_index] = HDstrtoull(sdim, NULL, 0);
if (pack->chunk.chunk_lengths[c_index] == 0) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n", sdim, str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
c_index++;
}
@@ -615,9 +615,9 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
pack->chunk.chunk_lengths[c_index] = HDstrtoull(sdim, NULL, 0);
if (pack->chunk.chunk_lengths[c_index] == 0) {
if (obj_list)
- HDfree(obj_list);
+ free(obj_list);
error_msg("in parse layout, <%s> conversion to number in <%s>\n", sdim, str);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
pack->chunk.rank = c_index + 1;
}
diff --git a/tools/src/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 3c0be30..171b335 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -152,18 +152,18 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
*-------------------------------------------------------------------------
*/
if (nelmts) {
- buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize));
+ buf = (hobj_ref_t *)malloc((unsigned)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Dread(dset_in, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Dread failed");
- refbuf = (hobj_ref_t *)HDcalloc((unsigned)nelmts, msize);
+ refbuf = (hobj_ref_t *)calloc((unsigned)nelmts, msize);
if (refbuf == NULL) {
- HDprintf("cannot allocate memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDcalloc failed");
+ printf("cannot allocate memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "calloc failed");
} /* end if */
for (u = 0; u < nelmts; u++) {
H5E_BEGIN_TRY
@@ -183,11 +183,11 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Rcreate failed");
if (options->verbose > 0) {
if (options->verbose == 2)
- HDprintf(FORMAT_OBJ_NOTIME, "dset", travt->objs[i].name);
+ printf(FORMAT_OBJ_NOTIME, "dset", travt->objs[i].name);
else
- HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name);
- HDprintf("object <%s> object reference created to <%s>\n",
- travt->objs[i].name, refname);
+ printf(FORMAT_OBJ, "dset", travt->objs[i].name);
+ printf("object <%s> object reference created to <%s>\n",
+ travt->objs[i].name, refname);
}
} /*refname*/
if (H5Oclose(refobj_id) < 0)
@@ -207,9 +207,9 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Dwrite failed");
if (buf)
- HDfree(buf);
+ free(buf);
if (refbuf)
- HDfree(refbuf);
+ free(refbuf);
/*------------------------------------------------------
* copy attrs
@@ -234,10 +234,10 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
*-------------------------------------------------------------------------
*/
if (nelmts) {
- buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize));
+ buf = (hdset_reg_ref_t *)malloc((unsigned)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Dread(dset_in, mtype_id, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Dread failed");
@@ -246,11 +246,11 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
* create output
*-------------------------------------------------------------------------
*/
- refbuf = (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t),
- (size_t)nelmts); /*init to zero */
+ refbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t),
+ (size_t)nelmts); /*init to zero */
if (refbuf == NULL) {
- HDprintf("cannot allocate memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDcalloc failed");
+ printf("cannot allocate memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "calloc failed");
} /* end if */
for (u = 0; u < nelmts; u++) {
@@ -279,9 +279,9 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (H5Sclose(region_id) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Sclose failed");
if (options->verbose > 0) {
- HDprintf(FORMAT_OBJ, "dset", travt->objs[i].name);
- HDprintf("object <%s> region reference created to <%s>\n",
- travt->objs[i].name, refname);
+ printf(FORMAT_OBJ, "dset", travt->objs[i].name);
+ printf("object <%s> region reference created to <%s>\n",
+ travt->objs[i].name, refname);
}
} /*refname*/
if (H5Oclose(refobj_id) < 0)
@@ -301,9 +301,9 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5TOOLS_GOTO_ERROR((-1), "H5Dwrite failed");
if (buf)
- HDfree(buf);
+ free(buf);
if (refbuf)
- HDfree(refbuf);
+ free(refbuf);
/*-----------------------------------------------------
* copy attrs
@@ -506,8 +506,8 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (nmembers < 1)
H5TOOLS_GOTO_ERROR((-1), "H5Tget_nmembers failed");
- ref_comp_index = (unsigned *)HDmalloc((size_t)nmembers * sizeof(unsigned));
- ref_comp_size = (size_t *)HDmalloc((size_t)nmembers * sizeof(ref_comp_size));
+ ref_comp_index = (unsigned *)malloc((size_t)nmembers * sizeof(unsigned));
+ ref_comp_size = (size_t *)malloc((size_t)nmembers * sizeof(ref_comp_size));
ref_comp_field_n = 0;
for (i = 0; i < (unsigned)nmembers; i++) {
@@ -527,12 +527,12 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
* statement below. */
if (!ref_comp_field_n) {
if (ref_comp_index) {
- HDfree(ref_comp_index);
+ free(ref_comp_index);
ref_comp_index = NULL;
}
if (ref_comp_size) {
- HDfree(ref_comp_size);
+ free(ref_comp_size);
ref_comp_size = NULL;
}
}
@@ -598,18 +598,18 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (nelmts > 0) {
/* handle object references */
if ((is_ref || is_ref_array) && (H5R_OBJ_REF_BUF_SIZE == msize)) {
- buf = (hobj_ref_t *)HDmalloc((unsigned)(nelmts * msize));
+ buf = (hobj_ref_t *)malloc((unsigned)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Aread(attr_id, mtype_id, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Aread failed");
- refbuf = (hobj_ref_t *)HDcalloc((unsigned)nelmts, msize);
+ refbuf = (hobj_ref_t *)calloc((unsigned)nelmts, msize);
if (refbuf == NULL) {
- HDprintf("cannot allocate memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDcalloc failed");
+ printf("cannot allocate memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "calloc failed");
} /* end if */
for (i = 0; i < (unsigned)nelmts; i++)
@@ -619,11 +619,11 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
} /* H5T_STD_REF_OBJ */
/* handle region references */
else if ((is_ref || is_ref_array) && (H5R_DSET_REG_REF_BUF_SIZE == msize)) {
- buf = (hdset_reg_ref_t *)HDmalloc((unsigned)(nelmts * msize));
+ buf = (hdset_reg_ref_t *)malloc((unsigned)(nelmts * msize));
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Aread(attr_id, mtype_id, buf) < 0)
H5TOOLS_GOTO_ERROR((-1), "H5Aread failed");
@@ -632,11 +632,10 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
* create output
*-------------------------------------------------------------------------
*/
- refbuf =
- (hdset_reg_ref_t *)HDcalloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */
+ refbuf = (hdset_reg_ref_t *)calloc(sizeof(hdset_reg_ref_t), (size_t)nelmts); /*init to zero */
if (refbuf == NULL) {
- HDprintf("cannot allocate memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDcalloc failed");
+ printf("cannot allocate memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "calloc failed");
} /* end if */
for (i = 0; i < (unsigned)nelmts; i++)
@@ -647,12 +646,12 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
else if (is_ref_vlen) {
/* handle VLEN of references */
- buf = (hvl_t *)HDmalloc((unsigned)(nelmts * sizeof(hvl_t)));
+ buf = (hvl_t *)malloc((unsigned)(nelmts * sizeof(hvl_t)));
refbuf = buf; /* reuse the read buffer for write */
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Aread(attr_id, mtype_id, buf) < 0)
@@ -667,7 +666,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
for (j = 0; j < ((hvl_t *)buf)[i].len; j++) {
if (update_ref_value(attr_id, H5R_OBJECT, &(ptr[j]), fidout, &ref_out, travt) < 0)
continue;
- HDmemcpy(&(ptr[j]), &ref_out, msize);
+ memcpy(&(ptr[j]), &ref_out, msize);
}
} /* for (i=0; i<nelems; i++) */
}
@@ -681,7 +680,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (update_ref_value(attr_id, H5R_DATASET_REGION, &(ptr[j]), fidout, &ref_out,
travt) < 0)
continue;
- HDmemcpy(&(ptr[j]), &ref_out, msize);
+ memcpy(&(ptr[j]), &ref_out, msize);
}
} /* for (i=0; i<nelems; i++) */
}
@@ -689,12 +688,12 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
else if (is_ref_comp) {
/* handle ref fields in a compound */
- buf = HDmalloc((unsigned)(nelmts * msize));
+ buf = malloc((unsigned)(nelmts * msize));
refbuf = buf; /* reuse the read buffer for write */
if (buf == NULL) {
- HDprintf("cannot read into memory\n");
- H5TOOLS_GOTO_ERROR((-1), "HDmalloc failed");
+ printf("cannot read into memory\n");
+ H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */
if (H5Aread(attr_id, mtype_id, buf) < 0)
@@ -712,7 +711,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
travt) < 0) /* Extra (void *) cast to quiet "cast to create
alignment" warning - 2019/07/05, QAK */
continue;
- HDmemcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]);
+ memcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]);
} /* if */
else if (ref_comp_size[j] == H5R_DSET_REG_REF_BUF_SIZE) {
size_t idx = i * msize + H5Tget_member_offset(mtype_id, ref_comp_index[j]);
@@ -722,7 +721,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
(hdset_reg_ref_t *)(((char *)buf) + idx), fidout, &ref_out,
travt) < 0)
continue;
- HDmemcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]);
+ memcpy(((char *)buf) + idx, &ref_out, ref_comp_size[j]);
} /* else if */
} /* j */
} /* i */
@@ -739,22 +738,22 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
refbuf = NULL; /* set it to NULL to avoid double free since buf and refbuf are the same. */
if (buf) {
- HDfree(buf);
+ free(buf);
buf = NULL;
}
if (refbuf) {
- HDfree(refbuf);
+ free(refbuf);
refbuf = NULL;
}
if (ref_comp_index) {
- HDfree(ref_comp_index);
+ free(ref_comp_index);
ref_comp_index = NULL;
}
if (ref_comp_size) {
- HDfree(ref_comp_size);
+ free(ref_comp_size);
ref_comp_size = NULL;
}
@@ -777,15 +776,15 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
done:
if (refbuf)
- HDfree(refbuf);
+ free(refbuf);
if (buf)
- HDfree(buf);
+ free(buf);
if (ref_comp_index)
- HDfree(ref_comp_index);
+ free(ref_comp_index);
if (ref_comp_size)
- HDfree(ref_comp_size);
+ free(ref_comp_size);
H5E_BEGIN_TRY
{
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index 05e0be8..7916517 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -192,7 +192,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
}
/*-------------------------------------------------------------------------
@@ -207,46 +207,45 @@ leave(int ret)
static void
usage(const char *prog)
{
- HDfflush(stdout);
- HDfprintf(stdout, "usage: %s [OPTIONS] file\n", prog);
- HDfprintf(stdout, "\n");
- HDfprintf(stdout, " ERROR\n");
- HDfprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n");
- HDfprintf(stdout, " Optional value 2 also prints file open errors\n");
- HDfprintf(stdout, " OPTIONS\n");
- HDfprintf(stdout, " -h, --help Print a usage message and exit\n");
- HDfprintf(stdout, " -V, --version Print version number and exit\n");
- HDfprintf(stdout, " -f, --file Print file information\n");
- HDfprintf(stdout, " -F, --filemetadata Print file space information for file's metadata\n");
- HDfprintf(stdout, " -g, --group Print group information\n");
- HDfprintf(stdout, " -l N, --links=N Set the threshold for the # of links when printing\n");
- HDfprintf(stdout, " information for small groups. N is an integer greater\n");
- HDfprintf(stdout, " than 0. The default threshold is 10.\n");
- HDfprintf(stdout, " -G, --groupmetadata Print file space information for groups' metadata\n");
- HDfprintf(stdout, " -d, --dset Print dataset information\n");
- HDfprintf(stdout, " -m N, --dims=N Set the threshold for the dimension sizes when printing\n");
- HDfprintf(stdout,
- " information for small datasets. N is an integer greater\n");
- HDfprintf(stdout, " than 0. The default threshold is 10.\n");
- HDfprintf(stdout, " -D, --dsetmetadata Print file space information for datasets' metadata\n");
- HDfprintf(stdout, " -T, --dtypemetadata Print datasets' datatype information\n");
- HDfprintf(stdout, " -A, --attribute Print attribute information\n");
- HDfprintf(stdout, " -a N, --numattrs=N Set the threshold for the # of attributes when printing\n");
- HDfprintf(stdout,
- " information for small # of attributes. N is an integer greater\n");
- HDfprintf(stdout, " than 0. The default threshold is 10.\n");
- HDfprintf(stdout, " -s, --freespace Print free space information\n");
- HDfprintf(stdout, " -S, --summary Print summary of file space information\n");
- HDfprintf(stdout, " --s3-cred=<cred> Access file on S3, using provided credential\n");
- HDfprintf(stdout, " <cred> :: (region,id,key)\n");
- HDfprintf(stdout, " If <cred> == \"(,,)\", no authentication is used.\n");
- HDfprintf(stdout, " --hdfs-attrs=<attrs> Access a file on HDFS with given configuration\n");
- HDfprintf(stdout, " attributes.\n");
- HDfprintf(stdout, " <attrs> :: (<namenode name>,<namenode port>,\n");
- HDfprintf(stdout, " <kerberos cache path>,<username>,\n");
- HDfprintf(stdout, " <buffer size>)\n");
- HDfprintf(stdout, " If an attribute is empty, a default value will be\n");
- HDfprintf(stdout, " used.\n");
+ fflush(stdout);
+ fprintf(stdout, "usage: %s [OPTIONS] file\n", prog);
+ fprintf(stdout, "\n");
+ fprintf(stdout, " ERROR\n");
+ fprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n");
+ fprintf(stdout, " Optional value 2 also prints file open errors\n");
+ fprintf(stdout, " OPTIONS\n");
+ fprintf(stdout, " -h, --help Print a usage message and exit\n");
+ fprintf(stdout, " -V, --version Print version number and exit\n");
+ fprintf(stdout, " -f, --file Print file information\n");
+ fprintf(stdout, " -F, --filemetadata Print file space information for file's metadata\n");
+ fprintf(stdout, " -g, --group Print group information\n");
+ fprintf(stdout, " -l N, --links=N Set the threshold for the # of links when printing\n");
+ fprintf(stdout, " information for small groups. N is an integer greater\n");
+ fprintf(stdout, " than 0. The default threshold is 10.\n");
+ fprintf(stdout, " -G, --groupmetadata Print file space information for groups' metadata\n");
+ fprintf(stdout, " -d, --dset Print dataset information\n");
+ fprintf(stdout, " -m N, --dims=N Set the threshold for the dimension sizes when printing\n");
+ fprintf(stdout, " information for small datasets. N is an integer greater\n");
+ fprintf(stdout, " than 0. The default threshold is 10.\n");
+ fprintf(stdout, " -D, --dsetmetadata Print file space information for datasets' metadata\n");
+ fprintf(stdout, " -T, --dtypemetadata Print datasets' datatype information\n");
+ fprintf(stdout, " -A, --attribute Print attribute information\n");
+ fprintf(stdout, " -a N, --numattrs=N Set the threshold for the # of attributes when printing\n");
+ fprintf(stdout,
+ " information for small # of attributes. N is an integer greater\n");
+ fprintf(stdout, " than 0. The default threshold is 10.\n");
+ fprintf(stdout, " -s, --freespace Print free space information\n");
+ fprintf(stdout, " -S, --summary Print summary of file space information\n");
+ fprintf(stdout, " --s3-cred=<cred> Access file on S3, using provided credential\n");
+ fprintf(stdout, " <cred> :: (region,id,key)\n");
+ fprintf(stdout, " If <cred> == \"(,,)\", no authentication is used.\n");
+ fprintf(stdout, " --hdfs-attrs=<attrs> Access a file on HDFS with given configuration\n");
+ fprintf(stdout, " attributes.\n");
+ fprintf(stdout, " <attrs> :: (<namenode name>,<namenode port>,\n");
+ fprintf(stdout, " <kerberos cache path>,<username>,\n");
+ fprintf(stdout, " <buffer size>)\n");
+ fprintf(stdout, " If an attribute is empty, a default value will be\n");
+ fprintf(stdout, " used.\n");
}
/*-------------------------------------------------------------------------
@@ -307,8 +306,8 @@ attribute_stats(iter_t *iter, const H5O_info2_t *oi, const H5O_native_info_t *na
/* Add attribute count to proper bin */
bin = ceil_log10((unsigned long)oi->num_attrs);
if ((bin + 1) > iter->attr_nbins) {
- iter->attr_bins = (unsigned long *)HDrealloc(iter->attr_bins, (bin + 1) * sizeof(unsigned long));
- HDassert(iter->attr_bins);
+ iter->attr_bins = (unsigned long *)realloc(iter->attr_bins, (bin + 1) * sizeof(unsigned long));
+ assert(iter->attr_bins);
/* Initialize counts for intermediate bins */
while (iter->attr_nbins < bin)
@@ -368,7 +367,7 @@ group_stats(iter_t *iter, const char *name, const H5O_info2_t *oi, const H5O_nat
if ((bin + 1) > iter->group_nbins) {
/* Allocate more storage for info about dataset's datatype */
if ((iter->group_bins =
- (unsigned long *)HDrealloc(iter->group_bins, (bin + 1) * sizeof(unsigned long))) == NULL)
+ (unsigned long *)realloc(iter->group_bins, (bin + 1) * sizeof(unsigned long))) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "H5Drealloc() failed");
/* Initialize counts for intermediate bins */
@@ -503,8 +502,8 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info2_t *oi, const H5O_n
bin = ceil_log10((unsigned long)dims[0]);
if ((bin + 1) > iter->dset_dim_nbins) {
/* Allocate more storage for info about dataset's datatype */
- if ((iter->dset_dim_bins = (unsigned long *)HDrealloc(iter->dset_dim_bins,
- (bin + 1) * sizeof(unsigned long))) == NULL)
+ if ((iter->dset_dim_bins = (unsigned long *)realloc(iter->dset_dim_bins,
+ (bin + 1) * sizeof(unsigned long))) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "H5Drealloc() failed");
/* Initialize counts for intermediate bins */
@@ -542,7 +541,7 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info2_t *oi, const H5O_n
iter->dset_ntypes++;
/* Allocate more storage for info about dataset's datatype */
- if ((iter->dset_type_info = (dtype_info_t *)HDrealloc(
+ if ((iter->dset_type_info = (dtype_info_t *)realloc(
iter->dset_type_info, iter->dset_ntypes * sizeof(dtype_info_t))) == NULL)
H5TOOLS_GOTO_ERROR(FAIL, "H5Drealloc() failed");
@@ -739,10 +738,10 @@ freespace_stats(hid_t fid, iter_t *iter)
if ((nsects = H5Fget_free_sections(fid, H5FD_MEM_DEFAULT, 0, NULL)) < 0)
return (FAIL);
else if (nsects) {
- if (NULL == (sect_info = (H5F_sect_info_t *)HDcalloc((size_t)nsects, sizeof(H5F_sect_info_t))))
+ if (NULL == (sect_info = (H5F_sect_info_t *)calloc((size_t)nsects, sizeof(H5F_sect_info_t))))
return (FAIL);
nsects = H5Fget_free_sections(fid, H5FD_MEM_DEFAULT, (size_t)nsects, sect_info);
- HDassert(nsects);
+ assert(nsects);
} /* end else-if */
for (u = 0; u < (size_t)nsects; u++) {
@@ -755,8 +754,8 @@ freespace_stats(hid_t fid, iter_t *iter)
bin = ceil_log10((unsigned long)sect_info[u].size);
if (bin >= iter->sect_nbins) {
/* Allocate more storage for section info */
- iter->sect_bins = (unsigned long *)HDrealloc(iter->sect_bins, (bin + 1) * sizeof(unsigned long));
- HDassert(iter->sect_bins);
+ iter->sect_bins = (unsigned long *)realloc(iter->sect_bins, (bin + 1) * sizeof(unsigned long));
+ assert(iter->sect_bins);
/* Initialize counts for intermediate bins */
while (iter->sect_nbins < bin)
@@ -771,7 +770,7 @@ freespace_stats(hid_t fid, iter_t *iter)
} /* end for */
if (sect_info)
- HDfree(sect_info);
+ free(sect_info);
return 0;
} /* end freespace_stats() */
@@ -795,12 +794,12 @@ hand_free(struct handler_t *hand)
for (u = 0; u < hand->obj_count; u++)
if (hand->obj[u]) {
- HDfree(hand->obj[u]);
+ free(hand->obj[u]);
hand->obj[u] = NULL;
} /* end if */
hand->obj_count = 0;
- HDfree(hand->obj);
- HDfree(hand);
+ free(hand->obj);
+ free(hand);
} /* end if */
} /* end hand_free() */
@@ -842,7 +841,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
case 'E':
if (H5_optarg != NULL)
- enable_error_stack = HDatoi(H5_optarg);
+ enable_error_stack = atoi(H5_optarg);
else
enable_error_stack = 1;
break;
@@ -869,7 +868,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
case 'l':
if (H5_optarg) {
- sgroups_threshold = HDatoi(H5_optarg);
+ sgroups_threshold = atoi(H5_optarg);
if (sgroups_threshold < 1) {
error_msg("Invalid threshold for small groups\n");
goto error;
@@ -892,7 +891,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
case 'm':
if (H5_optarg) {
- sdsets_threshold = HDatoi(H5_optarg);
+ sdsets_threshold = atoi(H5_optarg);
if (sdsets_threshold < 1) {
error_msg("Invalid threshold for small datasets\n");
goto error;
@@ -915,7 +914,7 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
case 'a':
if (H5_optarg) {
- sattrs_threshold = HDatoi(H5_optarg);
+ sattrs_threshold = atoi(H5_optarg);
if (sattrs_threshold < 1) {
error_msg("Invalid threshold for small # of attributes\n");
goto error;
@@ -941,14 +940,14 @@ parse_command_line(int argc, const char *const *argv, struct handler_t **hand_re
display_object = TRUE;
/* Allocate space to hold the command line info */
- if (NULL == (hand = (struct handler_t *)HDcalloc((size_t)1, sizeof(struct handler_t)))) {
+ if (NULL == (hand = (struct handler_t *)calloc((size_t)1, sizeof(struct handler_t)))) {
error_msg("unable to allocate memory for object struct\n");
goto error;
} /* end if */
/* Allocate space to hold the object strings */
hand->obj_count = (size_t)argc;
- if (NULL == (hand->obj = (char **)HDcalloc((size_t)argc, sizeof(char *)))) {
+ if (NULL == (hand->obj = (char **)calloc((size_t)argc, sizeof(char *)))) {
error_msg("unable to allocate memory for object array\n");
goto error;
} /* end if */
@@ -1032,49 +1031,49 @@ iter_free(iter_t *iter)
/* Clear array of bins for group counts */
if (iter->group_bins) {
- HDfree(iter->group_bins);
+ free(iter->group_bins);
iter->group_bins = NULL;
} /* end if */
/* Clear array for tracking small groups */
if (iter->num_small_groups) {
- HDfree(iter->num_small_groups);
+ free(iter->num_small_groups);
iter->num_small_groups = NULL;
} /* end if */
/* Clear array of bins for attribute counts */
if (iter->attr_bins) {
- HDfree(iter->attr_bins);
+ free(iter->attr_bins);
iter->attr_bins = NULL;
} /* end if */
/* Clear array for tracking small attributes */
if (iter->num_small_attrs) {
- HDfree(iter->num_small_attrs);
+ free(iter->num_small_attrs);
iter->num_small_attrs = NULL;
} /* end if */
/* Clear dataset datatype information found */
if (iter->dset_type_info) {
- HDfree(iter->dset_type_info);
+ free(iter->dset_type_info);
iter->dset_type_info = NULL;
} /* end if */
/* Clear array of bins for dataset dimensions */
if (iter->dset_dim_bins) {
- HDfree(iter->dset_dim_bins);
+ free(iter->dset_dim_bins);
iter->dset_dim_bins = NULL;
} /* end if */
/* Clear array of tracking 1-D small datasets */
if (iter->small_dset_dims) {
- HDfree(iter->small_dset_dims);
+ free(iter->small_dset_dims);
iter->small_dset_dims = NULL;
} /* end if */
/* Clear array of bins for free-space section sizes */
if (iter->sect_bins) {
- HDfree(iter->sect_bins);
+ free(iter->sect_bins);
iter->sect_bins = NULL;
} /* end if */
} /* end iter_free() */
@@ -1096,14 +1095,14 @@ iter_free(iter_t *iter)
static herr_t
print_file_info(const iter_t *iter)
{
- HDprintf("File information\n");
- HDprintf("\t# of unique groups: %lu\n", iter->uniq_groups);
- HDprintf("\t# of unique datasets: %lu\n", iter->uniq_dsets);
- HDprintf("\t# of unique named datatypes: %lu\n", iter->uniq_dtypes);
- HDprintf("\t# of unique links: %lu\n", iter->uniq_links);
- HDprintf("\t# of unique other: %lu\n", iter->uniq_others);
- HDprintf("\tMax. # of links to object: %lu\n", iter->max_links);
- HDfprintf(stdout, "\tMax. # of objects in group: %" PRIuHSIZE "\n", iter->max_fanout);
+ printf("File information\n");
+ printf("\t# of unique groups: %lu\n", iter->uniq_groups);
+ printf("\t# of unique datasets: %lu\n", iter->uniq_dsets);
+ printf("\t# of unique named datatypes: %lu\n", iter->uniq_dtypes);
+ printf("\t# of unique links: %lu\n", iter->uniq_links);
+ printf("\t# of unique other: %lu\n", iter->uniq_others);
+ printf("\tMax. # of links to object: %lu\n", iter->max_links);
+ fprintf(stdout, "\tMax. # of objects in group: %" PRIuHSIZE "\n", iter->max_fanout);
return 0;
} /* print_file_info() */
@@ -1125,41 +1124,41 @@ print_file_info(const iter_t *iter)
static herr_t
print_file_metadata(const iter_t *iter)
{
- HDfprintf(stdout, "File space information for file metadata (in bytes):\n");
- HDfprintf(stdout, "\tSuperblock: %" PRIuHSIZE "\n", iter->super_size);
- HDfprintf(stdout, "\tSuperblock extension: %" PRIuHSIZE "\n", iter->super_ext_size);
- HDfprintf(stdout, "\tUser block: %" PRIuHSIZE "\n", iter->ublk_size);
-
- HDfprintf(stdout, "\tObject headers: (total/unused)\n");
- HDfprintf(stdout, "\t\tGroups: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->group_ohdr_info.total_size,
- iter->group_ohdr_info.free_size);
- HDfprintf(stdout, "\t\tDatasets(exclude compact data): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
- iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
- HDfprintf(stdout, "\t\tDatatypes: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->dtype_ohdr_info.total_size,
- iter->dtype_ohdr_info.free_size);
-
- HDfprintf(stdout, "\tGroups:\n");
- HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
- HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
-
- HDfprintf(stdout, "\tAttributes:\n");
- HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->attrs_btree_storage_size);
- HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->attrs_heap_storage_size);
-
- HDfprintf(stdout, "\tChunked datasets:\n");
- HDfprintf(stdout, "\t\tIndex: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
-
- HDfprintf(stdout, "\tDatasets:\n");
- HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
-
- HDfprintf(stdout, "\tShared Messages:\n");
- HDfprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->SM_hdr_storage_size);
- HDfprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->SM_index_storage_size);
- HDfprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->SM_heap_storage_size);
-
- HDfprintf(stdout, "\tFree-space managers:\n");
- HDfprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->free_hdr);
- HDfprintf(stdout, "\t\tAmount of free space: %" PRIuHSIZE "\n", iter->free_space);
+ fprintf(stdout, "File space information for file metadata (in bytes):\n");
+ fprintf(stdout, "\tSuperblock: %" PRIuHSIZE "\n", iter->super_size);
+ fprintf(stdout, "\tSuperblock extension: %" PRIuHSIZE "\n", iter->super_ext_size);
+ fprintf(stdout, "\tUser block: %" PRIuHSIZE "\n", iter->ublk_size);
+
+ fprintf(stdout, "\tObject headers: (total/unused)\n");
+ fprintf(stdout, "\t\tGroups: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->group_ohdr_info.total_size,
+ iter->group_ohdr_info.free_size);
+ fprintf(stdout, "\t\tDatasets(exclude compact data): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
+ iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
+ fprintf(stdout, "\t\tDatatypes: %" PRIuHSIZE "/%" PRIuHSIZE "\n", iter->dtype_ohdr_info.total_size,
+ iter->dtype_ohdr_info.free_size);
+
+ fprintf(stdout, "\tGroups:\n");
+ fprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
+ fprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
+
+ fprintf(stdout, "\tAttributes:\n");
+ fprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->attrs_btree_storage_size);
+ fprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->attrs_heap_storage_size);
+
+ fprintf(stdout, "\tChunked datasets:\n");
+ fprintf(stdout, "\t\tIndex: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
+
+ fprintf(stdout, "\tDatasets:\n");
+ fprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
+
+ fprintf(stdout, "\tShared Messages:\n");
+ fprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->SM_hdr_storage_size);
+ fprintf(stdout, "\t\tB-tree/List: %" PRIuHSIZE "\n", iter->SM_index_storage_size);
+ fprintf(stdout, "\t\tHeap: %" PRIuHSIZE "\n", iter->SM_heap_storage_size);
+
+ fprintf(stdout, "\tFree-space managers:\n");
+ fprintf(stdout, "\t\tHeader: %" PRIuHSIZE "\n", iter->free_hdr);
+ fprintf(stdout, "\t\tAmount of free space: %" PRIuHSIZE "\n", iter->free_space);
return 0;
} /* print_file_metadata() */
@@ -1185,32 +1184,31 @@ print_group_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- HDprintf("Small groups (with 0 to %u links):\n", sgroups_threshold - 1);
+ printf("Small groups (with 0 to %u links):\n", sgroups_threshold - 1);
total = 0;
for (u = 0; u < (unsigned)sgroups_threshold; u++) {
if (iter->num_small_groups[u] > 0) {
- HDprintf("\t# of groups with %u link(s): %lu\n", u, iter->num_small_groups[u]);
+ printf("\t# of groups with %u link(s): %lu\n", u, iter->num_small_groups[u]);
total += iter->num_small_groups[u];
} /* end if */
} /* end for */
- HDprintf("\tTotal # of small groups: %lu\n", total);
+ printf("\tTotal # of small groups: %lu\n", total);
- HDprintf("Group bins:\n");
+ printf("Group bins:\n");
total = 0;
if ((iter->group_nbins > 0) && (iter->group_bins[0] > 0)) {
- HDprintf("\t# of groups with 0 link: %lu\n", iter->group_bins[0]);
+ printf("\t# of groups with 0 link: %lu\n", iter->group_bins[0]);
total = iter->group_bins[0];
} /* end if */
power = 1;
for (u = 1; u < iter->group_nbins; u++) {
if (iter->group_bins[u] > 0) {
- HDprintf("\t# of groups with %lu - %lu links: %lu\n", power, (power * 10) - 1,
- iter->group_bins[u]);
+ printf("\t# of groups with %lu - %lu links: %lu\n", power, (power * 10) - 1, iter->group_bins[u]);
total += iter->group_bins[u];
} /* end if */
power *= 10;
} /* end for */
- HDprintf("\tTotal # of groups: %lu\n", total);
+ printf("\tTotal # of groups: %lu\n", total);
return 0;
} /* print_group_info() */
@@ -1230,13 +1228,13 @@ print_group_info(const iter_t *iter)
static herr_t
print_group_metadata(const iter_t *iter)
{
- HDprintf("File space information for groups' metadata (in bytes):\n");
+ printf("File space information for groups' metadata (in bytes):\n");
- HDfprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
- iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size);
+ fprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
+ iter->group_ohdr_info.total_size, iter->group_ohdr_info.free_size);
- HDfprintf(stdout, "\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
- HDfprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
+ fprintf(stdout, "\tB-tree/List: %" PRIuHSIZE "\n", iter->groups_btree_storage_size);
+ fprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->groups_heap_storage_size);
return 0;
} /* print_group_metadata() */
@@ -1262,69 +1260,68 @@ print_dataset_info(const iter_t *iter)
unsigned u; /* Local index variable */
if (iter->uniq_dsets > 0) {
- HDprintf("Dataset dimension information:\n");
- HDprintf("\tMax. rank of datasets: %u\n", iter->max_dset_rank);
- HDprintf("\tDataset ranks:\n");
+ printf("Dataset dimension information:\n");
+ printf("\tMax. rank of datasets: %u\n", iter->max_dset_rank);
+ printf("\tDataset ranks:\n");
for (u = 0; u < H5S_MAX_RANK; u++)
if (iter->dset_rank_count[u] > 0)
- HDprintf("\t\t# of dataset with rank %u: %lu\n", u, iter->dset_rank_count[u]);
+ printf("\t\t# of dataset with rank %u: %lu\n", u, iter->dset_rank_count[u]);
- HDprintf("1-D Dataset information:\n");
- HDfprintf(stdout, "\tMax. dimension size of 1-D datasets: %" PRIuHSIZE "\n", iter->max_dset_dims);
- HDprintf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1);
+ printf("1-D Dataset information:\n");
+ fprintf(stdout, "\tMax. dimension size of 1-D datasets: %" PRIuHSIZE "\n", iter->max_dset_dims);
+ printf("\tSmall 1-D datasets (with dimension sizes 0 to %u):\n", sdsets_threshold - 1);
total = 0;
for (u = 0; u < (unsigned)sdsets_threshold; u++) {
if (iter->small_dset_dims[u] > 0) {
- HDprintf("\t\t# of datasets with dimension sizes %u: %lu\n", u, iter->small_dset_dims[u]);
+ printf("\t\t# of datasets with dimension sizes %u: %lu\n", u, iter->small_dset_dims[u]);
total += iter->small_dset_dims[u];
} /* end if */
} /* end for */
- HDprintf("\t\tTotal # of small datasets: %lu\n", total);
+ printf("\t\tTotal # of small datasets: %lu\n", total);
/* Protect against no datasets in file */
if (iter->dset_dim_nbins > 0) {
- HDprintf("\t1-D Dataset dimension bins:\n");
+ printf("\t1-D Dataset dimension bins:\n");
total = 0;
if (iter->dset_dim_bins[0] > 0) {
- HDprintf("\t\t# of datasets with dimension size 0: %lu\n", iter->dset_dim_bins[0]);
+ printf("\t\t# of datasets with dimension size 0: %lu\n", iter->dset_dim_bins[0]);
total = iter->dset_dim_bins[0];
} /* end if */
power = 1;
for (u = 1; u < iter->dset_dim_nbins; u++) {
if (iter->dset_dim_bins[u] > 0) {
- HDprintf("\t\t# of datasets with dimension size %lu - %lu: %lu\n", power,
- (power * 10) - 1, iter->dset_dim_bins[u]);
+ printf("\t\t# of datasets with dimension size %lu - %lu: %lu\n", power, (power * 10) - 1,
+ iter->dset_dim_bins[u]);
total += iter->dset_dim_bins[u];
} /* end if */
power *= 10;
} /* end for */
- HDprintf("\t\tTotal # of datasets: %lu\n", total);
+ printf("\t\tTotal # of datasets: %lu\n", total);
} /* end if */
- HDprintf("Dataset storage information:\n");
- HDfprintf(stdout, "\tTotal raw data size: %" PRIuHSIZE "\n", iter->dset_storage_size);
- HDfprintf(stdout, "\tTotal external raw data size: %" PRIuHSIZE "\n",
- iter->dset_external_storage_size);
+ printf("Dataset storage information:\n");
+ fprintf(stdout, "\tTotal raw data size: %" PRIuHSIZE "\n", iter->dset_storage_size);
+ fprintf(stdout, "\tTotal external raw data size: %" PRIuHSIZE "\n", iter->dset_external_storage_size);
- HDprintf("Dataset layout information:\n");
+ printf("Dataset layout information:\n");
for (u = 0; u < H5D_NLAYOUTS; u++)
- HDprintf("\tDataset layout counts[%s]: %lu\n",
- (u == H5D_COMPACT
- ? "COMPACT"
- : (u == H5D_CONTIGUOUS ? "CONTIG" : (u == H5D_CHUNKED ? "CHUNKED" : "VIRTUAL"))),
- iter->dset_layouts[u]);
- HDprintf("\tNumber of external files : %lu\n", iter->nexternal);
-
- HDprintf("Dataset filters information:\n");
- HDprintf("\tNumber of datasets with:\n");
- HDprintf("\t\tNO filter: %lu\n", iter->dset_comptype[H5Z_FILTER_ERROR + 1]);
- HDprintf("\t\tGZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_DEFLATE]);
- HDprintf("\t\tSHUFFLE filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SHUFFLE]);
- HDprintf("\t\tFLETCHER32 filter: %lu\n", iter->dset_comptype[H5Z_FILTER_FLETCHER32]);
- HDprintf("\t\tSZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SZIP]);
- HDprintf("\t\tNBIT filter: %lu\n", iter->dset_comptype[H5Z_FILTER_NBIT]);
- HDprintf("\t\tSCALEOFFSET filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SCALEOFFSET]);
- HDprintf("\t\tUSER-DEFINED filter: %lu\n", iter->dset_comptype[H5_NFILTERS_IMPL - 1]);
+ printf("\tDataset layout counts[%s]: %lu\n",
+ (u == H5D_COMPACT
+ ? "COMPACT"
+ : (u == H5D_CONTIGUOUS ? "CONTIG" : (u == H5D_CHUNKED ? "CHUNKED" : "VIRTUAL"))),
+ iter->dset_layouts[u]);
+ printf("\tNumber of external files : %lu\n", iter->nexternal);
+
+ printf("Dataset filters information:\n");
+ printf("\tNumber of datasets with:\n");
+ printf("\t\tNO filter: %lu\n", iter->dset_comptype[H5Z_FILTER_ERROR + 1]);
+ printf("\t\tGZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_DEFLATE]);
+ printf("\t\tSHUFFLE filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SHUFFLE]);
+ printf("\t\tFLETCHER32 filter: %lu\n", iter->dset_comptype[H5Z_FILTER_FLETCHER32]);
+ printf("\t\tSZIP filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SZIP]);
+ printf("\t\tNBIT filter: %lu\n", iter->dset_comptype[H5Z_FILTER_NBIT]);
+ printf("\t\tSCALEOFFSET filter: %lu\n", iter->dset_comptype[H5Z_FILTER_SCALEOFFSET]);
+ printf("\t\tUSER-DEFINED filter: %lu\n", iter->dset_comptype[H5_NFILTERS_IMPL - 1]);
} /* end if */
return 0;
@@ -1346,13 +1343,13 @@ print_dataset_info(const iter_t *iter)
static herr_t
print_dset_metadata(const iter_t *iter)
{
- HDprintf("File space information for datasets' metadata (in bytes):\n");
+ printf("File space information for datasets' metadata (in bytes):\n");
- HDfprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
- iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
+ fprintf(stdout, "\tObject headers (total/unused): %" PRIuHSIZE "/%" PRIuHSIZE "\n",
+ iter->dset_ohdr_info.total_size, iter->dset_ohdr_info.free_size);
- HDfprintf(stdout, "\tIndex for Chunked datasets: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
- HDfprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
+ fprintf(stdout, "\tIndex for Chunked datasets: %" PRIuHSIZE "\n", iter->datasets_index_storage_size);
+ fprintf(stdout, "\tHeap: %" PRIuHSIZE "\n", iter->datasets_heap_storage_size);
return 0;
} /* print_dset_metadata() */
@@ -1378,20 +1375,20 @@ print_dset_dtype_meta(const iter_t *iter)
unsigned u; /* Local index variable */
if (iter->dset_ntypes) {
- HDprintf("Dataset datatype information:\n");
- HDprintf("\t# of unique datatypes used by datasets: %lu\n", iter->dset_ntypes);
+ printf("Dataset datatype information:\n");
+ printf("\t# of unique datatypes used by datasets: %lu\n", iter->dset_ntypes);
total = 0;
for (u = 0; u < iter->dset_ntypes; u++) {
H5Tencode(iter->dset_type_info[u].tid, NULL, &dtype_size);
- HDprintf("\tDataset datatype #%u:\n", u);
- HDprintf("\t\tCount (total/named) = (%lu/%lu)\n", iter->dset_type_info[u].count,
- iter->dset_type_info[u].named);
- HDprintf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size,
- (unsigned long)H5Tget_size(iter->dset_type_info[u].tid));
+ printf("\tDataset datatype #%u:\n", u);
+ printf("\t\tCount (total/named) = (%lu/%lu)\n", iter->dset_type_info[u].count,
+ iter->dset_type_info[u].named);
+ printf("\t\tSize (desc./elmt) = (%lu/%lu)\n", (unsigned long)dtype_size,
+ (unsigned long)H5Tget_size(iter->dset_type_info[u].tid));
H5Tclose(iter->dset_type_info[u].tid);
total += iter->dset_type_info[u].count;
} /* end for */
- HDprintf("\tTotal dataset datatype count: %lu\n", total);
+ printf("\tTotal dataset datatype count: %lu\n", total);
} /* end if */
return 0;
@@ -1418,29 +1415,29 @@ print_attr_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- HDprintf("Small # of attributes (objects with 1 to %u attributes):\n", sattrs_threshold);
+ printf("Small # of attributes (objects with 1 to %u attributes):\n", sattrs_threshold);
total = 0;
for (u = 1; u <= (unsigned)sattrs_threshold; u++) {
if (iter->num_small_attrs[u] > 0) {
- HDprintf("\t# of objects with %u attributes: %lu\n", u, iter->num_small_attrs[u]);
+ printf("\t# of objects with %u attributes: %lu\n", u, iter->num_small_attrs[u]);
total += iter->num_small_attrs[u];
} /* end if */
} /* end for */
- HDprintf("\tTotal # of objects with small # of attributes: %lu\n", total);
+ printf("\tTotal # of objects with small # of attributes: %lu\n", total);
- HDprintf("Attribute bins:\n");
+ printf("Attribute bins:\n");
total = 0;
power = 1;
for (u = 1; u < iter->attr_nbins; u++) {
if (iter->attr_bins[u] > 0) {
- HDprintf("\t# of objects with %lu - %lu attributes: %lu\n", power, (power * 10) - 1,
- iter->attr_bins[u]);
+ printf("\t# of objects with %lu - %lu attributes: %lu\n", power, (power * 10) - 1,
+ iter->attr_bins[u]);
total += iter->attr_bins[u];
} /* end if */
power *= 10;
} /* end for */
- HDprintf("\tTotal # of objects with attributes: %lu\n", total);
- HDprintf("\tMax. # of attributes to objects: %lu\n", (unsigned long)iter->max_attrs);
+ printf("\tTotal # of objects with attributes: %lu\n", total);
+ printf("\tMax. # of attributes to objects: %lu\n", (unsigned long)iter->max_attrs);
return 0;
} /* print_attr_info() */
@@ -1465,30 +1462,30 @@ print_freespace_info(const iter_t *iter)
unsigned long total; /* Total count for various statistics */
unsigned u; /* Local index variable */
- HDfprintf(stdout, "Free-space persist: %s\n", iter->fs_persist ? "TRUE" : "FALSE");
- HDfprintf(stdout, "Free-space section threshold: %" PRIuHSIZE " bytes\n", iter->fs_threshold);
- HDprintf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
+ fprintf(stdout, "Free-space persist: %s\n", iter->fs_persist ? "TRUE" : "FALSE");
+ fprintf(stdout, "Free-space section threshold: %" PRIuHSIZE " bytes\n", iter->fs_threshold);
+ printf("Small size free-space sections (< %u bytes):\n", (unsigned)SIZE_SMALL_SECTS);
total = 0;
for (u = 0; u < SIZE_SMALL_SECTS; u++) {
if (iter->num_small_sects[u] > 0) {
- HDprintf("\t# of sections of size %u: %lu\n", u, iter->num_small_sects[u]);
+ printf("\t# of sections of size %u: %lu\n", u, iter->num_small_sects[u]);
total += iter->num_small_sects[u];
} /* end if */
} /* end for */
- HDprintf("\tTotal # of small size sections: %lu\n", total);
+ printf("\tTotal # of small size sections: %lu\n", total);
- HDprintf("Free-space section bins:\n");
+ printf("Free-space section bins:\n");
total = 0;
power = 1;
for (u = 1; u < iter->sect_nbins; u++) {
if (iter->sect_bins[u] > 0) {
- HDprintf("\t# of sections of size %lu - %lu: %lu\n", power, (power * 10) - 1, iter->sect_bins[u]);
+ printf("\t# of sections of size %lu - %lu: %lu\n", power, (power * 10) - 1, iter->sect_bins[u]);
total += iter->sect_bins[u];
} /* end if */
power *= 10;
} /* end for */
- HDprintf("\tTotal # of sections: %lu\n", total);
+ printf("\tTotal # of sections: %lu\n", total);
return 0;
} /* print_freespace_info() */
@@ -1513,9 +1510,9 @@ print_storage_summary(const iter_t *iter)
hsize_t unaccount = 0;
double percent = 0.0;
- HDfprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]);
- HDfprintf(stdout, "File space page size: %" PRIuHSIZE " bytes\n", iter->fsp_size);
- HDprintf("Summary of file space information:\n");
+ fprintf(stdout, "File space management strategy: %s\n", FS_STRATEGY_NAME[iter->fs_strategy]);
+ fprintf(stdout, "File space page size: %" PRIuHSIZE " bytes\n", iter->fsp_size);
+ printf("Summary of file space information:\n");
total_meta =
iter->super_size + iter->super_ext_size + iter->ublk_size + iter->group_ohdr_info.total_size +
iter->dset_ohdr_info.total_size + iter->dtype_ohdr_info.total_size + iter->groups_btree_storage_size +
@@ -1523,28 +1520,28 @@ print_storage_summary(const iter_t *iter)
iter->datasets_index_storage_size + iter->datasets_heap_storage_size + iter->SM_hdr_storage_size +
iter->SM_index_storage_size + iter->SM_heap_storage_size + iter->free_hdr;
- HDfprintf(stdout, " File metadata: %" PRIuHSIZE " bytes\n", total_meta);
- HDfprintf(stdout, " Raw data: %" PRIuHSIZE " bytes\n", iter->dset_storage_size);
+ fprintf(stdout, " File metadata: %" PRIuHSIZE " bytes\n", total_meta);
+ fprintf(stdout, " Raw data: %" PRIuHSIZE " bytes\n", iter->dset_storage_size);
percent = ((double)iter->free_space / (double)iter->filesize) * 100.0;
- HDfprintf(stdout, " Amount/Percent of tracked free space: %" PRIuHSIZE " bytes/%3.1f%%\n",
- iter->free_space, percent);
+ fprintf(stdout, " Amount/Percent of tracked free space: %" PRIuHSIZE " bytes/%3.1f%%\n",
+ iter->free_space, percent);
if (iter->filesize < (total_meta + iter->dset_storage_size + iter->free_space)) {
unaccount = (total_meta + iter->dset_storage_size + iter->free_space) - iter->filesize;
- HDfprintf(stdout, " ??? File has %" PRIuHSIZE " more bytes accounted for than its size! ???\n",
- unaccount);
+ fprintf(stdout, " ??? File has %" PRIuHSIZE " more bytes accounted for than its size! ???\n",
+ unaccount);
}
else {
unaccount = iter->filesize - (total_meta + iter->dset_storage_size + iter->free_space);
- HDfprintf(stdout, " Unaccounted space: %" PRIuHSIZE " bytes\n", unaccount);
+ fprintf(stdout, " Unaccounted space: %" PRIuHSIZE " bytes\n", unaccount);
}
- HDfprintf(stdout, "Total space: %" PRIuHSIZE " bytes\n",
- total_meta + iter->dset_storage_size + iter->free_space + unaccount);
+ fprintf(stdout, "Total space: %" PRIuHSIZE " bytes\n",
+ total_meta + iter->dset_storage_size + iter->free_space + unaccount);
if (iter->nexternal)
- HDfprintf(stdout, "External raw data: %" PRIuHSIZE " bytes\n", iter->dset_external_storage_size);
+ fprintf(stdout, "External raw data: %" PRIuHSIZE " bytes\n", iter->dset_external_storage_size);
return 0;
} /* print_storage_summary() */
@@ -1622,7 +1619,7 @@ print_file_statistics(const iter_t *iter)
static void
print_object_statistics(const char *name)
{
- HDprintf("Object name %s\n", name);
+ printf("Object name %s\n", name);
} /* print_object_statistics() */
/*-------------------------------------------------------------------------
@@ -1668,7 +1665,7 @@ main(int argc, char *argv[])
/* Initialize h5tools lib */
h5tools_init();
- HDmemset(&iter, 0, sizeof(iter));
+ memset(&iter, 0, sizeof(iter));
if (parse_command_line(argc, (const char *const *)argv, &hand) < 0)
goto done;
@@ -1705,7 +1702,7 @@ main(int argc, char *argv[])
hid_t fcpl;
H5F_info2_t finfo;
- HDprintf("Filename: %s\n", fname);
+ printf("Filename: %s\n", fname);
fid = h5tools_fopen(fname, H5F_ACC_RDONLY, fapl_id, (fapl_id != H5P_DEFAULT), NULL, 0);
@@ -1720,7 +1717,7 @@ main(int argc, char *argv[])
if (H5Fget_filesize(fid, &iter.filesize) < 0)
warn_msg("Unable to retrieve file size\n");
- HDassert(iter.filesize != 0);
+ assert(iter.filesize != 0);
/* Get storage info for file-level structures */
if (H5Fget_info2(fid, &finfo) < 0)
@@ -1735,10 +1732,9 @@ main(int argc, char *argv[])
iter.free_hdr = finfo.free.meta_size;
} /* end else */
- iter.num_small_groups = (unsigned long *)HDcalloc((size_t)sgroups_threshold, sizeof(unsigned long));
- iter.num_small_attrs =
- (unsigned long *)HDcalloc((size_t)(sattrs_threshold + 1), sizeof(unsigned long));
- iter.small_dset_dims = (unsigned long *)HDcalloc((size_t)sdsets_threshold, sizeof(unsigned long));
+ iter.num_small_groups = (unsigned long *)calloc((size_t)sgroups_threshold, sizeof(unsigned long));
+ iter.num_small_attrs = (unsigned long *)calloc((size_t)(sattrs_threshold + 1), sizeof(unsigned long));
+ iter.small_dset_dims = (unsigned long *)calloc((size_t)sdsets_threshold, sizeof(unsigned long));
if (iter.num_small_groups == NULL || iter.num_small_attrs == NULL || iter.small_dset_dims == NULL) {
error_msg("Unable to allocate memory for tracking small groups/datasets/attributes\n");
@@ -1754,7 +1750,7 @@ main(int argc, char *argv[])
if (H5Pget_file_space_strategy(fcpl, &iter.fs_strategy, &iter.fs_persist, &iter.fs_threshold) < 0)
warn_msg("Unable to retrieve file space information\n");
- HDassert(iter.fs_strategy >= 0 && iter.fs_strategy < H5F_FSPACE_STRATEGY_NTYPES);
+ assert(iter.fs_strategy >= 0 && iter.fs_strategy < H5F_FSPACE_STRATEGY_NTYPES);
if (H5Pget_file_space_page_size(fcpl, &iter.fsp_size) < 0)
warn_msg("Unable to retrieve file space page size\n");
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index 4a2b07d..2272626 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -144,11 +144,11 @@ parse_command_line(int argc, const char *const *argv)
case 'i':
increment_eoa_eof = TRUE;
if (H5_optarg != NULL) {
- if (HDatoi(H5_optarg) < 0) {
+ if (atoi(H5_optarg) < 0) {
usage(h5tools_getprogname());
goto done;
}
- increment = (hsize_t)HDatoi(H5_optarg);
+ increment = (hsize_t)atoi(H5_optarg);
}
break;
@@ -189,7 +189,7 @@ static void
leave(int ret)
{
h5tools_close();
- HDexit(ret);
+ exit(ret);
} /* leave() */
/*-------------------------------------------------------------------------
@@ -325,7 +325,7 @@ main(int argc, char *argv[])
h5tools_setstatus(EXIT_FAILURE);
goto done;
}
- HDfprintf(stdout, "EOA is %" PRIuHADDR "; EOF is %" PRIuHADDR " \n", eoa, (haddr_t)st.st_size);
+ fprintf(stdout, "EOA is %" PRIuHADDR "; EOF is %" PRIuHADDR " \n", eoa, (haddr_t)st.st_size);
}
/* --increment option */
@@ -353,9 +353,9 @@ main(int argc, char *argv[])
done:
if (fname)
- HDfree(fname);
+ free(fname);
if (fname_g)
- HDfree(fname_g);
+ free(fname_g);
H5E_BEGIN_TRY
{
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index b15ae09..9bac669 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -131,7 +131,7 @@ get_H5B2_class(const uint8_t *sig)
case H5B2_NUM_BTREE_ID:
default:
- HDfprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
+ fprintf(stderr, "Unknown v2 B-tree subtype %u\n", (unsigned)(subtype));
} /* end switch */
return (cls);
@@ -172,7 +172,7 @@ get_H5EA_class(const uint8_t *sig)
case H5EA_NUM_CLS_ID:
default:
- HDfprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid));
+ fprintf(stderr, "Unknown extensible array class %u\n", (unsigned)(clsid));
} /* end switch */
return (cls);
@@ -213,7 +213,7 @@ get_H5FA_class(const uint8_t *sig)
case H5FA_NUM_CLS_ID:
default:
- HDfprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid));
+ fprintf(stderr, "Unknown fixed array class %u\n", (unsigned)(clsid));
} /* end switch */
return (cls);
@@ -252,14 +252,14 @@ main(int argc, char *argv[])
int exit_value = 0;
if (argc == 1) {
- HDfprintf(stderr, "Usage: %s filename [signature-addr [extra]*]\n", argv[0]);
+ fprintf(stderr, "Usage: %s filename [signature-addr [extra]*]\n", argv[0]);
exit_value = 1;
goto done;
} /* end if */
/* Initialize the library */
if (H5open() < 0) {
- HDfprintf(stderr, "cannot initialize the library\n");
+ fprintf(stderr, "cannot initialize the library\n");
exit_value = 1;
goto done;
} /* end if */
@@ -272,45 +272,45 @@ main(int argc, char *argv[])
* Open the file and get the file descriptor.
*/
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
- HDfprintf(stderr, "cannot create file access property list\n");
+ fprintf(stderr, "cannot create file access property list\n");
exit_value = 1;
goto done;
} /* end if */
if (HDstrchr(argv[1], '%'))
if (H5Pset_fapl_family(fapl, (hsize_t)0, H5P_DEFAULT) < 0) {
- HDfprintf(stderr, "cannot set file access property list\n");
+ fprintf(stderr, "cannot set file access property list\n");
exit_value = 1;
goto done;
}
if ((fid = H5Fopen(argv[1], H5F_ACC_RDONLY, fapl)) < 0) {
- HDfprintf(stderr, "cannot open file\n");
+ fprintf(stderr, "cannot open file\n");
exit_value = 1;
goto done;
} /* end if */
/* Push API context */
if (H5CX_push() < 0) {
- HDfprintf(stderr, "cannot set API context\n");
+ fprintf(stderr, "cannot set API context\n");
exit_value = 1;
goto done;
}
api_ctx_pushed = TRUE;
if (NULL == (vol_obj = (H5VL_object_t *)H5VL_vol_object(fid))) {
- HDfprintf(stderr, "cannot obtain vol_obj pointer\n");
+ fprintf(stderr, "cannot obtain vol_obj pointer\n");
exit_value = 2;
goto done;
} /* end if */
if (NULL == (f = (H5F_t *)H5VL_object_data(vol_obj))) {
- HDfprintf(stderr, "cannot obtain H5F_t pointer\n");
+ fprintf(stderr, "cannot obtain H5F_t pointer\n");
exit_value = 2;
goto done;
} /* end if */
/* Ignore metadata tags while using h5debug */
if (H5AC_ignore_tags(f) < 0) {
- HDfprintf(stderr, "cannot ignore metadata tags\n");
+ fprintf(stderr, "cannot ignore metadata tags\n");
exit_value = 1;
goto done;
}
@@ -324,15 +324,15 @@ main(int argc, char *argv[])
addr = (haddr_t)HDstrtoll(argv[2], NULL, 0);
/* Extra arguments for primary data structure */
- HDmemset(extra, 0, sizeof(extra));
+ memset(extra, 0, sizeof(extra));
if (argc > 3) {
/* Number of extra arguments */
extra_count = argc - 3;
/* Range check against 'extra' array size */
if (extra_count > (int)(sizeof(extra) / sizeof(haddr_t))) {
- HDfprintf(stderr, "\nWARNING: Only using first %d extra parameters\n\n",
- (int)(sizeof(extra) / sizeof(haddr_t)));
+ fprintf(stderr, "\nWARNING: Only using first %d extra parameters\n\n",
+ (int)(sizeof(extra) / sizeof(haddr_t)));
extra_count = (int)(sizeof(extra) / sizeof(haddr_t));
} /* end if */
@@ -343,46 +343,46 @@ main(int argc, char *argv[])
/*
* Read the signature at the specified file position.
*/
- HDfprintf(stdout, "Reading signature at address %" PRIuHADDR " (rel)\n", addr);
+ fprintf(stdout, "Reading signature at address %" PRIuHADDR " (rel)\n", addr);
if (H5F_block_read(f, H5FD_MEM_SUPER, addr, sizeof(sig), sig) < 0) {
- HDfprintf(stderr, "cannot read signature\n");
+ fprintf(stderr, "cannot read signature\n");
exit_value = 3;
goto done;
}
- if (!HDmemcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) {
+ if (!memcmp(sig, H5F_SIGNATURE, (size_t)H5F_SIGNATURE_LEN)) {
/*
* Debug the file's super block.
*/
status = H5F_debug(f, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HL_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a local heap.
*/
status = H5HL_debug(f, addr, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HG_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a global heap collection.
*/
status = H5HG_debug(f, addr, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5G_NODE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a symbol table node.
*/
/* Check for extra parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(stderr,
- "\nWarning: Providing the group's local heap address will give more information\n");
- HDfprintf(stderr, "Symbol table node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <Symbol table node address> <address of local heap>\n\n");
+ fprintf(stderr,
+ "\nWarning: Providing the group's local heap address will give more information\n");
+ fprintf(stderr, "Symbol table node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <Symbol table node address> <address of local heap>\n\n");
} /* end if */
status = H5G_node_debug(f, addr, stdout, 0, VCOL, extra[0]);
}
- else if (!HDmemcmp(sig, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5B_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a B-tree. B-trees are debugged through the B-tree
* subclass. The subclass identifier is the byte immediately
@@ -396,12 +396,11 @@ main(int argc, char *argv[])
case H5B_SNODE_ID:
/* Check for extra parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(
+ fprintf(
stderr,
"\nWarning: Providing the group's local heap address will give more information\n");
- HDfprintf(stderr, "B-tree symbol table node usage:\n");
- HDfprintf(stderr,
- "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
+ fprintf(stderr, "B-tree symbol table node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <B-tree node address> <address of local heap>\n\n");
exit_value = 4;
goto done;
} /* end if */
@@ -412,12 +411,11 @@ main(int argc, char *argv[])
case H5B_CHUNK_ID:
/* Check for extra parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(
- stderr,
- "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
- HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest "
- "chunk dim>...<fastest chunk dim>\n");
+ fprintf(stderr,
+ "ERROR: Need number of dimensions of chunk in order to dump chunk B-tree node\n");
+ fprintf(stderr, "B-tree chunked storage node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest "
+ "chunk dim>...<fastest chunk dim>\n");
exit_value = 4;
goto done;
} /* end if */
@@ -427,10 +425,10 @@ main(int argc, char *argv[])
/* Check for dimension error */
if (ndims > 9) {
- HDfprintf(stderr, "ERROR: Only 9 dimensions support currently (fix h5debug)\n");
- HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest "
- "chunk dim>...<fastest chunk dim>\n");
+ fprintf(stderr, "ERROR: Only 9 dimensions support currently (fix h5debug)\n");
+ fprintf(stderr, "B-tree chunked storage node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> <slowest "
+ "chunk dim>...<fastest chunk dim>\n");
exit_value = 4;
goto done;
} /* end for */
@@ -442,10 +440,10 @@ main(int argc, char *argv[])
/* Check for dimension error */
for (u = 0; u < ndims; u++)
if (0 == dim[u]) {
- HDfprintf(stderr, "ERROR: Chunk dimensions should be >0\n");
- HDfprintf(stderr, "B-tree chunked storage node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> "
- "<slowest chunk dim>...<fastest chunk dim>\n");
+ fprintf(stderr, "ERROR: Chunk dimensions should be >0\n");
+ fprintf(stderr, "B-tree chunked storage node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <B-tree node address> <# of dimensions> "
+ "<slowest chunk dim>...<fastest chunk dim>\n");
exit_value = 4;
goto done;
} /* end if */
@@ -458,58 +456,58 @@ main(int argc, char *argv[])
case H5B_NUM_BTREE_ID:
default:
- HDfprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype));
+ fprintf(stderr, "Unknown v1 B-tree subtype %u\n", (unsigned)(subtype));
exit_value = 4;
goto done;
}
}
- else if (!HDmemcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a v2 B-tree header.
*/
const H5B2_class_t *cls = get_H5B2_class(sig);
- HDassert(cls);
+ assert(cls);
if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) && (extra_count == 0 || extra[0] == 0)) {
- HDfprintf(stderr, "ERROR: Need v2 B-tree header address and object header address containing the "
- "layout message in order to dump header\n");
- HDfprintf(stderr, "v2 B-tree hdr usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <v2 B-tree header address> <object header address>\n");
+ fprintf(stderr, "ERROR: Need v2 B-tree header address and object header address containing the "
+ "layout message in order to dump header\n");
+ fprintf(stderr, "v2 B-tree hdr usage:\n");
+ fprintf(stderr, "\th5debug <filename> <v2 B-tree header address> <object header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5B2__hdr_debug(f, addr, stdout, 0, VCOL, cls, (haddr_t)extra[0]);
}
- else if (!HDmemcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a v2 B-tree internal node.
*/
const H5B2_class_t *cls = get_H5B2_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) &&
(extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0 || extra[3] == 0)) {
- HDfprintf(stderr,
- "ERROR: Need v2 B-tree header address, the node's number of records, depth, and object "
- "header address containing the layout message in order to dump internal node\n");
- HDfprintf(stderr,
- "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
- HDfprintf(stderr, "v2 B-tree internal node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> "
- "<number of records> <depth> <object header address>\n");
+ fprintf(stderr,
+ "ERROR: Need v2 B-tree header address, the node's number of records, depth, and object "
+ "header address containing the layout message in order to dump internal node\n");
+ fprintf(stderr,
+ "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
+ fprintf(stderr, "v2 B-tree internal node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> "
+ "<number of records> <depth> <object header address>\n");
exit_value = 4;
goto done;
}
else if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) {
- HDfprintf(stderr, "ERROR: Need v2 B-tree header address and the node's number of records and "
- "depth in order to dump internal node\n");
- HDfprintf(stderr,
- "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
- HDfprintf(stderr, "v2 B-tree internal node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> "
- "<number of records> <depth>\n");
+ fprintf(stderr, "ERROR: Need v2 B-tree header address and the node's number of records and "
+ "depth in order to dump internal node\n");
+ fprintf(stderr,
+ "NOTE: Leaf nodes are depth 0, the internal nodes above them are depth 1, etc.\n");
+ fprintf(stderr, "v2 B-tree internal node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <internal node address> <v2 B-tree header address> "
+ "<number of records> <depth>\n");
exit_value = 4;
goto done;
} /* end if */
@@ -517,31 +515,31 @@ main(int argc, char *argv[])
status = H5B2__int_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1],
(unsigned)extra[2], (haddr_t)extra[3]);
}
- else if (!HDmemcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a v2 B-tree leaf node.
*/
const H5B2_class_t *cls = get_H5B2_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if ((cls == H5D_BT2 || cls == H5D_BT2_FILT) &&
(extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0)) {
- HDfprintf(stderr, "ERROR: Need v2 B-tree header address, number of records, and object header "
- "address containing the layout message in order to dump leaf node\n");
- HDfprintf(stderr, "v2 B-tree leaf node usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number "
- "of records> <object header address>\n");
+ fprintf(stderr, "ERROR: Need v2 B-tree header address, number of records, and object header "
+ "address containing the layout message in order to dump leaf node\n");
+ fprintf(stderr, "v2 B-tree leaf node usage:\n");
+ fprintf(stderr, "\th5debug <filename> <leaf node address> <v2 B-tree header address> <number "
+ "of records> <object header address>\n");
exit_value = 4;
goto done;
}
else if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(
+ fprintf(
stderr,
"ERROR: Need v2 B-tree header address and number of records in order to dump leaf node\n");
- HDfprintf(stderr, "v2 B-tree leaf node usage:\n");
- HDfprintf(
+ fprintf(stderr, "v2 B-tree leaf node usage:\n");
+ fprintf(
stderr,
"\th5debug <filename> <leaf node address> <v2 B-tree header address> <number of records>\n");
exit_value = 4;
@@ -551,23 +549,23 @@ main(int argc, char *argv[])
status =
H5B2__leaf_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1], (haddr_t)extra[2]);
}
- else if (!HDmemcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HF_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fractal heap header.
*/
status = H5HF_hdr_debug(f, addr, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HF_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fractal heap direct block.
*/
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need fractal heap header address and size of direct block in order to "
- "dump direct block\n");
- HDfprintf(stderr, "Fractal heap direct block usage:\n");
- HDfprintf(
+ fprintf(stderr, "ERROR: Need fractal heap header address and size of direct block in order to "
+ "dump direct block\n");
+ fprintf(stderr, "Fractal heap direct block usage:\n");
+ fprintf(
stderr,
"\th5debug <filename> <direct block address> <heap header address> <size of direct block>\n");
exit_value = 4;
@@ -576,108 +574,107 @@ main(int argc, char *argv[])
status = H5HF_dblock_debug(f, addr, stdout, 0, VCOL, extra[0], (size_t)extra[1]);
}
- else if (!HDmemcmp(sig, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5HF_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fractal heap indirect block.
*/
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need fractal heap header address and number of rows in order to dump "
- "indirect block\n");
- HDfprintf(stderr, "Fractal heap indirect block usage:\n");
- HDfprintf(
- stderr,
- "\th5debug <filename> <indirect block address> <heap header address> <number of rows>\n");
+ fprintf(stderr, "ERROR: Need fractal heap header address and number of rows in order to dump "
+ "indirect block\n");
+ fprintf(stderr, "Fractal heap indirect block usage:\n");
+ fprintf(stderr,
+ "\th5debug <filename> <indirect block address> <heap header address> <number of rows>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5HF_iblock_debug(f, addr, stdout, 0, VCOL, extra[0], (unsigned)extra[1]);
}
- else if (!HDmemcmp(sig, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5FS_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a free space header.
*/
status = H5FS_debug(f, addr, stdout, 0, VCOL);
}
- else if (!HDmemcmp(sig, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug free space serialized sections.
*/
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need free space header address and client address in order to dump "
- "serialized sections\n");
- HDfprintf(stderr, "Free space serialized sections usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <serialized sections address> <free space header "
- "address> <client address>\n");
+ fprintf(stderr, "ERROR: Need free space header address and client address in order to dump "
+ "serialized sections\n");
+ fprintf(stderr, "Free space serialized sections usage:\n");
+ fprintf(stderr, "\th5debug <filename> <serialized sections address> <free space header "
+ "address> <client address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5FS_sects_debug(f, addr, stdout, 0, VCOL, extra[0], extra[1]);
}
- else if (!HDmemcmp(sig, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5SM_TABLE_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug shared message master table.
*/
status = H5SM_table_debug(f, addr, stdout, 0, VCOL, UINT_MAX, UINT_MAX);
}
- else if (!HDmemcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5SM_LIST_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug shared message list index.
*/
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(stderr, "ERROR: Need shared message header address in order to shared message list\n");
- HDfprintf(stderr, "Shared message list usage:\n");
- HDfprintf(stderr,
- "\th5debug <filename> <shared message list address> <shared message header address>\n");
+ fprintf(stderr, "ERROR: Need shared message header address in order to shared message list\n");
+ fprintf(stderr, "Shared message list usage:\n");
+ fprintf(stderr,
+ "\th5debug <filename> <shared message list address> <shared message header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5SM_list_debug(f, addr, stdout, 0, VCOL, (haddr_t)extra[0]);
}
- else if (!HDmemcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5EA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug an extensible array header.
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(
+ fprintf(
stderr,
"ERROR: Need object header address containing the layout message in order to dump header\n");
- HDfprintf(stderr, "Extensible array header block usage:\n");
- HDfprintf(stderr,
- "\th5debug <filename> <Extensible Array header address> <object header address>\n");
+ fprintf(stderr, "Extensible array header block usage:\n");
+ fprintf(stderr,
+ "\th5debug <filename> <Extensible Array header address> <object header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5EA__hdr_debug(f, addr, stdout, 0, VCOL, cls, extra[0]);
}
- else if (!HDmemcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5EA_IBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug an extensible array index block.
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need extensible array header address and object header address "
- "containing the layout message in order to dump index block\n");
- HDfprintf(stderr, "Extensible array index block usage:\n");
- HDfprintf(
+ fprintf(stderr, "ERROR: Need extensible array header address and object header address "
+ "containing the layout message in order to dump index block\n");
+ fprintf(stderr, "Extensible array index block usage:\n");
+ fprintf(
stderr,
"\th5debug <filename> <index block address> <array header address> <object header address\n");
exit_value = 4;
@@ -686,80 +683,80 @@ main(int argc, char *argv[])
status = H5EA__iblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], extra[1]);
}
- else if (!HDmemcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5EA_SBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug an extensible array super block.
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) {
- HDfprintf(stderr, "ERROR: Need extensible array header address, super block index and object "
- "header address containing the layout message in order to dump super block\n");
- HDfprintf(stderr, "Extensible array super block usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super "
- "block index> <object header address>\n");
+ fprintf(stderr, "ERROR: Need extensible array header address, super block index and object "
+ "header address containing the layout message in order to dump super block\n");
+ fprintf(stderr, "Extensible array super block usage:\n");
+ fprintf(stderr, "\th5debug <filename> <super block address> <array header address> <super "
+ "block index> <object header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5EA__sblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (unsigned)extra[1], extra[2]);
}
- else if (!HDmemcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5EA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug an extensible array data block.
*/
const H5EA_class_t *cls = get_H5EA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0 || extra[2] == 0) {
- HDfprintf(stderr,
- "ERROR: Need extensible array header address, # of elements in data block and object "
- "header address containing the layout message in order to dump data block\n");
- HDfprintf(stderr, "Extensible array data block usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of "
- "elements in data block> <object header address\n");
+ fprintf(stderr,
+ "ERROR: Need extensible array header address, # of elements in data block and object "
+ "header address containing the layout message in order to dump data block\n");
+ fprintf(stderr, "Extensible array data block usage:\n");
+ fprintf(stderr, "\th5debug <filename> <data block address> <array header address> <# of "
+ "elements in data block> <object header address\n");
exit_value = 4;
goto done;
} /* end if */
status = H5EA__dblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], (size_t)extra[1], extra[2]);
}
- else if (!HDmemcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5FA_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fixed array header.
*/
const H5FA_class_t *cls = get_H5FA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0) {
- HDfprintf(
+ fprintf(
stderr,
"ERROR: Need object header address containing the layout message in order to dump header\n");
- HDfprintf(stderr, "Fixed array header block usage:\n");
- HDfprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n");
+ fprintf(stderr, "Fixed array header block usage:\n");
+ fprintf(stderr, "\th5debug <filename> <Fixed Array header address> <object header address>\n");
exit_value = 4;
goto done;
} /* end if */
status = H5FA__hdr_debug(f, addr, stdout, 0, VCOL, cls, extra[0]);
}
- else if (!HDmemcmp(sig, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5FA_DBLOCK_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug a fixed array data block.
*/
const H5FA_class_t *cls = get_H5FA_class(sig);
- HDassert(cls);
+ assert(cls);
/* Check for enough valid parameters */
if (extra_count == 0 || extra[0] == 0 || extra[1] == 0) {
- HDfprintf(stderr, "ERROR: Need fixed array header address and object header address containing "
- "the layout message in order to dump data block\n");
- HDfprintf(stderr, "fixed array data block usage:\n");
- HDfprintf(
+ fprintf(stderr, "ERROR: Need fixed array header address and object header address containing "
+ "the layout message in order to dump data block\n");
+ fprintf(stderr, "fixed array data block usage:\n");
+ fprintf(
stderr,
"\th5debug <filename> <data block address> <array header address> <object header address>\n");
exit_value = 4;
@@ -768,7 +765,7 @@ main(int argc, char *argv[])
status = H5FA__dblock_debug(f, addr, stdout, 0, VCOL, cls, extra[0], extra[1]);
}
- else if (!HDmemcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
+ else if (!memcmp(sig, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/*
* Debug v2 object header (which have signatures).
*/
@@ -786,7 +783,7 @@ main(int argc, char *argv[])
/*
* Got some other unrecognized signature.
*/
- HDprintf("%-*s ", VCOL, "Signature:");
+ printf("%-*s ", VCOL, "Signature:");
for (u = 0; u < sizeof(sig); u++) {
if (sig[u] > ' ' && sig[u] <= '~' && '\\' != sig[u])
HDputchar(sig[u]);
@@ -795,18 +792,18 @@ main(int argc, char *argv[])
HDputchar('\\');
}
else
- HDprintf("\\%03o", sig[u]);
+ printf("\\%03o", sig[u]);
}
HDputchar('\n');
- HDfprintf(stderr, "unknown signature\n");
+ fprintf(stderr, "unknown signature\n");
exit_value = 4;
goto done;
} /* end else */
/* Check for an error when dumping information */
if (status < 0) {
- HDfprintf(stderr, "An error occurred!\n");
+ fprintf(stderr, "An error occurred!\n");
H5Eprint2(H5E_DEFAULT, stderr);
exit_value = 5;
goto done;
@@ -817,7 +814,7 @@ done:
H5Pclose(fapl);
if (fid > 0) {
if (H5Fclose(fid) < 0) {
- HDfprintf(stderr, "Error in closing file!\n");
+ fprintf(stderr, "Error in closing file!\n");
exit_value = 1;
}
}
diff --git a/tools/src/misc/h5delete.c b/tools/src/misc/h5delete.c
index ef5b25f..3684365 100644
--- a/tools/src/misc/h5delete.c
+++ b/tools/src/misc/h5delete.c
@@ -25,7 +25,7 @@ static void usage(void);
static void
usage(void)
{
- HDfprintf(stderr, "usage: h5delete [-f] <filename>\n");
+ fprintf(stderr, "usage: h5delete [-f] <filename>\n");
}
int
@@ -60,7 +60,7 @@ main(int argc, char *argv[])
H5E_END_TRY;
if (ret < 0 && !quiet)
- HDfprintf(stderr, "Unable to delete storage at: %s\n", name);
+ fprintf(stderr, "Unable to delete storage at: %s\n", name);
return ret < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index fc7d5b6..36e6c15 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -58,18 +58,18 @@ leave(int ret)
size_t curr_group;
if (params_g.fname)
- HDfree(params_g.fname);
+ free(params_g.fname);
if (params_g.ngroups) {
for (curr_group = 0; curr_group < params_g.ngroups; curr_group++)
- HDfree(params_g.groups[curr_group]);
- HDfree(params_g.groups);
+ free(params_g.groups[curr_group]);
+ free(params_g.groups);
}
if (H5I_INVALID_HID != params_g.fapl_id && H5P_DEFAULT != params_g.fapl_id)
if (H5Pclose(params_g.fapl_id) < 0)
error_msg("Could not close file access property list\n");
h5tools_close();
- HDexit(ret);
+ exit(ret);
} /* end leave() */
/*-------------------------------------------------------------------------
@@ -147,8 +147,8 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
}
/* Initialize fapl info structs */
- HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t));
- HDmemset(&vfd_info, 0, sizeof(h5tools_vfd_info_t));
+ memset(&vol_info, 0, sizeof(h5tools_vol_info_t));
+ memset(&vfd_info, 0, sizeof(h5tools_vfd_info_t));
/* Parse command line options */
while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
@@ -182,7 +182,7 @@ 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)HDatoi(H5_optarg);
+ vol_info.u.value = (H5VL_class_value_t)atoi(H5_optarg);
custom_vol = TRUE;
break;
@@ -198,7 +198,7 @@ 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)HDatoi(H5_optarg);
+ vfd_info.u.value = (H5FD_class_value_t)atoi(H5_optarg);
custom_vfd = TRUE;
break;
@@ -239,7 +239,7 @@ parse_command_line(int argc, const char *const *argv, mkgrp_opt_t *options)
/* Allocate space for the group name pointers */
options->ngroups = (size_t)(argc - H5_optind);
- options->groups = (char **)HDmalloc(options->ngroups * sizeof(char *));
+ options->groups = (char **)malloc(options->ngroups * sizeof(char *));
/* Retrieve the group names */
curr_group = 0;
@@ -293,7 +293,7 @@ main(int argc, char *argv[])
h5tools_init();
/* Initialize the parameters */
- HDmemset(&params_g, 0, sizeof(params_g));
+ memset(&params_g, 0, sizeof(params_g));
/* Create file access property list */
if ((params_g.fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
@@ -320,7 +320,7 @@ main(int argc, char *argv[])
/* Display some output if requested */
if (params_g.verbose)
- HDprintf("%s: Creating groups with latest version of the format\n", h5tools_getprogname());
+ printf("%s: Creating groups with latest version of the format\n", h5tools_getprogname());
}
/* Attempt to open an existing HDF5 file first */
@@ -354,7 +354,7 @@ main(int argc, char *argv[])
/* Display some output if requested */
if (params_g.verbose)
- HDprintf("%s: Creating parent groups\n", h5tools_getprogname());
+ printf("%s: Creating parent groups\n", h5tools_getprogname());
}
/* Loop over creating requested groups */
@@ -375,7 +375,7 @@ main(int argc, char *argv[])
/* Display some output if requested */
if (params_g.verbose)
- HDprintf("%s: created group '%s'\n", h5tools_getprogname(), params_g.groups[curr_group]);
+ printf("%s: created group '%s'\n", h5tools_getprogname(), params_g.groups[curr_group]);
} /* end for */
/* Close link creation property list */
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index c01ec0f..004241d 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -50,22 +50,22 @@
static void
usage(const char *progname)
{
- HDfprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2|-family_to_single] SRC DST\n",
- progname);
- HDfprintf(stderr, " -v Produce verbose output\n");
- HDfprintf(stderr, " -V Print a version number and exit\n");
- HDfprintf(stderr, " -b N The I/O block size, defaults to 1kB\n");
- HDfprintf(stderr, " -m N The destination member size or 1GB\n");
- HDfprintf(stderr, " -family_to_sec2 Deprecated version of -family_to_single (below)\n");
- HDfprintf(stderr, " -family_to_single Change file driver from family to the default single-file VFD "
- "(windows or sec2)\n");
- HDfprintf(stderr, " SRC The name of the source file\n");
- HDfprintf(stderr, " DST The name of the destination files\n");
- HDfprintf(stderr, "Sizes may be suffixed with 'g' for GB, 'm' for MB or "
- "'k' for kB.\n");
- HDfprintf(stderr, "File family names include an integer printf "
- "format such as '%%d'\n");
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "usage: %s [-v] [-V] [-[b|m] N[g|m|k]] [-family_to_sec2|-family_to_single] SRC DST\n",
+ progname);
+ fprintf(stderr, " -v Produce verbose output\n");
+ fprintf(stderr, " -V Print a version number and exit\n");
+ fprintf(stderr, " -b N The I/O block size, defaults to 1kB\n");
+ fprintf(stderr, " -m N The destination member size or 1GB\n");
+ fprintf(stderr, " -family_to_sec2 Deprecated version of -family_to_single (below)\n");
+ fprintf(stderr, " -family_to_single Change file driver from family to the default single-file VFD "
+ "(windows or sec2)\n");
+ fprintf(stderr, " SRC The name of the source file\n");
+ fprintf(stderr, " DST The name of the destination files\n");
+ fprintf(stderr, "Sizes may be suffixed with 'g' for GB, 'm' for MB or "
+ "'k' for kB.\n");
+ fprintf(stderr, "File family names include an integer printf "
+ "format such as '%%d'\n");
+ exit(EXIT_FAILURE);
}
/*-------------------------------------------------------------------------
@@ -202,9 +202,9 @@ main(int argc, char *argv[])
argno++;
}
else if (!HDstrcmp(argv[argno], "-V")) {
- HDprintf("This is %s version %u.%u release %u\n", prog_name, H5_VERS_MAJOR, H5_VERS_MINOR,
- H5_VERS_RELEASE);
- HDexit(EXIT_SUCCESS);
+ 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;
@@ -226,10 +226,10 @@ main(int argc, char *argv[])
} /* end while */
/* allocate names */
- if (NULL == (src_name = (char *)HDcalloc((size_t)NAMELEN, sizeof(char))))
- HDexit(EXIT_FAILURE);
- if (NULL == (dst_name = (char *)HDcalloc((size_t)NAMELEN, sizeof(char))))
- HDexit(EXIT_FAILURE);
+ if (NULL == (src_name = (char *)calloc((size_t)NAMELEN, sizeof(char))))
+ exit(EXIT_FAILURE);
+ if (NULL == (dst_name = (char *)calloc((size_t)NAMELEN, sizeof(char))))
+ exit(EXIT_FAILURE);
/*
* Get the name for the source file and open the first member. The size
@@ -243,16 +243,16 @@ main(int argc, char *argv[])
if ((src = HDopen(src_name, O_RDONLY)) < 0) {
HDperror(src_name);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
HDperror("fstat");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
src_size = src_act_size = sb.st_size;
if (verbose)
- HDfprintf(stderr, "< %s\n", src_name);
+ fprintf(stderr, "< %s\n", src_name);
/*
* Get the name for the destination file and open the first member.
@@ -265,17 +265,17 @@ main(int argc, char *argv[])
if ((dst = HDopen(dst_name, O_RDWR | O_CREAT | O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
HDperror(dst_name);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (verbose)
- HDfprintf(stderr, "> %s\n", dst_name);
+ fprintf(stderr, "> %s\n", dst_name);
/* No more arguments */
if (argno < argc)
usage(prog_name);
/* Now the real work, split the file */
- buf = (char *)HDmalloc(blk_size);
+ buf = (char *)malloc(blk_size);
while (src_offset < src_size) {
/* Read a block. The amount to read is the minimum of:
@@ -295,11 +295,11 @@ main(int argc, char *argv[])
n = (size_t)MIN((off_t)n, src_act_size - src_offset);
if ((nio = HDread(src, buf, n)) < 0) {
HDperror("read");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
- HDfprintf(stderr, "%s: short read\n", src_name);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "%s: short read\n", src_name);
+ exit(EXIT_FAILURE);
}
for (i = 0; i < n; i++) {
if (buf[i])
@@ -321,15 +321,15 @@ main(int argc, char *argv[])
if (need_write) {
if (need_seek && HDlseek(dst, dst_offset, SEEK_SET) < 0) {
HDperror("HDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if ((nio = HDwrite(dst, buf, n)) < 0) {
HDperror("write");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
else if ((size_t)nio != n) {
- HDfprintf(stderr, "%s: short write\n", dst_name);
- HDexit(EXIT_FAILURE);
+ fprintf(stderr, "%s: short write\n", dst_name);
+ exit(EXIT_FAILURE);
}
need_seek = FALSE;
}
@@ -359,19 +359,19 @@ main(int argc, char *argv[])
}
else if (src < 0) {
HDperror(src_name);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDfstat(src, &sb) < 0) {
HDperror("fstat");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
src_act_size = sb.st_size;
if (src_act_size > src_size) {
- HDfprintf(stderr, "%s: member truncated to %lu bytes\n", src_name, (unsigned long)src_size);
+ fprintf(stderr, "%s: member truncated to %lu bytes\n", src_name, (unsigned long)src_size);
}
src_offset = 0;
if (verbose)
- HDfprintf(stderr, "< %s\n", src_name);
+ fprintf(stderr, "< %s\n", src_name);
}
/*
@@ -384,31 +384,31 @@ main(int argc, char *argv[])
if (0 == dst_membno) {
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
HDperror("HDHDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
HDperror("read");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_size - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
HDperror("write");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
HDclose(dst);
HDsnprintf(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);
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
dst_offset = 0;
need_seek = FALSE;
if (verbose)
- HDfprintf(stderr, "> %s\n", dst_name);
+ fprintf(stderr, "> %s\n", dst_name);
}
}
@@ -420,19 +420,19 @@ main(int argc, char *argv[])
if (need_seek) {
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDread(dst, buf, 1) < 0) {
HDperror("read");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDlseek(dst, dst_offset - 1, SEEK_SET) < 0) {
HDperror("HDlseek");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (HDwrite(dst, buf, 1) < 0) {
HDperror("write");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
HDclose(dst);
@@ -441,7 +441,7 @@ main(int argc, char *argv[])
* These private properties are for this tool only. */
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
HDperror("H5Pcreate");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (family_to_single) {
@@ -451,7 +451,7 @@ main(int argc, char *argv[])
*/
if (H5Pset(fapl, H5F_ACS_FAMILY_TO_SINGLE_NAME, &family_to_single) < 0) {
HDperror("H5Pset");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
else {
@@ -460,14 +460,14 @@ main(int argc, char *argv[])
* This private property is for this tool only. */
if (H5Pset_fapl_family(fapl, H5F_FAMILY_DEFAULT, H5P_DEFAULT) < 0) {
HDperror("H5Pset_fapl_family");
- HDexit(EXIT_FAILURE);
+ 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");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
@@ -488,19 +488,19 @@ main(int argc, char *argv[])
if (file >= 0) {
if (H5Fclose(file) < 0) {
HDperror("H5Fclose");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
} /* end if */
if (H5Pclose(fapl) < 0) {
HDperror("H5Pclose");
- HDexit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} /* end if */
/* Free resources and return */
- HDfree(src_name);
- HDfree(dst_name);
- HDfree(buf);
+ free(src_name);
+ free(dst_name);
+ free(buf);
return EXIT_SUCCESS;
} /* end main */
H5_GCC_CLANG_DIAG_ON("format-nonliteral")