summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstarfire <no_author@starfire>2006-07-10 15:47:58 (GMT)
committerstarfire <no_author@starfire>2006-07-10 15:47:58 (GMT)
commit8db4fe6d16d3e51e3d6122db02aaf888b911ebe0 (patch)
tree870360048be564a1126a63dbfc0693385e6fc1be
parent9161a29d8315c8c61f4e993bf272dddde0e1e6ec (diff)
downloadhdf5-8db4fe6d16d3e51e3d6122db02aaf888b911ebe0.zip
hdf5-8db4fe6d16d3e51e3d6122db02aaf888b911ebe0.tar.gz
hdf5-8db4fe6d16d3e51e3d6122db02aaf888b911ebe0.tar.bz2
[svn-r12461] Cleaned up the names of some internal API functions, cleaned up comments,
fixed a few tests that used incorrect names for H5L APIs (formerly hidden behind H5_GROUP_REVISION ifdefs Mostly cosmetic changes, tested on mir.
-rw-r--r--src/H5D.c2
-rw-r--r--src/H5G.c4
-rw-r--r--src/H5L.c34
-rw-r--r--src/H5Plcpl.c4
-rw-r--r--src/H5Tcommit.c2
-rw-r--r--test/links.c20
-rw-r--r--test/stab.c6
7 files changed, 36 insertions, 36 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 01cd378..70f84ad 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1256,7 +1256,7 @@ done:
* create other datasets.
*
* The resulting ID should be linked into the file with
- * H5Lcreate or it will be deleted when closed.
+ * H5Llink 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/H5G.c b/src/H5G.c
index cebb24e..21767a0 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -263,10 +263,10 @@ done:
* property list GAPL_ID.
*
* The resulting ID should be linked into the file with
- * H5Lcreate or it will be deleted when closed.
+ * H5Llink or it will be deleted when closed.
*
* Given the default setting, H5Gcreate_expand() followed by
- * H5Lcreate() will have the same function as H5Gcreate().
+ * H5Llink() will have the same function as H5Gcreate().
*
* Usage: H5Gcreate_expand(loc_id, char *name, gcpl_id, gapl_id)
* hid_t loc_id; IN: File or group identifier
diff --git a/src/H5L.c b/src/H5L.c
index fe52dc9..4127067 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -104,9 +104,9 @@ static herr_t H5L_unlink(H5G_loc_t *loc, const char *name, hid_t dxpl_id);
static herr_t H5L_move(H5G_loc_t *src_loc, const char *src_name,
H5G_loc_t *dst_loc, const char *dst_name, hbool_t copy_flag,
hid_t lcpl_id, hid_t dxpl_id);
-static herr_t H5L_move_rename_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
+static herr_t H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name,
const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/);
-static herr_t H5L_move_rename_dest_cb(H5G_loc_t *grp_loc/*in*/,
+static herr_t H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/,
const char *name, const H5O_link_t *lnk, H5G_loc_t *obj_loc, void *_udata/*in,out*/);
static herr_t H5L_get_linkinfo(H5G_loc_t *loc, const char *name,
H5L_linkinfo_t *linkbuf/*out*/, hid_t dxpl_id);
@@ -196,10 +196,10 @@ H5L_term_interface(void)
* Function: H5Lmove
*
* Purpose: Renames an object within an HDF5 file and moves it to a new
- * group using H5Lrename and H5Lmove. The original name SRC
- * is unlinked from the group graph and the inserted with the new
- * name DST (which can specify a new path for the object) as an atomic
- * operation. The names are interpreted relative to SRC_LOC_ID and
+ * group. The original name SRC is unlinked from the group graph
+ * and the inserted with the new name DST (which can specify a
+ * new path for the object) as an atomic operation. The names
+ * are interpreted relative to SRC_LOC_ID and
* DST_LOC_ID, which are either file IDs or group ID.
*
* Return: Non-negative on success/Negative on failure
@@ -1099,11 +1099,11 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_move_rename_dest_cb
+ * Function: H5L_move_dest_cb
*
* Purpose: Second callback for moving and renaming an object. This routine
* inserts a new link into the group returned by the traversal.
- * It is called by H5L_move_rename_cb.
+ * It is called by H5L_move_cb.
*
* Return: Non-negative on success/Negative on failure
*
@@ -1113,14 +1113,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_move_rename_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
+H5L_move_dest_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
H5G_loc_t *obj_loc, void *_udata/*in,out*/)
{
H5L_trav_ud10_t *udata = (H5L_trav_ud10_t *)_udata; /* User data passed in */
H5RS_str_t *dst_name_r = NULL; /* Ref-counted version of dest name */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_move_rename_dest_cb)
+ FUNC_ENTER_NOAPI_NOINIT(H5L_move_dest_cb)
/* Make sure an object with this name doesn't already exist */
if(obj_loc != NULL)
@@ -1157,7 +1157,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5L_move_rename_cb
+ * Function: H5L_move_cb
*
* Purpose: Callback for moving and renaming an object. This routine
* replaces the names of open objects with the moved object
@@ -1171,7 +1171,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5L_move_rename_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
+H5L_move_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t *lnk,
H5G_loc_t *obj_loc, void *_udata/*in,out*/)
{
H5L_trav_ud4_t *udata = (H5L_trav_ud4_t *)_udata; /* User data passed in */
@@ -1181,7 +1181,7 @@ H5L_move_rename_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t
char * orig_name = NULL; /* The name of the link in this group */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5L_move_rename_cb)
+ FUNC_ENTER_NOAPI_NOINIT(H5L_move_cb)
/* Check if the name in this group resolved to a valid link */
if(obj_loc == NULL)
@@ -1189,7 +1189,7 @@ H5L_move_rename_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t
/* Check for operations on '.' */
if(lnk == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "the name of a link must be supplied to move or rename")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "the name of a link must be supplied to move or copy")
/* Get object type */
switch(lnk->type) {
@@ -1217,7 +1217,7 @@ H5L_move_rename_cb(H5G_loc_t *grp_loc/*in*/, const char *name, const H5O_link_t
orig_name = H5MM_xstrdup(name);
/* Insert the link into its new location */
- if(H5G_traverse(udata->dst_loc, udata->dst_name, H5G_TARGET_NORMAL, H5L_move_rename_dest_cb, &udata_out, udata->dxpl_id) < 0)
+ if(H5G_traverse(udata->dst_loc, udata->dst_name, H5G_TARGET_NORMAL, H5L_move_dest_cb, &udata_out, udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to follow symbolic link")
/* If this is a move and not a copy operation, change the object's name and remove the old link */
@@ -1253,7 +1253,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5L_move
*
- * Purpose: Atomically move and rename or copy a link.
+ * Purpose: Atomically move or copy a link.
*
* Creates a copy of a link in a new destination with a new name.
* SRC_LOC and SRC_NAME together define the link's original
@@ -1317,7 +1317,7 @@ H5L_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
udata.dxpl_id = dxpl_id;
/* Do the move */
- if(H5G_traverse(src_loc, src_name, H5G_TARGET_MOUNT|H5G_TARGET_SLINK, H5L_move_rename_cb, &udata, dxpl_id) < 0)
+ if(H5G_traverse(src_loc, src_name, H5G_TARGET_MOUNT|H5G_TARGET_SLINK, H5L_move_cb, &udata, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to find link")
done:
diff --git a/src/H5Plcpl.c b/src/H5Plcpl.c
index 927bfc9..55c3c58 100644
--- a/src/H5Plcpl.c
+++ b/src/H5Plcpl.c
@@ -29,7 +29,7 @@
/*-------------------------------------------------------------------------
* Function: H5Pset_create_intermediate_group
*
- * Purpose: set crt_intmd_group so that H5Lcreate(), H5Llink, etc.
+ * Purpose: set crt_intmd_group so that H5Lcreate_*, H5Llink, etc.
* will create missing groups along the given path "name"
*
* Note: XXX: This property should really be an access property. -QAK
@@ -67,7 +67,7 @@ done:
* Function: H5Pget_create_intermediate_group
*
* Purpose: Returns the crt_intmd_group, which is set to create missing
- * groups during H5Lcreate, etc.
+ * groups during H5Llink, etc.
*
* Return: Non-negative on success/Negative on failure
*
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 4c6eb87..e842c78 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -150,7 +150,7 @@ done:
* into a "named", immutable type.
*
* The resulting ID should be linked into the file with
- * H5Lcreate or it will be deleted when closed.
+ * H5Llink or it will be deleted when closed.
*
* Return: Non-negative on success/Negative on failure
*
diff --git a/test/links.c b/test/links.c
index 1ad35af..a2da2e6 100644
--- a/test/links.c
+++ b/test/links.c
@@ -699,14 +699,14 @@ test_h5l_create(hid_t fapl)
if((group_id = H5Gcreate_expand(file_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR;
/* Link nameless datatype into nameless group */
- if(H5Lcreate(group_id, "datatype", type_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Llink(group_id, "datatype", type_id, H5P_DEFAULT)<0) TEST_ERROR;
/* Create LCPL with intermediate group creation flag set */
if((lcpl_id = H5Pcreate(H5P_LINK_CREATE)) <0) TEST_ERROR;
if(H5Pset_create_intermediate_group(lcpl_id, TRUE) <0) TEST_ERROR;
/* Link nameless dataset into nameless group with intermediate group */
- if(H5Lcreate(group_id, "inter_group/dataset", dset_id, lcpl_id)<0) TEST_ERROR;
+ if(H5Llink(group_id, "inter_group/dataset", dset_id, lcpl_id)<0) TEST_ERROR;
/* Close IDs for dataset and datatype */
if(H5Dclose(dset_id)<0) TEST_ERROR;
@@ -716,7 +716,7 @@ test_h5l_create(hid_t fapl)
if((type_id = H5Topen(group_id, "datatype"))<0) TEST_ERROR;
/* Link nameless group to root group and close the group ID*/
- if(H5Lcreate(file_id, "/group", group_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Llink(file_id, "/group", group_id, H5P_DEFAULT)<0) TEST_ERROR;
if(H5Gclose(group_id)<0) TEST_ERROR;
/* Open dataset through root group and verify its data */
@@ -797,7 +797,7 @@ test_lcpl(hid_t fapl)
/* Create and link a group with the default LCPL */
if((group_id = H5Gcreate_expand(file_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR;
- if(H5Lcreate(file_id, "/group", group_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Llink(file_id, "/group", group_id, H5P_DEFAULT)<0) TEST_ERROR;
if(H5Gclose(group_id)<0) TEST_ERROR;
/* Check that its character encoding is the default */
@@ -807,7 +807,7 @@ test_lcpl(hid_t fapl)
/* Create and commit a datatype with the default LCPL */
if((type_id =H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR;
if(H5Tcommit_expand(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR;
- if(H5Lcreate(file_id, "/type", type_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Llink(file_id, "/type", type_id, H5P_DEFAULT)<0) TEST_ERROR;
if(H5Tclose(type_id)<0) TEST_ERROR;
/* Check that its character encoding is the default */
@@ -821,7 +821,7 @@ test_lcpl(hid_t fapl)
/* Create a dataset using the default LCPL */
if ((dset_id = H5Dcreate_expand(file_id, H5T_NATIVE_INT, space_id, H5P_DEFAULT)) <0) TEST_ERROR;
- if(H5Lcreate(file_id, "/dataset", dset_id, H5P_DEFAULT)<0) TEST_ERROR;
+ if(H5Llink(file_id, "/dataset", dset_id, H5P_DEFAULT)<0) TEST_ERROR;
if(H5Dclose(dset_id)<0) TEST_ERROR;
/* Check that its character encoding is the default */
@@ -834,7 +834,7 @@ test_lcpl(hid_t fapl)
/* Create and link a group with the new LCPL */
if((group_id = H5Gcreate_expand(file_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR;
- if(H5Lcreate(file_id, "/group2", group_id, lcpl_id)<0) TEST_ERROR;
+ if(H5Llink(file_id, "/group2", group_id, lcpl_id)<0) TEST_ERROR;
if(H5Gclose(group_id)<0) TEST_ERROR;
/* Check that its character encoding is UTF-8 */
@@ -844,7 +844,7 @@ test_lcpl(hid_t fapl)
/* Create and commit a datatype with the new LCPL */
if((type_id =H5Tcopy(H5T_NATIVE_INT)) < 0) TEST_ERROR;
if(H5Tcommit_expand(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR;
- if(H5Lcreate(file_id, "/type2", type_id, lcpl_id)<0) TEST_ERROR;
+ if(H5Llink(file_id, "/type2", type_id, lcpl_id)<0) TEST_ERROR;
if(H5Tclose(type_id)<0) TEST_ERROR;
/* Check that its character encoding is UTF-8 */
@@ -853,7 +853,7 @@ test_lcpl(hid_t fapl)
/* Create a dataset using the new LCPL */
if ((dset_id = H5Dcreate_expand(file_id, H5T_NATIVE_INT, space_id, H5P_DEFAULT)) <0) TEST_ERROR;
- if(H5Lcreate(file_id, "/dataset2", dset_id, lcpl_id)<0) TEST_ERROR;
+ if(H5Llink(file_id, "/dataset2", dset_id, lcpl_id)<0) TEST_ERROR;
if(H5Dclose(dset_id)<0) TEST_ERROR;
/* Check that its character encoding is UTF-8 */
@@ -1233,7 +1233,7 @@ test_move_preserves(hid_t fapl_id)
if(H5Pset_char_encoding(lcpl_id, H5T_CSET_UTF8) < 0) TEST_ERROR;
/* Create a group with that lcpl */
if((group_id = H5Gcreate_expand(file_id, H5P_DEFAULT, H5P_DEFAULT)) <0) TEST_ERROR;
- if(H5Lcreate(file_id, "group", group_id, lcpl_id) < 0) TEST_ERROR;
+ if(H5Llink(file_id, "group", group_id, lcpl_id) < 0) TEST_ERROR;
if(H5Gclose(group_id) < 0) TEST_ERROR;
/* Get the group's link's creation time */
diff --git a/test/stab.c b/test/stab.c
index ec6343d..7c2f719 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -330,7 +330,7 @@ lifecycle(hid_t fapl)
/* Create group for testing lifecycle */
if((gid = H5Gcreate_expand(fid, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR
- if((H5Lcreate(fid, LIFECYCLE_TOP_GROUP, gid, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((H5Llink(fid, LIFECYCLE_TOP_GROUP, gid, H5P_DEFAULT)) < 0) TEST_ERROR
/* Query group creation property settings */
if(H5Pget_local_heap_size_hint(gcpl, &lheap_size_hint) < 0) TEST_ERROR;
@@ -789,7 +789,7 @@ no_compact(hid_t fapl)
/* Create group for testing lifecycle */
if((gid = H5Gcreate_expand(fid, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR
- if((H5Lcreate(fid, NO_COMPACT_TOP_GROUP, gid, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((H5Llink(fid, NO_COMPACT_TOP_GROUP, gid, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close GCPL */
if(H5Pclose(gcpl) < 0) TEST_ERROR;
@@ -920,7 +920,7 @@ gcpl_on_root(hid_t fapl)
/* Create a group and intermediate groups, to check if root group settings are inherited */
if((gid2 = H5Gcreate_expand(gid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
- if((H5Lcreate(gid, GCPL_ON_ROOT_BOTTOM_GROUP, gid2, lcpl)) < 0) TEST_ERROR
+ if((H5Llink(gid, GCPL_ON_ROOT_BOTTOM_GROUP, gid2, lcpl)) < 0) TEST_ERROR
/* Close LCPL */
if(H5Pclose(lcpl) < 0) TEST_ERROR;