summaryrefslogtreecommitdiffstats
path: root/src/H5Omessage.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-18 14:32:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-18 14:32:27 (GMT)
commit9155785889af8ae809fb5e9cdbb330710a174d72 (patch)
tree1aa6540340928a3c5b05bb240540ce6aa48ec6be /src/H5Omessage.c
parentfa11904aabebe64af2d90be3b3203203569e0bcb (diff)
downloadhdf5-9155785889af8ae809fb5e9cdbb330710a174d72.zip
hdf5-9155785889af8ae809fb5e9cdbb330710a174d72.tar.gz
hdf5-9155785889af8ae809fb5e9cdbb330710a174d72.tar.bz2
[svn-r13152] Description:
Add anotherdense/shared attribute test. Clean up minor attribute/object header codelets, in preparation for adding creation index to attributes. Tested on: Mac OS X/32 10.4.8 (amazon) FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src/H5Omessage.c')
-rw-r--r--src/H5Omessage.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 54bbdf4..2e01516 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -103,7 +103,7 @@ static unsigned H5O_new_mesg(H5F_t *f, H5O_t *oh, unsigned *flags,
const H5O_msg_class_t *orig_type, const void *orig_mesg, H5O_shared_t *sh_mesg,
const H5O_msg_class_t **new_type, const void **new_mesg, hid_t dxpl_id,
unsigned *oh_flags_ptr);
-static herr_t H5O_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
+static herr_t H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
const H5O_msg_class_t *type, const void *mesg, unsigned flags,
unsigned update_flags, unsigned *oh_flags_ptr);
@@ -272,8 +272,8 @@ H5O_msg_append_real(H5F_t *f, hid_t dxpl_id, H5O_t *oh, const H5O_msg_class_t *t
if((idx = H5O_new_mesg(f, oh, &mesg_flags, type, mesg, &sh_mesg, &new_type, &new_mesg, dxpl_id, oh_flags_ptr)) == UFAIL)
HGOTO_ERROR(H5E_OHDR, H5E_NOSPACE, FAIL, "unable to create new message")
- /* Write the information to the message */
- if(H5O_write_mesg(f, dxpl_id, oh, idx, new_type, new_mesg, mesg_flags, update_flags, oh_flags_ptr) < 0)
+ /* Copy the information for the message */
+ if(H5O_copy_mesg(f, dxpl_id, oh, idx, new_type, new_mesg, mesg_flags, update_flags, oh_flags_ptr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to write message")
#ifdef H5O_DEBUG
H5O_assert(oh);
@@ -458,8 +458,8 @@ H5O_msg_write_real(H5F_t *f, H5O_t *oh, const H5O_msg_class_t *type,
write_mesg = &sh_mesg;
} /* end if */
- /* Write the information to the message */
- if(H5O_write_mesg(f, dxpl_id, oh, idx, write_type, write_mesg, mesg_flags, update_flags, oh_flags_ptr) < 0)
+ /* Copy the information for the message */
+ if(H5O_copy_mesg(f, dxpl_id, oh, idx, write_type, write_mesg, mesg_flags, update_flags, oh_flags_ptr) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to write message")
#ifdef H5O_DEBUG
H5O_assert(oh);
@@ -2001,9 +2001,10 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5O_write_mesg
+ * Function: H5O_copy_mesg
*
- * Purpose: Write message to object header
+ * Purpose: Make a copy of the native object for an object header's
+ * native message info
*
* Return: Non-negative on success/Negative on failure
*
@@ -2013,14 +2014,14 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
+H5O_copy_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
const H5O_msg_class_t *type, const void *mesg, unsigned mesg_flags,
unsigned update_flags, unsigned *oh_flags_ptr)
{
H5O_mesg_t *idx_msg; /* Pointer to message to modify */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5O_write_mesg)
+ FUNC_ENTER_NOAPI_NOINIT(H5O_copy_mesg)
/* check args */
HDassert(f);
@@ -2032,10 +2033,10 @@ H5O_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
/* Set pointer to the correct message */
idx_msg = &oh->mesg[idx];
- /* Reset existing native information */
+ /* Reset existing native information for the header's message */
H5O_msg_reset_real(type, idx_msg->native);
- /* Copy the native value for the message */
+ /* Copy the native object for the message */
if(NULL == (idx_msg->native = (type->copy)(mesg, idx_msg->native)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to copy message to object header")
@@ -2053,7 +2054,7 @@ H5O_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *oh, unsigned idx,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_write_mesg() */
+} /* end H5O_copy_mesg() */
/*-------------------------------------------------------------------------