diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-09-22 17:33:58 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-09-22 17:33:58 (GMT) |
commit | 926cfe52cc14c735e53709e8b8dc3bfc4d0f8dd8 (patch) | |
tree | ad06b825bd0d4dc30c88ab14dda1abe0c87f4ed5 /src/H5B2cache.c | |
parent | 531822d443296bfe74a76aed6c121ec8421508a5 (diff) | |
download | hdf5-926cfe52cc14c735e53709e8b8dc3bfc4d0f8dd8.zip hdf5-926cfe52cc14c735e53709e8b8dc3bfc4d0f8dd8.tar.gz hdf5-926cfe52cc14c735e53709e8b8dc3bfc4d0f8dd8.tar.bz2 |
[svn-r15677] Description:
Bring r15676 back from trunk:
Centralize all macros for declaring "magic numbers"/signatures for
objects in the file into src/H5Fprivate.h, so it's easier to know what
values have already been defined, etc.
Tested on:
Mac OS X/32 10.5.5 (amazon)
Too minor to require h5committest
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r-- | src/H5B2cache.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c index f6d95ce..1d34eb0 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -188,9 +188,9 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, vo p = hdr; /* Magic number */ - if(HDmemcmp(p, H5B2_HDR_MAGIC, (size_t)H5B2_SIZEOF_MAGIC)) + if(HDmemcmp(p, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree header signature") - p += H5B2_SIZEOF_MAGIC; + p += H5_SIZEOF_MAGIC; /* Version */ if(*p++ != H5B2_HDR_VERSION) @@ -307,8 +307,8 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B p = hdr; /* Magic number */ - HDmemcpy(p, H5B2_HDR_MAGIC, (size_t)H5B2_SIZEOF_MAGIC); - p += H5B2_SIZEOF_MAGIC; + HDmemcpy(p, H5B2_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC); + p += H5_SIZEOF_MAGIC; /* Version # */ *p++ = H5B2_HDR_VERSION; @@ -522,9 +522,9 @@ H5B2_cache_internal_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_uda p = shared->page; /* Magic number */ - if(HDmemcmp(p, H5B2_INT_MAGIC, (size_t)H5B2_SIZEOF_MAGIC)) + if(HDmemcmp(p, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree internal node signature") - p += H5B2_SIZEOF_MAGIC; + p += H5_SIZEOF_MAGIC; /* Version */ if(*p++ != H5B2_INT_VERSION) @@ -641,8 +641,8 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr p = shared->page; /* Magic number */ - HDmemcpy(p, H5B2_INT_MAGIC, (size_t)H5B2_SIZEOF_MAGIC); - p += H5B2_SIZEOF_MAGIC; + HDmemcpy(p, H5B2_INT_MAGIC, (size_t)H5_SIZEOF_MAGIC); + p += H5_SIZEOF_MAGIC; /* Version # */ *p++ = H5B2_INT_VERSION; @@ -877,9 +877,9 @@ H5B2_cache_leaf_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_nrec, v p = shared->page; /* Magic number */ - if(HDmemcmp(p, H5B2_LEAF_MAGIC, (size_t)H5B2_SIZEOF_MAGIC)) + if(HDmemcmp(p, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC)) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, NULL, "wrong B-tree leaf node signature") - p += H5B2_SIZEOF_MAGIC; + p += H5_SIZEOF_MAGIC; /* Version */ if(*p++ != H5B2_LEAF_VERSION) @@ -977,8 +977,8 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5 p = shared->page; /* magic number */ - HDmemcpy(p, H5B2_LEAF_MAGIC, (size_t)H5B2_SIZEOF_MAGIC); - p += H5B2_SIZEOF_MAGIC; + HDmemcpy(p, H5B2_LEAF_MAGIC, (size_t)H5_SIZEOF_MAGIC); + p += H5_SIZEOF_MAGIC; /* version # */ *p++ = H5B2_LEAF_VERSION; |