diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2003-12-04 15:31:05 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2003-12-04 15:31:05 (GMT) |
commit | 967a04fdec8aa15d93978cd201cd4ba0a583d6e2 (patch) | |
tree | 0db04bdb3c56abf4766a3324516ad033034b69a7 /tools/lib/h5diff.c | |
parent | e4e37e6d4aed05c4d6358907dc71470194310f42 (diff) | |
download | hdf5-967a04fdec8aa15d93978cd201cd4ba0a583d6e2.zip hdf5-967a04fdec8aa15d93978cd201cd4ba0a583d6e2.tar.gz hdf5-967a04fdec8aa15d93978cd201cd4ba0a583d6e2.tar.bz2 |
[svn-r7912] Purpose:
code clean, bug fix
Description:
the attributes of the root group were not being compared
removed compiler warnings on IRIX and solaris
Solution:
added a special function to compare the attributes of the root group
Platforms tested:
linux
IRIX 6.5
solaris 2.7
Misc. update:
Diffstat (limited to 'tools/lib/h5diff.c')
-rw-r--r-- | tools/lib/h5diff.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 5b38968..9c9d8aa 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -253,13 +253,33 @@ int diff_match( hid_t file1_id, for (i = 0; i < table->nobjs; i++) { if ( table->objs[i].flags[0] && table->objs[i].flags[1] ) - nfound+=diff( file1_id, table->objs[i].objname, - file2_id, table->objs[i].objname, - options, table->objs[i].type ); + nfound+=diff( file1_id, + table->objs[i].objname, + file2_id, + table->objs[i].objname, + options, + table->objs[i].type ); } /* free table */ trav_table_free(table); + + +/*------------------------------------------------------------------------- + * do the diff for the root. + * this is a special case, we get an ID for the root group and call diff() + * with this ID; it compares only the root group attributes + *------------------------------------------------------------------------- + */ + + nfound+=diff( file1_id, + "/", + file2_id, + "/", + options, + H5G_GROUP ); + + return nfound; } @@ -398,7 +418,7 @@ int diff( hid_t file1_id, nfound = (ret>0) ? 0 : 1; /* compare attributes */ - diff_attr(type1_id,type2_id,path1,path2,options); + nfound=diff_attr(type1_id,type2_id,path1,path2,options); if ( H5Tclose(type1_id)<0) goto out; @@ -426,7 +446,7 @@ int diff( hid_t file1_id, nfound = (ret!=0) ? 1 : 0; /* compare attributes */ - diff_attr(grp1_id,grp2_id,path1,path2,options); + nfound=diff_attr(grp1_id,grp2_id,path1,path2,options); if ( H5Gclose(grp1_id)<0) goto out; |