summaryrefslogtreecommitdiffstats
path: root/src/H5Abtree2.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/H5Abtree2.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/H5Abtree2.c')
-rw-r--r--src/H5Abtree2.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 5fb37fe..14d7bb9 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -193,7 +193,7 @@ H5A_dense_btree2_name_store(void *_nrecord, const void *_udata)
/* Copy user information info native record */
nrecord->hash = udata->common.name_hash;
nrecord->flags = udata->common.flags;
- HDmemcpy(nrecord->id, udata->id, (size_t)H5A_DENSE_FHEAP_ID_LEN);
+ nrecord->id = udata->id;
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_name_store() */
@@ -283,7 +283,7 @@ H5A_dense_btree2_name_compare(const void *_bt2_udata, const void *_bt2_rec)
HDassert(fheap);
/* Check if the user's link and the B-tree's link have the same name */
- status = H5HF_op(fheap, bt2_udata->dxpl_id, bt2_rec->id, H5A_dense_fh_name_cmp, &fh_udata);
+ status = H5HF_op(fheap, bt2_udata->dxpl_id, &bt2_rec->id, H5A_dense_fh_name_cmp, &fh_udata);
HDassert(status >= 0);
/* Callback will set comparison value */
@@ -318,7 +318,7 @@ H5A_dense_btree2_name_encode(const H5F_t UNUSED *f, uint8_t *raw, const void *_n
/* Encode the record's fields */
UINT32ENCODE(raw, nrecord->hash)
*raw++ = nrecord->flags;
- HDmemcpy(raw, nrecord->id, (size_t)H5A_DENSE_FHEAP_ID_LEN);
+ UINT64ENCODE(raw, nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_name_encode() */
@@ -347,7 +347,7 @@ H5A_dense_btree2_name_decode(const H5F_t UNUSED *f, const uint8_t *raw, void *_n
/* Decode the record's fields */
UINT32DECODE(raw, nrecord->hash)
nrecord->flags = *raw++;
- HDmemcpy(nrecord->id, raw, (size_t)H5A_DENSE_FHEAP_ID_LEN);
+ UINT64DECODE(raw, nrecord->id);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_name_decode() */
@@ -371,15 +371,11 @@ H5A_dense_btree2_name_debug(FILE *stream, const H5F_t UNUSED *f, hid_t UNUSED dx
int indent, int fwidth, const void *_nrecord, const void UNUSED *_udata)
{
const H5A_dense_bt2_name_rec_t *nrecord = (const H5A_dense_bt2_name_rec_t *)_nrecord;
- unsigned u; /* Local index variable */
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_dense_btree2_name_debug)
- HDfprintf(stream, "%*s%-*s {%lx, ", indent, "", fwidth, "Record:",
- nrecord->hash);
- for(u = 0; u < H5A_DENSE_FHEAP_ID_LEN; u++)
- HDfprintf(stderr, "%02x%s", nrecord->id[u], (u < (H5A_DENSE_FHEAP_ID_LEN - 1) ? " " : ", "));
- HDfprintf(stderr, "%02x}\n", nrecord->flags);
+ HDfprintf(stream, "%*s%-*s {%lx, %Hx, %02x}", indent, "", fwidth, "Record:",
+ nrecord->hash, nrecord->id, nrecord->flags);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A_dense_btree2_name_debug() */