summaryrefslogtreecommitdiffstats
path: root/src/H5Orefcount.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-05-07 05:16:51 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-05-07 05:16:51 (GMT)
commitc0c8efc4d74df59791521076d905127b37f9efda (patch)
treed015074b36f2737a985b0c986e8510b0c3a9581d /src/H5Orefcount.c
parent7a5b440fa89538b94088cc89a1188aef27033e74 (diff)
downloadhdf5-c0c8efc4d74df59791521076d905127b37f9efda.zip
hdf5-c0c8efc4d74df59791521076d905127b37f9efda.tar.gz
hdf5-c0c8efc4d74df59791521076d905127b37f9efda.tar.bz2
Normalization of object header code
Diffstat (limited to 'src/H5Orefcount.c')
-rw-r--r--src/H5Orefcount.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index ccd21b8..52eee14 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -32,36 +32,36 @@
/* PRIVATE PROTOTYPES */
static void * H5O__refcount_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, unsigned *ioflags,
size_t p_size, const uint8_t *p);
-static herr_t H5O_refcount_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
-static void * H5O_refcount_copy(const void *_mesg, void *_dest);
-static size_t H5O_refcount_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
+static herr_t H5O__refcount_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg);
+static void * H5O__refcount_copy(const void *_mesg, void *_dest);
+static size_t H5O__refcount_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg);
static herr_t H5O__refcount_free(void *_mesg);
-static herr_t H5O_refcount_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
- const H5O_copy_t *cpy_info, void *udata);
+static herr_t H5O__refcount_pre_copy_file(H5F_t *file_src, const void *mesg_src, hbool_t *deleted,
+ const H5O_copy_t *cpy_info, void *udata);
static herr_t H5O__refcount_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth);
/* This message derives from H5O message class */
const H5O_msg_class_t H5O_MSG_REFCOUNT[1] = {{
- H5O_REFCOUNT_ID, /*message id number */
- "refcount", /*message name for debugging */
- sizeof(H5O_refcount_t), /*native message size */
- 0, /* messages are sharable? */
- H5O__refcount_decode, /*decode message */
- H5O_refcount_encode, /*encode message */
- H5O_refcount_copy, /*copy the native value */
- H5O_refcount_size, /*size of symbol table entry */
- NULL, /*default reset method */
- H5O__refcount_free, /* free method */
- NULL, /* file delete method */
- NULL, /* link method */
- NULL, /*set share method */
- NULL, /*can share method */
- H5O_refcount_pre_copy_file, /* pre copy native value to file */
- NULL, /* copy native value to file */
- NULL, /* post copy native value to file */
- NULL, /* get creation index */
- NULL, /* set creation index */
- H5O__refcount_debug /*debug the message */
+ H5O_REFCOUNT_ID, /*message id number */
+ "refcount", /*message name for debugging */
+ sizeof(H5O_refcount_t), /*native message size */
+ 0, /* messages are sharable? */
+ H5O__refcount_decode, /*decode message */
+ H5O__refcount_encode, /*encode message */
+ H5O__refcount_copy, /*copy the native value */
+ H5O__refcount_size, /*size of symbol table entry */
+ NULL, /*default reset method */
+ H5O__refcount_free, /* free method */
+ NULL, /* file delete method */
+ NULL, /* link method */
+ NULL, /*set share method */
+ NULL, /*can share method */
+ H5O__refcount_pre_copy_file, /* pre copy native value to file */
+ NULL, /* copy native value to file */
+ NULL, /* post copy native value to file */
+ NULL, /* get creation index */
+ NULL, /* set creation index */
+ H5O__refcount_debug /*debug the message */
}};
/* Current version of ref. count information */
@@ -119,7 +119,7 @@ done:
} /* end H5O__refcount_decode() */
/*-------------------------------------------------------------------------
- * Function: H5O_refcount_encode
+ * Function: H5O__refcount_encode
*
* Purpose: Encodes a message.
*
@@ -131,12 +131,12 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
- const void *_mesg)
+H5O__refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p,
+ const void *_mesg)
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(f);
@@ -150,10 +150,10 @@ H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
UINT32ENCODE(p, *refcount);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_refcount_encode() */
+} /* end H5O__refcount_encode() */
/*-------------------------------------------------------------------------
- * Function: H5O_refcount_copy
+ * Function: H5O__refcount_copy
*
* Purpose: Copies a message from _MESG to _DEST, allocating _DEST if
* necessary.
@@ -167,13 +167,13 @@ H5O_refcount_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shar
*-------------------------------------------------------------------------
*/
static void *
-H5O_refcount_copy(const void *_mesg, void *_dest)
+H5O__refcount_copy(const void *_mesg, void *_dest)
{
const H5O_refcount_t *refcount = (const H5O_refcount_t *)_mesg;
H5O_refcount_t * dest = (H5O_refcount_t *)_dest;
void * ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
/* check args */
HDassert(refcount);
@@ -188,10 +188,10 @@ H5O_refcount_copy(const void *_mesg, void *_dest)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_refcount_copy() */
+} /* end H5O__refcount_copy() */
/*-------------------------------------------------------------------------
- * Function: H5O_refcount_size
+ * Function: H5O__refcount_size
*
* Purpose: Returns the size of the raw message in bytes not counting
* the message type or size fields, but only the data fields.
@@ -206,19 +206,19 @@ done:
*-------------------------------------------------------------------------
*/
static size_t
-H5O_refcount_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
- const void H5_ATTR_UNUSED *_mesg)
+H5O__refcount_size(const H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared,
+ const void H5_ATTR_UNUSED *_mesg)
{
- size_t ret_value; /* Return value */
+ size_t ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* Set return value */
ret_value = 1 /* Version */
+ 4; /* Ref. count */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5O_refcount_size() */
+} /* end H5O__refcount_size() */
/*-------------------------------------------------------------------------
* Function: H5O__refcount_free
@@ -245,7 +245,7 @@ H5O__refcount_free(void *mesg)
} /* end H5O__refcount_free() */
/*-------------------------------------------------------------------------
- * Function: H5O_refcount_pre_copy_file
+ * Function: H5O__refcount_pre_copy_file
*
* Purpose: Perform any necessary actions before copying message between
* files.
@@ -259,11 +259,11 @@ H5O__refcount_free(void *mesg)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
- hbool_t *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info,
- void H5_ATTR_UNUSED *udata)
+H5O__refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSED *native_src,
+ hbool_t *deleted, const H5O_copy_t H5_ATTR_UNUSED *cpy_info,
+ void H5_ATTR_UNUSED *udata)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
/* check args */
HDassert(deleted);
@@ -275,7 +275,7 @@ H5O_refcount_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UN
*deleted = TRUE;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5O_refcount_pre_copy_file() */
+} /* end H5O__refcount_pre_copy_file() */
/*-------------------------------------------------------------------------
* Function: H5O__refcount_debug