summaryrefslogtreecommitdiffstats
path: root/tools/src
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src')
-rw-r--r--tools/src/h5copy/h5copy.c12
-rw-r--r--tools/src/h5diff/h5diff_common.c21
-rw-r--r--tools/src/h5diff/ph5diff_main.c2
-rw-r--r--tools/src/h5dump/h5dump.c33
-rw-r--r--tools/src/h5dump/h5dump_ddl.c2
-rw-r--r--tools/src/h5dump/h5dump_defines.h4
-rw-r--r--tools/src/h5dump/h5dump_xml.c4
-rw-r--r--tools/src/h5format_convert/h5format_convert.c3
-rw-r--r--tools/src/h5import/h5import.c60
-rw-r--r--tools/src/h5import/h5import.h30
-rw-r--r--tools/src/h5jam/h5jam.c8
-rw-r--r--tools/src/h5jam/h5unjam.c11
-rw-r--r--tools/src/h5ls/h5ls.c32
-rw-r--r--tools/src/h5perf/pio_perf.c6
-rw-r--r--tools/src/h5perf/pio_perf.h6
-rw-r--r--tools/src/h5perf/sio_engine.c2
-rw-r--r--tools/src/h5perf/sio_perf.c18
-rw-r--r--tools/src/h5repack/h5repack.c4
-rw-r--r--tools/src/h5repack/h5repack_copy.c6
-rw-r--r--tools/src/h5repack/h5repack_main.c34
-rw-r--r--tools/src/h5repack/h5repack_parse.c26
-rw-r--r--tools/src/h5repack/h5repack_refs.c30
-rw-r--r--tools/src/h5repack/h5repack_verify.c4
-rw-r--r--tools/src/h5stat/h5stat.c27
-rw-r--r--tools/src/misc/h5debug.c4
-rw-r--r--tools/src/misc/h5delete.c2
-rw-r--r--tools/src/misc/h5mkgrp.c9
-rw-r--r--tools/src/misc/h5repart.c6
28 files changed, 220 insertions, 186 deletions
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index e633ce3..2b28df3 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -30,11 +30,11 @@ static struct h5_long_options l_opts[] = {{"destination", require_arg, 'd'},
{"version", no_arg, 'V'},
{"enable-error-stack", optional_arg, 'E'},
{NULL, 0, '\0'}};
-char *fname_src = NULL;
-char *fname_dst = NULL;
-char *oname_src = NULL;
-char *oname_dst = NULL;
-char *str_flag = NULL;
+static char *fname_src = NULL;
+static char *fname_dst = NULL;
+static char *oname_src = NULL;
+static char *oname_dst = NULL;
+static char *str_flag = NULL;
/*-------------------------------------------------------------------------
* Function: leave
@@ -479,7 +479,7 @@ done:
H5Fclose(fid_src);
H5Fclose(fid_dst);
}
- H5E_END_TRY;
+ H5E_END_TRY
leave(ret_value);
}
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 51bc050..4854534 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -280,7 +280,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
usage();
h5diff_exit(EXIT_FAILURE);
}
- opts->delta = HDatof(H5_optarg);
+ opts->delta = atof(H5_optarg);
/* do not check against default, the DBL_EPSILON is being replaced by user */
break;
@@ -291,7 +291,7 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const
usage();
h5diff_exit(EXIT_FAILURE);
}
- opts->percent = HDatof(H5_optarg);
+ opts->percent = atof(H5_optarg);
/* -p 0 is the same as default */
if (H5_DBL_ABS_EQUAL(opts->percent, 0.0))
@@ -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();
@@ -544,7 +544,7 @@ check_p_input(const char *str)
if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x')
return -1;
- x = HDatof(str);
+ x = atof(str);
if (x < 0)
return -1;
@@ -571,7 +571,7 @@ check_d_input(const char *str)
if (HDstrlen(str) > 2 && str[0] == '0' && str[1] == 'x')
return -1;
- x = HDatof(str);
+ x = atof(str);
if (x < 0)
return -1;
@@ -640,6 +640,13 @@ usage(void)
PRINTVALSTREAM(rawoutstream,
" --vol-info-2 VOL-specific info to pass to the VOL connector used for\n");
PRINTVALSTREAM(rawoutstream, " opening the second HDF5 file specified\n");
+ PRINTVALSTREAM(rawoutstream, " If none of the above options are used to "
+ "specify a VOL for a file, then\n");
+ PRINTVALSTREAM(
+ rawoutstream,
+ " the VOL named by HDF5_VOL_CONNECTOR (or the native VOL connector,\n");
+ PRINTVALSTREAM(rawoutstream,
+ " if that environment variable is unset) will be used\n");
PRINTVALSTREAM(rawoutstream,
" --vfd-value-1 Value (ID) of the VFL driver to use for opening the\n");
PRINTVALSTREAM(rawoutstream, " first HDF5 file specified\n");
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 884f788..efac3cb 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -143,7 +143,7 @@ ph5diff_worker(int nID)
}
/* enable error reporting */
}
- H5E_END_TRY;
+ H5E_END_TRY
}
/* Check for work */
else if (Status.MPI_TAG == MPI_TAG_ARGS) {
diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c
index 73309cd..1458354 100644
--- a/tools/src/h5dump/h5dump.c
+++ b/tools/src/h5dump/h5dump.c
@@ -32,12 +32,15 @@ static hbool_t get_onion_revision_count = FALSE;
#ifdef H5_HAVE_ROS3_VFD
/* Default "anonymous" S3 configuration */
-static H5FD_ros3_fapl_t ros3_fa_g = {
- 1, /* Structure Version */
- FALSE, /* Authenticate? */
- "", /* AWS Region */
- "", /* Access Key ID */
- "", /* Secret Access Key */
+static H5FD_ros3_fapl_ext_t ros3_fa_g = {
+ {
+ 1, /* Structure Version */
+ FALSE, /* Authenticate? */
+ "", /* AWS Region */
+ "", /* Access Key ID */
+ "", /* Secret Access Key */
+ },
+ "", /* Session/security token */
};
#endif /* H5_HAVE_ROS3_VFD */
@@ -219,6 +222,14 @@ usage(const char *prog)
PRINTVALSTREAM(rawoutstream,
" --vol-info VOL-specific info to pass to the VOL connector used for\n");
PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n");
+ PRINTVALSTREAM(
+ rawoutstream,
+ " If none of the above options are used to specify a VOL, then\n");
+ PRINTVALSTREAM(
+ rawoutstream,
+ " the VOL named by HDF5_VOL_CONNECTOR (or the native VOL connector,\n");
+ PRINTVALSTREAM(rawoutstream,
+ " if that environment variable is unset) will be used\n");
PRINTVALSTREAM(rawoutstream,
" --vfd-value Value (ID) of the VFL driver to use for opening the\n");
PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n");
@@ -594,7 +605,7 @@ parse_mask_list(const char *h_list)
ptr = h_list;
while (*ptr) {
/* scan for an offset which is an unsigned int */
- if (!HDisdigit(*ptr)) {
+ if (!isdigit(*ptr)) {
error_msg("Bad mask list(%s)\n", h_list);
return FAIL;
}
@@ -607,7 +618,7 @@ parse_mask_list(const char *h_list)
}
/* skip to end of integer */
- while (HDisdigit(*++ptr))
+ while (isdigit(*++ptr))
;
/* Look for the common separator */
if (*ptr++ != ',') {
@@ -616,7 +627,7 @@ parse_mask_list(const char *h_list)
}
/* scan for a length which is a positive int */
- if (!HDisdigit(*ptr)) {
+ if (!isdigit(*ptr)) {
error_msg("Bad mask list(%s)\n", h_list);
return FAIL;
}
@@ -633,7 +644,7 @@ parse_mask_list(const char *h_list)
}
/* skip to end of int */
- while (HDisdigit(*++ptr))
+ while (isdigit(*++ptr))
;
/* store the offset,length pair */
@@ -1230,7 +1241,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/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c
index a69aeac..da9093c 100644
--- a/tools/src/h5dump/h5dump_ddl.c
+++ b/tools/src/h5dump/h5dump_ddl.c
@@ -1649,7 +1649,7 @@ error:
H5Oclose(oid);
H5Aclose(attr_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
dump_indent -= COL;
}
diff --git a/tools/src/h5dump/h5dump_defines.h b/tools/src/h5dump/h5dump_defines.h
index bb4236d..5f89178 100644
--- a/tools/src/h5dump/h5dump_defines.h
+++ b/tools/src/h5dump/h5dump_defines.h
@@ -28,7 +28,7 @@
else { \
PRINTSTREAM(rawoutstream, "%s %s", (obj), (begin)); \
} \
- } while (0);
+ } while (0)
#define end_obj(obj, end) \
do { \
@@ -39,7 +39,7 @@
} \
if (HDstrlen(obj)) \
PRINTSTREAM(rawoutstream, "%s", obj); \
- } while (0);
+ } while (0)
/* 3 private values: can't be set, but can be read.
Note: these are defined in H5Zprivate, they are
diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c
index 95c99f6..cb279e3 100644
--- a/tools/src/h5dump/h5dump_xml.c
+++ b/tools/src/h5dump/h5dump_xml.c
@@ -3069,7 +3069,7 @@ error:
H5Tclose(type);
H5Sclose(space);
}
- H5E_END_TRY;
+ H5E_END_TRY
return FAIL;
}
@@ -3238,7 +3238,7 @@ error:
H5Tclose(type);
H5Sclose(space);
}
- H5E_END_TRY;
+ H5E_END_TRY
return FAIL;
}
diff --git a/tools/src/h5format_convert/h5format_convert.c b/tools/src/h5format_convert/h5format_convert.c
index 0806840..96aab9b 100644
--- a/tools/src/h5format_convert/h5format_convert.c
+++ b/tools/src/h5format_convert/h5format_convert.c
@@ -158,7 +158,6 @@ parse_command_line(int argc, const char *const *argv)
error:
return -1;
- ;
} /* parse_command_line() */
/*-------------------------------------------------------------------------
@@ -329,7 +328,7 @@ error:
H5Pclose(dcpl);
H5Dclose(did);
}
- H5E_END_TRY;
+ H5E_END_TRY
return -1;
} /* convert() */
diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c
index 3dba23a..2a89bcc 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;
}
@@ -457,7 +457,7 @@ processDataFile(char *infile, struct Input *in, hid_t file_id)
error:
if (strm)
- HDfclose(strm);
+ fclose(strm);
return retval;
}
@@ -500,7 +500,7 @@ readIntegerData(FILE *strm, struct Input *in)
case 4: /* IN */
in08 = (H5DT_INT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
- if (HDfread((char *)in08, sizeof(H5DT_INT8), 1, strm) != 1) {
+ if (fread((char *)in08, sizeof(H5DT_INT8), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -531,7 +531,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) {
+ if (fread((char *)&temp16, sizeof(H5DT_INT16), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -567,7 +567,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) {
+ if (fread((char *)&temp32, sizeof(H5DT_INT32), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -598,13 +598,13 @@ 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;
case 4: /* IN */
for (i = 0; i < len; i++, in64++) {
- if (HDfread((char *)&temp64, sizeof(H5DT_INT64), 1, strm) != 1) {
+ if (fread((char *)&temp64, sizeof(H5DT_INT64), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -671,7 +671,7 @@ readUIntegerData(FILE *strm, struct Input *in)
case 7: /* UIN */
in08 = (H5DT_UINT8 *)in->data;
for (i = 0; i < len; i++, in08++) {
- if (HDfread((char *)in08, sizeof(H5DT_UINT8), 1, strm) != 1) {
+ if (fread((char *)in08, sizeof(H5DT_UINT8), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -698,7 +698,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) {
+ if (fread((char *)&temp16, sizeof(H5DT_UINT16), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -734,7 +734,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) {
+ if (fread((char *)&temp32, sizeof(H5DT_UINT32), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -765,13 +765,13 @@ 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;
case 7: /* UIN */
for (i = 0; i < len; i++, in64++) {
- if (HDfread((char *)&temp64, sizeof(H5DT_UINT64), 1, strm) != 1) {
+ if (fread((char *)&temp64, sizeof(H5DT_UINT64), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -851,7 +851,7 @@ readFloatData(FILE *strm, struct Input *in)
case 3: /* FP */
bfp32 = (uint32_t *)in->data;
for (i = 0; i < len; i++, bfp32++) {
- if (HDfread((char *)&temp32, sizeof(uint32_t), 1, strm) != 1) {
+ if (fread((char *)&temp32, sizeof(uint32_t), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -903,7 +903,7 @@ readFloatData(FILE *strm, struct Input *in)
case 3: /* FP */
bfp64 = (uint64_t *)in->data;
for (i = 0; i < len; i++, bfp64++) {
- if (HDfread((char *)&temp64, sizeof(uint64_t), 1, strm) != 1) {
+ if (fread((char *)&temp64, sizeof(uint64_t), 1, strm) != 1) {
(void)fprintf(stderr, "%s", err1);
return (-1);
}
@@ -1015,7 +1015,7 @@ processStrData(FILE *strm, struct Input *in, hid_t file_id)
/*enable error reporting */
}
- H5E_END_TRY;
+ H5E_END_TRY
if ((space_id = H5Screate_simple(1, dims, NULL)) < 0)
goto out;
@@ -1141,7 +1141,7 @@ processStrHDFData(FILE *strm, struct Input *in, hid_t file_id)
/*enable error reporting */
}
- H5E_END_TRY;
+ H5E_END_TRY
#ifdef H5DEBUGIMPORT
printf("processStrHDFData DATATYPE STRING groups created\n");
#endif
@@ -1243,7 +1243,7 @@ out:
H5Sclose(mspace_id);
H5Tclose(type_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
return (-1);
}
@@ -1564,7 +1564,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;
@@ -1663,7 +1663,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;
@@ -1752,7 +1752,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);
@@ -1839,7 +1839,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;
@@ -2024,7 +2024,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;
@@ -2080,7 +2080,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;
@@ -2436,7 +2436,7 @@ processConfigurationFile(char *infile, struct Input *in)
error:
if (strm)
- HDfclose(strm);
+ fclose(strm);
return retval;
}
@@ -2567,13 +2567,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);
}
@@ -4623,7 +4623,7 @@ process(struct Options *opt)
}
}
}
- H5E_END_TRY;
+ H5E_END_TRY
for (k = 0; k < opt->fcount; k++) {
in = &(opt->infiles[k].in);
@@ -4671,7 +4671,7 @@ process(struct Options *opt)
/*enable error reporting */
}
- H5E_END_TRY;
+ H5E_END_TRY
/*create data type */
intype = createInputDataType(in);
@@ -4701,7 +4701,7 @@ process(struct Options *opt)
H5Fclose(file_id);
return (-1);
}
- HDfclose(extfile);
+ fclose(extfile);
H5Pset_external(proplist, in->externFilename, (off_t)0,
numOfElements * (hsize_t)in->inputSize / 8);
}
@@ -4727,7 +4727,7 @@ process(struct Options *opt)
/*enable error reporting */
}
- H5E_END_TRY;
+ H5E_END_TRY
/* write dataset */
if (H5Dwrite(dataset, intype, H5S_ALL, H5S_ALL, H5P_DEFAULT, (VOIDP)in->data) < 0) {
diff --git a/tools/src/h5import/h5import.h b/tools/src/h5import/h5import.h
index 5d29317..46c366c 100644
--- a/tools/src/h5import/h5import.h
+++ b/tools/src/h5import/h5import.h
@@ -110,21 +110,21 @@ struct Options {
int fcount; /* number of input files */
};
-char keytable[NUM_KEYS][30] = {"PATH",
- "INPUT-CLASS",
- "INPUT-SIZE",
- "RANK",
- "DIMENSION-SIZES",
- "OUTPUT-CLASS",
- "OUTPUT-SIZE",
- "OUTPUT-ARCHITECTURE",
- "OUTPUT-BYTE-ORDER",
- "CHUNKED-DIMENSION-SIZES",
- "COMPRESSION-TYPE",
- "COMPRESSION-PARAM",
- "EXTERNAL-STORAGE",
- "MAXIMUM-DIMENSIONS",
- "INPUT-BYTE-ORDER"};
+static char keytable[NUM_KEYS][30] = {"PATH",
+ "INPUT-CLASS",
+ "INPUT-SIZE",
+ "RANK",
+ "DIMENSION-SIZES",
+ "OUTPUT-CLASS",
+ "OUTPUT-SIZE",
+ "OUTPUT-ARCHITECTURE",
+ "OUTPUT-BYTE-ORDER",
+ "CHUNKED-DIMENSION-SIZES",
+ "COMPRESSION-TYPE",
+ "COMPRESSION-PARAM",
+ "EXTERNAL-STORAGE",
+ "MAXIMUM-DIMENSIONS",
+ "INPUT-BYTE-ORDER"};
static int state_table[15][8] = {
/* token ordering: FILNAME OPT_o OPT_c OPT_h OPT_d OPT_p OPT_t OPT_s */
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c
index 4043c73..6f318a4 100644
--- a/tools/src/h5jam/h5jam.c
+++ b/tools/src/h5jam/h5jam.c
@@ -23,10 +23,10 @@ hsize_t compute_user_block_size(hsize_t);
hsize_t copy_some_to_file(int, int, hsize_t, hsize_t, ssize_t);
void parse_command_line(int, const char *const *);
-int do_clobber = FALSE;
-char *output_file = NULL;
-char *input_file = NULL;
-char *ub_file = NULL;
+static int do_clobber = FALSE;
+static char *output_file = NULL;
+static char *input_file = NULL;
+static char *ub_file = NULL;
/*
* Command-line options: The user can specify short or long-named
diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c
index d606e94..d752014 100644
--- a/tools/src/h5jam/h5unjam.c
+++ b/tools/src/h5jam/h5unjam.c
@@ -108,7 +108,6 @@ parse_command_line(int argc, const char *const *argv)
if (input_file)
h5tools_set_input_file(input_file, 1);
break;
- ;
case 'u':
ub_file = HDstrdup(H5_optarg);
@@ -335,12 +334,12 @@ copy_to_file(FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much)
HDfseek(infid, from, SEEK_SET);
/* Read data to buffer */
- bytes_read = HDfread(buf, (size_t)1, bytes_in, infid);
- if (0 == bytes_read && HDferror(infid)) {
+ bytes_read = fread(buf, (size_t)1, bytes_in, infid);
+ if (0 == bytes_read && ferror(infid)) {
ret_value = -1;
goto done;
} /* end if */
- if (0 == bytes_read && HDfeof(infid)) {
+ if (0 == bytes_read && feof(infid)) {
goto done;
} /* end if */
@@ -353,8 +352,8 @@ copy_to_file(FILE *infid, FILE *ofid, ssize_t _where, ssize_t show_much)
to += (off_t)bytes_read;
/* Write nchars bytes to output file */
- bytes_wrote = HDfwrite(buf, (size_t)1, bytes_read, ofid);
- if (bytes_wrote != bytes_read || (0 == bytes_wrote && HDferror(ofid))) { /* error */
+ bytes_wrote = fwrite(buf, (size_t)1, bytes_read, ofid);
+ if (bytes_wrote != bytes_read || (0 == bytes_wrote && ferror(ofid))) { /* error */
ret_value = -1;
goto done;
} /* end if */
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 217d8b5..84567c8 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -141,11 +141,11 @@ static struct dispatch_t {
} dispatch_g[H5O_TYPE_NTYPES];
#define DISPATCH(TYPE, NAME, LIST1, LIST2) \
- { \
+ do { \
dispatch_g[TYPE].name = (NAME); \
dispatch_g[TYPE].list1 = (LIST1); \
dispatch_g[TYPE].list2 = (LIST2); \
- }
+ } while (0)
static void print_type(h5tools_str_t *buffer, hid_t type, int ind);
static hbool_t print_int_type(h5tools_str_t *buffer, hid_t type, int ind);
@@ -234,6 +234,11 @@ usage(void)
PRINTVALSTREAM(rawoutstream,
" --vol-info VOL-specific info to pass to the VOL connector used for\n");
PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n");
+ PRINTVALSTREAM(rawoutstream,
+ " If none of the above options are used to specify a VOL, then\n");
+ PRINTVALSTREAM(rawoutstream,
+ " the VOL named by HDF5_VOL_CONNECTOR (or the native VOL connector,\n");
+ PRINTVALSTREAM(rawoutstream, " if that environment variable is unset) will be used\n");
PRINTVALSTREAM(rawoutstream, " --vfd-value Value (ID) of the VFL driver to use for opening the\n");
PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n");
PRINTVALSTREAM(rawoutstream, " --vfd-name Name of the VFL driver to use for opening the\n");
@@ -2525,7 +2530,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)
{
@@ -2651,12 +2656,15 @@ main(int argc, char *argv[])
#ifdef H5_HAVE_ROS3_VFD
/* Default "anonymous" S3 configuration */
- H5FD_ros3_fapl_t ros3_fa = {
- 1, /* Structure Version */
- FALSE, /* Authenticate? */
- "", /* AWS Region */
- "", /* Access Key ID */
- "", /* Secret Access Key */
+ H5FD_ros3_fapl_ext_t ros3_fa = {
+ {
+ 1, /* Structure Version */
+ FALSE, /* Authenticate? */
+ "", /* AWS Region */
+ "", /* Access Key ID */
+ "", /* Secret Access Key */
+ },
+ "", /* Session/security token */
};
#endif /* H5_HAVE_ROS3_VFD */
@@ -2774,7 +2782,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;
@@ -2791,7 +2799,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);
@@ -2818,7 +2826,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 d670002..37e6aeb 100644
--- a/tools/src/h5perf/pio_perf.c
+++ b/tools/src/h5perf/pio_perf.c
@@ -1331,10 +1331,10 @@ parse_command_line(int argc, const char *const *argv)
memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (HDisalnum(*end) && i < 10)
+ if (isalnum(*end) && i < 10)
buf[i++] = *end;
- if (HDstrlen(buf) > 1 || HDisdigit(buf[0])) {
+ if (HDstrlen(buf) > 1 || isdigit(buf[0])) {
size_t j;
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
@@ -1488,7 +1488,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/pio_perf.h b/tools/src/h5perf/pio_perf.h
index 05f8d5b..54fbb52 100644
--- a/tools/src/h5perf/pio_perf.h
+++ b/tools/src/h5perf/pio_perf.h
@@ -86,10 +86,10 @@ extern int pio_debug_level; /* The debug level:
* 4 - Even More Debugging (timer stuff)
*/
-#define HDprint_rank(f) /* print rank in MPI_COMM_WORLD */ HDfprintf(f, "%d: ", comm_world_rank_g);
-#define HDprint_size(f) /* print size of MPI_COMM_WORLD */ HDfprintf(f, "%d", comm_world_nprocs_g);
+#define HDprint_rank(f) /* print rank in MPI_COMM_WORLD */ fprintf(f, "%d: ", comm_world_rank_g);
+#define HDprint_size(f) /* print size of MPI_COMM_WORLD */ fprintf(f, "%d", comm_world_nprocs_g);
#define HDprint_rank_size(f) /* print rank/size of MPI_COMM_WORLD */ \
- HDfprintf(f, "%d/%d: ", comm_world_rank_g, comm_world_nprocs_g);
+ fprintf(f, "%d/%d: ", comm_world_rank_g, comm_world_nprocs_g);
#ifdef __cplusplus
extern "C" {
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index a7f07ee..849238f 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -1176,7 +1176,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 ed7b209..5ffad71 100644
--- a/tools/src/h5perf/sio_perf.c
+++ b/tools/src/h5perf/sio_perf.c
@@ -852,7 +852,7 @@ parse_command_line(int argc, const char *const *argv)
memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (HDisalnum(*end) && i < 10)
+ if (isalnum(*end) && i < 10)
buf[i++] = *end;
if (!HDstrcasecmp(buf, "hdf5")) {
@@ -892,7 +892,7 @@ parse_command_line(int argc, const char *const *argv)
memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (HDisalnum(*end) && i < 10)
+ if (isalnum(*end) && i < 10)
buf[i++] = *end;
cl_opts->chk_size[j] = parse_size_directive(buf);
@@ -918,14 +918,14 @@ parse_command_line(int argc, const char *const *argv)
memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (HDisalnum(*end) && i < 10)
+ if (isalnum(*end) && i < 10)
buf[i++] = *end;
- if (HDstrlen(buf) > 1 || HDisdigit(buf[0])) {
+ if (HDstrlen(buf) > 1 || isdigit(buf[0])) {
size_t j;
for (j = 0; j < 10 && buf[j] != '\0'; ++j)
- if (!HDisdigit(buf[j])) {
+ if (!isdigit(buf[j])) {
fprintf(stderr, "sio_perf: invalid --debug option %s\n", buf);
exit(EXIT_FAILURE);
}
@@ -975,7 +975,7 @@ parse_command_line(int argc, const char *const *argv)
memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (HDisalnum(*end) && i < 10)
+ if (isalnum(*end) && i < 10)
buf[i++] = *end;
cl_opts->dset_size[j] = parse_size_directive(buf);
@@ -1044,7 +1044,7 @@ parse_command_line(int argc, const char *const *argv)
memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (HDisalnum(*end) && i < 10)
+ if (isalnum(*end) && i < 10)
buf[i++] = *end;
cl_opts->buf_size[j] = parse_size_directive(buf);
@@ -1071,7 +1071,7 @@ parse_command_line(int argc, const char *const *argv)
memset(buf, '\0', sizeof(buf));
for (i = 0; *end != '\0' && *end != ','; ++end)
- if (HDisalnum(*end) && i < 10)
+ if (isalnum(*end) && i < 10)
buf[i++] = *end;
cl_opts->order[j] = (int)parse_size_directive(buf);
@@ -1164,7 +1164,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.c b/tools/src/h5repack/h5repack.c
index 0ced980..7849e29 100644
--- a/tools/src/h5repack/h5repack.c
+++ b/tools/src/h5repack/h5repack.c
@@ -575,7 +575,7 @@ done:
H5Tclose(ftype_id);
H5Aclose(attr_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
return ret_value;
} /* end copy_attr() */
@@ -884,7 +884,7 @@ done:
H5Dclose(did);
H5Fclose(fid);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (travt)
trav_table_free(travt);
return ret_value;
diff --git a/tools/src/h5repack/h5repack_copy.c b/tools/src/h5repack/h5repack_copy.c
index 172ba26..0f270c5 100644
--- a/tools/src/h5repack/h5repack_copy.c
+++ b/tools/src/h5repack/h5repack_copy.c
@@ -390,7 +390,7 @@ done:
H5Fclose(fidout);
H5Fclose(fidin);
}
- H5E_END_TRY;
+ H5E_END_TRY
}
if (travt)
trav_table_free(travt);
@@ -1455,7 +1455,7 @@ done:
{
named_datatype_free(&named_dt_head, 1);
}
- H5E_END_TRY;
+ H5E_END_TRY
}
/* free link info path */
@@ -1480,7 +1480,7 @@ done:
H5Tclose(type_in);
H5Tclose(type_out);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* free */
if (buf != NULL)
diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c
index 0621c7a..85bc15d 100644
--- a/tools/src/h5repack/h5repack_main.c
+++ b/tools/src/h5repack/h5repack_main.c
@@ -21,10 +21,10 @@ static int parse_command_line(int argc, const char *const *argv, pack_opt_t *op
static void leave(int ret) H5_ATTR_NORETURN;
/* module-scoped variables */
-static int has_i = 0;
-static int has_o = 0;
-const char *infile = NULL;
-const char *outfile = NULL;
+static int has_i = 0;
+static int has_o = 0;
+static const char *infile = NULL;
+static const char *outfile = NULL;
/*
* Command-line options: The user can specify short or long-named
@@ -415,26 +415,26 @@ read_info(const char *filename, pack_opt_t *options)
i = 0;
c = '0';
while (c != ' ') {
- if (HDfscanf(fp, "%c", &c) < 0 && HDferror(fp)) {
+ if (HDfscanf(fp, "%c", &c) < 0 && ferror(fp)) {
error_msg("fscanf error\n");
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
goto done;
}
- if (HDfeof(fp))
+ if (feof(fp))
break;
}
c = '0';
/* go until end */
while (c != ' ') {
- if (HDfscanf(fp, "%c", &c) < 0 && HDferror(fp)) {
+ if (HDfscanf(fp, "%c", &c) < 0 && ferror(fp)) {
error_msg("fscanf error\n");
h5tools_setstatus(EXIT_FAILURE);
ret_value = EXIT_FAILURE;
goto done;
}
comp_info[i++] = c;
- if (HDfeof(fp))
+ if (feof(fp))
break;
if (c == 10 /*eol*/)
break;
@@ -461,7 +461,7 @@ read_info(const char *filename, pack_opt_t *options)
done:
if (fp)
- HDfclose(fp);
+ fclose(fp);
return ret_value;
}
@@ -597,7 +597,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);
@@ -699,19 +699,19 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'b':
- options->ublock_size = (hsize_t)HDatol(H5_optarg);
+ options->ublock_size = (hsize_t)atol(H5_optarg);
break;
case 'M':
- options->meta_block_size = (hsize_t)HDatol(H5_optarg);
+ options->meta_block_size = (hsize_t)atol(H5_optarg);
break;
case 't':
- options->threshold = (hsize_t)HDatol(H5_optarg);
+ options->threshold = (hsize_t)atol(H5_optarg);
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);
@@ -751,14 +751,14 @@ parse_command_line(int argc, const char *const *argv, pack_opt_t *options)
break;
case 'T':
- options->fs_threshold = HDatol(H5_optarg);
+ options->fs_threshold = atol(H5_optarg);
if (options->fs_threshold == 0)
/* To distinguish the "specified" zero value */
options->fs_threshold = -1;
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;
@@ -889,7 +889,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 f6c3d71..f88ba6f 100644
--- a/tools/src/h5repack/h5repack_parse.c
+++ b/tools/src/h5repack/h5repack_parse.c
@@ -132,7 +132,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
u++; /* skip ',' */
}
c = str[u];
- if (!HDisdigit(c) && l == -1) {
+ if (!isdigit(c) && l == -1) {
if (obj_list)
free(obj_list);
error_msg("compression parameter not digit in <%s>\n", str);
@@ -182,7 +182,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
u++; /* skip ',' */
}
c = str[u];
- if (!HDisdigit(c) && l == -1) {
+ if (!isdigit(c) && l == -1) {
if (obj_list)
free(obj_list);
error_msg("compression parameter is not a digit in <%s>\n", str);
@@ -228,27 +228,27 @@ 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 ',' */
}
c = str[u];
- if (!HDisdigit(c) && l == -1) {
+ if (!isdigit(c) && l == -1) {
if (obj_list)
free(obj_list);
error_msg("filter number parameter is not a digit in <%s>\n", str);
exit(EXIT_FAILURE);
}
- else if (!HDisdigit(c) && f == -1) {
+ else if (!isdigit(c) && f == -1) {
if (obj_list)
free(obj_list);
error_msg("filter flag parameter is not a digit in <%s>\n", str);
@@ -267,7 +267,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
/* here we could have 1 or 2 digits */
for (m = 0, u = i + 1; u < len; u++, m++) {
c = str[u];
- if (!HDisdigit(c)) {
+ if (!isdigit(c)) {
if (obj_list)
free(obj_list);
error_msg("compression parameter is not a digit in <%s>\n", str);
@@ -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 */
@@ -457,7 +457,7 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
break;
default:
break;
- };
+ }
return obj_list;
}
@@ -581,7 +581,7 @@ parse_layout(const char *str, unsigned *n_objs, pack_info_t *pack, /* info about
sdim[k] = c;
k++; /*increment sdim index */
- if (!HDisdigit(c) && c != 'x' && c != 'N' && c != 'O' && c != 'N' && c != 'E') {
+ if (!isdigit(c) && c != 'x' && c != 'N' && c != 'O' && c != 'N' && c != 'E') {
if (obj_list)
free(obj_list);
error_msg("in parse layout, <%s> Not a valid character in <%s>\n", sdim, str);
@@ -592,7 +592,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);
@@ -608,7 +608,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/h5repack/h5repack_refs.c b/tools/src/h5repack/h5repack_refs.c
index 171b335..ce4a5cf 100644
--- a/tools/src/h5repack/h5repack_refs.c
+++ b/tools/src/h5repack/h5repack_refs.c
@@ -156,7 +156,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (buf == NULL) {
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");
@@ -164,7 +164,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (refbuf == NULL) {
printf("cannot allocate memory\n");
H5TOOLS_GOTO_ERROR((-1), "calloc failed");
- } /* end if */
+ }
for (u = 0; u < nelmts; u++) {
H5E_BEGIN_TRY
{
@@ -172,7 +172,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
H5Rdereference2(dset_in, H5P_DEFAULT, H5R_OBJECT, &buf[u])) < 0)
continue;
}
- H5E_END_TRY;
+ H5E_END_TRY
/* get the name. a valid name could only occur
* in the second traversal of the file
@@ -238,7 +238,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (buf == NULL) {
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");
@@ -251,7 +251,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
if (refbuf == NULL) {
printf("cannot allocate memory\n");
H5TOOLS_GOTO_ERROR((-1), "calloc failed");
- } /* end if */
+ }
for (u = 0; u < nelmts; u++) {
H5E_BEGIN_TRY
@@ -260,7 +260,7 @@ do_copy_refobjs(hid_t fidin, hid_t fidout, trav_table_t *travt, pack_opt_t *opti
&buf[u])) < 0)
continue;
}
- H5E_END_TRY;
+ H5E_END_TRY
/* get the name. a valid name could only occur
* in the second traversal of the file
@@ -408,7 +408,7 @@ done:
H5Tclose(type_in);
named_datatype_free(&named_dt_head, 1);
}
- H5E_END_TRY;
+ H5E_END_TRY
return ret_value;
}
@@ -602,7 +602,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (buf == NULL) {
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");
@@ -610,7 +610,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (refbuf == NULL) {
printf("cannot allocate memory\n");
H5TOOLS_GOTO_ERROR((-1), "calloc failed");
- } /* end if */
+ }
for (i = 0; i < (unsigned)nelmts; i++)
if (update_ref_value(attr_id, H5R_OBJECT, &((hobj_ref_t *)buf)[i], fidout,
@@ -624,7 +624,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (buf == NULL) {
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");
@@ -636,7 +636,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (refbuf == NULL) {
printf("cannot allocate memory\n");
H5TOOLS_GOTO_ERROR((-1), "calloc failed");
- } /* end if */
+ }
for (i = 0; i < (unsigned)nelmts; i++)
if (update_ref_value(attr_id, H5R_DATASET_REGION, &((hdset_reg_ref_t *)buf)[i], fidout,
@@ -652,7 +652,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (buf == NULL) {
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");
@@ -694,7 +694,7 @@ copy_refs_attr(hid_t loc_in, hid_t loc_out, trav_table_t *travt, hid_t fidout) /
if (buf == NULL) {
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");
@@ -794,7 +794,7 @@ done:
H5Aclose(attr_id);
H5Aclose(attr_out);
}
- H5E_END_TRY;
+ H5E_END_TRY
return ret_value;
}
@@ -875,7 +875,7 @@ done:
H5Sclose(space_id);
H5Oclose(ref_obj_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
return ret_value;
}
diff --git a/tools/src/h5repack/h5repack_verify.c b/tools/src/h5repack/h5repack_verify.c
index bccf034..572aa48 100644
--- a/tools/src/h5repack/h5repack_verify.c
+++ b/tools/src/h5repack/h5repack_verify.c
@@ -286,7 +286,7 @@ done:
if (travt)
trav_table_free(travt);
}
- H5E_END_TRY;
+ H5E_END_TRY
return ret_value;
} /* h5repack_verify() */
@@ -475,7 +475,7 @@ done:
if (trav)
trav_table_free(trav);
}
- H5E_END_TRY;
+ H5E_END_TRY
return ret_value;
}
diff --git a/tools/src/h5stat/h5stat.c b/tools/src/h5stat/h5stat.c
index a7d9342..5cfa61d 100644
--- a/tools/src/h5stat/h5stat.c
+++ b/tools/src/h5stat/h5stat.c
@@ -35,12 +35,12 @@
to accommodate datasets without any filters */
/* File space management strategies: see H5Fpublic.h for declarations */
-const char *FS_STRATEGY_NAME[] = {"H5F_FSPACE_STRATEGY_FSM_AGGR",
- "H5F_FSPACE_STRATEGY_PAGE",
- "H5F_FSPACE_STRATEGY_AGGR",
- "H5F_FSPACE_STRATEGY_NONE",
- "unknown",
- NULL};
+static const char *FS_STRATEGY_NAME[] = {"H5F_FSPACE_STRATEGY_FSM_AGGR",
+ "H5F_FSPACE_STRATEGY_PAGE",
+ "H5F_FSPACE_STRATEGY_AGGR",
+ "H5F_FSPACE_STRATEGY_NONE",
+ "unknown",
+ NULL};
/* Datatype statistics for datasets */
typedef struct dtype_info_t {
@@ -119,12 +119,15 @@ static const char *drivername = NULL;
#ifdef H5_HAVE_ROS3_VFD
/* Default "anonymous" S3 configuration */
-static H5FD_ros3_fapl_t ros3_fa = {
- 1, /* Structure Version */
- FALSE, /* Authenticate? */
- "", /* AWS Region */
- "", /* Access Key ID */
- "", /* Secret Access Key */
+static H5FD_ros3_fapl_ext_t ros3_fa = {
+ {
+ 1, /* Structure Version */
+ FALSE, /* Authenticate? */
+ "", /* AWS Region */
+ "", /* Access Key ID */
+ "", /* Secret Access Key */
+ },
+ "", /* Session/security token */
};
#endif /* H5_HAVE_ROS3_VFD */
diff --git a/tools/src/misc/h5debug.c b/tools/src/misc/h5debug.c
index a8ba2a5..fa93244 100644
--- a/tools/src/misc/h5debug.c
+++ b/tools/src/misc/h5debug.c
@@ -307,7 +307,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 */
memset(extra, 0, sizeof(extra));
@@ -323,7 +323,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/h5delete.c b/tools/src/misc/h5delete.c
index 3684365..f996d8d 100644
--- a/tools/src/misc/h5delete.c
+++ b/tools/src/misc/h5delete.c
@@ -57,7 +57,7 @@ main(int argc, char *argv[])
/* Only uses the environment variable at this time */
ret = (int)H5Fdelete(name, H5P_DEFAULT);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret < 0 && !quiet)
fprintf(stderr, "Unable to delete storage at: %s\n", name);
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index b2c9000..31deb8b 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -39,7 +39,7 @@ typedef struct mkgrp_opt_t {
hid_t fapl_id; /* fapl to use when opening the file */
} mkgrp_opt_t;
-mkgrp_opt_t params_g; /* Command line parameter settings */
+static mkgrp_opt_t params_g; /* Command line parameter settings */
/*-------------------------------------------------------------------------
* Function: leave
@@ -102,6 +102,13 @@ usage(const char *prog)
" --vol-info VOL-specific info to pass to the VOL connector used for\n");
PRINTVALSTREAM(rawoutstream, " opening the HDF5 file specified\n");
PRINTVALSTREAM(rawoutstream,
+ " If none of the above options are used to specify a VOL, then\n");
+ PRINTVALSTREAM(
+ rawoutstream,
+ " the VOL named by HDF5_VOL_CONNECTOR (or the native VOL connector,\n");
+ PRINTVALSTREAM(rawoutstream,
+ " if that environment variable is unset) will be used\n");
+ PRINTVALSTREAM(rawoutstream,
" --vfd-value Value (ID) of the VFL driver to use for opening the\n");
PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n");
PRINTVALSTREAM(rawoutstream, " --vfd-name Name of the VFL driver to use for opening the\n");
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index 5256c5e..e7bf055 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -89,14 +89,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;
@@ -472,7 +472,7 @@ main(int argc, char *argv[])
{
file = H5Fopen(dst_gen_name, H5F_ACC_RDWR, fapl);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (file >= 0) {
if (H5Fclose(file) < 0) {