summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2002-11-25 17:59:14 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2002-11-25 17:59:14 (GMT)
commit8333adf8ffc1265440aefad62e0cd9ab33175bd7 (patch)
treedc4321c2e92663f32f83c9feab57aaddab839f57 /src/H5B.c
parentb4b718b9297c479a3d1177209dcf1214d7de27a4 (diff)
downloadhdf5-8333adf8ffc1265440aefad62e0cd9ab33175bd7.zip
hdf5-8333adf8ffc1265440aefad62e0cd9ab33175bd7.tar.gz
hdf5-8333adf8ffc1265440aefad62e0cd9ab33175bd7.tar.bz2
[svn-r6136]
Purpose: new functions Description: H5Gget_num_objs, H5Gget_objname_by_idx and H5Gget_objtype_by_idx. Platforms tested: modi4, arabica, eirene Misc. update: RELEASE.txt updated.
Diffstat (limited to 'src/H5B.c')
-rw-r--r--src/H5B.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/H5B.c b/src/H5B.c
index 4d1c328..700cf3f 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -1473,9 +1473,10 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, H5B_operator_t op, haddr_t addr,
haddr_t cur_addr = HADDR_UNDEF;
haddr_t *child = NULL;
uint8_t *key = NULL;
- int i, nchildren;
+ int i, nchildren;
herr_t ret_value = SUCCEED;
-
+ H5B_iterate_t ret_flag = H5B_ITER_CONT;
+
FUNC_ENTER_NOAPI(H5B_iterate, FAIL);
/*
@@ -1526,11 +1527,16 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, H5B_operator_t op, haddr_t addr,
* Perform the iteration operator, which might invoke an
* application callback.
*/
- for (i=0; i<nchildren && !ret_value; i++) {
- ret_value = (*op)(f, key+i*type->sizeof_nkey,
+ for (i=0; i<nchildren && ret_flag==H5B_ITER_CONT; i++) {
+ ret_flag = (*op)(f, key+i*type->sizeof_nkey,
child[i], key+(i+1)*type->sizeof_nkey, udata);
- if (ret_value<0)
+ if (ret_flag==H5B_ITER_ERROR) {
HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "iterator function failed");
+ } else if(ret_flag==H5B_ITER_STOP) {
+ HGOTO_DONE(SUCCEED);
+ } else {
+ ;
+ }
} /* end for */
} /* end for */
} /* end else */