diff options
Diffstat (limited to 'tools/src/h5dump/h5dump.c')
-rw-r--r-- | tools/src/h5dump/h5dump.c | 72 |
1 files changed, 36 insertions, 36 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 */ |