summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_attr.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2003-12-02 23:13:27 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2003-12-02 23:13:27 (GMT)
commit486c13d307978ccbb9c2306c85c39a674ed56b96 (patch)
tree5c5863521d8acf6dd3c7d4db3880596fecad84de /tools/lib/h5diff_attr.c
parent684db5595b5fa30633eb648f6e71a36d3857644a (diff)
downloadhdf5-486c13d307978ccbb9c2306c85c39a674ed56b96.zip
hdf5-486c13d307978ccbb9c2306c85c39a674ed56b96.tar.gz
hdf5-486c13d307978ccbb9c2306c85c39a674ed56b96.tar.bz2
[svn-r7904] Purpose:
h5diff new features Description: added comparison for attributes adeded comparison for all dataset datatypes added tests for the new features changed the output format Solution: Platforms tested: linux solaris 5.7 IRIX 6.5 (64) Misc. update:
Diffstat (limited to 'tools/lib/h5diff_attr.c')
-rw-r--r--tools/lib/h5diff_attr.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 2fbb2a4..c2e36ef 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -20,7 +20,7 @@
/*-------------------------------------------------------------------------
* Function: diff_attr
*
- * Purpose: diff attributes located in LOC1_ID and LOC2_ID, which are
+ * Purpose: compare attributes located in LOC1_ID and LOC2_ID, which are
* obtained either from
* loc_id = H5Gopen( fid, name);
* loc_id = H5Dopen( fid, name);
@@ -38,8 +38,10 @@
*-------------------------------------------------------------------------
*/
-int diff_attr(hid_t loc1_id,
- hid_t loc2_id,
+int diff_attr(hid_t loc1_id,
+ hid_t loc2_id,
+ const char *path1,
+ const char *path2,
diff_opt_t *options
)
{
@@ -92,7 +94,7 @@ int diff_attr(hid_t loc1_id,
/* get name */
if (H5Aget_name( attr1_id, 255, name1 )<0)
goto error;
- if (H5Aget_name( attr1_id, 255, name2 )<0)
+ if (H5Aget_name( attr2_id, 255, name2 )<0)
goto error;
if (HDstrcmp(name1,name2)!=0)
@@ -179,10 +181,23 @@ int diff_attr(hid_t loc1_id,
*/
if (options->verbose)
- printf( "Comparing <%s> with <%s>\n", name1, name2 );
- nfound = diff_array(buf1,buf2,nelmts1,rank1,dims1,options,name1,name2,mtype1_id);
- if (options->verbose)
- printf("%d attribute differences found\n", nfound );
+ printf( "Attribute: <%s> and <%s>\n",name1,name2);
+ sprintf(name1,"%s of <%s>",name1,path1);
+ sprintf(name2,"%s of <%s>",name2,path2);
+ nfound = diff_array(buf1,
+ buf2,
+ nelmts1,
+ rank1,
+ dims1,
+ options,
+ name1,
+ name2,
+ mtype1_id,
+ attr1_id,
+ attr2_id);
+ if (options->verbose && nfound)
+ printf("%d differences found\n", nfound );
+
/*-------------------------------------------------------------------------
* close