diff options
Diffstat (limited to 'src/H5Gdense.c')
-rw-r--r-- | src/H5Gdense.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/src/H5Gdense.c b/src/H5Gdense.c index d2bcad1..a2ef55c 100644 --- a/src/H5Gdense.c +++ b/src/H5Gdense.c @@ -1777,80 +1777,3 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__dense_delete() */ -#ifndef H5_NO_DEPRECATED_SYMBOLS - -/*------------------------------------------------------------------------- - * Function: H5G__dense_get_type_by_idx - * - * Purpose: Returns the type of objects in the group by giving index. - * - * Note: This routine assumes a lookup on the link name index in - * increasing order and isn't currently set up to be as - * flexible as other routines in this code module, because - * the H5Gget_objtype_by_idx that it's supporting is - * deprecated. - * - * Return: Success: Non-negative, object type - * Failure: Negative - * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Sep 19 2006 - * - *------------------------------------------------------------------------- - */ -H5G_obj_t -H5G__dense_get_type_by_idx(H5F_t *f, H5O_linfo_t *linfo, hsize_t idx) -{ - H5G_link_table_t ltable = {0, NULL}; /* Table of links */ - H5G_obj_t ret_value = H5G_UNKNOWN; /* Return value */ - - FUNC_ENTER_PACKAGE - - /* - * Check arguments. - */ - HDassert(f); - HDassert(linfo); - - /* Build the table of links for this group */ - if(H5G__dense_build_table(f, linfo, H5_INDEX_NAME, H5_ITER_INC, <able) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "error building table of links") - - /* Check for going out of bounds */ - if(idx >= ltable.nlinks) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5G_UNKNOWN, "index out of bound") - - /* Determine type of object */ - if(ltable.lnks[idx].type == H5L_TYPE_SOFT) - ret_value = H5G_LINK; - else if(ltable.lnks[idx].type >= H5L_TYPE_UD_MIN) - ret_value = H5G_UDLINK; - else if(ltable.lnks[idx].type == H5L_TYPE_HARD) { - 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 = f; - tmp_oloc.addr = ltable.lnks[idx].u.hard.addr; - - /* Get the type of the object */ - if(H5O_obj_type(&tmp_oloc, &obj_type) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5G_UNKNOWN, "can't get object type") - - /* Map to group object type */ - if(H5G_UNKNOWN == (ret_value = H5G_map_obj_type(obj_type))) - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "can't determine object type") - } else { - HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, H5G_UNKNOWN, "unknown link type") - } /* end else */ - -done: - /* Release link table */ - if(ltable.lnks && H5G__link_release_table(<able) < 0) - HDONE_ERROR(H5E_SYM, H5E_CANTFREE, H5G_UNKNOWN, "unable to release link table") - - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5G__dense_get_type_by_idx() */ -#endif /* H5_NO_DEPRECATED_SYMBOLS */ - |