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_utils.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_utils.c')
-rw-r--r-- | tools/lib/h5tools_utils.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 9eba7c5..c1fa292 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -488,15 +488,18 @@ find_objs_cb(hid_t group, const char *name, void *op_data) if(H5Gget_objinfo(group, name, FALSE, &statbuf) < 0) ret_value = FAIL; else { + haddr_t objno; /* Compact form of object's location */ + + objno = (haddr_t)statbuf.objno[0] | ((haddr_t)statbuf.objno[1] << (8 * sizeof(long))); switch (statbuf.type) { char *tmp; case H5G_GROUP: - if (search_obj(info->group_table, statbuf.u.obj.objno) == NULL) { + if (search_obj(info->group_table, objno) == NULL) { char *old_prefix; tmp = build_obj_path_name(info->prefix, name); - add_obj(info->group_table, statbuf.u.obj.objno, tmp, TRUE); + add_obj(info->group_table, objno, tmp, TRUE); old_prefix = info->prefix; info->prefix = tmp; @@ -509,11 +512,11 @@ find_objs_cb(hid_t group, const char *name, void *op_data) break; case H5G_DATASET: - if (search_obj(info->dset_table, statbuf.u.obj.objno) == NULL) { + if (search_obj(info->dset_table, objno) == NULL) { hid_t dset; tmp = build_obj_path_name(info->prefix, name); - add_obj(info->dset_table, statbuf.u.obj.objno, tmp, TRUE); + add_obj(info->dset_table, objno, tmp, TRUE); if ((dset = H5Dopen (group, name)) >= 0) { hid_t type; @@ -522,11 +525,12 @@ find_objs_cb(hid_t group, const char *name, void *op_data) if (H5Tcommitted(type) > 0) { H5Gget_objinfo(type, ".", TRUE, &statbuf); + objno = (haddr_t)statbuf.objno[0] | ((haddr_t)statbuf.objno[1] << (8 * sizeof(long))); - if (search_obj(info->type_table, statbuf.u.obj.objno) == NULL) { + if (search_obj(info->type_table, objno) == NULL) { char *type_name = HDstrdup(tmp); - add_obj(info->type_table, statbuf.u.obj.objno, type_name, FALSE); + add_obj(info->type_table, objno, type_name, FALSE); } /* end if */ } @@ -543,8 +547,8 @@ find_objs_cb(hid_t group, const char *name, void *op_data) obj_t *found_obj; tmp = build_obj_path_name(info->prefix, name); - if ((found_obj = search_obj(info->type_table, statbuf.u.obj.objno)) == NULL) - add_obj(info->type_table, statbuf.u.obj.objno, tmp, TRUE); + if ((found_obj = search_obj(info->type_table, objno)) == NULL) + add_obj(info->type_table, objno, tmp, TRUE); else { /* Use latest version of name */ HDfree(found_obj->objname); |