summaryrefslogtreecommitdiffstats
path: root/tools/src/h5jam/h5jam.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2021-08-23 18:50:17 (GMT)
committerGitHub <noreply@github.com>2021-08-23 18:50:17 (GMT)
commitf8ecdf846c7e054d874ea92baf5c9b6c2b47e836 (patch)
treeeb33b014a18e87bf9df4dfa21b532af5c288c225 /tools/src/h5jam/h5jam.c
parent0a9099807a127a74b35ecf2c4ad98d6571f2e753 (diff)
downloadhdf5-f8ecdf846c7e054d874ea92baf5c9b6c2b47e836.zip
hdf5-f8ecdf846c7e054d874ea92baf5c9b6c2b47e836.tar.gz
hdf5-f8ecdf846c7e054d874ea92baf5c9b6c2b47e836.tar.bz2
1.12 Tools merges from develop (#949)
* Tools merges from develop Brings the tools getopt(3) replacement into the main library (#803) Perform option arg variables (#834) Removes unused commented-out code from h5jamgentest.c (#851) Reorg tools perform to provide h5perf for installation (#884) * Fix missing files * Remove empty files * Remove empty file * Resync defines * Fix endif typo * Add Makfile to list * Fix typo * Remove H5_GCC_DIAG_ON line to match removal of H5_GCC_DIAG_OFF line in sio_engine.c/ Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'tools/src/h5jam/h5jam.c')
-rw-r--r--tools/src/h5jam/h5jam.c20
1 files changed, 8 insertions, 12 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;