summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5diff_common.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2009-01-26 19:29:22 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2009-01-26 19:29:22 (GMT)
commit120350c39588d57d6b89bd99569a7fa34b4de59f (patch)
treedda9cdb9248d698832c0bd25425029634cfd2d7e /tools/h5diff/h5diff_common.c
parent0682bfceb764bd4f4b4fb61695ca8d99440f39b1 (diff)
downloadhdf5-120350c39588d57d6b89bd99569a7fa34b4de59f.zip
hdf5-120350c39588d57d6b89bd99569a7fa34b4de59f.tar.gz
hdf5-120350c39588d57d6b89bd99569a7fa34b4de59f.tar.bz2
[svn-r16348] #1368 (E1) h5diff: implement "not comparable" messages. Implemented RFC. The new option is <-c, --compare List objects that are not comparable>
added some test cases tested: windows, linux
Diffstat (limited to 'tools/h5diff/h5diff_common.c')
-rw-r--r--tools/h5diff/h5diff_common.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c
index 8a49fa0..3f2b8cf 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:N";
+static const char *s_opts = "hVrvqn:d:p:Nc";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "version", no_arg, 'V' },
@@ -42,6 +42,7 @@ static struct long_options l_opts[] = {
{ "delta", require_arg, 'd' },
{ "relative", require_arg, 'p' },
{ "nan", no_arg, 'N' },
+ { "compare", no_arg, 'c' },
{ NULL, 0, '\0' }
};
@@ -138,6 +139,9 @@ void parse_command_line(int argc,
case 'N':
options->do_nans = 0;
break;
+ case 'c':
+ options->m_list_not_cmp = 1;
+ break;
}
}
@@ -194,11 +198,15 @@ void parse_command_line(int argc,
if (options->not_cmp==1)
{
- printf("--------------------------------\n");
- printf("Some objects are not comparable\n");
- printf("--------------------------------\n");
- if (!options->m_verbose)
- printf("Use -v for a list of objects.\n");
+ if ( options->m_list_not_cmp == 0 )
+ {
+ printf("--------------------------------\n");
+ printf("Some objects are not comparable\n");
+ printf("--------------------------------\n");
+ printf("Use -c for a list of objects.\n");
+ }
+
+
}
}
@@ -331,6 +339,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(" -c, --compare List objects that are not comparable\n");
printf(" -N, --nan Avoid NaNs detection\n");
printf(" -n C, --count=C Print differences up to C number\n");