diff options
Diffstat (limited to 'src/H5Opline.c')
-rw-r--r-- | src/H5Opline.c | 52 |
1 files changed, 19 insertions, 33 deletions
diff --git a/src/H5Opline.c b/src/H5Opline.c index 5240f72..e4101cd 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -31,14 +31,13 @@ #define PABLO_MASK H5O_pline_mask /* Interface initialization */ -static int interface_initialize_g = 0; #define INTERFACE_INIT NULL #define H5O_PLINE_VERSION 1 static herr_t H5O_pline_encode (H5F_t *f, uint8_t *p, const void *mesg); static void *H5O_pline_decode (H5F_t *f, hid_t dxpl_id, const uint8_t *p, H5O_shared_t *sh); -static void *H5O_pline_copy (const void *_mesg, void *_dest); +static void *H5O_pline_copy (const void *_mesg, void *_dest, unsigned update_flags); static size_t H5O_pline_size (H5F_t *f, const void *_mesg); static herr_t H5O_pline_reset (void *_mesg); static herr_t H5O_pline_free (void *_mesg); @@ -93,7 +92,7 @@ H5O_pline_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p, unsigned version; size_t i, j, n, name_length; - FUNC_ENTER_NOAPI(H5O_pline_decode, NULL); + FUNC_ENTER_NOAPI_NOINIT(H5O_pline_decode); /* check args */ assert(p); @@ -184,9 +183,8 @@ H5O_pline_encode (H5F_t UNUSED *f, uint8_t *p/*out*/, const void *mesg) size_t i, j, name_length; const char *name=NULL; H5Z_class_t *cls=NULL; - herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5O_pline_encode, FAIL); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_encode); /* Check args */ assert (p); @@ -229,8 +227,7 @@ H5O_pline_encode (H5F_t UNUSED *f, uint8_t *p/*out*/, const void *mesg) UINT32ENCODE(p, 0); } -done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } @@ -253,14 +250,14 @@ done: *------------------------------------------------------------------------- */ static void * -H5O_pline_copy (const void *_src, void *_dst/*out*/) +H5O_pline_copy (const void *_src, void *_dst/*out*/, unsigned UNUSED update_flags) { const H5O_pline_t *src = (const H5O_pline_t *)_src; H5O_pline_t *dst = (H5O_pline_t *)_dst; size_t i; - H5O_pline_t *ret_value = NULL; + H5O_pline_t *ret_value; - FUNC_ENTER_NOAPI(H5O_pline_copy, NULL); + FUNC_ENTER_NOAPI_NOINIT(H5O_pline_copy); if (!dst && NULL==(dst = H5FL_MALLOC (H5O_pline_t))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); @@ -330,15 +327,15 @@ static size_t H5O_pline_size (H5F_t UNUSED *f, const void *mesg) { const H5O_pline_t *pline = (const H5O_pline_t*)mesg; - size_t i, size, name_len; + size_t i, name_len; const char *name = NULL; H5Z_class_t *cls = NULL; size_t ret_value; /* Return value */ - FUNC_ENTER_NOAPI(H5O_pline_size, 0); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_size); /* Message header */ - size = 1 + /*version */ + ret_value = 1 + /*version */ 1 + /*number of filters */ 6; /*reserved */ @@ -350,21 +347,17 @@ H5O_pline_size (H5F_t UNUSED *f, const void *mesg) name_len = name ? HDstrlen(name)+1 : 0; - size += 2 + /*filter identification number */ + ret_value += 2 + /*filter identification number */ 2 + /*name length */ 2 + /*flags */ 2 + /*number of client data values */ H5O_ALIGN(name_len); /*length of the filter name */ - size += pline->filter[i].cd_nelmts * 4; + ret_value += pline->filter[i].cd_nelmts * 4; if (pline->filter[i].cd_nelmts % 2) - size += 4; + ret_value += 4; } - /* Set return value */ - ret_value=size; - -done: FUNC_LEAVE_NOAPI(ret_value); } @@ -389,9 +382,8 @@ H5O_pline_reset (void *mesg) { H5O_pline_t *pline = (H5O_pline_t*)mesg; size_t i; - herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5O_pline_reset, FAIL); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_reset); assert (pline); @@ -403,8 +395,7 @@ H5O_pline_reset (void *mesg) H5MM_xfree(pline->filter); HDmemset(pline, 0, sizeof *pline); -done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } @@ -425,16 +416,13 @@ done: static herr_t H5O_pline_free (void *mesg) { - herr_t ret_value=SUCCEED; /* Return value */ - - FUNC_ENTER_NOAPI(H5O_pline_free, FAIL); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_free); assert (mesg); H5FL_FREE(H5O_pline_t,mesg); -done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } @@ -460,9 +448,8 @@ H5O_pline_debug (H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, FILE * { const H5O_pline_t *pline = (const H5O_pline_t *)mesg; size_t i, j; - herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5O_pline_debug, FAIL); + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_pline_debug); /* check args */ assert(f); @@ -506,6 +493,5 @@ H5O_pline_debug (H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg, FILE * } } -done: - FUNC_LEAVE_NOAPI(ret_value); + FUNC_LEAVE_NOAPI(SUCCEED); } |