summaryrefslogtreecommitdiffstats
path: root/src/H5Ostab.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Ostab.c')
-rw-r--r--src/H5Ostab.c56
1 files changed, 26 insertions, 30 deletions
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index e1a5d0a..7600f47 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -23,31 +23,29 @@
#define PABLO_MASK H5O_stab_mask
/* PRIVATE PROTOTYPES */
-static void *H5O_stab_decode(H5F_t *f, size_t raw_size, const uint8 *p);
-static herr_t H5O_stab_encode(H5F_t *f, size_t size, uint8 *p,
- const void *_mesg);
-static void *H5O_stab_copy(const void *_mesg, void *_dest);
-static size_t H5O_stab_size(H5F_t *f, const void *_mesg);
-static herr_t H5O_stab_debug(H5F_t *f, const void *_mesg,
- FILE * stream, intn indent, intn fwidth);
+static void *H5O_stab_decode(H5F_t *f, size_t raw_size, const uint8 *p);
+static herr_t H5O_stab_encode(H5F_t *f, size_t size, uint8 *p,
+ const void *_mesg);
+static void *H5O_stab_copy(const void *_mesg, void *_dest);
+static size_t H5O_stab_size(H5F_t *f, const void *_mesg);
+static herr_t H5O_stab_debug(H5F_t *f, const void *_mesg,
+ FILE * stream, intn indent, intn fwidth);
/* This message derives from H5O */
-const H5O_class_t H5O_STAB[1] =
-{
- {
- H5O_STAB_ID, /*message id number */
- "stab", /*message name for debugging */
- sizeof(H5O_stab_t), /*native message size */
- H5O_stab_decode, /*decode message */
- H5O_stab_encode, /*encode message */
- H5O_stab_copy, /*copy the native value */
- H5O_stab_size, /*size of symbol table entry */
- NULL, /*default reset method */
- H5O_stab_debug, /*debug the message */
- }};
+const H5O_class_t H5O_STAB[1] = {{
+ H5O_STAB_ID, /*message id number */
+ "stab", /*message name for debugging */
+ sizeof(H5O_stab_t), /*native message size */
+ H5O_stab_decode, /*decode message */
+ H5O_stab_encode, /*encode message */
+ H5O_stab_copy, /*copy the native value */
+ H5O_stab_size, /*size of symbol table entry */
+ NULL, /*default reset method */
+ H5O_stab_debug, /*debug the message */
+}};
/* Interface initialization */
-static hbool_t interface_initialize_g = FALSE;
+static hbool_t interface_initialize_g = FALSE;
#define INTERFACE_INIT NULL
/*-------------------------------------------------------------------------
@@ -68,7 +66,7 @@ static hbool_t interface_initialize_g = FALSE;
*
*-------------------------------------------------------------------------
*/
-static void *
+static void *
H5O_stab_decode(H5F_t *f, size_t raw_size, const uint8 *p)
{
H5O_stab_t *stab;
@@ -77,7 +75,7 @@ H5O_stab_decode(H5F_t *f, size_t raw_size, const uint8 *p)
/* check args */
assert(f);
- assert(raw_size == 2 * H5F_SIZEOF_ADDR(f));
+ assert(raw_size == H5O_ALIGN (2 * H5F_SIZEOF_ADDR(f)));
assert(p);
/* decode */
@@ -114,7 +112,7 @@ H5O_stab_encode(H5F_t *f, size_t raw_size, uint8 *p, const void *_mesg)
/* check args */
assert(f);
- assert(raw_size == 2 * H5F_SIZEOF_ADDR(f));
+ assert(raw_size == H5O_ALIGN (2 * H5F_SIZEOF_ADDR(f)));
assert(p);
assert(stab);
@@ -144,7 +142,7 @@ H5O_stab_encode(H5F_t *f, size_t raw_size, uint8 *p, const void *_mesg)
*
*-------------------------------------------------------------------------
*/
-void *
+void *
H5O_stab_fast(const H5G_cache_t *cache, const H5O_class_t *type, void *_mesg)
{
H5O_stab_t *stab = NULL;
@@ -156,10 +154,8 @@ H5O_stab_fast(const H5G_cache_t *cache, const H5O_class_t *type, void *_mesg)
assert(type);
if (H5O_STAB == type) {
- if (_mesg)
- stab = (H5O_stab_t *) _mesg;
- else
- stab = H5MM_xcalloc(1, sizeof(H5O_stab_t));
+ if (_mesg) stab = (H5O_stab_t *) _mesg;
+ else stab = H5MM_xcalloc(1, sizeof(H5O_stab_t));
stab->btree_addr = cache->stab.btree_addr;
stab->heap_addr = cache->stab.heap_addr;
}
@@ -184,7 +180,7 @@ H5O_stab_fast(const H5G_cache_t *cache, const H5O_class_t *type, void *_mesg)
*
*-------------------------------------------------------------------------
*/
-static void *
+static void *
H5O_stab_copy(const void *_mesg, void *_dest)
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;