summaryrefslogtreecommitdiffstats
path: root/tools/src/h5dump
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/h5dump
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/h5dump')
-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
3 files changed, 208 insertions, 208 deletions
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);
}