diff options
Diffstat (limited to 'tools/src/h5diff/h5diff_common.c')
-rw-r--r-- | tools/src/h5diff/h5diff_common.c | 78 |
1 files changed, 64 insertions, 14 deletions
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c index e05a8e3..771b20f 100644 --- a/tools/src/h5diff/h5diff_common.c +++ b/tools/src/h5diff/h5diff_common.c @@ -27,21 +27,27 @@ static int check_d_input(const char*); */ static const char *s_opts = "hVrv:qn:d:p:NcelxE:S"; static struct long_options l_opts[] = { - { "help", no_arg, 'h' }, - { "version", no_arg, 'V' }, - { "report", no_arg, 'r' }, - { "verbose", optional_arg, 'v' }, - { "quiet", no_arg, 'q' }, - { "count", require_arg, 'n' }, - { "delta", require_arg, 'd' }, - { "relative", require_arg, 'p' }, - { "nan", no_arg, 'N' }, - { "compare", no_arg, 'c' }, + { "help", no_arg, 'h' }, + { "version", no_arg, 'V' }, + { "report", no_arg, 'r' }, + { "verbose", optional_arg, 'v' }, + { "quiet", no_arg, 'q' }, + { "count", require_arg, 'n' }, + { "delta", require_arg, 'd' }, + { "relative", require_arg, 'p' }, + { "nan", no_arg, 'N' }, + { "compare", no_arg, 'c' }, { "use-system-epsilon", no_arg, 'e' }, - { "follow-symlinks", no_arg, 'l' }, - { "no-dangling-links", no_arg, 'x' }, - { "exclude-path", require_arg, 'E' }, + { "follow-symlinks", no_arg, 'l' }, + { "no-dangling-links", no_arg, 'x' }, + { "exclude-path", require_arg, 'E' }, { "enable-error-stack", no_arg, 'S' }, + { "vol-value-1", require_arg, '1' }, + { "vol-name-1", require_arg, '2' }, + { "vol-info-1", require_arg, '3' }, + { "vol-value-2", require_arg, '4' }, + { "vol-name-2", require_arg, '5' }, + { "vol-info-2", require_arg, '6' }, { NULL, 0, '\0' } }; @@ -91,7 +97,7 @@ void parse_command_line(int argc, struct exclude_path_list *exclude_head, *exclude_prev, *exclude_node; /* process the command-line */ - memset(opts, 0, sizeof (diff_opt_t)); + HDmemset(opts, 0, sizeof (diff_opt_t)); /* assume equal contents initially */ opts->contents = 1; @@ -258,6 +264,38 @@ void parse_command_line(int argc, case 'e': opts->use_system_epsilon = 1; break; + + case '1': + opts->vol_info_1.type = VOL_BY_VALUE; + opts->vol_info_1.u.value = (H5VL_class_value_t)HDatoi(opt_arg); + opts->custom_vol_1 = TRUE; + break; + + case '2': + opts->vol_info_1.type = VOL_BY_NAME; + opts->vol_info_1.u.name = opt_arg; + opts->custom_vol_1 = TRUE; + break; + + case '3': + opts->vol_info_1.info_string = opt_arg; + break; + + case '4': + opts->vol_info_2.type = VOL_BY_VALUE; + opts->vol_info_2.u.value = (H5VL_class_value_t)HDatoi(opt_arg); + opts->custom_vol_2 = TRUE; + break; + + case '5': + opts->vol_info_2.type = VOL_BY_NAME; + opts->vol_info_2.u.name = opt_arg; + opts->custom_vol_2 = TRUE; + break; + + case '6': + opts->vol_info_2.info_string = opt_arg; + break; } } @@ -469,6 +507,18 @@ void usage(void) 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"); + PRINTVALSTREAM(rawoutstream, " --vol-name-1 Name of the VOL connector to use for opening the first\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vol-info-1 VOL-specific info to pass to the VOL connector used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the first HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vol-value-2 Value (ID) of the VOL connector to use for opening the\n"); + PRINTVALSTREAM(rawoutstream, " second HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vol-name-2 Name of the VOL connector to use for opening the second\n"); + PRINTVALSTREAM(rawoutstream, " HDF5 file specified\n"); + PRINTVALSTREAM(rawoutstream, " --vol-info-2 VOL-specific info to pass to the VOL connector used for\n"); + PRINTVALSTREAM(rawoutstream, " opening the second HDF5 file specified\n"); PRINTVALSTREAM(rawoutstream, " --follow-symlinks\n"); PRINTVALSTREAM(rawoutstream, " Follow symbolic links (soft links and external links and compare the)\n"); PRINTVALSTREAM(rawoutstream, " links' target objects.\n"); |