diff options
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff.c | 30 | ||||
-rw-r--r-- | tools/lib/h5diff_dset.c | 2 | ||||
-rw-r--r-- | tools/lib/h5trav.c | 8 |
3 files changed, 32 insertions, 8 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; diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index 2e4cd67..9088c3a 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -350,7 +350,7 @@ int diff_datasetid( hid_t dset1_id, *------------------------------------------------------------------------- */ - diff_attr(dset1_id,dset2_id,obj1_name,obj2_name,options); + nfound=diff_attr(dset1_id,dset2_id,obj1_name,obj2_name,options); /*------------------------------------------------------------------------- * close diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 8d51ac4..4747aad 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -32,7 +32,7 @@ herr_t get_name_type( hid_t loc_id, const char *group_name, int idx, char **name, - int *type ); + H5G_obj_t *type ); /*------------------------------------------------------------------------- * Function: h5trav_getinfo @@ -246,7 +246,11 @@ static herr_t opget_info( hid_t loc_id, const char *name, void *op_data) *------------------------------------------------------------------------- */ -herr_t get_name_type( hid_t loc_id, const char *group_name, int idx, char **name, int *type ) +herr_t get_name_type( hid_t loc_id, + const char *group_name, + int idx, + char **name, + H5G_obj_t *type ) { trav_info_t info; |