summaryrefslogtreecommitdiffstats
path: root/src/H5Gdeprec.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-06 17:44:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-06 17:44:40 (GMT)
commit32cd8f3fcf6ef1804a2818c84ad3ed92b26c887e (patch)
tree8f81cb8e5466a2a118f2afb3c5be7252c7eb3739 /src/H5Gdeprec.c
parent5adf1ee1bab95cce501257e538b638a75c9e72fa (diff)
downloadhdf5-32cd8f3fcf6ef1804a2818c84ad3ed92b26c887e.zip
hdf5-32cd8f3fcf6ef1804a2818c84ad3ed92b26c887e.tar.gz
hdf5-32cd8f3fcf6ef1804a2818c84ad3ed92b26c887e.tar.bz2
[svn-r12865] Description:
Change name of H5Lunlink to H5Ldelete, per our design meeting last Friday. Tested on: Linux/32 2.6 (chicago)
Diffstat (limited to 'src/H5Gdeprec.c')
-rw-r--r--src/H5Gdeprec.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 9f8a39f..fc74bcf 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -151,20 +151,28 @@ done:
/*-------------------------------------------------------------------------
* Function: H5Gunlink
*
- * Purpose: Removes a link. The new API is H5Lunlink.
+ * Purpose: Removes a link. The new API is H5Ldelete.
*
*-------------------------------------------------------------------------
*/
herr_t
H5Gunlink(hid_t loc_id, const char *name)
{
- herr_t ret_value;
+ H5G_loc_t loc; /* Group's location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Gunlink, FAIL)
H5TRACE2("e","is",loc_id,name);
- if((ret_value = H5Lunlink(loc_id, name, H5P_DEFAULT)) < 0)
- HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "Couldn't delete link")
+ /* Check arguments */
+ if(H5G_loc(loc_id, &loc) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ if(!name || !*name)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name")
+
+ /* Call H5L routine... */
+ if(H5L_delete(&loc, name, H5P_DEFAULT, H5AC_dxpl_id) < 0)
+ HGOTO_ERROR(H5E_LINK, H5E_CANTDELETE, FAIL, "couldn't delete link")
done:
FUNC_LEAVE_API(ret_value)
@@ -182,8 +190,8 @@ done:
herr_t
H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf/*out*/)
{
- H5G_loc_t loc;
- herr_t ret_value = SUCCEED;
+ H5G_loc_t loc; /* Group's location */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Gget_linkval, FAIL)
H5TRACE4("e","iszx",loc_id,name,size,buf);
@@ -195,7 +203,7 @@ H5Gget_linkval(hid_t loc_id, const char *name, size_t size, char *buf/*out*/)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified")
/* Call the new link routine which provides this capability */
- if(H5L_get_val(&loc, name, size, buf, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if(H5L_get_val(&loc, name, size, buf, H5P_DEFAULT, H5AC_ind_dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "couldn't get link info")
done: