summaryrefslogtreecommitdiffstats
path: root/src/H5Oshmesg.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-03-01 21:26:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-03-01 21:26:31 (GMT)
commit2e8b6c0223e6969e3840e2dfefdfa34a223f3e15 (patch)
tree2b2dae6d7e737de43d23ba0f4fb0a07596a21078 /src/H5Oshmesg.c
parent2618906fee4c3fe20c81c8b2b2d744af4f13e5a7 (diff)
downloadhdf5-2e8b6c0223e6969e3840e2dfefdfa34a223f3e15.zip
hdf5-2e8b6c0223e6969e3840e2dfefdfa34a223f3e15.tar.gz
hdf5-2e8b6c0223e6969e3840e2dfefdfa34a223f3e15.tar.bz2
[svn-r13440] Description:
Revise latest form of superblock format pretty drastically, to eliminate unused fields and move rarely used fields into superblock extension. Finished removing last vestiges of references to (never used) i"shared" object header message ID. Added object header messages for non-default v1 B-tree 'K' values and for driver info. Updated testfiles to reflect size changes, etc. Various minor cleanups, etc. Tested on: FreeBSD/32 6.2 (duty) Mac OS X/32 10.4.8 (amazon)
Diffstat (limited to 'src/H5Oshmesg.c')
-rw-r--r--src/H5Oshmesg.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/H5Oshmesg.c b/src/H5Oshmesg.c
index 05898a3..7ac5ed6 100644
--- a/src/H5Oshmesg.c
+++ b/src/H5Oshmesg.c
@@ -14,7 +14,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: James Laird <jlaird@hdfgroup.com>
+/* Programmer: James Laird <jlaird@hdfgroup.org>
* Monday, January 29, 2007
*
* Purpose: A message holding "implicitly shared object header message"
@@ -30,12 +30,12 @@
static void *H5O_shmesg_decode(H5F_t *f, hid_t dxpl_id, unsigned mesg_flags, const uint8_t *p);
static herr_t H5O_shmesg_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void *H5O_shmesg_copy(const void *_mesg, void *_dest);
+static void *H5O_shmesg_copy(const void *_mesg, void *_dest);
static size_t H5O_shmesg_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O_shmesg_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE *stream,
int indent, int fwidth);
-/* This message derives from H5O message class, for old fill value before version 1.5 */
+/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_SHMESG[1] = {{
H5O_SHMESG_ID, /*message id number */
"shared message table", /*message name for debugging */
@@ -78,11 +78,12 @@ static void *
H5O_shmesg_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags,
const uint8_t *p)
{
- H5O_shmesg_table_t *mesg = NULL;
- void *ret_value = NULL;
+ H5O_shmesg_table_t *mesg; /* Native message */
+ void *ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5O_shmesg_decode)
+ /* Sanity check */
HDassert(f);
HDassert(p);
@@ -95,7 +96,7 @@ H5O_shmesg_decode(H5F_t *f, hid_t UNUSED dxpl_id, unsigned UNUSED mesg_flags,
mesg->nindexes = *p++;
/* Set return value */
- ret_value = (void*)mesg;
+ ret_value = (void *)mesg;
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -105,8 +106,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5O_shmesg_encode
*
- * Purpose: Encode a shared message table message and return a pointer
- * to a newly allocated H5O_shmesg_table_t struct.
+ * Purpose: Encode a shared message table message.
*
* Return: Non-negative on success/Negative on failure
*
@@ -122,6 +122,7 @@ H5O_shmesg_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shmesg_encode)
+ /* Sanity check */
HDassert(f);
HDassert(p);
HDassert(mesg);
@@ -154,10 +155,11 @@ H5O_shmesg_copy(const void *_mesg, void *_dest)
{
const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
H5O_shmesg_table_t *dest = (H5O_shmesg_table_t *)_dest;
- void *ret_value = NULL;
+ void *ret_value;
FUNC_ENTER_NOAPI_NOINIT(H5O_shmesg_copy)
+ /* Sanity check */
HDassert(mesg);
if(!dest && NULL == (dest = H5MM_malloc(sizeof(H5O_shmesg_table_t))))
@@ -178,10 +180,7 @@ done:
* Function: H5O_shmesg_size
*
* Purpose: Returns the size of the raw message in bytes not counting the
- * message type or size fields, but only the data fields. This
- * function doesn't take into account alignment. The new fill
- * value message is fill value plus space allocation time and
- * fill value writing time and whether fill value is defined.
+ * message type or size fields, but only the data fields.
*
* Return: Success: Message data size in bytes w/o alignment.
* Failure: 0
@@ -192,15 +191,14 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_shmesg_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void *_mesg)
+H5O_shmesg_size(const H5F_t *f, hbool_t UNUSED disable_shared, const void UNUSED *_mesg)
{
- const H5O_shmesg_table_t *mesg = (const H5O_shmesg_table_t *)_mesg;
size_t ret_value;
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shmesg_size)
+ /* Sanity check */
HDassert(f);
- HDassert(mesg);
ret_value = 1 + /* Version number */
H5F_SIZEOF_ADDR(f) + /* Table address */
@@ -230,6 +228,7 @@ H5O_shmesg_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shmesg_debug)
+ /* Sanity check */
HDassert(f);
HDassert(mesg);
HDassert(stream);