diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2022-04-14 13:59:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-14 13:59:07 (GMT) |
commit | 1a1e59172dc6312808981baeca4bc1772e126ff3 (patch) | |
tree | cdc409def6f9dd634c3aa335bee8cf8183c071c3 /tools/src/h5diff | |
parent | c81841b715491437cf27ed6cc6ce0ada92ae230a (diff) | |
download | hdf5-1a1e59172dc6312808981baeca4bc1772e126ff3.zip hdf5-1a1e59172dc6312808981baeca4bc1772e126ff3.tar.gz hdf5-1a1e59172dc6312808981baeca4bc1772e126ff3.tar.bz2 |
1.10 Move error-stack text to top of usage display #1564 (#1567)
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 9e1b6ed..5fac8e7 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'}, {NULL, 0, '\0'}}; /*------------------------------------------------------------------------- @@ -288,7 +288,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': @@ -576,6 +579,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"); @@ -598,9 +605,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, " --follow-symlinks\n"); PRINTVALSTREAM(rawoutstream, " Follow symbolic links (soft links and external links and compare the)\n"); @@ -722,7 +726,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"); |