diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-12-23 06:18:42 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-12-23 06:18:42 (GMT) |
commit | c3f51c52d098d6cd2e6c2955a50140bdb45571c6 (patch) | |
tree | 3fbc8a16ba3140b0f7ed1febfbff9afb511073bd /src/H5Gstab.c | |
parent | 251ba120b5e3277a0e53e9ea2417f6b370cf7d05 (diff) | |
parent | 7d28a4295ebac24dd0a84da9f4b880488d8bd32f (diff) | |
download | hdf5-c3f51c52d098d6cd2e6c2955a50140bdb45571c6.zip hdf5-c3f51c52d098d6cd2e6c2955a50140bdb45571c6.tar.gz hdf5-c3f51c52d098d6cd2e6c2955a50140bdb45571c6.tar.bz2 |
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/~bmribler/hdf5_bmr_fixbug into develop
Diffstat (limited to 'src/H5Gstab.c')
-rw-r--r-- | src/H5Gstab.c | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/src/H5Gstab.c b/src/H5Gstab.c index 9072b97..e8d38b9 100644 --- a/src/H5Gstab.c +++ b/src/H5Gstab.c @@ -1103,118 +1103,3 @@ done: } /* end H5G__stab_valid */ #endif /* H5_STRICT_FORMAT_CHECKS */ -#ifndef H5_NO_DEPRECATED_SYMBOLS - -/*------------------------------------------------------------------------- - * Function: H5G_stab_get_type_by_idx_cb - * - * Purpose: Callback for B-tree iteration 'by index' info query to - * retrieve the type of an object - * - * Return: Success: Non-negative - * Failure: Negative - * - * Programmer: Quincey Koziol - * Nov 7, 2006 - * - *------------------------------------------------------------------------- - */ -static herr_t -H5G_stab_get_type_by_idx_cb(const H5G_entry_t *ent, void *_udata) -{ - H5G_bt_it_gtbi_t *udata = (H5G_bt_it_gtbi_t *)_udata; - herr_t ret_value = SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI_NOINIT - - /* Sanity check */ - HDassert(ent); - HDassert(udata); - - /* Check for a soft link */ - switch(ent->type) { - case H5G_CACHED_SLINK: - udata->type = H5G_LINK; - break; - - case H5G_CACHED_ERROR: - case H5G_NOTHING_CACHED: - case H5G_CACHED_STAB: - case H5G_NCACHED: - default: - { - H5O_loc_t tmp_oloc; /* Temporary object location */ - H5O_type_t obj_type; /* Type of object at location */ - - /* Build temporary object location */ - tmp_oloc.file = udata->f; - HDassert(H5F_addr_defined(ent->header)); - tmp_oloc.addr = ent->header; - - /* Get the type of the object */ - if(H5O_obj_type(&tmp_oloc, &obj_type) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get object type") - udata->type = H5G_map_obj_type(obj_type); - } - break; - } /* end switch */ - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G_stab_get_type_by_idx_cb */ - - -/*------------------------------------------------------------------------- - * Function: H5G__stab_get_type_by_idx - * - * Purpose: Private function for H5Gget_objtype_by_idx. - * Returns the type of objects in the group by giving index. - * - * Return: Success: H5G_GROUP(1), H5G_DATASET(2), H5G_TYPE(3) - * - * Failure: UNKNOWN - * - * Programmer: Raymond Lu - * Nov 20, 2002 - * - *------------------------------------------------------------------------- - */ -H5G_obj_t -H5G__stab_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx) -{ - H5O_stab_t stab; /* Info about local heap & B-tree */ - H5G_bt_it_gtbi_t udata; /* User data for B-tree callback */ - H5G_obj_t ret_value = H5G_UNKNOWN; /* Return value */ - - FUNC_ENTER_PACKAGE_TAG(oloc->addr) - - /* Sanity check */ - HDassert(oloc); - - /* Get the B-tree & local heap info */ - if(NULL == H5O_msg_read(oloc, H5O_STAB_ID, &stab)) - HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "unable to determine local heap address") - - /* Set iteration information */ - udata.common.idx = idx; - udata.common.num_objs = 0; - udata.common.op = H5G_stab_get_type_by_idx_cb; - udata.f = oloc->file; - udata.type = H5G_UNKNOWN; - - /* Iterate over the group members */ - if(H5B_iterate(oloc->file, H5B_SNODE, stab.btree_addr, H5G__node_by_idx, &udata) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "iteration operator failed") - - /* If we don't know the type now, we almost certainly went out of bounds */ - if(udata.type == H5G_UNKNOWN) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5G_UNKNOWN, "index out of bound") - - /* Set the return value */ - ret_value = udata.type; - -done: - FUNC_LEAVE_NOAPI_TAG(ret_value) -} /* end H5G__stab_get_type_by_idx() */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - |