summaryrefslogtreecommitdiffstats
path: root/tools/h5diff/h5diff_common.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2009-01-26 20:39:32 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2009-01-26 20:39:32 (GMT)
commitd2dd85b598976e6a3227447f464dbd9dcbb01b96 (patch)
treecf88399f8142b05d53af1ae9730e551671b2113f /tools/h5diff/h5diff_common.c
parent1197e992e94d823a1dea02ad91f42299df305dad (diff)
downloadhdf5-d2dd85b598976e6a3227447f464dbd9dcbb01b96.zip
hdf5-d2dd85b598976e6a3227447f464dbd9dcbb01b96.tar.gz
hdf5-d2dd85b598976e6a3227447f464dbd9dcbb01b96.tar.bz2
[svn-r16351] merge 16348
#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");