diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-04-14 22:21:54 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-04-14 22:21:54 (GMT) |
commit | 2521c4084c06f078846fe06bb1d3cd7bfa506316 (patch) | |
tree | 466b9213c163d812778434bba2097705b423e799 /tools/lib/h5tools_ref.c | |
parent | 3468ff3a5c4f6c384801edef9ae52ecc4f2de3c5 (diff) | |
download | hdf5-2521c4084c06f078846fe06bb1d3cd7bfa506316.zip hdf5-2521c4084c06f078846fe06bb1d3cd7bfa506316.tar.gz hdf5-2521c4084c06f078846fe06bb1d3cd7bfa506316.tar.bz2 |
[svn-r12254] Purpose:
Anti-feature
Description:
Revert changes to H5G_stat_t struct, to make it compatible with the 1.6.x
branch again. The information that was added to the H5G_stat_t struct will
be reported through other API routines.
Platforms tested:
FreeBSD 4.11 (sleipnir) w/C++
Linux 2.4/64 (mir) w/C++ & Fortran
Solaris 2.9 (shanti)
Diffstat (limited to 'tools/lib/h5tools_ref.c')
-rw-r--r-- | tools/lib/h5tools_ref.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/lib/h5tools_ref.c b/tools/lib/h5tools_ref.c index 89bdaf1..f49cb07 100644 --- a/tools/lib/h5tools_ref.c +++ b/tools/lib/h5tools_ref.c @@ -65,7 +65,8 @@ static hbool_t ref_path_table_find(haddr_t objno); int init_ref_path_table(hid_t fid) { - H5G_stat_t sb; + H5G_stat_t sb; + haddr_t objno; /* Compact form of object's location */ char *root_path; /* Set file ID for later queries (XXX: this should be fixed) */ @@ -83,9 +84,10 @@ init_ref_path_table(hid_t fid) HDfree(root_path); return (-1); } + objno = (haddr_t)sb.objno[0] | ((haddr_t)sb.objno[1] << (8 * sizeof(long))); /* Insert into table (takes ownership of path) */ - ref_path_table_put(root_path, sb.u.obj.objno); + ref_path_table_put(root_path, objno); return(0); } @@ -156,6 +158,7 @@ haddr_t ref_path_table_lookup(const char *thepath) { H5G_stat_t sb; + haddr_t objno; /* Compact form of object's location */ /* Check for external link first, so we don't return the OID of an object in another file */ if(H5Gget_objinfo(thefile, thepath, FALSE, &sb)<0) @@ -169,13 +172,14 @@ ref_path_table_lookup(const char *thepath) /* fatal error ? */ return HADDR_UNDEF; } /* end if */ + objno = (haddr_t)sb.objno[0] | ((haddr_t)sb.objno[1] << (8 * sizeof(long))); /* All existing objects in the file had better be in the table */ - HDassert(ref_path_table_find(sb.u.obj.objno)); + HDassert(ref_path_table_find(objno)); /* Return OID */ - return(sb.u.obj.objno); + return(objno); } /*------------------------------------------------------------------------- @@ -332,11 +336,13 @@ fill_ref_path_table(hid_t group, const char *obj_name, void *op_data) { const char *obj_prefix = (const char *)op_data; H5G_stat_t statbuf; + haddr_t objno; /* Compact form of object's location */ H5Gget_objinfo(group, obj_name, FALSE, &statbuf); + objno = (haddr_t)statbuf.objno[0] | ((haddr_t)statbuf.objno[1] << (8 * sizeof(long))); /* Check if the object is in the path table */ - if (!ref_path_table_find(statbuf.u.obj.objno)) { + if (!ref_path_table_find(objno)) { size_t tmp_len; char *thepath; @@ -353,7 +359,7 @@ fill_ref_path_table(hid_t group, const char *obj_name, void *op_data) HDstrcat(thepath, obj_name); /* Insert the object into the path table */ - ref_path_table_put(thepath, statbuf.u.obj.objno); + ref_path_table_put(thepath, objno); if(statbuf.type == H5G_GROUP) { /* Iterate over objects in this group, using this group's |