summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-06-29 15:18:49 (GMT)
committerGitHub <noreply@github.com>2023-06-29 15:18:49 (GMT)
commit8aef67f0ae3e037df22c5319eb2eac8b95521b19 (patch)
tree1286f3e2109b73a7040119779331814436110fae /tools
parent9f430d15b004495d17826840ef1a4f281215c7f9 (diff)
downloadhdf5-8aef67f0ae3e037df22c5319eb2eac8b95521b19.zip
hdf5-8aef67f0ae3e037df22c5319eb2eac8b95521b19.tar.gz
hdf5-8aef67f0ae3e037df22c5319eb2eac8b95521b19.tar.bz2
Remove HD from strto* calls (#3204)
* HDstrtod * HDstrtol * HDstrtoll * HDstrtoul * HDstrtoull * HDstrtoumax
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5tools_utils.c6
-rw-r--r--tools/src/h5diff/h5diff_common.c6
-rw-r--r--tools/src/h5dump/h5dump.c2
-rw-r--r--tools/src/h5import/h5import.c22
-rw-r--r--tools/src/h5ls/h5ls.c8
-rw-r--r--tools/src/h5perf/pio_perf.c2
-rw-r--r--tools/src/h5perf/sio_engine.c2
-rw-r--r--tools/src/h5perf/sio_perf.c2
-rw-r--r--tools/src/h5repack/h5repack_main.c8
-rw-r--r--tools/src/h5repack/h5repack_parse.c12
-rw-r--r--tools/src/misc/h5debug.c4
-rw-r--r--tools/src/misc/h5repart.c4
-rw-r--r--tools/test/perform/zip_perf.c4
13 files changed, 41 insertions, 41 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c
index 983d4af..717ab12 100644
--- a/tools/lib/h5tools_utils.c
+++ b/tools/lib/h5tools_utils.c
@@ -211,7 +211,7 @@ parse_hsize_list(const char *h_list, subset_d *d)
for (ptr = h_list; i < size_count && ptr && *ptr && *ptr != ';' && *ptr != ']'; ptr++)
if (HDisdigit(*ptr)) {
/* we should have an integer now */
- p_list[i++] = (hsize_t)HDstrtoull(ptr, NULL, 0);
+ p_list[i++] = (hsize_t)strtoull(ptr, NULL, 0);
while (HDisdigit(*ptr))
/* scroll to end of integer */
@@ -999,7 +999,7 @@ h5tools_getenv_update_hyperslab_bufsize(void)
/* check if environment variable is set for the hyperslab buffer size */
if (NULL != (env_str = HDgetenv("H5TOOLS_BUFSIZE"))) {
errno = 0;
- hyperslab_bufsize_mb = HDstrtol(env_str, (char **)NULL, 10);
+ hyperslab_bufsize_mb = strtol(env_str, (char **)NULL, 10);
if (errno != 0 || hyperslab_bufsize_mb <= 0)
H5TOOLS_GOTO_ERROR(FAIL, "hyperslab buffer size failed");
@@ -1283,7 +1283,7 @@ h5tools_parse_hdfs_fapl_tuple(const char *tuple_str, int delim, H5FD_hdfs_fapl_t
HDstrncpy(fapl_config_out->user_name, (const char *)props[3], HDstrlen(props[3]));
}
if (HDstrncmp(props[4], "", 1)) {
- k = HDstrtoul((const char *)props[4], NULL, 0);
+ k = strtoul((const char *)props[4], NULL, 0);
if (errno == ERANGE)
H5TOOLS_GOTO_ERROR(FAIL, "supposed buffersize number wasn't");
fapl_config_out->stream_buffer_size = (int32_t)k;
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index f941d00..0e34bc4 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -305,7 +305,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
usage();
h5diff_exit(EXIT_FAILURE);
}
- opts->count = HDstrtoull(H5_optarg, NULL, 0);
+ opts->count = strtoull(H5_optarg, NULL, 0);
break;
case 'N':
@@ -390,7 +390,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
if (opts->vfd_info[0].u.name && !HDstrcmp(opts->vfd_info[0].u.name, "onion")) {
if (opts->vfd_info[0].info) {
errno = 0;
- onion_fa_g_1.revision_num = HDstrtoull(opts->vfd_info[0].info, NULL, 10);
+ onion_fa_g_1.revision_num = strtoull(opts->vfd_info[0].info, NULL, 10);
if (errno == ERANGE) {
printf("Invalid onion revision specified for file 1\n");
usage();
@@ -407,7 +407,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
if (opts->vfd_info[1].u.name && !HDstrcmp(opts->vfd_info[1].u.name, "onion")) {
if (opts->vfd_info[1].info) {
errno = 0;
- onion_fa_g_2.revision_num = HDstrtoull(opts->vfd_info[1].info, NULL, 10);
+ onion_fa_g_2.revision_num = strtoull(opts->vfd_info[1].info, NULL, 10);
if (errno == ERANGE) {
printf("Invalid onion revision specified for file 2\n");
usage();
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 9fdaaca..31671b0 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -1238,7 +1238,7 @@ end_collect:
get_onion_revision_count = TRUE;
else {
errno = 0;
- onion_fa_g.revision_num = HDstrtoull(vfd_info_g.info, NULL, 10);
+ onion_fa_g.revision_num = strtoull(vfd_info_g.info, NULL, 10);
if (errno == ERANGE) {
printf("Invalid onion revision specified\n");
goto error;
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 06a160b..f5197f7 100644
--- a/tools/src/h5import/h5import.c
+++ b/tools/src/h5import/h5import.c
@@ -212,7 +212,7 @@ main(int argc, char *argv[])
break;
case 14: /* read data size */
- if (getInputSize(in, (int)HDstrtol(argv[i], NULL, BASE_10)) == -1) {
+ if (getInputSize(in, (int)strtol(argv[i], NULL, BASE_10)) == -1) {
(void)fprintf(stderr, err8, argv[i]);
goto err;
}
@@ -600,7 +600,7 @@ readIntegerData(FILE *strm, struct Input *in)
(void)fprintf(stderr, "%s", err1);
return (-1);
}
- *in64 = (H5DT_INT64)HDstrtoll(buffer, NULL, 10);
+ *in64 = (H5DT_INT64)strtoll(buffer, NULL, 10);
}
break;
@@ -767,7 +767,7 @@ readUIntegerData(FILE *strm, struct Input *in)
(void)fprintf(stderr, "%s", err1);
return (-1);
}
- *in64 = (H5DT_UINT64)HDstrtoll(buffer, NULL, 10);
+ *in64 = (H5DT_UINT64)strtoll(buffer, NULL, 10);
}
break;
@@ -1570,7 +1570,7 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
if (HDstrcmp("H5T_VARIABLE;", temp) != 0) {
char *more = temp;
- ival = (int)HDstrtol(more, &more, 10);
+ ival = (int)strtol(more, &more, 10);
if (getInputSize(in, ival) == -1) {
(void)fprintf(stderr, err5b, infile);
goto error;
@@ -1669,7 +1669,7 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
while (get_next_dim) {
char *more = temp;
- temp_dims[icount] = HDstrtoull(more, &more, 10);
+ temp_dims[icount] = strtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
@@ -1758,7 +1758,7 @@ processConfigurationFile(char *infile, struct Input *in)
}
else {
char *more = temp;
- in->maxsizeOfDimension[i] = HDstrtoull(more, &more, 10);
+ in->maxsizeOfDimension[i] = strtoull(more, &more, 10);
}
if (HDfscanf(strm, "%254s", temp) != 1) { /* max dim or end paren */
(void)fprintf(stderr, err16c, infile);
@@ -1845,7 +1845,7 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
while (get_next_dim) {
char *more = temp;
- in->sizeOfChunk[icount] = HDstrtoull(more, &more, 10);
+ in->sizeOfChunk[icount] = strtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
@@ -2030,7 +2030,7 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
while (get_next_dim) {
char *more = temp;
- temp_dims[icount] = HDstrtoull(more, &more, 10);
+ temp_dims[icount] = strtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
@@ -2086,7 +2086,7 @@ processConfigurationFile(char *infile, struct Input *in)
#endif
while (get_next_dim) {
char *more = temp;
- temp_dims[icount] = HDstrtoull(more, &more, 10);
+ temp_dims[icount] = strtoull(more, &more, 10);
if (HDfscanf(strm, "%254s", temp) != 1) { /* Dimension or end paren */
(void)fprintf(stderr, err6b, infile);
goto error;
@@ -2573,13 +2573,13 @@ parseDimensions(struct Input *in, char *strm)
i = 0;
HDstrncpy(temp, strm, sizeof(temp));
temp[sizeof(temp) - 1] = '\0';
- in->sizeOfDimension[i++] = HDstrtoull(HDstrtok(temp, delimiter), NULL, BASE_10);
+ in->sizeOfDimension[i++] = strtoull(HDstrtok(temp, delimiter), NULL, BASE_10);
while (1) {
token = HDstrtok(NULL, delimiter);
if (token == NULL)
break;
- in->sizeOfDimension[i++] = HDstrtoull(token, NULL, BASE_10);
+ in->sizeOfDimension[i++] = strtoull(token, NULL, BASE_10);
}
return (0);
}
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 2a826c1..24bb345 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -2535,7 +2535,7 @@ get_width(void)
/* Try to get it from the COLUMNS environment variable first since it's
* value is sometimes wrong. */
if ((s = HDgetenv("COLUMNS")) && *s && isdigit((int)*s))
- width = (int)HDstrtol(s, NULL, 0);
+ width = (int)strtol(s, NULL, 0);
#if defined(H5_HAVE_STRUCT_VIDEOCONFIG) && defined(H5_HAVE__GETVIDEOCONFIG)
{
@@ -2784,7 +2784,7 @@ main(int argc, char *argv[])
vfd_info.info = (const void *)(argv[argno] + 11);
}
else if (!HDstrncmp(argv[argno], "--width=", (size_t)8)) {
- width_g = (int)HDstrtol(argv[argno] + 8, &rest, 0);
+ width_g = (int)strtol(argv[argno] + 8, &rest, 0);
if (0 == width_g)
no_line_wrap_g = TRUE;
@@ -2801,7 +2801,7 @@ main(int argc, char *argv[])
else {
s = argv[++argno];
}
- width_g = (int)HDstrtol(s, &rest, 0);
+ width_g = (int)strtol(s, &rest, 0);
if (width_g <= 0 || *rest) {
usage();
leave(EXIT_FAILURE);
@@ -2828,7 +2828,7 @@ main(int argc, char *argv[])
else {
s = argv[++argno];
}
- width_g = (int)HDstrtol(s, &rest, 0);
+ width_g = (int)strtol(s, &rest, 0);
if (0 == width_g) {
no_line_wrap_g = TRUE;
diff --git a/tools/src/h5perf/pio_perf.c b/tools/src/h5perf/pio_perf.c
index 4682f2d..3e306df 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -1503,7 +1503,7 @@ parse_size_directive(const char *size)
off_t s;
char *endptr;
- s = HDstrtol(size, &endptr, 10);
+ s = strtol(size, &endptr, 10);
if (endptr && *endptr) {
while (*endptr != '\0' && (*endptr == ' ' || *endptr == '\t'))
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index 9fbe9eb..cc4a28e 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -1190,7 +1190,7 @@ set_vfd(parameters *param)
/* Family of files, each 1MB and using the default driver */
/* if ((val=HDstrtok(NULL, " \t\n\r")))
- fam_size = (hsize_t)(HDstrtod(val, NULL) * 1024*1024); */
+ fam_size = (hsize_t)(strtod(val, NULL) * 1024*1024); */
if (H5Pset_fapl_family(my_fapl, fam_size, H5P_DEFAULT) < 0)
return -1;
}
diff --git a/tools/src/h5perf/sio_perf.c b/tools/src/h5perf/sio_perf.c
index 3aad24e..b456a4f 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -1175,7 +1175,7 @@ parse_size_directive(const char *size)
hsize_t s;
char *endptr;
- s = HDstrtoull(size, &endptr, 10);
+ s = strtoull(size, &endptr, 10);
if (endptr && *endptr) {
while (*endptr != '\0' && (*endptr == ' ' || *endptr == '\t'))
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 15b206e..7134865 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -598,7 +598,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'm':
- options->min_comp = HDstrtoull(H5_optarg, NULL, 0);
+ options->min_comp = strtoull(H5_optarg, NULL, 0);
if ((int)options->min_comp <= 0) {
error_msg("invalid minimum compress size <%s>\n", H5_optarg);
h5tools_setstatus(EXIT_FAILURE);
@@ -712,7 +712,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'a':
- options->alignment = HDstrtoull(H5_optarg, NULL, 0);
+ options->alignment = strtoull(H5_optarg, NULL, 0);
if (options->alignment < 1) {
error_msg("invalid alignment size `%s`\n", H5_optarg);
h5tools_setstatus(EXIT_FAILURE);
@@ -759,7 +759,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'G':
- options->fs_pagesize = HDstrtoll(H5_optarg, NULL, 0);
+ options->fs_pagesize = strtoll(H5_optarg, NULL, 0);
if (options->fs_pagesize == 0)
/* To distinguish the "specified" zero value */
options->fs_pagesize = -1;
@@ -890,7 +890,7 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
if (in_vfd_info.u.name && !HDstrcmp(in_vfd_info.u.name, "onion")) {
if (in_vfd_info.info) {
errno = 0;
- onion_fa_in_g.revision_num = HDstrtoull(in_vfd_info.info, NULL, 10);
+ onion_fa_in_g.revision_num = strtoull(in_vfd_info.info, NULL, 10);
if (errno == ERANGE) {
printf("Invalid onion revision specified for the input file\n");
usage(h5tools_getprogname());
diff --git a/tools/src/h5repack/h5repack_parse.c b/tools/src/h5repack/h5repack_parse.c
index ad1f852..38f9d3b 100644
--- a/tools/src/h5repack/h5repack_parse.c
+++ b/tools/src/h5repack/h5repack_parse.c
@@ -228,15 +228,15 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
l = 0;
}
else if (f == -1) {
- filt->filt_flag = (unsigned)HDstrtoul(stype, NULL, 0);
+ filt->filt_flag = (unsigned)strtoul(stype, NULL, 0);
f = 0;
}
else if (p == -1) {
- filt->cd_nelmts = HDstrtoull(stype, NULL, 0);
+ filt->cd_nelmts = strtoull(stype, NULL, 0);
p = 0;
}
else {
- filt->cd_values[j++] = (unsigned)HDstrtoul(stype, NULL, 0);
+ filt->cd_values[j++] = (unsigned)strtoul(stype, NULL, 0);
}
q = 0;
u++; /* skip ',' */
@@ -279,7 +279,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
stype[m] = '\0';
} /*if */
- filt->cd_values[j++] = (unsigned)HDstrtoul(stype, NULL, 0);
+ filt->cd_values[j++] = (unsigned)strtoul(stype, NULL, 0);
if (filt->cd_nelmts == 0)
j = 0;
i += m; /* jump */
@@ -596,7 +596,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
if (c == 'x') {
sdim[k - 1] = '\0';
k = 0;
- pack->chunk.chunk_lengths[c_index] = HDstrtoull(sdim, NULL, 0);
+ pack->chunk.chunk_lengths[c_index] = strtoull(sdim, NULL, 0);
if (pack->chunk.chunk_lengths[c_index] == 0) {
if (obj_list)
free(obj_list);
@@ -612,7 +612,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
pack->chunk.rank = -2;
}
else {
- pack->chunk.chunk_lengths[c_index] = HDstrtoull(sdim, NULL, 0);
+ pack->chunk.chunk_lengths[c_index] = strtoull(sdim, NULL, 0);
if (pack->chunk.chunk_lengths[c_index] == 0) {
if (obj_list)
free(obj_list);
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index 0f841a9..7196fbc 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -321,7 +321,7 @@ main(int argc, char *argv[])
/* Primary data structure to dump */
if (argc > 2)
- addr = (haddr_t)HDstrtoll(argv[2], NULL, 0);
+ addr = (haddr_t)strtoll(argv[2], NULL, 0);
/* Extra arguments for primary data structure */
HDmemset(extra, 0, sizeof(extra));
@@ -337,7 +337,7 @@ main(int argc, char *argv[])
} /* end if */
for (u = 0; u < (size_t)extra_count; u++)
- extra[u] = (haddr_t)HDstrtoll(argv[u + 3], NULL, 0);
+ extra[u] = (haddr_t)strtoll(argv[u + 3], NULL, 0);
} /* end if */
/*
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index 17c3a97..57b5ea5 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -97,14 +97,14 @@ get_size(const char *progname, int *argno, int argc, char *argv[])
char *suffix = NULL;
if (isdigit((int)(argv[*argno][2]))) {
- retval = HDstrtol(argv[*argno] + 2, &suffix, 10);
+ retval = strtol(argv[*argno] + 2, &suffix, 10);
(*argno)++;
}
else if (argv[*argno][2] || *argno + 1 >= argc) {
usage(progname);
}
else {
- retval = HDstrtol(argv[*argno + 1], &suffix, 0);
+ retval = strtol(argv[*argno + 1], &suffix, 0);
if (suffix == argv[*argno + 1])
usage(progname);
*argno += 2;
diff --git a/tools/test/perform/zip_perf.c b/tools/test/perform/zip_perf.c
index 7527716..a21bfd8 100644
--- a/tools/test/perform/zip_perf.c
+++ b/tools/test/perform/zip_perf.c
@@ -280,7 +280,7 @@ parse_size_directive(const char *size)
unsigned long s;
char *endptr;
- s = HDstrtoul(size, &endptr, 10);
+ s = strtoul(size, &endptr, 10);
if (endptr && *endptr) {
while (*endptr != '\0' && (*endptr == ' ' || *endptr == '\t'))
@@ -495,7 +495,7 @@ main(int argc, char *argv[])
min_buf_size = parse_size_directive(H5_optarg);
break;
case 'c':
- compress_percent = (int)HDstrtol(H5_optarg, NULL, 10);
+ compress_percent = (int)strtol(H5_optarg, NULL, 10);
if (compress_percent < 0)
compress_percent = 0;