diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2009-01-14 16:31:52 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2009-01-14 16:31:52 (GMT) |
commit | d496a1c71536ab7ceeff60256c9c0bdf00c4f941 (patch) | |
tree | 0d48ac69f38e8d000beea1b41927993db73b73ab /tools/h5diff/h5diff_common.c | |
parent | 98d4ba5d8a6fcb80fdf02517e48c4d6b19b1b122 (diff) | |
download | hdf5-d496a1c71536ab7ceeff60256c9c0bdf00c4f941.zip hdf5-d496a1c71536ab7ceeff60256c9c0bdf00c4f941.tar.gz hdf5-d496a1c71536ab7ceeff60256c9c0bdf00c4f941.tar.bz2 |
[svn-r16312] merge 16300
Added an option to avoid dealing with NaNs
-N, --nan Avoid NaNs detection
Note: there is no shell script run for datasets with NaN because the output is non portable (different results and NaN strings for different systems)
Tested: windows, linux
Diffstat (limited to 'tools/h5diff/h5diff_common.c')
-rw-r--r-- | tools/h5diff/h5diff_common.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 5a59215..8a49fa0 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -31,7 +31,7 @@ const char *progname = "h5diff"; * Command-line options: The user can specify short or long-named * parameters. */ -static const char *s_opts = "hVrvqn:d:p:"; +static const char *s_opts = "hVrvqn:d:p:N"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -41,6 +41,7 @@ static struct long_options l_opts[] = { { "count", require_arg, 'n' }, { "delta", require_arg, 'd' }, { "relative", require_arg, 'p' }, + { "nan", no_arg, 'N' }, { NULL, 0, '\0' } }; @@ -70,6 +71,9 @@ void parse_command_line(int argc, /* assume equal contents initially */ options->contents = 1; + /* NaNs are handled by default */ + options->do_nans = 1; + /* parse command line options */ while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) { @@ -130,6 +134,10 @@ void parse_command_line(int argc, options->count = atol( opt_arg ); break; + + case 'N': + options->do_nans = 0; + break; } } @@ -323,6 +331,7 @@ void usage(void) printf(" -r, --report Report mode. Print differences\n"); printf(" -v, --verbose Verbose mode. Print differences, list of objects\n"); printf(" -q, --quiet Quiet mode. Do not do output\n"); + printf(" -N, --nan Avoid NaNs detection\n"); printf(" -n C, --count=C Print differences up to C number\n"); printf(" -d D, --delta=D Print difference when greater than limit D\n"); |