summaryrefslogtreecommitdiffstats
path: root/tools/src/misc/h5mkgrp.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-08-17 19:55:18 (GMT)
committerGitHub <noreply@github.com>2021-08-17 19:55:18 (GMT)
commitc0ef1fd6de3ff20cc8fc49c05ca71254c784bea6 (patch)
treefb2bdf05e276e3614b3b5c343447cd82f4e6718b /tools/src/misc/h5mkgrp.c
parent2bca2ca6f1ef1b60bb8541413c5f2e68ff5549d3 (diff)
downloadhdf5-c0ef1fd6de3ff20cc8fc49c05ca71254c784bea6.zip
hdf5-c0ef1fd6de3ff20cc8fc49c05ca71254c784bea6.tar.gz
hdf5-c0ef1fd6de3ff20cc8fc49c05ca71254c784bea6.tar.bz2
Reverts PR 906 and 907 due to binary compatibility issues (#918)
Diffstat (limited to 'tools/src/misc/h5mkgrp.c')
-rw-r--r--tools/src/misc/h5mkgrp.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/src/misc/h5mkgrp.c b/tools/src/misc/h5mkgrp.c
index a85ee4d..516191c 100644
--- a/tools/src/misc/h5mkgrp.c
+++ b/tools/src/misc/h5mkgrp.c
@@ -22,8 +22,8 @@
int d_status = EXIT_SUCCESS;
/* command-line options: short and long-named parameters */
-static const char * s_opts = "hlpvV";
-static struct h5_long_options l_opts[] = {
+static const char * s_opts = "hlpvV";
+static struct long_options l_opts[] = {
{"help", no_arg, 'h'}, {"latest", no_arg, 'l'}, {"parents", no_arg, 'p'},
{"verbose", no_arg, 'v'}, {"version", no_arg, 'V'}, {"vol-value", require_arg, '1'},
{"vol-name", require_arg, '2'}, {"vol-info", require_arg, '3'}, {NULL, 0, '\0'}};
@@ -140,7 +140,7 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options)
HDmemset(&vol_info, 0, sizeof(h5tools_vol_info_t));
/* 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) {
/* Display 'help' */
case 'h':
@@ -171,18 +171,18 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options)
case '1':
vol_info.type = VOL_BY_VALUE;
- vol_info.u.value = (H5VL_class_value_t)HDatoi(H5_optarg);
+ vol_info.u.value = (H5VL_class_value_t)HDatoi(opt_arg);
custom_fapl = TRUE;
break;
case '2':
vol_info.type = VOL_BY_NAME;
- vol_info.u.name = H5_optarg;
+ vol_info.u.name = opt_arg;
custom_fapl = TRUE;
break;
case '3':
- vol_info.info_string = H5_optarg;
+ vol_info.info_string = opt_arg;
break;
/* Bad command line argument */
@@ -193,33 +193,33 @@ parse_command_line(int argc, const char *argv[], mkgrp_opt_t *options)
} /* 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());
leave(EXIT_FAILURE);
}
/* Retrieve file name */
- options->fname = HDstrdup(argv[H5_optind]);
- H5_optind++;
+ options->fname = HDstrdup(argv[opt_ind]);
+ opt_ind++;
/* Check for group(s) to be created */
- if (argc <= H5_optind) {
+ if (argc <= opt_ind) {
error_msg("missing group name(s)\n");
usage(h5tools_getprogname());
leave(EXIT_FAILURE);
}
/* Allocate space for the group name pointers */
- options->ngroups = (size_t)(argc - H5_optind);
+ options->ngroups = (size_t)(argc - opt_ind);
options->groups = (char **)HDmalloc(options->ngroups * sizeof(char *));
/* Retrieve the group names */
curr_group = 0;
- while (H5_optind < argc) {
- options->groups[curr_group] = HDstrdup(argv[H5_optind]);
+ while (opt_ind < argc) {
+ options->groups[curr_group] = HDstrdup(argv[opt_ind]);
curr_group++;
- H5_optind++;
+ opt_ind++;
}
/* Setup a custom fapl for file accesses */