diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-04-01 20:55:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-01 20:55:47 (GMT) |
commit | 2f9c53739b5149875dbb45f3a12091c0782b1d10 (patch) | |
tree | 91220d3f4c06269edbe9d13ba5fef20f60d87843 /tools/src/h5diff | |
parent | 572adbaacb126e530f6af94a90092e004c23a163 (diff) | |
download | hdf5-2f9c53739b5149875dbb45f3a12091c0782b1d10.zip hdf5-2f9c53739b5149875dbb45f3a12091c0782b1d10.tar.gz hdf5-2f9c53739b5149875dbb45f3a12091c0782b1d10.tar.bz2 |
1.12 Move error-stack text to top of usage display #1564 (#1566)
Diffstat (limited to 'tools/src/h5diff')
-rw-r--r-- | tools/src/h5diff/h5diff_common.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index 53ece8b..c032b7a 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -25,7 +25,7 @@ static int check_d_input(const char *); * Command-line options: The user can specify short or long-named * parameters. */ -static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S"; +static const char * s_opts = "hVrv*qn:d:p:NcelxE:A:S*"; static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"version", no_arg, 'V'}, {"report", no_arg, 'r'}, @@ -41,7 +41,7 @@ static struct long_options l_opts[] = {{"help", no_arg, 'h'}, {"no-dangling-links", no_arg, 'x'}, {"exclude-path", require_arg, 'E'}, {"exclude-attribute", require_arg, 'A'}, - {"enable-error-stack", no_arg, 'S'}, + {"enable-error-stack", optional_arg, 'S'}, {"vol-value-1", require_arg, '1'}, {"vol-name-1", require_arg, '2'}, {"vol-info-1", require_arg, '3'}, @@ -294,7 +294,10 @@ parse_command_line(int argc, const char *const *argv, const char **fname1, const break; case 'S': - enable_error_stack = 1; + if (opt_arg != NULL) + enable_error_stack = HDatoi(opt_arg); + else + enable_error_stack = 1; break; case 'E': @@ -614,6 +617,10 @@ usage(void) PRINTVALSTREAM(rawoutstream, " [obj1] Name of an HDF5 object, in absolute path\n"); PRINTVALSTREAM(rawoutstream, " [obj2] Name of an HDF5 object, in absolute path\n"); PRINTVALSTREAM(rawoutstream, "\n"); + PRINTVALSTREAM(rawoutstream, " ERROR\n"); + PRINTVALSTREAM(rawoutstream, + " --enable-error-stack Prints messages from the HDF5 error stack as they occur.\n"); + PRINTVALSTREAM(rawoutstream, " Optional value 2 also prints file open errors.\n"); PRINTVALSTREAM(rawoutstream, " OPTIONS\n"); PRINTVALSTREAM(rawoutstream, " -h, --help\n"); PRINTVALSTREAM(rawoutstream, " Print a usage message and exit.\n"); @@ -636,9 +643,6 @@ usage(void) PRINTVALSTREAM(rawoutstream, " 3 : All level 2 information plus file names.\n"); PRINTVALSTREAM(rawoutstream, " -q, --quiet\n"); PRINTVALSTREAM(rawoutstream, " Quiet mode. Do not produce output.\n"); - PRINTVALSTREAM(rawoutstream, " --enable-error-stack\n"); - PRINTVALSTREAM(rawoutstream, - " Prints messages from the HDF5 error stack as they occur.\n"); PRINTVALSTREAM(rawoutstream, " --vol-value-1 Value (ID) of the VOL connector to use for opening the\n"); PRINTVALSTREAM(rawoutstream, " first HDF5 file specified\n"); @@ -778,7 +782,7 @@ usage(void) PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Modes of output:\n"); PRINTVALSTREAM(rawoutstream, - " Default mode: print the number of differences found and where they occured\n"); + " Default mode: print the number of differences found and where they occurred\n"); PRINTVALSTREAM(rawoutstream, " -r Report mode: print the above plus the differences\n"); PRINTVALSTREAM(rawoutstream, " -v Verbose mode: print the above plus a list of objects and warnings\n"); PRINTVALSTREAM(rawoutstream, " -q Quiet mode: do not print output\n"); |