summaryrefslogtreecommitdiffstats
path: root/src/H5Ocopy.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-19 14:54:46 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-19 14:54:46 (GMT)
commit46598f35cafc38ff166783e57d5622f4a1a3153e (patch)
treec546aa50b62b9e0dff539b8a95c364b64300d4ea /src/H5Ocopy.c
parentb6bd503a59621bf51e1eec9d40547a7c8b1858d8 (diff)
downloadhdf5-46598f35cafc38ff166783e57d5622f4a1a3153e.zip
hdf5-46598f35cafc38ff166783e57d5622f4a1a3153e.tar.gz
hdf5-46598f35cafc38ff166783e57d5622f4a1a3153e.tar.bz2
[svn-r13155] Description:
Add "set_crt_index" and "get_crt_index" methods for the object header message class. Unify fractal heap definitions for shared messages and attributes, under "object header" fractal heap definitions. Initial code for adding creation order index to object header messages. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Ocopy.c')
-rw-r--r--src/H5Ocopy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 4e457ac..8c263f5 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -331,12 +331,12 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
HGOTO_ERROR(H5E_OHDR, H5E_CANTFLUSH, FAIL, "unable to flush object header messages")
/* Allocate the destination object header and fill in header fields */
- if(NULL == (oh_dst = H5FL_MALLOC(H5O_t)))
+ if(NULL == (oh_dst = H5FL_CALLOC(H5O_t)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Initialize header information */
oh_dst->version = oh_src->version;
- oh_dst->nlink = 0;
+ oh_dst->flags = oh_src->flags;
oh_dst->skipped_mesg_size = oh_src->skipped_mesg_size;
oh_dst->sizeof_size = H5F_SIZEOF_SIZE(oloc_dst->file);
oh_dst->sizeof_addr = H5F_SIZEOF_ADDR(oloc_dst->file);
@@ -412,7 +412,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
}
HDassert(copy_type);
- if(copy_type->pre_copy_file ) {
+ if(copy_type->pre_copy_file) {
/*
* Decode the message if necessary. If the message is shared then do
* a shared message, ignoring the message type.
@@ -547,7 +547,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
/* Calculate how big the destination object header will be on disk.
* This isn't necessarily the same size as the original.
*/
- dst_oh_size = H5O_SIZEOF_HDR_OH(oh_dst);
+ dst_oh_size = H5O_SIZEOF_HDR(oh_dst);
/* Add space for messages. */
for(mesgno = 0; mesgno < oh_dst->nmesgs; mesgno++) {
@@ -573,7 +573,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
* treatment. This has to happen after the destination header has been
* allocated.
*/
- HDassert(H5O_SIZEOF_HDR_OH(oh_src) == H5O_SIZEOF_HDR_OH(oh_dst));
+ HDassert(H5O_SIZEOF_HDR(oh_src) == H5O_SIZEOF_HDR(oh_dst));
HDassert(H5O_SIZEOF_MSGHDR_OH(oh_src) == H5O_SIZEOF_MSGHDR_OH(oh_dst));
msghdr_size = H5O_SIZEOF_MSGHDR_OH(oh_src);
@@ -584,8 +584,8 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
* a magic number that isn't.
*/
HDmemcpy(current_pos, oh_src->chunk[0].image,
- (size_t)(H5O_SIZEOF_HDR_OH(oh_dst) - H5O_SIZEOF_CHKSUM_OH(oh_dst)));
- current_pos += H5O_SIZEOF_HDR_OH(oh_dst) - H5O_SIZEOF_CHKSUM_OH(oh_dst);
+ (size_t)(H5O_SIZEOF_HDR(oh_dst) - H5O_SIZEOF_CHKSUM_OH(oh_dst)));
+ current_pos += H5O_SIZEOF_HDR(oh_dst) - H5O_SIZEOF_CHKSUM_OH(oh_dst);
/* Copy each message that wasn't dirtied above */
null_msgs = 0;