summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/h5diff_common.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c
index 898f56c..569cd00 100644
--- a/tools/h5diff/h5diff_common.c
+++ b/tools/h5diff/h5diff_common.c
@@ -475,6 +475,8 @@ int check_d_input( const char *str )
*
*-------------------------------------------------------------------------
*/
+
+#if defined (OLD)
void usage(void)
{
printf("usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] \n");
@@ -533,6 +535,73 @@ void usage(void)
}
+
+#else
+
+void usage(void)
+{
+ printf("usage: h5diff [OPTIONS] file1 file2 [obj1[obj2]] \n");
+ printf(" file1 File name of the first HDF5 file\n");
+ printf(" file2 File name of the second HDF5 file\n");
+ printf(" [obj1] Name of an HDF5 object, in absolute path\n");
+ printf(" [obj2] Name of an HDF5 object, in absolute path\n");
+
+ printf(" OPTIONS\n");
+
+ printf(" -h, --help Print a usage message and exit\n");
+ printf(" -V, --version Print version number and exit\n");
+ 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 C, --count=C Print differences up to C number\n");
+ printf(" -d D, --delta=D Print difference when greater than limit D\n");
+ printf(" -p R, --relative=R Print difference when greater than relative limit R\n");
+
+
+ printf("\n");
+
+ printf(" C - is a positive integer\n");
+ printf(" D - is a positive number. Compare criteria is |a - b| > D\n");
+ printf(" R - is a positive number. Compare criteria is |(b-a)/a| > R\n");
+
+ printf("\n");
+
+ printf("h5diff has four modes of output:\n");
+ printf(" Normal mode: print the number of differences found and where they occured\n");
+ printf(" Report mode: print the above plus the differences\n");
+ printf(" Verbose mode: print the above plus a list of objects and warnings\n");
+ printf(" Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found)\n");
+ printf("\n");
+ printf("Examples of use:\n");
+ printf("\n");
+ printf("1) h5diff file1 file2 /g1/dset1 /g1/dset2\n");
+ printf("\n");
+ printf(" Compares object '/g1/dset1' in file1 with '/g1/dset2' in file2\n");
+ printf("\n");
+ printf("2) h5diff file1 file2 /g1/dset1\n");
+ printf("\n");
+ printf(" Compares object '/g1/dset1' in both files\n");
+ printf("\n");
+ printf("3) h5diff file1 file2\n");
+ printf("\n");
+ printf(" Compares all objects in both files\n");
+ printf("\n");
+ printf("Note) file1 and file2 can be the same file. Use\n");
+ printf("\n");
+ printf(" h5diff file1 file1 /g1/dset1 /g1/dset2\n");
+ printf("\n");
+ printf(" to compare '/g1/dset1' and '/g1/dset2' in the same file\n");
+ printf("\n");
+ printf("If no objects are specified, h5diff only compares objects with the same ");
+ printf("absolute path in both files. The compare criteria is: ");
+ printf("1) datasets: numerical array differences 2) groups: name string difference ");
+ printf("3) datatypes: the return value of H5Tequal 2) links: name string difference of the linked value\n");
+
+}
+
+#endif
+
/*-------------------------------------------------------------------------
* Function: h5diff_exit
*