summaryrefslogtreecommitdiffstats
path: root/tools/src/h5copy/h5copy.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/h5copy/h5copy.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/h5copy/h5copy.c')
-rw-r--r--tools/src/h5copy/h5copy.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/tools/src/h5copy/h5copy.c b/tools/src/h5copy/h5copy.c
index 6f10fee..933e230 100644
--- a/tools/src/h5copy/h5copy.c
+++ b/tools/src/h5copy/h5copy.c
@@ -19,23 +19,23 @@
#define PROGRAMNAME "h5copy"
/* command-line options: short and long-named parameters */
-static const char * s_opts = "d:f:hi:o:ps:vVE";
-static struct h5_long_options l_opts[] = {{"destination", require_arg, 'd'},
- {"flag", require_arg, 'f'},
- {"help", no_arg, 'h'},
- {"input", require_arg, 'i'},
- {"output", require_arg, 'o'},
- {"parents", no_arg, 'p'},
- {"source", require_arg, 's'},
- {"verbose", no_arg, 'v'},
- {"version", no_arg, 'V'},
- {"enable-error-stack", no_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 const char * s_opts = "d:f:hi:o:ps:vVE";
+static struct long_options l_opts[] = {{"destination", require_arg, 'd'},
+ {"flag", require_arg, 'f'},
+ {"help", no_arg, 'h'},
+ {"input", require_arg, 'i'},
+ {"output", require_arg, 'o'},
+ {"parents", no_arg, 'p'},
+ {"source", require_arg, 's'},
+ {"verbose", no_arg, 'v'},
+ {"version", no_arg, 'V'},
+ {"enable-error-stack", no_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;
/*-------------------------------------------------------------------------
* Function: leave
@@ -242,19 +242,19 @@ main(int argc, char *argv[])
} /* end if */
/* parse command line options */
- while ((opt = H5_get_option(argc, (const char *const *)argv, s_opts, l_opts)) != EOF) {
+ while ((opt = get_option(argc, (const char *const *)argv, s_opts, l_opts)) != EOF) {
switch ((char)opt) {
case 'd':
- oname_dst = HDstrdup(H5_optarg);
+ oname_dst = HDstrdup(opt_arg);
break;
case 'f':
/* validate flag */
- if (parse_flag(H5_optarg, &flag) < 0) {
+ if (parse_flag(opt_arg, &flag) < 0) {
usage();
leave(EXIT_FAILURE);
}
- str_flag = HDstrdup(H5_optarg);
+ str_flag = HDstrdup(opt_arg);
break;
case 'h':
@@ -263,11 +263,11 @@ main(int argc, char *argv[])
break;
case 'i':
- fname_src = HDstrdup(H5_optarg);
+ fname_src = HDstrdup(opt_arg);
break;
case 'o':
- fname_dst = HDstrdup(H5_optarg);
+ fname_dst = HDstrdup(opt_arg);
break;
case 'p':
@@ -275,7 +275,7 @@ main(int argc, char *argv[])
break;
case 's':
- oname_src = HDstrdup(H5_optarg);
+ oname_src = HDstrdup(opt_arg);
break;
case 'V':