diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-02-21 16:37:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 16:37:04 (GMT) |
commit | c7d800e5e526e2dcc2fd19cd0c75d2ef92f184bc (patch) | |
tree | aa6df876c2d6da6f35f531fd025589e60f9e2b8d /tools/test/h5jam/tellub.c | |
parent | 1c9f219463e236487a27cee6cb839379d670cda4 (diff) | |
download | hdf5-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/test/h5jam/tellub.c')
-rw-r--r-- | tools/test/h5jam/tellub.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/test/h5jam/tellub.c b/tools/test/h5jam/tellub.c index f264d9b..d608df5 100644 --- a/tools/test/h5jam/tellub.c +++ b/tools/test/h5jam/tellub.c @@ -24,8 +24,8 @@ * parameters. The long-named ones can be partially spelled. When * adding more, make sure that they don't clash with each other. */ -static const char * s_opts = "h"; -static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {NULL, 0, '\0'}}; +static const char * s_opts = "h"; +static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- * Function: usage @@ -61,7 +61,7 @@ parse_command_line(int argc, const char *const *argv) int opt; /* 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()); @@ -75,7 +75,7 @@ parse_command_line(int argc, const char *const *argv) } /* 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); @@ -118,14 +118,14 @@ main(int argc, char *argv[]) /* enable error reporting if command line option */ h5tools_error_report(); - if (argc <= (H5_optind)) { + if (argc <= (opt_ind)) { error_msg("missing file name\n"); usage(h5tools_getprogname()); h5tools_setstatus(EXIT_FAILURE); goto done; } - ifname = HDstrdup(argv[H5_optind]); + ifname = HDstrdup(argv[opt_ind]); testval = H5Fis_accessible(ifname, H5P_DEFAULT); |