diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2009-01-13 16:33:31 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2009-01-13 16:33:31 (GMT) |
commit | 108699a7a8e3fd459cf29ac1dea9a9623de9a561 (patch) | |
tree | 14c3d606767b364664c3d5ee1abe5e06614a0edd /tools/h5diff/h5diff_common.c | |
parent | 050ded21d307de35b0394614aa0962e8bca2f850 (diff) | |
download | hdf5-108699a7a8e3fd459cf29ac1dea9a9623de9a561.zip hdf5-108699a7a8e3fd459cf29ac1dea9a9623de9a561.tar.gz hdf5-108699a7a8e3fd459cf29ac1dea9a9623de9a561.tar.bz2 |
[svn-r16300] 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"); |