diff options
author | jrmainzer <72230804+jrmainzer@users.noreply.github.com> | 2021-11-23 01:20:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 01:20:56 (GMT) |
commit | 28d0a7b1b93e3918f3c8ee361af3280a2c9ee8a4 (patch) | |
tree | 0ac1b135f2c8a8bd9dbb980ebdbeb36dcf89f2c2 /tools/src/h5jam | |
parent | 65d6d256cf9d04dbeb275025cc2b01d0f36ed3f1 (diff) | |
parent | 68c00b3fa1c0f4ba9b8e9724beb1d0b0b31f69ad (diff) | |
download | hdf5-28d0a7b1b93e3918f3c8ee361af3280a2c9ee8a4.zip hdf5-28d0a7b1b93e3918f3c8ee361af3280a2c9ee8a4.tar.gz hdf5-28d0a7b1b93e3918f3c8ee361af3280a2c9ee8a4.tar.bz2 |
Merge pull request #1217 from jrmainzer/selection_io_with_subfiling_vfd
Selection io with subfiling vfd
Diffstat (limited to 'tools/src/h5jam')
-rw-r--r-- | tools/src/h5jam/h5jam.c | 20 | ||||
-rw-r--r-- | tools/src/h5jam/h5unjam.c | 20 |
2 files changed, 16 insertions, 24 deletions
diff --git a/tools/src/h5jam/h5jam.c b/tools/src/h5jam/h5jam.c index 5bcbf45..7f3385c 100644 --- a/tools/src/h5jam/h5jam.c +++ b/tools/src/h5jam/h5jam.c @@ -34,14 +34,10 @@ char *ub_file = NULL; * 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 = "hi:u:o:c:V"; /* add more later ? */ -static struct long_options l_opts[] = { - {"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {"i", require_arg, 'i'}, /* input file */ - {"u", require_arg, 'u'}, /* user block file */ - {"o", require_arg, 'o'}, /* output file */ - {"clobber", no_arg, 'c'}, /* clobber existing UB */ - {"clobbe", no_arg, 'c'}, {"clobb", no_arg, 'c'}, {"clob", no_arg, 'c'}, - {"clo", no_arg, 'c'}, {"cl", no_arg, 'c'}, {NULL, 0, '\0'}}; +static const char * s_opts = "hi:u:o:c:V"; +static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", require_arg, 'i'}, + {"u", require_arg, 'u'}, {"o", require_arg, 'o'}, + {"clobber", no_arg, 'c'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- * Function: usage @@ -113,16 +109,16 @@ parse_command_line(int argc, const char *argv[]) int opt = FALSE; /* parse command line options */ - while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { + while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) { switch ((char)opt) { case 'o': - output_file = HDstrdup(opt_arg); + output_file = HDstrdup(H5_optarg); break; case 'i': - input_file = HDstrdup(opt_arg); + input_file = HDstrdup(H5_optarg); break; case 'u': - ub_file = HDstrdup(opt_arg); + ub_file = HDstrdup(H5_optarg); break; case 'c': do_clobber = TRUE; diff --git a/tools/src/h5jam/h5unjam.c b/tools/src/h5jam/h5unjam.c index cde7ec7..fa23b06 100644 --- a/tools/src/h5jam/h5unjam.c +++ b/tools/src/h5jam/h5unjam.c @@ -35,14 +35,10 @@ char *ub_file = NULL; * 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 = "hu:i:o:d:V"; -static struct long_options l_opts[] = { - {"help", no_arg, 'h'}, {"hel", no_arg, 'h'}, {"i", require_arg, 'i'}, /* input file */ - {"u", require_arg, 'u'}, /* user block file */ - {"o", require_arg, 'o'}, /* output file */ - {"delete", no_arg, 'd'}, /* delete ub */ - {"delet", no_arg, 'd'}, {"dele", no_arg, 'd'}, {"del", no_arg, 'd'}, - {"de", no_arg, 'd'}, {NULL, 0, '\0'}}; +static const char * s_opts = "hu:i:o:d:V"; +static struct h5_long_options l_opts[] = {{"help", no_arg, 'h'}, {"i", require_arg, 'i'}, + {"u", require_arg, 'u'}, {"o", require_arg, 'o'}, + {"delete", no_arg, 'd'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- * Function: usage @@ -101,23 +97,23 @@ parse_command_line(int argc, const char *argv[]) int opt = FALSE; /* parse command line options */ - while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { + while ((opt = H5_get_option(argc, argv, s_opts, l_opts)) != EOF) { switch ((char)opt) { case 'o': - output_file = HDstrdup(opt_arg); + output_file = HDstrdup(H5_optarg); if (output_file) h5tools_set_data_output_file(output_file, 1); break; case 'i': - input_file = HDstrdup(opt_arg); + input_file = HDstrdup(H5_optarg); if (input_file) h5tools_set_input_file(input_file, 1); break; ; case 'u': - ub_file = HDstrdup(opt_arg); + ub_file = HDstrdup(H5_optarg); if (ub_file) h5tools_set_output_file(ub_file, 1); else |