summaryrefslogtreecommitdiffstats
path: root/tools/src/misc/h5clear.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-02-21 16:37:04 (GMT)
committerGitHub <noreply@github.com>2022-02-21 16:37:04 (GMT)
commitc7d800e5e526e2dcc2fd19cd0c75d2ef92f184bc (patch)
treeaa6df876c2d6da6f35f531fd025589e60f9e2b8d /tools/src/misc/h5clear.c
parent1c9f219463e236487a27cee6cb839379d670cda4 (diff)
downloadhdf5-c7d800e5e526e2dcc2fd19cd0c75d2ef92f184bc.zip
hdf5-c7d800e5e526e2dcc2fd19cd0c75d2ef92f184bc.tar.gz
hdf5-c7d800e5e526e2dcc2fd19cd0c75d2ef92f184bc.tar.bz2
1.12 Fix tools incompatibility (#1448)
* fix tools incompatibility with get_option #1443 * Fix get_option function * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/src/misc/h5clear.c')
-rw-r--r--tools/src/misc/h5clear.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index 15c170d..60e2e63 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -44,8 +44,8 @@ static hsize_t increment = DEFAULT_INCREMENT;
/*
* Command-line options: only publicize long options
*/
-static const char * s_opts = "hVsmzi*";
-static struct h5_long_options l_opts[] = {
+static const char * s_opts = "hVsmzi*";
+static struct long_options l_opts[] = {
{"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"status", no_arg, 's'},
{"image", no_arg, 'm'}, {"filesize", no_arg, 'z'}, {"increment", optional_arg, 'i'},
{NULL, 0, '\0'}};
@@ -121,7 +121,7 @@ parse_command_line(int argc, const char *const *argv)
}
/* parse command line options */
- while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) {
+ while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'h':
usage(h5tools_getprogname());
@@ -147,12 +147,12 @@ parse_command_line(int argc, const char *const *argv)
case 'i':
increment_eoa_eof = TRUE;
- if (H5_optarg != NULL) {
- if (HDatoi(H5_optarg) < 0) {
+ if (opt_arg != NULL) {
+ if (HDatoi(opt_arg) < 0) {
usage(h5tools_getprogname());
goto done;
}
- increment = (hsize_t)HDatoi(H5_optarg);
+ increment = (hsize_t)HDatoi(opt_arg);
}
break;
@@ -164,14 +164,14 @@ parse_command_line(int argc, const char *const *argv)
} /* end while */
/* check for file name to be processed */
- if (argc <= H5_optind) {
+ if (argc <= opt_ind) {
error_msg("missing file name\n");
usage(h5tools_getprogname());
h5tools_setstatus(EXIT_FAILURE);
goto error;
} /* end if */
- fname_g = HDstrdup(argv[H5_optind]);
+ fname_g = HDstrdup(argv[opt_ind]);
done:
return (0);