diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5D.c | 2 | ||||
-rw-r--r-- | src/H5Distore.c | 8 | ||||
-rw-r--r-- | src/H5G.c | 4 | ||||
-rw-r--r-- | src/H5L.c | 57 | ||||
-rw-r--r-- | src/H5Lpublic.h | 2 | ||||
-rw-r--r-- | src/H5O.c | 55 | ||||
-rw-r--r-- | src/H5Opublic.h | 2 | ||||
-rw-r--r-- | src/H5Plcpl.c | 4 | ||||
-rw-r--r-- | src/H5Tcommit.c | 2 |
9 files changed, 68 insertions, 68 deletions
@@ -197,7 +197,7 @@ done: * create other datasets. * * The resulting ID should be linked into the file with - * H5Llink or it will be deleted when closed. + * H5Olink or it will be deleted when closed. * * Return: Success: The object ID of the new dataset. At this * point, the dataset is ready to receive its diff --git a/src/H5Distore.c b/src/H5Distore.c index 66fc41a..399f9f9 100644 --- a/src/H5Distore.c +++ b/src/H5Distore.c @@ -2101,10 +2101,8 @@ H5D_istore_readvv(const H5D_io_info_t *io_info, haddr_t chunk_addr, void *chunk, void *buf) { H5D_t *dset=io_info->dset; /* Local pointer to the dataset info */ - H5D_istore_ud1_t udata; /*B-tree pass-through */ size_t u; /* Local index variables */ ssize_t ret_value; /* Return value */ - ssize_t naccessed; /* Number of bytes accessed in chunk */ FUNC_ENTER_NOAPI(H5D_istore_readvv, FAIL) @@ -2285,8 +2283,6 @@ H5D_istore_writevv(const H5D_io_info_t *io_info, haddr_t chunk_addr, void *chunk, const void *buf) { H5D_t *dset = io_info->dset; /* Local pointer to the dataset info */ - H5D_istore_ud1_t udata; /*B-tree pass-through */ - size_t u; /* Local index variables */ ssize_t ret_value; /* Return value */ FUNC_ENTER_NOAPI(H5D_istore_writevv, FAIL) @@ -2304,6 +2300,9 @@ H5D_istore_writevv(const H5D_io_info_t *io_info, HDassert(buf); #ifdef QAK +{ +size_t u; /* Local index variables */ + HDfprintf(stderr,"%s: io_info->store->chunk.offset={",FUNC); for(u=0; u<dset->shared->layout.u.chunk.ndims; u++) HDfprintf(stderr,"%Hd%s",io_info->store->chunk.offset[u],(u<(dset->shared->layout.u.chunk.ndims-1) ? ", " : "}\n")); @@ -2313,6 +2312,7 @@ HDfprintf(stderr,"%s: chunk_len_arr[%Zu]=%Zu\n",FUNC,*chunk_curr_seq,chunk_len_a HDfprintf(stderr,"%s: chunk_offset_arr[%Zu]=%Hu\n",FUNC,*chunk_curr_seq,chunk_offset_arr[*chunk_curr_seq]); HDfprintf(stderr,"%s: mem_len_arr[%Zu]=%Zu\n",FUNC,*mem_curr_seq,mem_len_arr[*mem_curr_seq]); HDfprintf(stderr,"%s: mem_offset_arr[%Zu]=%Hu\n",FUNC,*mem_curr_seq,mem_offset_arr[*mem_curr_seq]); +} #endif /* QAK */ /* @@ -252,10 +252,10 @@ done: * property list GAPL_ID. * * The resulting ID should be linked into the file with - * H5Llink or it will be deleted when closed. + * H5Olink or it will be deleted when closed. * * Given the default setting, H5Gcreate_anon() followed by - * H5Llink() will have the same function as H5Gcreate2(). + * H5Olink() will have the same function as H5Gcreate2(). * * Usage: H5Gcreate_anon(loc_id, char *name, gcpl_id, gapl_id) * hid_t loc_id; IN: File or group identifier @@ -409,61 +409,6 @@ done: /*------------------------------------------------------------------------- - * Function: H5Llink - * - * Purpose: Creates a hard link from NEW_NAME to the object specified - * by OBJ_ID using properties defined in the Link Creation - * Property List LCPL. - * - * This function should be used to link objects that have just - * been created. - * - * CUR_NAME and NEW_NAME are interpreted relative to - * CUR_LOC_ID and NEW_LOC_ID, which is either a file ID or a - * group ID. - * - * Return: Non-negative on success/Negative on failure - * - * Programmer: James Laird - * Tuesday, December 13, 2005 - * - *------------------------------------------------------------------------- - */ -herr_t -H5Llink(hid_t new_loc_id, const char *new_name, hid_t obj_id, hid_t lcpl_id, - hid_t lapl_id) -{ - H5G_loc_t new_loc; - H5G_loc_t obj_loc; - herr_t ret_value=SUCCEED; /* Return value */ - - FUNC_ENTER_API(H5Llink, FAIL) - H5TRACE5("e", "i*siii", new_loc_id, new_name, obj_id, lcpl_id, lapl_id); - - /* Check arguments */ - if(new_loc_id == H5L_SAME_LOC) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "cannot use H5L_SAME_LOC when only one location is specified") - if(H5G_loc(new_loc_id, &new_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") - if(H5G_loc(obj_id, &obj_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") - if(!new_name || !*new_name) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") - if(HDstrlen(new_name) > H5L_MAX_LINK_NAME_LEN) - HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "name too long") - if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list") - - /* Link to the object */ - if(H5L_link(&new_loc, new_name, &obj_loc, lcpl_id, lapl_id, H5AC_dxpl_id) < 0) - HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link") - -done: - FUNC_LEAVE_API(ret_value) -} /* end H5Llink() */ - - -/*------------------------------------------------------------------------- * Function: H5Lcreate_soft * * Purpose: Creates a soft link from LINK_NAME to LINK_TARGET. @@ -1488,7 +1433,7 @@ done: /*------------------------------------------------------------------------- * Function: H5L_link * - * Purpose: Creates a link from OBJ_ID to CUR_NAME. See H5Llink() for + * Purpose: Creates a link from OBJ_ID to CUR_NAME. See H5Olink() for * full documentation. * * Return: Non-negative on success/Negative on failure diff --git a/src/H5Lpublic.h b/src/H5Lpublic.h index 9a85900..1645e4b 100644 --- a/src/H5Lpublic.h +++ b/src/H5Lpublic.h @@ -140,8 +140,6 @@ typedef herr_t (*H5L_iterate_t)(hid_t group, const char *name, const H5L_info_t /*********************/ /* Public Prototypes */ /*********************/ -H5_DLL herr_t H5Llink(hid_t cur_loc_id, const char *cur_name, - hid_t obj_id, hid_t lcpl_id, hid_t lapl_id); H5_DLL herr_t H5Lmove(hid_t src_loc, const char *src_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id); H5_DLL herr_t H5Lcopy(hid_t src_loc, const char *src_name, hid_t dst_loc, @@ -369,6 +369,61 @@ done: /*------------------------------------------------------------------------- + * Function: H5Olink + * + * Purpose: Creates a hard link from NEW_NAME to the object specified + * by OBJ_ID using properties defined in the Link Creation + * Property List LCPL. + * + * This function should be used to link objects that have just + * been created. + * + * NEW_NAME is interpreted relative to + * NEW_LOC_ID, which is either a file ID or a + * group ID. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: James Laird + * Tuesday, December 13, 2005 + * + *------------------------------------------------------------------------- + */ +herr_t +H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, + hid_t lapl_id) +{ + H5G_loc_t new_loc; + H5G_loc_t obj_loc; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(H5Olink, FAIL) + H5TRACE5("e", "ii*sii", obj_id, new_loc_id, new_name, lcpl_id, lapl_id); + + /* Check arguments */ + if(H5G_loc(obj_id, &obj_loc) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + if(new_loc_id == H5L_SAME_LOC) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "cannot use H5L_SAME_LOC when only one location is specified") + if(H5G_loc(new_loc_id, &new_loc) < 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") + if(!new_name || !*new_name) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name specified") + if(HDstrlen(new_name) > H5L_MAX_LINK_NAME_LEN) + HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "name too long") + if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list") + + /* Link to the object */ + if(H5L_link(&new_loc, new_name, &obj_loc, lcpl_id, lapl_id, H5AC_dxpl_id) < 0) + HGOTO_ERROR(H5E_LINK, H5E_CANTINIT, FAIL, "unable to create link") + +done: + FUNC_LEAVE_API(ret_value) +} /* end H5Olink() */ + + +/*------------------------------------------------------------------------- * Function: H5Oincr_refcount * * Purpose: Warning! This function is EXTREMELY DANGEROUS! diff --git a/src/H5Opublic.h b/src/H5Opublic.h index d85d164..c3ce1b6 100644 --- a/src/H5Opublic.h +++ b/src/H5Opublic.h @@ -147,6 +147,8 @@ H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oi H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id); +H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, + hid_t lcpl_id, hid_t lapl_id); H5_DLL herr_t H5Oincr_refcount(hid_t object_id); H5_DLL herr_t H5Odecr_refcount(hid_t object_id); H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c index fb3169d..4006f0e 100644 --- a/src/H5Plcpl.c +++ b/src/H5Plcpl.c @@ -131,7 +131,7 @@ done: /*------------------------------------------------------------------------- * Function: H5Pset_create_intermediate_group * - * Purpose: set crt_intmd_group so that H5Lcreate_*, H5Llink, etc. + * Purpose: set crt_intmd_group so that H5Lcreate_*, H5Olink, etc. * will create missing groups along the given path "name" * * Note: XXX: This property should really be an access property. -QAK @@ -169,7 +169,7 @@ done: * Function: H5Pget_create_intermediate_group * * Purpose: Returns the crt_intmd_group, which is set to create missing - * groups during H5Llink, etc. + * groups during H5Olink, etc. * * Return: Non-negative on success/Negative on failure * diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c index 9739668..bcb9962 100644 --- a/src/H5Tcommit.c +++ b/src/H5Tcommit.c @@ -209,7 +209,7 @@ done: * into a "named", immutable type. * * The resulting ID should be linked into the file with - * H5Llink or it will be deleted when closed. + * H5Olink or it will be deleted when closed. * * Note: Datatype access property list is unused currently, but is * checked for sanity anyway. |