summaryrefslogtreecommitdiffstats
path: root/tools/h5diff
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2003-05-01 19:57:56 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2003-05-01 19:57:56 (GMT)
commitb0880f9331e973bd6cb043e5f6edf777bfba949f (patch)
tree5276d41b5a9640a603a7d6b00df69682ace30e57 /tools/h5diff
parentc3748e1b0b891462b885a4da3166c1e3e9b9edc1 (diff)
downloadhdf5-b0880f9331e973bd6cb043e5f6edf777bfba949f.zip
hdf5-b0880f9331e973bd6cb043e5f6edf777bfba949f.tar.gz
hdf5-b0880f9331e973bd6cb043e5f6edf777bfba949f.tar.bz2
[svn-r6789] Purpose:
new feature Description: during the sequencial match list, by default the differences between matched datasets were printed. added an -m option that allows to turn this off, just printing the file differences Solution: Platforms tested: Linux 2.4 (rockaway) SunOS 5.7 (arabica) IRIX 6.5 (modi4) Misc. update:
Diffstat (limited to 'tools/h5diff')
-rw-r--r--tools/h5diff/h5diff.c16
-rw-r--r--tools/h5diff/h5difftst.c8
2 files changed, 15 insertions, 9 deletions
diff --git a/tools/h5diff/h5diff.c b/tools/h5diff/h5diff.c
index 4031b88..0d5f587 100644
--- a/tools/h5diff/h5diff.c
+++ b/tools/h5diff/h5diff.c
@@ -36,6 +36,7 @@ typedef struct options_t
double p_relative; /* relative error value */
int n_; /* count */
int n_number_count; /* value */
+ int m_; /* do not make the diff on a sequencial match, default yes */
} options_t;
/*-------------------------------------------------------------------------
@@ -114,6 +115,7 @@ void usage(void)
printf("[-n count] Print difference up to count number for each variable\n");
printf("[-d delta] Print difference when it is greater than limit delta\n");
printf("[-p relative] Print differences which are within a relative error value\n");
+ printf("[-m ] Print differences on a sequencial match iteration\n");
}
@@ -167,8 +169,6 @@ int main(int argc, const char *argv[])
const char *obj1_name = NULL;
const char *obj2_name = NULL;
- /*do_test_files();*/
-
/*-------------------------------------------------------------------------
* print the command line options
@@ -219,6 +219,9 @@ int main(int argc, const char *argv[])
case 'r':
options.r_ = 1;
break;
+ case 'm':
+ options.m_ = 1;
+ break;
case 'd':
/* if it is not another option */
if ( '-' !=argv[i+1][0] )
@@ -726,8 +729,11 @@ void match( hid_t file1_id, const char *file1_name, int nobjects1, info_t *info1
info1[curr1].name, file1_name, info2[curr2].name, file2_name);
/* do the diff */
- diff( file1_id, info1[curr1].name, file2_id, info1[curr1].name, options,
- info1[curr1].type );
+ if ( options.m_ )
+ {
+ diff( file1_id, info1[curr1].name, file2_id, info1[curr1].name, options,
+ info1[curr1].type );
+ }
curr1++;
curr2++;
@@ -769,7 +775,7 @@ void match( hid_t file1_id, const char *file1_name, int nobjects1, info_t *info1
while ( curr2<nobjects2 )
{
printf( "<%s> is in <%s>, but not in <%s>\n", info2[curr2].name,
- file1_name, file2_name);
+ file2_name, file1_name);
curr2++;
}
}
diff --git a/tools/h5diff/h5difftst.c b/tools/h5diff/h5difftst.c
index 912ec33..c795b55 100644
--- a/tools/h5diff/h5difftst.c
+++ b/tools/h5diff/h5difftst.c
@@ -738,10 +738,10 @@ int do_test_files(void)
*-------------------------------------------------------------------------
*/
- write_dataset(file3_id,1,dims1_1,"dset3",H5T_NATIVE_INT,0);
- write_dataset(file4_id,1,dims1_1,"dset3",H5T_NATIVE_INT,0);
- write_dataset(file3_id,1,dims1_1,"dset4",H5T_NATIVE_INT,0);
- write_dataset(file4_id,1,dims1_1,"dset5",H5T_NATIVE_INT,0);
+ write_dataset(file3_id,1,dims1_1,"dset_A",H5T_NATIVE_INT,0);
+ write_dataset(file4_id,1,dims1_1,"dset_A",H5T_NATIVE_INT,0);
+ write_dataset(file3_id,1,dims1_1,"dset_B",H5T_NATIVE_INT,0);
+ write_dataset(file4_id,1,dims1_1,"dset_C",H5T_NATIVE_INT,0);