summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-22 17:13:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-22 17:13:21 (GMT)
commit071e281a3df70893b975d65a3a21f11a47cb43aa (patch)
tree3c12a5c093c4410929df792a5e6112858b8d212b /src/H5Ocache.c
parent02156246da8fd221b655458771f2b83ee20c9dfe (diff)
downloadhdf5-071e281a3df70893b975d65a3a21f11a47cb43aa.zip
hdf5-071e281a3df70893b975d65a3a21f11a47cb43aa.tar.gz
hdf5-071e281a3df70893b975d65a3a21f11a47cb43aa.tar.bz2
[svn-r15676] Description:
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.4 (amazon) in debug mode Mac OS X/32 10.5.4 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 7d1f001..35b4e07 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -167,9 +167,9 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * _udata1,
/* Check for magic number */
/* (indicates version 2 or later) */
- if(!HDmemcmp(p, H5O_HDR_MAGIC, (size_t)H5O_SIZEOF_MAGIC)) {
+ if(!HDmemcmp(p, H5O_HDR_MAGIC, (size_t)H5_SIZEOF_MAGIC)) {
/* Magic number */
- p += H5O_SIZEOF_MAGIC;
+ p += H5_SIZEOF_MAGIC;
/* Version */
oh->version = *p++;
@@ -349,9 +349,9 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * _udata1,
/* Check for magic # on chunks > 0 in later versions of the format */
if(chunkno > 0 && oh->version > H5O_VERSION_1) {
/* Magic number */
- if(HDmemcmp(p, H5O_CHK_MAGIC, (size_t)H5O_SIZEOF_MAGIC))
+ if(HDmemcmp(p, H5O_CHK_MAGIC, (size_t)H5_SIZEOF_MAGIC))
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "wrong object header chunk signature")
- p += H5O_SIZEOF_MAGIC;
+ p += H5_SIZEOF_MAGIC;
} /* end if */
/* Decode messages from this chunk */
@@ -682,8 +682,8 @@ H5O_assert(oh);
uint64_t chunk0_size = oh->chunk[0].size - H5O_SIZEOF_HDR(oh); /* Size of chunk 0's data */
/* Verify magic number */
- HDassert(!HDmemcmp(p, H5O_HDR_MAGIC, H5O_SIZEOF_MAGIC));
- p += H5O_SIZEOF_MAGIC;
+ HDassert(!HDmemcmp(p, H5O_HDR_MAGIC, H5_SIZEOF_MAGIC));
+ p += H5_SIZEOF_MAGIC;
/* Version */
*p++ = oh->version;
@@ -775,7 +775,7 @@ H5O_assert(oh);
/* Sanity checks */
if(oh->version > H5O_VERSION_1)
/* Make certain the magic # is present */
- HDassert(!HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5O_SIZEOF_MAGIC));
+ HDassert(!HDmemcmp(oh->chunk[u].image, (u == 0 ? H5O_HDR_MAGIC : H5O_CHK_MAGIC), H5_SIZEOF_MAGIC));
else
/* Gaps should never occur in version 1 of the format */
HDassert(oh->chunk[u].gap == 0);