diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-17 15:48:41 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-11-17 15:48:41 (GMT) |
commit | 1482d3e9cbc0796803e8cea47178b9878ef7a633 (patch) | |
tree | 8234b8b564f03e342d5ab1c459ed15ceb1a5e61b /src/H5Gname.c | |
parent | d3206adb2efdc50d998352ea7abcf225eadb64d5 (diff) | |
download | hdf5-1482d3e9cbc0796803e8cea47178b9878ef7a633.zip hdf5-1482d3e9cbc0796803e8cea47178b9878ef7a633.tar.gz hdf5-1482d3e9cbc0796803e8cea47178b9878ef7a633.tar.bz2 |
[svn-r12932] Description:
Basic support for H5Literate() routine. Still needs to be fleshed out and
refactored to simplify. Also, needs tests. :-)
Tested on:
FreeBSD/32 4.11 (sleipnir)
Linux/32 2.4 (heping)
Linux/64 2.4 (mir)
AIX/32 5.? (copper)
Mac OS X/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r-- | src/H5Gname.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c index 9200241..56df3d6 100644 --- a/src/H5Gname.c +++ b/src/H5Gname.c @@ -1060,7 +1060,7 @@ H5G_refname_iterator(hid_t group, const char *name, void *_udata) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") /* Get information for object in group */ - if(H5G_get_objinfo(&loc, name, 0, &sb, udata->dxpl_id) < 0) + if(H5G_get_objinfo(&loc, name, FALSE, &sb, udata->dxpl_id) < 0) HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "cannot stat object") #if H5_SIZEOF_UINT64_T > H5_SIZEOF_LONG objno = (haddr_t)sb.objno[0] | ((haddr_t)sb.objno[1] << (8 * sizeof(long))); @@ -1111,8 +1111,9 @@ H5G_refname_iterator(hid_t group, const char *name, void *_udata) /* If it's a group, we recurse into it */ if(sb.type == H5G_GROUP) { - int last_obj; - size_t len_needed; /* Length of container string needed */ + H5G_link_iterate_t lnk_op; /* Link operator */ + hsize_t last_obj; + size_t len_needed; /* Length of container string needed */ size_t len; /* Build full path name of group to recurse into */ @@ -1129,7 +1130,11 @@ H5G_refname_iterator(hid_t group, const char *name, void *_udata) udata->is_root_group = FALSE; HDstrcat(udata->container, "/"); - ret_value = H5G_obj_iterate(udata->file, udata->container, H5_ITER_INC, 0, &last_obj, H5G_refname_iterator, udata, udata->dxpl_id); + /* Build iterator operator */ + lnk_op.op_type = H5G_LINK_OP_OLD; + lnk_op.u.old_op = H5G_refname_iterator; + + ret_value = H5G_obj_iterate(udata->file, udata->container, H5L_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)0, &last_obj, &lnk_op, udata, udata->dxpl_id); /* If we didn't find the object, truncate the name to not include group name anymore */ if(!ret_value) |