summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5.c9
-rw-r--r--src/H5A.c12
-rw-r--r--src/H5AC.c27
-rw-r--r--src/H5B.c13
-rw-r--r--src/H5CS.c11
-rw-r--r--src/H5D.c12
-rw-r--r--src/H5Dcompact.c4
-rw-r--r--src/H5Dcontig.c14
-rw-r--r--src/H5Dio.c4
-rw-r--r--src/H5Distore.c49
-rw-r--r--src/H5Dseq.c4
-rw-r--r--src/H5Dtest.c4
-rw-r--r--src/H5E.c12
-rw-r--r--src/H5F.c43
-rw-r--r--src/H5FD.c12
-rw-r--r--src/H5FDcore.c29
-rw-r--r--src/H5FDfamily.c29
-rw-r--r--src/H5FDfphdf5.c27
-rw-r--r--src/H5FDgass.c27
-rw-r--r--src/H5FDlog.c27
-rw-r--r--src/H5FDmpi.c4
-rw-r--r--src/H5FDmpio.c27
-rw-r--r--src/H5FDmpiposix.c27
-rw-r--r--src/H5FDsec2.c29
-rw-r--r--src/H5FDsrb.c27
-rw-r--r--src/H5FDstream.c27
-rw-r--r--src/H5FL.c35
-rw-r--r--src/H5FO.c10
-rw-r--r--src/H5FP.c4
-rw-r--r--src/H5FPclient.c4
-rw-r--r--src/H5FPserver.c23
-rw-r--r--src/H5FS.c11
-rw-r--r--src/H5Fdbg.c4
-rw-r--r--src/H5G.c25
-rw-r--r--src/H5Gent.c32
-rw-r--r--src/H5Gnode.c36
-rw-r--r--src/H5Gstab.c8
-rw-r--r--src/H5HG.c6
-rw-r--r--src/H5HGdbg.c4
-rw-r--r--src/H5HL.c6
-rw-r--r--src/H5HLdbg.c4
-rw-r--r--src/H5HP.c31
-rw-r--r--src/H5I.c82
-rw-r--r--src/H5MF.c12
-rw-r--r--src/H5MM.c10
-rw-r--r--src/H5O.c14
-rw-r--r--src/H5Oattr.c21
-rw-r--r--src/H5Obogus.c18
-rw-r--r--src/H5Ocont.c17
-rw-r--r--src/H5Odtype.c40
-rw-r--r--src/H5Oefl.c35
-rw-r--r--src/H5Ofill.c74
-rw-r--r--src/H5Olayout.c41
-rw-r--r--src/H5Omtime.c56
-rw-r--r--src/H5Oname.c29
-rw-r--r--src/H5Opline.c51
-rw-r--r--src/H5Osdspace.c36
-rw-r--r--src/H5Oshared.c34
-rw-r--r--src/H5Ostab.c32
-rw-r--r--src/H5P.c19
-rw-r--r--src/H5Pdcpl.c11
-rw-r--r--src/H5Pdxpl.c11
-rw-r--r--src/H5Pfapl.c13
-rw-r--r--src/H5Pfcpl.c13
-rw-r--r--src/H5Ptest.c11
-rw-r--r--src/H5R.c17
-rw-r--r--src/H5RS.c55
-rw-r--r--src/H5S.c17
-rw-r--r--src/H5ST.c18
-rw-r--r--src/H5Sall.c86
-rw-r--r--src/H5Shyper.c108
-rw-r--r--src/H5Smpio.c15
-rw-r--r--src/H5Snone.c109
-rw-r--r--src/H5Spoint.c81
-rw-r--r--src/H5Sprivate.h2
-rw-r--r--src/H5Sselect.c78
-rw-r--r--src/H5Stest.c6
-rw-r--r--src/H5T.c15
-rw-r--r--src/H5TB.c45
-rw-r--r--src/H5TS.c2
-rw-r--r--src/H5Tarray.c10
-rw-r--r--src/H5Tbit.c13
-rw-r--r--src/H5Tcommit.c11
-rw-r--r--src/H5Tcompound.c10
-rw-r--r--src/H5Tconv.c55
-rw-r--r--src/H5Tcset.c14
-rw-r--r--src/H5Tenum.c14
-rw-r--r--src/H5Tfields.c10
-rw-r--r--src/H5Tfixed.c10
-rw-r--r--src/H5Tfloat.c10
-rw-r--r--src/H5Tnative.c10
-rw-r--r--src/H5Toffset.c10
-rw-r--r--src/H5Topaque.c10
-rw-r--r--src/H5Torder.c10
-rw-r--r--src/H5Tpad.c10
-rw-r--r--src/H5Tpkg.h1
-rw-r--r--src/H5Tprecis.c10
-rw-r--r--src/H5Tstrpad.c10
-rw-r--r--src/H5Tvlen.c10
-rw-r--r--src/H5V.c57
-rw-r--r--src/H5Z.c12
-rw-r--r--src/H5Zdeflate.c4
-rw-r--r--src/H5Zfletcher32.c4
-rw-r--r--src/H5Zshuffle.c4
-rw-r--r--src/H5Zszip.c4
-rw-r--r--src/H5Ztrans.c36
-rw-r--r--src/H5detect.c17
-rw-r--r--src/H5private.h114
108 files changed, 1057 insertions, 1520 deletions
diff --git a/src/H5.c b/src/H5.c
index 87f408a..6c79466 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -57,10 +57,6 @@ hbool_t dont_atexit_g = FALSE;
H5_debug_t H5_debug_g; /*debugging info */
static void H5_debug_mask(const char*);
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*--------------------------------------------------------------------------
* NAME
* H5_init_library -- Initialize library-global information
@@ -227,7 +223,6 @@ H5_term_library(void)
pending += DOWN(G);
pending += DOWN(A);
pending += DOWN(S);
- pending += DOWN(TN);
pending += DOWN(T);
/* Don't shut down the file code until objects in files are shut down */
if(pending==0)
@@ -624,7 +619,6 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum)
/* Bail out now. */
HDfputs ("Bye...\n", stderr);
HDabort ();
- break;
case 2:
/* continue silently */
break;
@@ -1807,8 +1801,7 @@ H5_trace (const double *returning, const char *func, const char *type, ...)
} else {
herr_t status = va_arg (ap, herr_t);
if (status>=0) fprintf (out, "SUCCEED");
- else if (status<0) fprintf (out, "FAIL");
- else fprintf (out, "%d", (int)status);
+ else fprintf (out, "FAIL");
}
break;
diff --git a/src/H5A.c b/src/H5A.c
index 113e2a6..21c3390 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -15,6 +15,9 @@
#define H5A_PACKAGE /*suppress error about including H5Apkg */
#define H5S_PACKAGE /*suppress error about including H5Spkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5A_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5A_mask
@@ -27,11 +30,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Spkg.h" /* Dataspace functions */
-/* Is the interface initialized? */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5A_init_interface
-static herr_t H5A_init_interface(void);
-
/* PRIVATE PROTOTYPES */
static hid_t H5A_create(const H5G_entry_t *ent, const char *name,
const H5T_t *type, const H5S_t *space, hid_t dxpl_id);
@@ -99,12 +97,12 @@ H5A_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5A_term_interface)
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_ATTR))) {
H5I_clear_type(H5I_ATTR, FALSE);
} else {
H5I_dec_type_ref(H5I_ATTR);
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1;
}
}
diff --git a/src/H5AC.c b/src/H5AC.c
index 7d83bbb..5742a80 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -36,6 +36,9 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5AC_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5AC_mask
@@ -56,11 +59,6 @@
#include "H5FPprivate.h" /* Flexible PHDF5 */
#endif /* H5_HAVE_FPHDF5 */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5AC_init_interface
-static herr_t H5AC_init_interface(void);
-
/*
* Private macros
*/
@@ -194,12 +192,10 @@ H5AC_init_interface(void)
unsigned block_before_meta_write; /* "block before meta write" property value */
unsigned library_internal=1; /* "library internal" property value */
H5FD_mpio_xfer_t xfer_mode; /* I/O transfer mode property value */
-#endif /* H5_HAVE_PARALLEL */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5AC_init_interface)
-#ifdef H5_HAVE_PARALLEL
/* Sanity check */
assert(H5P_CLS_DATASET_XFER_g!=(-1));
@@ -272,17 +268,22 @@ H5AC_init_interface(void)
xfer_mode=H5FD_MPIO_INDEPENDENT;
if (H5P_set(xfer_plist,H5D_XFER_IO_XFER_MODE_NAME,&xfer_mode)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+
#else /* H5_HAVE_PARALLEL */
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5AC_init_interface)
+
/* Sanity check */
assert(H5P_LST_DATASET_XFER_g!=(-1));
H5AC_dxpl_id=H5P_DATASET_XFER_DEFAULT;
H5AC_noblock_dxpl_id=H5P_DATASET_XFER_DEFAULT;
H5AC_ind_dxpl_id=H5P_DATASET_XFER_DEFAULT;
-#endif /* H5_HAVE_PARALLEL */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
+#endif /* H5_HAVE_PARALLEL */
} /* end H5AC_init_interface() */
@@ -310,7 +311,7 @@ H5AC_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5AC_term_interface)
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
#ifdef H5_HAVE_PARALLEL
if(H5AC_dxpl_id>0 || H5AC_noblock_dxpl_id>0 || H5AC_ind_dxpl_id>0) {
/* Indicate more work to do */
@@ -328,7 +329,7 @@ H5AC_term_interface(void)
H5AC_ind_dxpl_id=(-1);
/* Reset interface initialization flag */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
} /* end else */
} /* end if */
else
@@ -340,7 +341,7 @@ H5AC_term_interface(void)
#endif /* H5_HAVE_PARALLEL */
/* Reset interface initialization flag */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
} /* end if */
FUNC_LEAVE_NOAPI(n)
diff --git a/src/H5B.c b/src/H5B.c
index 5f7735b..4af914c 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -167,10 +167,6 @@ static const H5AC_class_t H5AC_BT[1] = {{
(H5AC_clear_func_t)H5B_clear,
}};
-/* Interface initialization? */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Declare a free list to manage the page information */
H5FL_BLK_DEFINE_STATIC(page);
@@ -2307,9 +2303,8 @@ H5B_nodesize(const H5F_t *f, const H5B_class_t *type,
size_t *total_nkey_size/*out*/, size_t sizeof_rkey)
{
size_t size;
- size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5B_nodesize, 0)
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5B_nodesize)
/*
* Check arguments.
@@ -2332,11 +2327,7 @@ H5B_nodesize(const H5F_t *f, const H5B_class_t *type,
2 * H5F_KVALUE(f, type) * H5F_SIZEOF_ADDR(f) + /*child pointers */
(2 * H5F_KVALUE(f, type) + 1) * sizeof_rkey); /*keys */
- /* Set return value */
- ret_value=size;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(size)
}
diff --git a/src/H5CS.c b/src/H5CS.c
index 0c02034..e0ad30b 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -32,9 +32,6 @@
#define PABLO_MASK H5FS_mask
-/* Interface initialization? */
-#define INTERFACE_INIT NULL
-
#ifdef H5_HAVE_THREADSAFE
/*
* The per-thread function stack. pthread_once() initializes a special
@@ -80,7 +77,7 @@ H5FS_get_stack(void)
{
H5FS_t *fstack;
- FUNC_ENTER_NOAPI_NOFS(H5FS_get_stack);
+ FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5FS_get_stack);
fstack = pthread_getspecific(H5TS_funcstk_key_g);
if (!fstack) {
@@ -116,7 +113,7 @@ H5FS_print(FILE *stream)
int i; /* Local index ariable */
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFS(H5FS_print);
+ FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5FS_print);
/* Sanity check */
assert(fstack);
@@ -164,7 +161,7 @@ H5FS_push(const char *func_name)
H5FS_t *fstack = H5FS_get_my_stack ();
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFS(H5FS_push);
+ FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5FS_push);
/* Sanity check */
assert (fstack);
@@ -201,7 +198,7 @@ H5FS_pop(void)
H5FS_t *fstack = H5FS_get_my_stack ();
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFS(H5FS_pop);
+ FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5FS_pop);
/* Sanity check */
assert (fstack);
diff --git a/src/H5D.c b/src/H5D.c
index c808faa..5d58e65 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -14,6 +14,9 @@
#define H5D_PACKAGE /*suppress error about including H5Dpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5D_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5D_mask
@@ -32,12 +35,7 @@
/*#define H5D_DEBUG*/
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5D_init_interface
-
/* Local functions */
-static herr_t H5D_init_interface(void);
static herr_t H5D_init_storage(H5D_t *dataset, hbool_t full_overwrite, hid_t dxpl_id);
static H5D_t * H5D_new(hid_t dcpl_id, hbool_t creating, hbool_t vl_type);
static H5D_t * H5D_create(H5G_entry_t *loc, const char *name, hid_t type_id,
@@ -418,7 +416,7 @@ H5D_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_term_interface)
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_DATASET))) {
/* The dataset API uses the "force" flag set to true because it
* is using the "file objects" (H5FO) API functions to track open
@@ -445,7 +443,7 @@ H5D_term_interface(void)
H5I_clear_type(H5I_DATASET, TRUE);
} else {
H5I_dec_type_ref(H5I_DATASET);
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c
index 3701221..0416f2b 100644
--- a/src/H5Dcompact.c
+++ b/src/H5Dcompact.c
@@ -35,10 +35,6 @@
#include "H5Oprivate.h" /* Object headers */
#include "H5Vprivate.h" /* Vector and array functions */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5D_compact_readvv
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index ac93b26..bf60dd1 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -44,10 +44,6 @@
static herr_t H5D_contig_write(H5F_t *f, hid_t dxpl_id, H5D_t *dset,
hsize_t offset, size_t size, const void *buf);
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a PQ free list to manage the sieve buffer information */
H5FL_BLK_DEFINE(sieve_buf);
@@ -318,19 +314,13 @@ done:
haddr_t
H5D_contig_get_addr(const H5D_t *dset)
{
- haddr_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5D_contig_get_addr, HADDR_UNDEF);
+ FUNC_ENTER_NOAPI_NOFUNC(H5D_contig_get_addr);
/* check args */
assert(dset);
assert(dset->layout.type==H5D_CONTIGUOUS);
- /* Get the address */
- ret_value=dset->layout.u.contig.addr;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(dset->layout.u.contig.addr);
} /* end H5D_contig_get_addr */
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 577df91..9cecda7 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -69,10 +69,6 @@ typedef struct fm_map {
H5S_sel_type msel_type; /* Selection type in memory */
} fm_map;
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Local functions */
static herr_t H5D_read(H5D_t *dataset, const H5T_t *mem_type,
const H5S_t *mem_space, const H5S_t *file_space,
diff --git a/src/H5Distore.c b/src/H5Distore.c
index ac9283d..ac3f4d4 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -88,10 +88,6 @@
/*#define H5D_ISTORE_DEBUG */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*
* Given a B-tree node return the dimensionality of the chunks pointed to by
* that node.
@@ -239,7 +235,6 @@ H5D_istore_sizeof_rkey(H5F_t UNUSED *f, const void *_udata)
const H5D_istore_ud1_t *udata = (const H5D_istore_ud1_t *) _udata;
size_t nbytes;
- /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_sizeof_rkey);
assert(udata);
@@ -273,9 +268,8 @@ H5D_istore_decode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
H5D_istore_key_t *key = (H5D_istore_key_t *) _key;
int i;
int ndims = H5D_ISTORE_NDIMS(bt);
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_istore_decode_key, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_decode_key);
/* check args */
assert(f);
@@ -290,8 +284,7 @@ H5D_istore_decode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
for (i=0; i<ndims; i++)
UINT64DECODE(raw, key->offset[i]);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5D_istore_decode_key() */
@@ -315,9 +308,8 @@ H5D_istore_encode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
H5D_istore_key_t *key = (H5D_istore_key_t *) _key;
int ndims = H5D_ISTORE_NDIMS(bt);
int i;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_istore_encode_key, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_encode_key);
/* check args */
assert(f);
@@ -332,8 +324,7 @@ H5D_istore_encode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
for (i=0; i<ndims; i++)
UINT64ENCODE(raw, key->offset[i]);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5D_istore_encode_key() */
@@ -358,9 +349,8 @@ H5D_istore_debug_key (FILE *stream, H5F_t UNUSED *f, hid_t UNUSED dxpl_id, int i
const H5D_istore_key_t *key = (const H5D_istore_key_t *)_key;
const H5D_istore_ud1_t *udata = (const H5D_istore_ud1_t *)_udata;
unsigned u;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_istore_debug_key, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_debug_key);
assert (key);
@@ -374,8 +364,7 @@ H5D_istore_debug_key (FILE *stream, H5F_t UNUSED *f, hid_t UNUSED dxpl_id, int i
HDfprintf (stream, "%s%Hd", u?", ":"", key->offset[u]);
HDfputs ("}\n", stream);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5D_istore_debug_key() */
@@ -409,7 +398,7 @@ H5D_istore_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_uda
H5D_istore_ud1_t *udata = (H5D_istore_ud1_t *) _udata;
int ret_value;
- FUNC_ENTER_NOAPI(H5D_istore_cmp2, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_cmp2);
assert(lt_key);
assert(rt_key);
@@ -419,7 +408,6 @@ H5D_istore_cmp2(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_uda
/* Compare the offsets but ignore the other fields */
ret_value = H5V_vector_cmp_s(udata->mesg.u.chunk.ndims, lt_key->offset, rt_key->offset);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5D_istore_cmp2() */
@@ -462,7 +450,7 @@ H5D_istore_cmp3(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_uda
H5D_istore_ud1_t *udata = (H5D_istore_ud1_t *) _udata;
int ret_value = 0;
- FUNC_ENTER_NOAPI(H5D_istore_cmp3, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_cmp3);
assert(lt_key);
assert(rt_key);
@@ -477,7 +465,6 @@ H5D_istore_cmp3(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_lt_key, void *_uda
ret_value = 1;
}
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5D_istore_cmp3() */
@@ -513,7 +500,7 @@ H5D_istore_new_node(H5F_t *f, hid_t dxpl_id, H5B_ins_t op,
unsigned u;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_istore_new_node, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5D_istore_new_node);
/* check args */
assert(f);
@@ -595,7 +582,7 @@ H5D_istore_found(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t addr, const void
unsigned u;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_istore_found, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_found);
/* Check arguments */
assert(f);
@@ -669,7 +656,7 @@ H5D_istore_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key,
unsigned u;
H5B_ins_t ret_value;
- FUNC_ENTER_NOAPI(H5D_istore_insert, H5B_INS_ERROR);
+ FUNC_ENTER_NOAPI_NOINIT(H5D_istore_insert);
/* check args */
assert(f);
@@ -2019,7 +2006,7 @@ H5D_istore_get_addr(H5F_t *f, hid_t dxpl_id, const H5O_layout_t *layout,
unsigned u;
haddr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5D_istore_get_addr);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_get_addr);
assert(f);
assert(layout && (layout->u.chunk.ndims > 0));
@@ -2663,9 +2650,8 @@ H5D_istore_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out
hbool_t *rt_key_changed /*out */ )
{
H5D_istore_key_t *lt_key = (H5D_istore_key_t *)_lt_key;
- H5B_ins_t ret_value=H5B_INS_REMOVE; /* Return value */
- FUNC_ENTER_NOAPI(H5D_istore_remove,H5B_INS_ERROR);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_istore_remove);
/* Remove raw data chunk from file */
H5MF_xfree(f, H5FD_MEM_DRAW, dxpl_id, addr, (hsize_t)lt_key->nbytes);
@@ -2674,8 +2660,7 @@ H5D_istore_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key /*in,out
*lt_key_changed = FALSE;
*rt_key_changed = FALSE;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(H5B_INS_REMOVE);
} /* end H5D_istore_remove() */
@@ -3141,15 +3126,13 @@ H5D_istore_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int inden
int fwidth, int ndims)
{
H5D_istore_ud1_t udata;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5D_istore_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5D_istore_debug);
HDmemset (&udata, 0, sizeof udata);
udata.mesg.u.chunk.ndims = ndims;
H5B_debug (f, dxpl_id, addr, stream, indent, fwidth, H5B_ISTORE, &udata);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5D_istore_debug() */
diff --git a/src/H5Dseq.c b/src/H5Dseq.c
index 5585315..b327904 100644
--- a/src/H5Dseq.c
+++ b/src/H5Dseq.c
@@ -41,10 +41,6 @@
#include "H5Pprivate.h" /* Property lists */
#include "H5Vprivate.h" /* Vector and array functions */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/*-------------------------------------------------------------------------
* Function: H5D_seq_readvv
diff --git a/src/H5Dtest.c b/src/H5Dtest.c
index d3339df..f140d03 100644
--- a/src/H5Dtest.c
+++ b/src/H5Dtest.c
@@ -30,10 +30,6 @@
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* ID Functions */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5E.c b/src/H5E.c
index 0862e89..5128aa8 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -40,6 +40,9 @@
*
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5E_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5E_mask
@@ -49,10 +52,6 @@
#include "H5Eprivate.h" /* Private error routines */
#include "H5MMprivate.h" /* Memory management */
-/* Interface initialization? */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5E_init_interface
-
/* HDF5 error class ID */
hid_t H5E_ERR_CLS_g = FAIL;
@@ -96,7 +95,6 @@ int H5E_mpi_error_str_len;
#endif
/* Static function declarations */
-static herr_t H5E_init_interface (void);
static H5E_cls_t *H5E_register_class(const char *cls_name, const char *lib_name,
const char *version);
static herr_t H5E_unregister_class(H5E_cls_t *cls);
@@ -203,7 +201,7 @@ H5E_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5E_term_interface)
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
/* Check if there are any open error stacks, classes or messages */
ncls = H5I_nmembers(H5I_ERROR_CLASS);
nmsg = H5I_nmembers(H5I_ERROR_MSG);
@@ -242,7 +240,7 @@ H5E_term_interface(void)
H5I_dec_type_ref(H5I_ERROR_MSG);
/* Mark closed */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}
diff --git a/src/H5F.c b/src/H5F.c
index 8091920..fca616d 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -14,6 +14,9 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5F_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5F_mask
@@ -46,11 +49,6 @@
#include "H5FDstdio.h" /* Standard C buffered I/O */
#include "H5FDstream.h" /*in-memory files streamed via sockets */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5F_init_interface
-static herr_t H5F_init_interface(void);
-
/* Struct only used by functions H5F_get_objects and H5F_get_objects_cb */
typedef struct H5F_olist_t {
H5I_type_t obj_type; /* Type of object to look for */
@@ -160,7 +158,6 @@ H5F_init_interface(void)
{
size_t nprops; /* Number of properties */
herr_t ret_value = SUCCEED;
- herr_t status;
/* File creation property class variables. In sequence, they are
* - File create property list class to modify
@@ -293,36 +290,6 @@ H5F_init_interface(void)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "can't insert property into class")
} /* end if */
- /* Register predefined file drivers */
- H5E_BEGIN_TRY {
- if ((status=H5FD_SEC2)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
- if ((status=H5FD_LOG)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
- if ((status=H5FD_STDIO)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
- if ((status=H5FD_FAMILY)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
-#ifdef H5_HAVE_GASS
- if ((status=H5FD_GASS)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
-#endif
-#ifdef H5_HAVE_SRB
- if ((status=H5FD_SRB)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
-#endif
- if ((status=H5FD_CORE)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
- if ((status=H5FD_MULTI)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
-#ifdef H5_HAVE_PARALLEL
- if ((status=H5FD_MPIO)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
- if ((status=H5FD_MPIPOSIX)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
-#ifdef H5_HAVE_FPHDF5
- if ((status=H5FD_FPHDF5)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
-#endif /* H5_HAVE_FPHDF5 */
-#endif /* H5_HAVE_PARALLEL */
-#ifdef H5_HAVE_STREAM
- if ((status=H5FD_STREAM)<0) goto end_registration; /*lint !e801 Tell lint that our use of goto is OK here */
-#endif
-end_registration: ;
- } H5E_END_TRY;
-
- if (status<0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "file driver registration failed")
-
/* ========== File Access Property Class Initialization ============*/
assert(H5P_CLS_FILE_ACCESS_g!=-1);
@@ -461,13 +428,13 @@ H5F_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_term_interface)
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_FILE))) {
H5I_clear_type(H5I_FILE, FALSE);
} else if (0==(n=H5I_nmembers(H5I_FILE_CLOSING))) {
H5I_dec_type_ref(H5I_FILE);
H5I_dec_type_ref(H5I_FILE_CLOSING);
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}
diff --git a/src/H5FD.c b/src/H5FD.c
index 95b825a..4d619d6 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -25,6 +25,9 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_mask
@@ -54,12 +57,7 @@
#include "H5FPprivate.h" /*Flexible Parallel HDF5 */
#endif /* H5_HAVE_FPHDF5 */
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_init_interface
-static int interface_initialize_g = 0;
-
/* static prototypes */
-static herr_t H5FD_init_interface(void);
static herr_t H5FD_pl_copy(void *(*copy_func)(const void *), size_t pl_size,
const void *old_pl, void **copied_pl);
static herr_t H5FD_pl_close(hid_t driver_id, herr_t (*free_func)(void *),
@@ -162,7 +160,7 @@ H5FD_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_term_interface)
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_VFL))) {
H5I_clear_type(H5I_VFL, FALSE);
@@ -193,7 +191,7 @@ H5FD_term_interface(void)
} /* end if */
} else {
H5I_dec_type_ref(H5I_VFL);
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index f74839e..95783aa 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -21,6 +21,9 @@
* access to small, temporary hdf5 files.
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_core_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_core_mask
@@ -34,10 +37,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_core_init
-static int interface_initialize_g = 0;
-
#undef MAX
#define MAX(X,Y) ((X)>(Y)?(X):(Y))
@@ -143,6 +142,28 @@ static const H5FD_class_t H5FD_core_g = {
};
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_core_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_core_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_core_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_core_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_core_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_core_init())
+} /* H5FD_core_init_interface() */
+
+
/*-------------------------------------------------------------------------
* Function: H5FD_core_init
*
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index c902e9b..5f94b68 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -33,6 +33,9 @@
*
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_family_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_family_mask
@@ -46,10 +49,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_family_init
-static int interface_initialize_g = 0;
-
#undef MAX
#define MAX(X,Y) ((X)>(Y)?(X):(Y))
#undef MIN
@@ -137,6 +136,28 @@ static const H5FD_class_t H5FD_family_g = {
};
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_family_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_family_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_family_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_family_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_family_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_family_init())
+} /* H5FD_family_init_interface() */
+
+
/*-------------------------------------------------------------------------
* Function: H5FD_family_init
*
diff --git a/src/H5FDfphdf5.c b/src/H5FDfphdf5.c
index 950fa3f..f3ae364 100644
--- a/src/H5FDfphdf5.c
+++ b/src/H5FDfphdf5.c
@@ -12,6 +12,9 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_fphdf5_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_fphdf5_mask
@@ -116,9 +119,27 @@ const H5FD_class_mpi_t H5FD_fphdf5_g = {
H5FD_fphdf5_barrier_communicator /*get_comm */
};
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_fphdf5_init
-static int interface_initialize_g = 0;
+
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_fphdf5_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_fphdf5_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_fphdf5_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_fphdf5_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_fphdf5_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_fphdf5_init())
+} /* H5FD_fphdf5_init_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDgass.c b/src/H5FDgass.c
index 3578b9f..9da489c 100644
--- a/src/H5FDgass.c
+++ b/src/H5FDgass.c
@@ -20,6 +20,9 @@
*
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_gass_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_gass_mask
@@ -174,9 +177,27 @@ static const H5FD_class_t H5FD_gass_g = {
H5FD_FLMAP_SINGLE /*fl_map */
};
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_gass_init
-static int interface_initialize_g = 0;
+
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_gass_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_gass_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_gass_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_gass_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_gass_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_gass_init())
+} /* H5FD_gass_init_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index a705d03..c8cfd14 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -25,6 +25,9 @@
* With custom modifications...
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_log_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_log_mask
@@ -236,9 +239,27 @@ static const H5FD_class_t H5FD_log_g = {
H5FD_FLMAP_NOLIST /*fl_map */
};
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_log_init
-static int interface_initialize_g = 0;
+
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_log_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_log_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_log_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_log_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_log_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_log_init())
+} /* H5FD_log_init_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDmpi.c b/src/H5FDmpi.c
index 7472575..e738a82 100644
--- a/src/H5FDmpi.c
+++ b/src/H5FDmpi.c
@@ -38,10 +38,6 @@ char H5FD_mpi_native_g[] = "native";
#ifdef H5_HAVE_PARALLEL
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/*-------------------------------------------------------------------------
* Function: H5FD_mpi_get_rank
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index a27abca..1156398 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -20,6 +20,9 @@
*
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_mpio_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_mpio_mask
@@ -149,9 +152,27 @@ static int H5FD_mpio_Debug[256] =
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
#endif
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_mpio_init
-static int interface_initialize_g = 0;
+
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_mpio_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_mpio_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_mpio_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_mpio_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_mpio_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_mpio_init())
+} /* H5FD_mpio_init_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index 5cf68ef..781bcc3 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -32,6 +32,9 @@
*
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_mpiposix_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_mpiposix_mask
@@ -237,9 +240,27 @@ static const H5FD_class_mpi_t H5FD_mpiposix_g = {
H5FD_mpiposix_communicator /*get_comm */
};
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_mpiposix_init
-static int interface_initialize_g = 0;
+
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_mpiposix_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_mpiposix_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_mpiposix_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_mpiposix_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_mpiposix_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_mpiposix_init())
+} /* H5FD_mpiposix_init_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 7478cf9..f8cf0e5 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -24,6 +24,9 @@
* application to the same file).
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_sec2_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_sec2_mask
@@ -192,14 +195,32 @@ static const H5FD_class_t H5FD_sec2_g = {
H5FD_FLMAP_SINGLE /*fl_map */
};
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_sec2_init
-static int interface_initialize_g = 0;
-
/* Declare a free list to manage the H5FD_sec2_t struct */
H5FL_DEFINE_STATIC(H5FD_sec2_t);
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_sec2_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_sec2_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_sec2_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_sec2_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_sec2_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_sec2_init())
+} /* H5FD_sec2_init_interface() */
+
+
/*-------------------------------------------------------------------------
* Function: H5FD_sec2_init
*
diff --git a/src/H5FDsrb.c b/src/H5FDsrb.c
index 4f1ec55..f739500 100644
--- a/src/H5FDsrb.c
+++ b/src/H5FDsrb.c
@@ -19,6 +19,9 @@
* Purpose: SRB I/O driver.
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_srb_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_srb_mask
@@ -157,9 +160,27 @@ static const H5FD_class_t H5FD_srb_g = {
H5FD_FLMAP_SINGLE /*fl_map */
};
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_srb_init
-static int interface_initialize_g = 0;
+
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_srb_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_srb_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_srb_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_srb_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_srb_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_srb_init())
+} /* H5FD_srb_init_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FDstream.c b/src/H5FDstream.c
index 60c414e..1cf02db 100644
--- a/src/H5FDstream.c
+++ b/src/H5FDstream.c
@@ -21,6 +21,9 @@
*
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FD_stream_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FD_stream_mask
@@ -203,9 +206,27 @@ static const H5FD_class_t H5FD_stream_g = {
H5FD_FLMAP_SINGLE /*fl_map */
};
-/* Interface initialization */
-#define INTERFACE_INIT H5FD_stream_init
-static int interface_initialize_g = 0;
+
+/*--------------------------------------------------------------------------
+NAME
+ H5FD_stream_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FD_stream_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines. (Just calls
+ H5FD_stream_init currently).
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FD_stream_init_interface(void)
+{
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FD_stream_init_interface)
+
+ FUNC_LEAVE_NOAPI(H5FD_stream_init())
+} /* H5FD_stream_init_interface() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FL.c b/src/H5FL.c
index 1d844b2..b5261f7 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -26,6 +26,9 @@
* move frequently accessed free lists to the head of the queue.
*/
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5FL_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5FL_mask
@@ -37,9 +40,6 @@
#include "H5FLprivate.h" /* Free Lists */
#include "H5MMprivate.h" /* Memory management */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*
* Private type definitions
*/
@@ -112,6 +112,31 @@ static herr_t H5FL_blk_gc_list(H5FL_blk_head_t *head);
H5FL_DEFINE(H5FL_blk_node_t);
+/*--------------------------------------------------------------------------
+NAME
+ H5FL_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5FL_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines.
+
+--------------------------------------------------------------------------*/
+static herr_t
+H5FL_init_interface(void)
+{
+ herr_t ret_value=SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_init_interface)
+
+ /* Nothing currently... */
+
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* H5FL_init_interface() */
+
+
/*-------------------------------------------------------------------------
* Function: H5FL_malloc
*
@@ -495,7 +520,7 @@ H5FL_reg_term(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FL_reg_term)
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
/* Free the nodes on the garbage collection list, keeping nodes with allocations outstanding */
left=NULL;
while(H5FL_reg_gc_head.first!=NULL) {
@@ -525,7 +550,7 @@ H5FL_reg_term(void)
/* Point to the list of nodes left with allocations open, if any */
H5FL_reg_gc_head.first=left;
if (!left)
- interface_initialize_g = 0; /*this layer has reached its initial state*/
+ H5_interface_initialize_g = 0; /*this layer has reached its initial state*/
}
/* Terminating this layer never affects other layers; rather, other layers affect
diff --git a/src/H5FO.c b/src/H5FO.c
index 9d973ac..7cb5508 100644
--- a/src/H5FO.c
+++ b/src/H5FO.c
@@ -32,10 +32,6 @@
#include "H5FOprivate.h" /* File objects */
#include "H5Oprivate.h" /* Object headers */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Private typedefs */
/* Information about object objects in a file */
@@ -115,7 +111,7 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
H5FO_open_obj_t *open_obj; /* Information about open object */
hid_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_opened,FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5FO_opened)
/* Sanity check */
assert(f);
@@ -133,7 +129,6 @@ H5FO_opened(const H5F_t *f, haddr_t addr)
else
ret_value=FAIL;
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_opened() */
@@ -276,7 +271,7 @@ H5FO_mark(const H5F_t *f, haddr_t addr)
H5FO_open_obj_t *open_obj; /* Information about open object */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5FO_mark,FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5FO_mark)
/* Sanity check */
assert(f);
@@ -293,7 +288,6 @@ H5FO_mark(const H5F_t *f, haddr_t addr)
else
ret_value=FAIL;
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FO_mark() */
diff --git a/src/H5FP.c b/src/H5FP.c
index 4d2dc77..9707e75 100644
--- a/src/H5FP.c
+++ b/src/H5FP.c
@@ -26,10 +26,6 @@
/* Pablo mask */
#define PABLO_MASK H5FP_mask
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
MPI_Datatype H5FP_request; /* MPI datatype for the H5FP_request_t type */
MPI_Datatype H5FP_reply; /* MPI datatype for the H5FP_reply_t type */
MPI_Datatype H5FP_read; /* MPI datatype for the H5FP_read_t type */
diff --git a/src/H5FPclient.c b/src/H5FPclient.c
index 8e52056..3db9995 100644
--- a/src/H5FPclient.c
+++ b/src/H5FPclient.c
@@ -37,10 +37,6 @@
/* Pablo mask */
#define PABLO_MASK H5FPclient_mask
-/* Is the interface initialized? */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* local functions */
static unsigned H5FP_gen_request_id(void);
static herr_t H5FP_dump_to_file(H5FD_t *file, hid_t dxpl_id);
diff --git a/src/H5FPserver.c b/src/H5FPserver.c
index 64535fd..1ffc642 100644
--- a/src/H5FPserver.c
+++ b/src/H5FPserver.c
@@ -43,10 +43,6 @@
/* Pablo mask */
#define PABLO_MASK H5FPserver_mask
-/* Is the interface initialized? */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Internal SAP structures */
/*===----------------------------------------------------------------------===
@@ -799,12 +795,10 @@ done:
static hbool_t
H5FP_mod_node_overlaps_with_next(H5TB_NODE *node_ptr)
{
- hbool_t ret_value;
+ hbool_t ret_value=FALSE;
H5TB_NODE *next_node_ptr;
- FUNC_ENTER_NOAPI_NOINIT(H5FP_mod_node_overlaps_with_next);
-
- ret_value = FALSE;
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FP_mod_node_overlaps_with_next);
HDassert(node_ptr != NULL);
@@ -856,10 +850,7 @@ H5FP_mod_node_overlaps_with_next(H5TB_NODE *node_ptr)
}
}
-done:
-
FUNC_LEAVE_NOAPI(ret_value);
-
} /* H5FP_mod_node_overlaps_with_next() */
/*
@@ -881,18 +872,15 @@ done:
static hbool_t
H5FP_mod_node_overlaps_with_prev(H5TB_NODE *node_ptr)
{
- hbool_t ret_value;
+ hbool_t ret_value=FALSE;
H5TB_NODE *prev_node_ptr;
- FUNC_ENTER_NOAPI_NOINIT(H5FP_mod_node_overlaps_with_prev);
-
- ret_value = FALSE;
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5FP_mod_node_overlaps_with_prev);
HDassert(node_ptr != NULL);
prev_node_ptr = H5TB_prev(node_ptr);
-
if ( prev_node_ptr != NULL )
{
HDassert((((H5FP_mdata_mod *)(node_ptr->data))->addr)
@@ -920,10 +908,7 @@ H5FP_mod_node_overlaps_with_prev(H5TB_NODE *node_ptr)
}
}
-done:
-
FUNC_LEAVE_NOAPI(ret_value);
-
} /* H5FP_mod_node_overlaps_with_prev() */
/*
diff --git a/src/H5FS.c b/src/H5FS.c
index 0c02034..e0ad30b 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -32,9 +32,6 @@
#define PABLO_MASK H5FS_mask
-/* Interface initialization? */
-#define INTERFACE_INIT NULL
-
#ifdef H5_HAVE_THREADSAFE
/*
* The per-thread function stack. pthread_once() initializes a special
@@ -80,7 +77,7 @@ H5FS_get_stack(void)
{
H5FS_t *fstack;
- FUNC_ENTER_NOAPI_NOFS(H5FS_get_stack);
+ FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5FS_get_stack);
fstack = pthread_getspecific(H5TS_funcstk_key_g);
if (!fstack) {
@@ -116,7 +113,7 @@ H5FS_print(FILE *stream)
int i; /* Local index ariable */
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFS(H5FS_print);
+ FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5FS_print);
/* Sanity check */
assert(fstack);
@@ -164,7 +161,7 @@ H5FS_push(const char *func_name)
H5FS_t *fstack = H5FS_get_my_stack ();
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFS(H5FS_push);
+ FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5FS_push);
/* Sanity check */
assert (fstack);
@@ -201,7 +198,7 @@ H5FS_pop(void)
H5FS_t *fstack = H5FS_get_my_stack ();
/* Don't push this function on the function stack... :-) */
- FUNC_ENTER_NOAPI_NOFS(H5FS_pop);
+ FUNC_ENTER_NOAPI_NOFUNC_NOFS(H5FS_pop);
/* Sanity check */
assert (fstack);
diff --git a/src/H5Fdbg.c b/src/H5Fdbg.c
index b262087..3e738d1 100644
--- a/src/H5Fdbg.c
+++ b/src/H5Fdbg.c
@@ -30,10 +30,6 @@
#include "H5Iprivate.h" /* ID Functions */
#include "H5Pprivate.h" /* Property lists */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/*-------------------------------------------------------------------------
* Function: H5F_debug
diff --git a/src/H5G.c b/src/H5G.c
index 181bbc9..ee3d5a4 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -88,6 +88,13 @@
#define H5G_PACKAGE /*suppress error message about including H5Gpkg.h */
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5G_init_interface
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5G_mask
+
/* Packages needed by this file... */
#include "H5private.h" /* Generic Functions */
#include "H5Aprivate.h" /* Attributes */
@@ -117,13 +124,6 @@
#define H5G_TARGET_SLINK 0x0001
#define H5G_TARGET_MOUNT 0x0002
-#define PABLO_MASK H5G_mask
-
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5G_init_interface
-static herr_t H5G_init_interface(void);
-
/* Local typedefs */
/* Struct only used by change name callback function */
@@ -1000,7 +1000,7 @@ H5G_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_term_interface);
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_GROUP))) {
H5I_clear_type(H5I_GROUP, FALSE);
} else {
@@ -1018,7 +1018,7 @@ H5G_term_interface(void)
H5G_comp_alloc_g = 0;
/* Mark closed */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}
@@ -1811,7 +1811,7 @@ H5G_isa(H5G_entry_t *ent, hid_t dxpl_id)
{
htri_t ret_value;
- FUNC_ENTER_NOAPI(H5G_isa, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_isa);
assert(ent);
@@ -2315,10 +2315,7 @@ H5G_loc (hid_t loc_id)
case H5I_REFERENCE:
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "unable to get symbol table entry of reference");
- case H5I_NTYPES:
- case H5I_BADID:
- case H5I_FILE_CLOSING:
- case H5I_VFL:
+ default:
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "invalid object ID");
}
diff --git a/src/H5Gent.c b/src/H5Gent.c
index dfd4886..6f206dd 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -19,6 +19,10 @@
#define H5G_PACKAGE
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5G_ent_mask
+
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
@@ -26,10 +30,6 @@
#include "H5HLprivate.h" /* Local Heaps */
#include "H5MMprivate.h" /* Memory management */
-#define PABLO_MASK H5G_ent_mask
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Private prototypes */
#ifdef NOT_YET
static herr_t H5G_ent_modified(H5G_entry_t *ent, H5G_type_t cache_type);
@@ -187,9 +187,8 @@ H5G_ent_decode(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
{
const uint8_t *p_ret = *pp;
uint32_t tmp;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_decode, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_decode);
/* check arguments */
assert(f);
@@ -226,8 +225,7 @@ H5G_ent_decode(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
*pp = p_ret + H5G_SIZEOF_ENTRY(f);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -307,9 +305,8 @@ herr_t
H5G_ent_encode(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
{
uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_encode);
/* check arguments */
assert(f);
@@ -351,8 +348,7 @@ H5G_ent_encode(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
while (*pp < p_ret) *(*pp)++ = 0;
*pp = p_ret;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -395,9 +391,8 @@ herr_t
H5G_ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5G_ent_copy_depth_t depth)
{
H5RS_str_t *tmp_user_path_r=NULL; /* Temporary string pointer for entry's user path */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_copy, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_copy);
/* Check arguments */
assert(src);
@@ -424,8 +419,7 @@ H5G_ent_copy(H5G_entry_t *dst, const H5G_entry_t *src, H5G_ent_copy_depth_t dept
dst->canon_path_r=NULL;
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -453,9 +447,8 @@ H5G_ent_debug(H5F_t UNUSED *f, hid_t dxpl_id, const H5G_entry_t *ent, FILE * str
{
const char *lval = NULL;
int nested_indent, nested_fwidth;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_ent_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5G_ent_debug);
/* Calculate the indent & field width values for nested information */
nested_indent=indent+3;
@@ -514,6 +507,5 @@ H5G_ent_debug(H5F_t UNUSED *f, hid_t dxpl_id, const H5G_entry_t *ent, FILE * str
break;
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 4ddc799..7fc436c 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -127,10 +127,6 @@ H5B_class_t H5B_SNODE[1] = {{
H5G_node_debug_key, /*debug */
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a free list to manage the H5G_node_t struct */
H5FL_DEFINE_STATIC(H5G_node_t);
@@ -188,9 +184,8 @@ static herr_t
H5G_node_decode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_decode_key, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_decode_key);
assert(f);
assert(raw);
@@ -198,8 +193,7 @@ H5G_node_decode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key)
H5F_DECODE_LENGTH(f, raw, key->offset);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -222,9 +216,8 @@ static herr_t
H5G_node_encode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_encode_key, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_node_encode_key);
assert(f);
assert(raw);
@@ -232,8 +225,7 @@ H5G_node_encode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key)
H5F_ENCODE_LENGTH(f, raw, key->offset);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -261,7 +253,7 @@ H5G_node_debug_key (FILE *stream, H5F_t *f, hid_t dxpl_id, int indent, int fwidt
const char *s;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_debug_key, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_debug_key);
assert (key);
HDfprintf(stream, "%*s%-*s %u\n", indent, "", fwidth, "Heap offset:",
@@ -342,7 +334,7 @@ H5G_node_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *_udata1
const uint8_t *p = NULL;
H5G_node_t *ret_value; /*for error handling */
- FUNC_ENTER_NOAPI(H5G_node_load, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_load);
/*
* Check arguments.
@@ -433,7 +425,7 @@ H5G_node_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5G_node_
int i;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_flush, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_flush);
/*
* Check arguments.
@@ -512,7 +504,7 @@ H5G_node_serialize(H5F_t *f, H5G_node_t *sym, uint8_t *buf)
uint8_t *p;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_NOAPI(H5G_node_serialize, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_serialize);
/* check args */
assert(f);
@@ -657,7 +649,7 @@ H5G_node_create(H5F_t *f, hid_t dxpl_id, H5B_ins_t UNUSED op, void *_lt_key,
hsize_t size = 0;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_create, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_create);
/*
* Check arguments.
@@ -734,7 +726,7 @@ H5G_node_cmp2(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, void *_rt_ke
const char *base; /* Base of heap */
int ret_value;
- FUNC_ENTER_NOAPI(H5G_node_cmp2, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_cmp2);
assert(udata);
assert(lt_key);
@@ -799,7 +791,7 @@ H5G_node_cmp3(H5F_t *f, hid_t dxpl_id, void *_lt_key, void *_udata, void *_rt_ke
const char *base; /* Base of heap */
int ret_value=0; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_cmp3, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_cmp3);
/* Get base address of heap */
if (NULL == (heap = H5HL_protect(f, dxpl_id, udata->heap_addr)))
@@ -866,7 +858,7 @@ H5G_node_found(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED *_lt_key
const char *base; /* Base of heap */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5G_node_found, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_found);
/*
* Check arguments.
@@ -984,7 +976,7 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, void UNUSED *_lt_key,
H5G_node_t *insert_into = NULL; /*node that gets new entry*/
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_NOAPI(H5G_node_insert, H5B_INS_ERROR);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_insert);
/*
* Check arguments.
@@ -1177,7 +1169,7 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/,
const char *base; /* Base of heap */
H5B_ins_t ret_value = H5B_INS_ERROR;
- FUNC_ENTER_NOAPI(H5G_node_remove, H5B_INS_ERROR);
+ FUNC_ENTER_NOAPI_NOINIT(H5G_node_remove);
/* Check arguments */
assert(f);
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 4804cff..d270ceb 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -19,6 +19,10 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5G_PACKAGE /*suppress error about including H5Gpkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5G_stab_mask
+
#include "H5private.h"
#include "H5Eprivate.h"
#include "H5Fpkg.h" /*file access */
@@ -28,10 +32,6 @@
#include "H5MMprivate.h"
#include "H5Oprivate.h"
-#define PABLO_MASK H5G_stab_mask
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare extern the PQ free list for the wrapped strings */
H5FL_BLK_EXTERN(str_buf);
diff --git a/src/H5HG.c b/src/H5HG.c
index 01f7a5d..5fc4076 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -144,10 +144,6 @@ const H5AC_class_t H5AC_GHEAP[1] = {{
(H5AC_clear_func_t)H5HG_clear,
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a free list to manage the H5HG_t struct */
H5FL_DEFINE_STATIC(H5HG_heap_t);
@@ -761,7 +757,7 @@ H5HG_extend (H5F_t *f, H5HG_heap_t *heap, size_t size)
/* Re-allocate the heap information in memory */
if (NULL==(new_chunk = H5FL_BLK_REALLOC (heap_chunk, heap->chunk, heap->size+need)))
- HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "new heap allocation failed");
+ HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "new heap allocation failed");
/* Adjust the size of the heap */
old_size=heap->size;
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index 64f0ea4..f3f081f 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -29,10 +29,6 @@
#include "H5HGpkg.h" /* Global heaps */
#include "H5Iprivate.h" /* ID Functions */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/*-------------------------------------------------------------------------
* Function: H5HG_debug
diff --git a/src/H5HL.c b/src/H5HL.c
index 67165d9..da9c68d 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -84,10 +84,6 @@ const H5AC_class_t H5AC_LHEAP[1] = {{
(H5AC_clear_func_t)H5HL_clear,
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a free list to manage the H5HL_free_t struct */
H5FL_DEFINE_STATIC(H5HL_free_t);
@@ -847,7 +843,7 @@ H5HL_unprotect(H5F_t *f, hid_t dxpl_id, const H5HL_t *heap, haddr_t addr)
assert(H5F_addr_defined(addr));
if (H5AC_unprotect(f, dxpl_id, H5AC_LHEAP, addr, (void *)heap, FALSE) != SUCCEED)
- HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release object header");
+ HGOTO_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release object header");
done:
FUNC_LEAVE_NOAPI(ret_value);
diff --git a/src/H5HLdbg.c b/src/H5HLdbg.c
index 3f330a5..1197fb8 100644
--- a/src/H5HLdbg.c
+++ b/src/H5HLdbg.c
@@ -30,10 +30,6 @@
#include "H5Iprivate.h" /* ID Functions */
#include "H5MMprivate.h" /* Memory management */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/*-------------------------------------------------------------------------
* Function: H5HL_debug
diff --git a/src/H5HP.c b/src/H5HP.c
index 6fc9d3e..b377593 100644
--- a/src/H5HP.c
+++ b/src/H5HP.c
@@ -20,19 +20,16 @@
*
*/
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5HP_mask
+
/* Private headers needed */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5HPprivate.h" /* Heap routines */
#include "H5FLprivate.h" /* Memory management functions */
-/* Pablo information */
-#define PABLO_MASK H5HP_mask
-
-/* Interface initialization? */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Local Macros */
#define H5HP_START_SIZE 16 /* Initial number of entries for heaps */
@@ -418,7 +415,7 @@ H5HP_count(const H5HP_t *heap)
{
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5HP_count,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5HP_count);
/* Check args */
assert(heap);
@@ -435,9 +432,7 @@ H5HP_count(const H5HP_t *heap)
H5_CHECK_OVERFLOW(heap->nobjs,size_t,ssize_t);
ret_value=(ssize_t)heap->nobjs;
-done:
/* No post-condition check necessary, since heap is constant */
-
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5HP_count() */
@@ -546,9 +541,7 @@ done:
herr_t
H5HP_top(const H5HP_t *heap, int *val)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5HP_top,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5HP_top);
/* Check args */
assert(heap);
@@ -565,11 +558,8 @@ H5HP_top(const H5HP_t *heap, int *val)
/* Get value of the top object in the heap */
*val=heap->heap[1].val;
-done:
-
/* No post-condition check necessary, since heap is constant */
-
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5HP_top() */
@@ -908,9 +898,7 @@ done:
herr_t
H5HP_close(H5HP_t *heap)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5HP_close,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5HP_close);
/* Check args */
assert(heap);
@@ -929,7 +917,6 @@ H5HP_close(H5HP_t *heap)
/* Free actual heap object */
H5FL_FREE(H5HP_t,heap);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5HP_close() */
diff --git a/src/H5I.c b/src/H5I.c
index 2a11a9d..55d0898 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -36,6 +36,13 @@
#define H5I_PACKAGE /*suppress error about including H5Ipkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5I_init_interface
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5I_mask
+
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5FLprivate.h" /* Free Lists */
@@ -53,13 +60,6 @@
#include "H5Tprivate.h" /* Datatypes */
#endif /* H5I_DEBUG_OUTPUT */
-/* Pablo information */
-#define PABLO_MASK H5I_mask
-
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5I_init_interface
-
/* Local Macros */
/*
@@ -126,7 +126,6 @@ static H5I_type_t H5I_next_type = (H5I_type_t) H5I_NTYPES;
H5FL_DEFINE_STATIC(H5I_id_info_t);
/*--------------------- Local function prototypes ---------------------------*/
-static herr_t H5I_init_interface(void);
static H5I_id_info_t *H5I_find_id(hid_t id);
static hid_t H5I_get_file_id(hid_t obj_id);
static int H5I_get_ref(hid_t id);
@@ -135,22 +134,19 @@ static herr_t H5I_debug(H5I_type_t type);
#endif /* H5I_DEBUG_OUTPUT */
-/*-------------------------------------------------------------------------
- * Function: H5I_init_interface
- *
- * Purpose: Initialize interface-specific information.
- *
- * Return: Success: Non-negative
- *
- * Failure: Negative
- *
- * Programmer:
- *
- * Modifications:
- *
- *-------------------------------------------------------------------------
- */
-static herr_t
+/*--------------------------------------------------------------------------
+NAME
+ H5I_init_interface -- Initialize interface-specific information
+USAGE
+ herr_t H5I_init_interface()
+
+RETURNS
+ Non-negative on success/Negative on failure
+DESCRIPTION
+ Initializes any interface-specific data or routines.
+
+--------------------------------------------------------------------------*/
+static herr_t
H5I_init_interface(void)
{
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5I_init_interface);
@@ -186,7 +182,7 @@ H5I_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5I_term_interface);
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
/* How many types are still being used? */
for (type=(H5I_type_t)0; type<H5I_next_type; H5_INC_ENUM(H5I_type_t,type)) {
if ((type_ptr=H5I_id_type_list_g[type]) && type_ptr->id_list)
@@ -203,10 +199,12 @@ H5I_term_interface(void)
}
/* Mark interface closed */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
}
FUNC_LEAVE_NOAPI(n);
}
+
+
/*-------------------------------------------------------------------------
* Function: H5Iregister_type
*
@@ -243,7 +241,7 @@ done:
FUNC_LEAVE_API(ret_value);
}
-
+
/*-------------------------------------------------------------------------
* Function: H5I_register_type
*
@@ -284,7 +282,7 @@ done:
H5I_type_t H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned reserved, H5I_free_t free_func)
{
- H5I_type_t ret_value; /* type ID to return */
+ H5I_type_t ret_value=H5I_BADID; /* type ID to return */
H5I_id_type_t *type_ptr = NULL; /*ptr to the atomic type*/
int i;
int done;
@@ -375,6 +373,7 @@ H5I_type_t H5I_register_type(H5I_type_t type_id, size_t hash_size, unsigned rese
FUNC_LEAVE_NOAPI(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5Inmembers
*
@@ -410,6 +409,8 @@ int H5Inmembers(H5I_type_t type)
done:
FUNC_LEAVE_API(ret_value);
}
+
+
/*-------------------------------------------------------------------------
* Function: H5I_nmembers
*
@@ -454,6 +455,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5Iclear_type
*
@@ -489,6 +491,7 @@ herr_t H5Iclear_type(H5I_type_t type, hbool_t force)
FUNC_LEAVE_API(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5I_clear_type
*
@@ -625,6 +628,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5Idestroy_type
*
@@ -660,6 +664,7 @@ herr_t H5Idestroy_type(H5I_type_t type)
FUNC_LEAVE_API(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5I_destroy_type
*
@@ -703,6 +708,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5Iregister
*
@@ -736,6 +742,7 @@ hid_t H5Iregister(H5I_type_t type, void *object)
FUNC_LEAVE_API(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5I_register
*
@@ -885,6 +892,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5Iobject_verify
*
@@ -922,6 +930,7 @@ void *H5Iobject_verify(hid_t id, H5I_type_t id_type)
FUNC_LEAVE_API(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5I_object_verify
*
@@ -1123,6 +1132,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5Iremove_verify
*
@@ -1161,6 +1171,7 @@ void *H5Iremove_verify(hid_t id, H5I_type_t id_type)
FUNC_LEAVE_API(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5I_remove_verify
*
@@ -1200,6 +1211,7 @@ done:
}
+
/*-------------------------------------------------------------------------
* Function: H5I_remove
*
@@ -1272,7 +1284,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
}
-
+
/*-------------------------------------------------------------------------
* Function: H5Idec_ref
*
@@ -1569,8 +1581,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5I_get_ref() */
-
-
+
/*-------------------------------------------------------------------------
* Function: H5Iinc_type_ref
*
@@ -1653,6 +1664,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5Idec_type_ref
*
@@ -1694,6 +1706,7 @@ herr_t H5Idec_type_ref(H5I_type_t type)
FUNC_LEAVE_API(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5I_dec_type_ref
*
@@ -1755,7 +1768,7 @@ H5I_dec_type_ref(H5I_type_t type)
FUNC_LEAVE_NOAPI(ret_value);
}
-
+
/*-------------------------------------------------------------------------
* Function: H5Iget_type_ref
*
@@ -1797,7 +1810,7 @@ done:
FUNC_LEAVE_API(ret_value);
} /* end H5Iget_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5I_get_type_ref
*
@@ -1838,7 +1851,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5I_get_ref() */
-
+
/*-------------------------------------------------------------------------
* Function: H5Isearch
*
@@ -1882,6 +1895,7 @@ void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key)
FUNC_LEAVE_API(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5I_search
*
diff --git a/src/H5MF.c b/src/H5MF.c
index d4ab9d8..9ea2d79 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -32,18 +32,16 @@
*/
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5MF_mask
+
#include "H5private.h"
#include "H5Eprivate.h"
#include "H5Fpkg.h"
#include "H5FDprivate.h"
#include "H5MFprivate.h"
-#define PABLO_MASK H5MF_mask
-
-/* Is the interface initialized? */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5MF_alloc
@@ -121,7 +119,7 @@ H5MF_xfree(H5F_t *f, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5MF_xfree, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5MF_xfree);
/* check arguments */
assert(f);
diff --git a/src/H5MM.c b/src/H5MM.c
index 5626fdf..5a191b3 100644
--- a/src/H5MM.c
+++ b/src/H5MM.c
@@ -24,15 +24,15 @@
*
*-------------------------------------------------------------------------
*/
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5MM_mask
+
#include "H5private.h"
#include "H5Eprivate.h"
#include "H5MMprivate.h"
-/* Interface initialization? */
-#define PABLO_MASK H5MM_mask
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
#ifndef NDEBUG
/*-------------------------------------------------------------------------
diff --git a/src/H5O.c b/src/H5O.c
index c2ff4f8..1989077 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -28,6 +28,13 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5O_PACKAGE /*suppress error about including H5Opkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5O_init_interface
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5O_mask
+
#include "H5private.h" /* Generic Functions */
#include "H5ACprivate.h" /* Metadata cache */
#include "H5Eprivate.h" /* Error handling */
@@ -43,8 +50,6 @@
#include <sys/time.h>
#endif /* H5_HAVE_GETTIMEOFDAY */
-#define PABLO_MASK H5O_mask
-
/* PRIVATE PROTOTYPES */
static herr_t H5O_init(H5F_t *f, hid_t dxpl_id, size_t size_hint,
H5G_entry_t *ent/*out*/, haddr_t header);
@@ -96,11 +101,6 @@ static const H5AC_class_t H5AC_OHDR[1] = {{
(H5AC_clear_func_t)H5O_clear,
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5O_init_interface
-static herr_t H5O_init_interface(void);
-
/* ID to type mapping */
static const H5O_class_t *const message_type_g[] = {
H5O_NULL, /*0x0000 Null */
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index f454b74..f816b2c 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -67,10 +67,6 @@ const H5O_class_t H5O_ATTR[1] = {{
/* Flags for attribute flag encoding */
#define H5O_ATTR_FLAG_TYPE_SHARED 0x01
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare external the free list for H5S_t's */
H5FL_EXTERN(H5S_t);
@@ -116,7 +112,7 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p, H5O_shared_t UNUSED *
unsigned flags=0; /* Attribute flags */
H5A_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_decode);
/* check args */
assert(f);
@@ -257,7 +253,7 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
hbool_t type_shared; /* Flag to indicate that a shared datatype is used for this attribute */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_encode);
/* check args */
assert(f);
@@ -373,7 +369,7 @@ H5O_attr_copy(const void *_src, void *_dst)
H5A_t *dst = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_copy);
/* check args */
assert(src);
@@ -425,7 +421,7 @@ H5O_attr_size(H5F_t UNUSED *f, const void *_mesg)
hbool_t type_shared; /* Flag to indicate that a shared datatype is used for this attribute */
size_t ret_value = 0;
- FUNC_ENTER_NOAPI(H5O_attr_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_attr_size);
assert(attr);
@@ -464,7 +460,6 @@ H5O_attr_size(H5F_t UNUSED *f, const void *_mesg)
attr->ds_size + /*data space */
attr->data_size; /*the data itself */
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -491,7 +486,7 @@ H5O_attr_reset(void *_mesg)
H5A_t *tmp = NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_reset);
if (attr) {
if (NULL==(tmp = H5MM_malloc(sizeof(H5A_t))))
@@ -526,7 +521,7 @@ H5O_attr_delete(H5F_t UNUSED *f, hid_t dxpl_id, const void *_mesg)
const H5A_t *attr = (const H5A_t *) _mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_delete, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_delete);
/* check args */
assert(f);
@@ -565,7 +560,7 @@ H5O_attr_link(H5F_t UNUSED *f, hid_t dxpl_id, const void *_mesg)
const H5A_t *attr = (const H5A_t *) _mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_link, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_link);
/* check args */
assert(f);
@@ -611,7 +606,7 @@ H5O_attr_debug(H5F_t *f, hid_t dxpl_id, const void *_mesg, FILE * stream, int in
herr_t (*debug)(H5F_t*, hid_t, const void*, FILE*, int, int)=NULL;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_attr_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_attr_debug);
/* check args */
assert(f);
diff --git a/src/H5Obogus.c b/src/H5Obogus.c
index b049654..ddd0a2c 100644
--- a/src/H5Obogus.c
+++ b/src/H5Obogus.c
@@ -64,10 +64,6 @@ const H5O_class_t H5O_BOGUS[1] = {{
H5O_bogus_debug, /*debug the message */
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5O_bogus_decode
@@ -94,7 +90,7 @@ H5O_bogus_decode(H5F_t UNUSED *f, hid_t dxpl_id, const uint8_t *p,
H5O_bogus_t *mesg=NULL;
void *ret_value; /* Return value */
- FUNC_ENTER(H5O_bogus_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_bogus_decode);
/* check args */
assert(f);
@@ -119,7 +115,7 @@ done:
if(ret_value==NULL && mesg!=NULL)
H5MM_xfree(mesg);
- FUNC_LEAVE(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value);
} /* end H5O_bogus_decode() */
@@ -141,7 +137,7 @@ done:
static herr_t
H5O_bogus_encode(H5F_t UNUSED *f, uint8_t *p, const void UNUSED *mesg)
{
- FUNC_ENTER(H5O_bogus_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_bogus_encode);
/* check args */
assert(f);
@@ -151,7 +147,7 @@ H5O_bogus_encode(H5F_t UNUSED *f, uint8_t *p, const void UNUSED *mesg)
/* encode */
UINT32ENCODE(p, H5O_BOGUS_VALUE);
- FUNC_LEAVE(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5O_bogus_encode() */
@@ -178,7 +174,7 @@ H5O_bogus_encode(H5F_t UNUSED *f, uint8_t *p, const void UNUSED *mesg)
static size_t
H5O_bogus_size(H5F_t UNUSED *f, const void UNUSED *mesg)
{
- FUNC_ENTER(H5O_bogus_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_bogus_size);
/* check args */
assert(f);
@@ -208,7 +204,7 @@ H5O_bogus_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
{
const H5O_bogus_t *mesg = (const H5O_bogus_t *)_mesg;
- FUNC_ENTER(H5O_name_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_debug);
/* check args */
assert(f);
@@ -220,7 +216,7 @@ H5O_bogus_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
fprintf(stream, "%*s%-*s `%u'\n", indent, "", fwidth,
"Bogus Value:", mesg->u);
- FUNC_LEAVE(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
#endif /* H5O_ENABLE_BOGUS */
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index e8dca5b..12e5ee7 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -61,9 +61,6 @@ const H5O_class_t H5O_CONT[1] = {{
H5O_cont_debug, /*debugging */
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
/*-------------------------------------------------------------------------
* Function: H5O_cont_decode
@@ -88,7 +85,7 @@ H5O_cont_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_t U
H5O_cont_t *cont = NULL;
void *ret_value;
- FUNC_ENTER_NOAPI(H5O_cont_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_cont_decode);
/* check args */
assert(f);
@@ -128,9 +125,8 @@ static herr_t
H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_cont_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cont_encode);
/* check args */
assert(f);
@@ -141,8 +137,7 @@ H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg)
H5F_addr_encode(f, &p, cont->addr);
H5F_ENCODE_LENGTH(f, p, cont->size);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -166,9 +161,8 @@ H5O_cont_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
int indent, int fwidth)
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_cont_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_cont_debug);
/* check args */
assert(f);
@@ -187,6 +181,5 @@ H5O_cont_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
"Points to chunk number:",
(int) (cont->chunkno));
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 1d7ce7c..c5a9fe8 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -66,10 +66,6 @@ const H5O_class_t H5O_DTYPE[1] = {{
* class objects (array definitely, potentially compound & vlen sequences also) */
#define H5O_DTYPE_VERSION_UPDATED 2
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare external the free list for H5T_t's */
H5FL_EXTERN(H5T_t);
@@ -828,7 +824,7 @@ H5O_dtype_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p,
H5T_t *dt = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dtype_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_decode);
/* check args */
assert(p);
@@ -876,7 +872,7 @@ H5O_dtype_encode(H5F_t UNUSED *f, uint8_t *p, const void *mesg)
const H5T_t *dt = (const H5T_t *) mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dtype_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_encode);
/* check args */
assert(f);
@@ -916,7 +912,7 @@ H5O_dtype_copy(const void *_src, void *_dst)
H5T_t *dst = NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dtype_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_copy);
/* check args */
assert(src);
@@ -966,7 +962,7 @@ H5O_dtype_size(H5F_t *f, const void *mesg)
size_t ret_value = 8;
const H5T_t *dt = (const H5T_t *) mesg;
- FUNC_ENTER_NOAPI(H5O_dtype_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_size);
assert(mesg);
@@ -1028,7 +1024,6 @@ H5O_dtype_size(H5F_t *f, const void *mesg)
break;
}
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -1052,15 +1047,13 @@ static herr_t
H5O_dtype_reset(void *_mesg)
{
H5T_t *dt = (H5T_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dtype_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_reset);
if (dt)
H5T_free(dt);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -1081,16 +1074,13 @@ done:
static herr_t
H5O_dtype_free (void *mesg)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_dtype_free, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_free);
assert (mesg);
H5FL_FREE(H5T_t,mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -1116,7 +1106,7 @@ H5O_dtype_get_share(H5F_t UNUSED *f, const void *_mesg,
const H5T_t *dt = (const H5T_t *)_mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dtype_get_share, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_dtype_get_share);
assert (dt);
assert (sh);
@@ -1157,9 +1147,8 @@ H5O_dtype_set_share (H5F_t UNUSED *f, void *_mesg/*in,out*/,
const H5O_shared_t *sh)
{
H5T_t *dt = (H5T_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dtype_set_share, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_set_share);
assert (dt);
assert (sh);
@@ -1175,8 +1164,7 @@ H5O_dtype_set_share (H5F_t UNUSED *f, void *_mesg/*in,out*/,
/* Note that the datatype is a named datatype */
dt->state = H5T_STATE_NAMED;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -1208,9 +1196,8 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
char buf[256];
unsigned i;
size_t k;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_dtype_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_dtype_debug);
/* check args */
assert(f);
@@ -1494,6 +1481,5 @@ H5O_dtype_debug(H5F_t *f, hid_t dxpl_id, const void *mesg, FILE *stream,
}
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 9155611..bc3b293 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -62,10 +62,6 @@ const H5O_class_t H5O_EFL[1] = {{
#define H5O_EFL_VERSION 1
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5O_efl_decode
@@ -96,7 +92,7 @@ H5O_efl_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p, H5O_shared_t UNUSED *s
size_t u; /* Local index variable */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_efl_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_efl_decode);
/* Check args */
assert(f);
@@ -202,9 +198,8 @@ H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
size_t u; /* Local index variable */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_efl_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_efl_encode);
/* check args */
assert(f);
@@ -241,8 +236,7 @@ H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg)
H5F_ENCODE_LENGTH (f, p, mesg->slot[u].size);
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -271,7 +265,7 @@ H5O_efl_copy(const void *_mesg, void *_dest)
size_t u; /* Local index variable */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_efl_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_efl_copy);
/* check args */
assert(mesg);
@@ -328,7 +322,7 @@ H5O_efl_size(H5F_t *f, const void *_mesg)
const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
size_t ret_value = 0;
- FUNC_ENTER_NOAPI(H5O_efl_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_efl_size);
/* check args */
assert(f);
@@ -342,7 +336,6 @@ H5O_efl_size(H5F_t *f, const void *_mesg)
H5F_SIZEOF_SIZE(f) + /*file offset */
H5F_SIZEOF_SIZE(f)); /*file size */
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -367,9 +360,8 @@ H5O_efl_reset(void *_mesg)
{
H5O_efl_t *mesg = (H5O_efl_t *) _mesg;
size_t u; /* Local index variable */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_efl_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_efl_reset);
/* check args */
assert(mesg);
@@ -382,8 +374,7 @@ H5O_efl_reset(void *_mesg)
if(mesg->slot)
mesg->slot = H5MM_xfree(mesg->slot);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -409,7 +400,7 @@ H5O_efl_total_size (H5O_efl_t *efl)
{
hsize_t ret_value = 0, tmp;
- FUNC_ENTER_NOAPI(H5O_efl_total_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_efl_total_size);
if (efl->nused>0 &&
H5O_EFL_UNLIMITED==efl->slot[efl->nused-1].size) {
@@ -461,7 +452,7 @@ H5O_efl_read (const H5O_efl_t *efl, haddr_t addr, size_t size, uint8_t *buf)
size_t u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_efl_read, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_efl_read);
/* Check args */
assert (efl && efl->nused>0);
@@ -547,7 +538,7 @@ H5O_efl_write (const H5O_efl_t *efl, haddr_t addr, size_t size, const uint8_t *b
size_t u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_efl_write, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_efl_write);
/* Check args */
assert (efl && efl->nused>0);
@@ -783,9 +774,8 @@ H5O_efl_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * s
const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
char buf[64];
size_t u;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_efl_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_efl_debug);
/* check args */
assert(f);
@@ -822,6 +812,5 @@ H5O_efl_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE * s
(unsigned long)(mesg->slot[u].size));
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index ffe42a8..57039bf 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -90,10 +90,6 @@ const H5O_class_t H5O_FILL_NEW[1] = {{
/* Revised version of the "new" fill value information */
#define H5O_FILL_VERSION_2 2
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a free list to manage the H5O_fill_new_t struct */
H5FL_DEFINE(H5O_fill_new_t);
@@ -127,7 +123,7 @@ H5O_fill_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p,
int version;
void *ret_value;
- FUNC_ENTER_NOAPI(H5O_fill_new_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_fill_new_decode);
assert(f);
assert(p);
@@ -212,7 +208,7 @@ H5O_fill_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p,
H5O_fill_t *mesg=NULL;
void *ret_value;
- FUNC_ENTER_NOAPI(H5O_fill_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_fill_decode);
assert(f);
assert(p);
@@ -261,9 +257,8 @@ static herr_t
H5O_fill_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const H5O_fill_new_t *mesg = (const H5O_fill_new_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_fill_new_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_new_encode);
assert(f);
assert(p);
@@ -288,8 +283,7 @@ H5O_fill_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
} /* end if */
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -311,9 +305,8 @@ static herr_t
H5O_fill_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_fill_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_encode);
assert(f);
assert(p);
@@ -323,8 +316,7 @@ H5O_fill_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
if(mesg->buf)
HDmemcpy(p, mesg->buf, mesg->size);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -354,7 +346,7 @@ H5O_fill_new_copy(const void *_mesg, void *_dest)
H5O_fill_new_t *dest = (H5O_fill_new_t *)_dest;
void *ret_value;
- FUNC_ENTER_NOAPI(H5O_fill_new_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_fill_new_copy);
assert(mesg);
@@ -426,7 +418,7 @@ H5O_fill_copy(const void *_mesg, void *_dest)
H5O_fill_t *dest = (H5O_fill_t *)_dest;
void *ret_value;
- FUNC_ENTER_NOAPI(H5O_fill_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_fill_copy);
assert(mesg);
@@ -492,7 +484,7 @@ H5O_fill_new_size(H5F_t UNUSED *f, const void *_mesg)
const H5O_fill_new_t *mesg = (const H5O_fill_new_t *)_mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI(H5O_fill_new_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_new_size);
assert(f);
assert(mesg);
@@ -505,7 +497,6 @@ H5O_fill_new_size(H5F_t UNUSED *f, const void *_mesg)
ret_value += 4 + /* Fill value size */
(mesg->size>0 ? mesg->size : 0); /* Size of fill value */
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -532,18 +523,13 @@ static size_t
H5O_fill_size(H5F_t UNUSED *f, const void *_mesg)
{
const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg;
- size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_fill_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_size);
assert(f);
assert(mesg);
- /* Set return value */
- ret_value=4+mesg->size;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(4+mesg->size);
}
@@ -567,9 +553,8 @@ static herr_t
H5O_fill_new_reset(void *_mesg)
{
H5O_fill_new_t *mesg = (H5O_fill_new_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_fill_new_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_new_reset);
assert(mesg);
@@ -584,8 +569,7 @@ H5O_fill_new_reset(void *_mesg)
mesg->fill_time = (H5D_fill_time_t)0;
mesg->fill_defined = FALSE;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -607,9 +591,8 @@ static herr_t
H5O_fill_reset(void *_mesg)
{
H5O_fill_t *mesg = (H5O_fill_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_fill_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_reset);
assert(mesg);
@@ -621,8 +604,7 @@ H5O_fill_reset(void *_mesg)
mesg->type = NULL;
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -643,16 +625,13 @@ done:
static herr_t
H5O_fill_new_free (void *mesg)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_fill_new_free, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_new_free);
assert (mesg);
H5FL_FREE(H5O_fill_new_t,mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -673,16 +652,13 @@ done:
static herr_t
H5O_fill_free (void *mesg)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_fill_free, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_free);
assert (mesg);
H5FL_FREE(H5O_fill_t,mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -706,9 +682,8 @@ H5O_fill_new_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FIL
{
const H5O_fill_new_t *mesg = (const H5O_fill_new_t *)_mesg;
H5D_fill_value_t fill_status; /* Whether the fill value is defined */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_fill_new_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_new_debug);
assert(f);
assert(mesg);
@@ -786,8 +761,7 @@ H5O_fill_new_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FIL
fprintf(stream, "<dataset type>\n");
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -810,9 +784,8 @@ H5O_fill_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *s
int indent, int fwidth)
{
const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_fill_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_fill_debug);
assert(f);
assert(mesg);
@@ -830,8 +803,7 @@ H5O_fill_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *s
fprintf(stream, "<dataset type>\n");
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 1077a37..eba35ae 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -20,6 +20,10 @@
#define H5O_PACKAGE /*suppress error about including H5Opkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5O_layout_mask
+
#include "H5private.h"
#include "H5Dprivate.h"
#include "H5Eprivate.h"
@@ -64,11 +68,6 @@ const H5O_class_t H5O_LAYOUT[1] = {{
#define H5O_LAYOUT_VERSION_2 2
#define H5O_LAYOUT_VERSION_3 3
-/* Interface initialization */
-#define PABLO_MASK H5O_layout_mask
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a free list to manage the H5O_layout_t struct */
H5FL_DEFINE(H5O_layout_t);
@@ -109,7 +108,7 @@ H5O_layout_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_t
unsigned u;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_layout_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_layout_decode);
/* check args */
assert(f);
@@ -273,7 +272,7 @@ H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg)
unsigned u;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_layout_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_layout_encode);
/* check args */
assert(f);
@@ -351,7 +350,7 @@ H5O_layout_copy(const void *_mesg, void *_dest)
H5O_layout_t *dest = (H5O_layout_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_layout_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_layout_copy);
/* check args */
assert(mesg);
@@ -403,7 +402,7 @@ H5O_layout_meta_size(H5F_t *f, const void *_mesg)
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI(H5O_layout_meta_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_layout_meta_size);
/* check args */
assert(f);
@@ -469,7 +468,7 @@ H5O_layout_size(H5F_t *f, const void *_mesg)
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI(H5O_layout_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_layout_size);
/* check args */
assert(f);
@@ -478,7 +477,7 @@ H5O_layout_size(H5F_t *f, const void *_mesg)
ret_value = H5O_layout_meta_size(f, mesg);
if(mesg->type==H5D_COMPACT)
ret_value += mesg->u.compact.size;/* data for compact dataset */
-done:
+
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -502,9 +501,8 @@ static herr_t
H5O_layout_reset (void *_mesg)
{
H5O_layout_t *mesg = (H5O_layout_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_layout_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_layout_reset);
if(mesg) {
/* Free the compact storage buffer */
@@ -515,8 +513,7 @@ H5O_layout_reset (void *_mesg)
mesg->type=H5D_CONTIGUOUS;
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -538,9 +535,8 @@ static herr_t
H5O_layout_free (void *_mesg)
{
H5O_layout_t *mesg = (H5O_layout_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_layout_free, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_layout_free);
assert (mesg);
@@ -550,8 +546,7 @@ H5O_layout_free (void *_mesg)
H5FL_FREE(H5O_layout_t,mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -575,7 +570,7 @@ H5O_layout_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg)
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_layout_delete, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_layout_delete);
/* check args */
assert(f);
@@ -628,9 +623,8 @@ H5O_layout_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE
{
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
unsigned u;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_layout_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_layout_debug);
/* check args */
assert(f);
@@ -664,6 +658,5 @@ H5O_layout_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE
"Data Size:", mesg->u.compact.size);
} /* end else */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index 0f56ee1..ac285bd 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -83,10 +83,6 @@ const H5O_class_t H5O_MTIME_NEW[1] = {{
H5O_mtime_debug, /*debug the message */
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Current version of new mtime information */
#define H5O_MTIME_VERSION 1
@@ -123,7 +119,7 @@ H5O_mtime_new_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p,
int version; /* Version of mtime information */
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_mtime_new_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_mtime_new_decode);
/* check args */
assert(f);
@@ -181,7 +177,7 @@ H5O_mtime_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p,
struct tm tm;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_mtime_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_mtime_decode);
/* check args */
assert(f);
@@ -301,9 +297,8 @@ static herr_t
H5O_mtime_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const time_t *mesg = (const time_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_mtime_new_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_new_encode);
/* check args */
assert(f);
@@ -321,8 +316,7 @@ H5O_mtime_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
/* Encode time */
UINT32ENCODE(p, *mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5O_mtime_new_encode() */
@@ -346,9 +340,8 @@ H5O_mtime_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const time_t *mesg = (const time_t *) _mesg;
struct tm *tm;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_mtime_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_encode);
/* check args */
assert(f);
@@ -361,8 +354,7 @@ H5O_mtime_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -391,7 +383,7 @@ H5O_mtime_copy(const void *_mesg, void *_dest)
time_t *dest = (time_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_mtime_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_mtime_copy);
/* check args */
assert(mesg);
@@ -432,16 +424,13 @@ done:
static size_t
H5O_mtime_new_size(H5F_t UNUSED * f, const void UNUSED * mesg)
{
- size_t ret_value=8; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_mtime_new_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_new_size);
/* check args */
assert(f);
assert(mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(8);
} /* end H5O_mtime_new_size() */
@@ -468,16 +457,13 @@ done:
static size_t
H5O_mtime_size(H5F_t UNUSED * f, const void UNUSED * mesg)
{
- size_t ret_value=16; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_mtime_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_size);
/* check args */
assert(f);
assert(mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(16);
}
@@ -499,12 +485,9 @@ done:
static herr_t
H5O_mtime_reset(void UNUSED *_mesg)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_mtime_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_reset);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -525,16 +508,13 @@ done:
static herr_t
H5O_mtime_free (void *mesg)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_mtime_free, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_free);
assert (mesg);
H5FL_FREE(time_t,mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -560,9 +540,8 @@ H5O_mtime_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
const time_t *mesg = (const time_t *)_mesg;
struct tm *tm;
char buf[128];
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_mtime_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_mtime_debug);
/* check args */
assert(f);
@@ -578,7 +557,6 @@ H5O_mtime_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Time:", buf);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 231a177..0f1893d 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -61,10 +61,6 @@ const H5O_class_t H5O_NAME[1] = {{
H5O_name_debug, /*debug the message */
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5O_name_decode
@@ -91,7 +87,7 @@ H5O_name_decode(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const uint8_t *p,
H5O_name_t *mesg;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_name_decode);
/* check args */
assert(f);
@@ -136,9 +132,8 @@ static herr_t
H5O_name_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_encode);
/* check args */
assert(f);
@@ -148,8 +143,7 @@ H5O_name_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
/* encode */
HDstrcpy((char*)p, mesg->s);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -178,7 +172,7 @@ H5O_name_copy(const void *_mesg, void *_dest)
H5O_name_t *dest = (H5O_name_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_name_copy);
/* check args */
assert(mesg);
@@ -224,7 +218,7 @@ H5O_name_size(H5F_t UNUSED *f, const void *_mesg)
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI(H5O_name_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_size);
/* check args */
assert(f);
@@ -232,7 +226,6 @@ H5O_name_size(H5F_t UNUSED *f, const void *_mesg)
ret_value = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -257,9 +250,8 @@ static herr_t
H5O_name_reset(void *_mesg)
{
H5O_name_t *mesg = (H5O_name_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_reset);
/* check args */
assert(mesg);
@@ -267,8 +259,7 @@ H5O_name_reset(void *_mesg)
/* reset */
mesg->s = H5MM_xfree(mesg->s);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -292,9 +283,8 @@ H5O_name_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *s
int indent, int fwidth)
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_name_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_name_debug);
/* check args */
assert(f);
@@ -307,6 +297,5 @@ H5O_name_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *s
"Name:",
mesg->s);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 5240f72..3485968 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -30,10 +30,6 @@
/* Pablo mask */
#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);
@@ -93,7 +89,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 +180,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 +224,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);
}
@@ -258,9 +252,9 @@ H5O_pline_copy (const void *_src, void *_dst/*out*/)
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 +324,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 +344,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 +379,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 +392,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 +413,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 +445,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 +490,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);
}
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 35f00cc..a78af13 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -58,10 +58,6 @@ const H5O_class_t H5O_SDSPACE[1] = {{
/* Initial version of the "new" data space information */
#define H5O_SDSPACE_VERSION_2 2
-/* Is the interface initialized? */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare external the free list for H5S_extent_t's */
H5FL_EXTERN(H5S_extent_t);
@@ -109,7 +105,7 @@ H5O_sdspace_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_
unsigned i; /* local counting variable */
unsigned flags, version;
- FUNC_ENTER_NOAPI(H5O_sdspace_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_sdspace_decode);
/* check args */
assert(f);
@@ -219,9 +215,8 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *mesg)
const H5S_extent_t *sdim = (const H5S_extent_t *) mesg;
unsigned u; /* Local counting variable */
unsigned flags = 0;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_sdspace_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_encode);
/* check args */
assert(f);
@@ -257,8 +252,7 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *mesg)
}
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -289,7 +283,7 @@ H5O_sdspace_copy(const void *mesg, void *dest)
H5S_extent_t *dst = (H5S_extent_t *) dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_sdspace_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_sdspace_copy);
/* check args */
assert(src);
@@ -339,7 +333,7 @@ H5O_sdspace_size(H5F_t *f, const void *mesg)
*/
size_t ret_value = 8;
- FUNC_ENTER_NOAPI(H5O_sdspace_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_size);
/* add in the dimension sizes */
ret_value += space->rank * H5F_SIZEOF_SIZE (f);
@@ -347,7 +341,6 @@ H5O_sdspace_size(H5F_t *f, const void *mesg)
/* add in the space for the maximum dimensions, if they are present */
ret_value += space->max ? space->rank * H5F_SIZEOF_SIZE (f) : 0;
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -371,14 +364,12 @@ static herr_t
H5O_sdspace_reset(void *_mesg)
{
H5S_extent_t *mesg = (H5S_extent_t*)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_sdspace_reset, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_reset);
H5S_extent_release(mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -399,16 +390,13 @@ done:
static herr_t
H5O_sdspace_free (void *mesg)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_sdspace_free, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_free);
assert (mesg);
H5FL_FREE(H5S_extent_t,mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -436,9 +424,8 @@ H5O_sdspace_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg,
{
const H5S_extent_t *sdim = (const H5S_extent_t *) mesg;
unsigned u; /* local counting variable */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_sdspace_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_sdspace_debug);
/* check args */
assert(f);
@@ -473,6 +460,5 @@ H5O_sdspace_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *mesg,
}
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 1444e03..0024d8d 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -28,6 +28,10 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5O_PACKAGE /*suppress error about including H5Opkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5O_shared_mask
+
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* File access */
@@ -67,11 +71,6 @@ const H5O_class_t H5O_SHARED[1] = {{
/* New version, with just address of object as link for object header sharing */
#define H5O_SHARED_VERSION 2
-/* Interface initialization */
-#define PABLO_MASK H5O_shared_mask
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5O_shared_read
@@ -158,7 +157,7 @@ H5O_shared_link_adj(H5F_t *f, hid_t dxpl_id, const H5O_shared_t *shared, int adj
{
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_shared_link_adj,FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_shared_link_adj);
/* check args */
assert(f);
@@ -214,7 +213,7 @@ H5O_shared_decode (H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *buf, H5O_share
unsigned flags, version;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_shared_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_shared_decode);
/* Check args */
assert (f);
@@ -287,9 +286,8 @@ H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg)
{
const H5O_shared_t *mesg = (const H5O_shared_t *)_mesg;
unsigned flags;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_shared_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_encode);
/* Check args */
assert (f);
@@ -323,8 +321,7 @@ H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg)
H5F_addr_encode (f, &buf, mesg->u.ent.header);
#endif /* OLD_WAY */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -353,7 +350,7 @@ H5O_shared_copy(const void *_mesg, void *_dest)
H5O_shared_t *dest = (H5O_shared_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_shared_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_shared_copy);
/* check args */
assert(mesg);
@@ -393,7 +390,7 @@ H5O_shared_size (H5F_t *f, const void *_mesg)
const H5O_shared_t *shared = (const H5O_shared_t *) _mesg;
size_t ret_value;
- FUNC_ENTER_NOAPI(H5O_shared_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_size);
ret_value = 1 + /*version */
1 + /*the flags field */
@@ -401,7 +398,6 @@ H5O_shared_size (H5F_t *f, const void *_mesg)
(H5F_SIZEOF_ADDR(f)+4) : /*sharing via global heap */
H5F_SIZEOF_ADDR(f)); /*sharing by another obj hdr */
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -426,7 +422,7 @@ H5O_shared_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg)
const H5O_shared_t *shared = (const H5O_shared_t *) _mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_shared_delete, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_shared_delete);
/* check args */
assert(f);
@@ -462,7 +458,7 @@ H5O_shared_link(H5F_t *f, hid_t dxpl_id, const void *_mesg)
const H5O_shared_t *shared = (const H5O_shared_t *) _mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_shared_link, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_shared_link);
/* check args */
assert(f);
@@ -496,9 +492,8 @@ H5O_shared_debug (H5F_t UNUSED *f, hid_t dxpl_id, const void *_mesg,
FILE *stream, int indent, int fwidth)
{
const H5O_shared_t *mesg = (const H5O_shared_t *)_mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_shared_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_shared_debug);
/* Check args */
assert (f);
@@ -525,6 +520,5 @@ H5O_shared_debug (H5F_t UNUSED *f, hid_t dxpl_id, const void *_mesg,
HADDR_UNDEF);
}
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 8b33884..b47ad3b 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -65,10 +65,6 @@ const H5O_class_t H5O_STAB[1] = {{
H5O_stab_debug, /*debug the message */
}};
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a free list to manage the H5O_stab_t struct */
H5FL_DEFINE_STATIC(H5O_stab_t);
@@ -97,7 +93,7 @@ H5O_stab_decode(H5F_t *f, hid_t UNUSED dxpl_id, const uint8_t *p, H5O_shared_t U
H5O_stab_t *stab=NULL;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_stab_decode, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_stab_decode);
/* check args */
assert(f);
@@ -142,9 +138,8 @@ static herr_t
H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_stab_encode, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_stab_encode);
/* check args */
assert(f);
@@ -155,8 +150,7 @@ H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg)
H5F_addr_encode(f, &p, stab->btree_addr);
H5F_addr_encode(f, &p, stab->heap_addr);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -234,7 +228,7 @@ H5O_stab_copy(const void *_mesg, void *_dest)
H5O_stab_t *dest = (H5O_stab_t *) _dest;
void *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_stab_copy, NULL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_stab_copy);
/* check args */
assert(stab);
@@ -276,12 +270,11 @@ H5O_stab_size(H5F_t *f, const void UNUSED *_mesg)
{
size_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_stab_size, 0);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_stab_size);
/* Set return value */
ret_value=2 * H5F_SIZEOF_ADDR(f);
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
@@ -303,16 +296,13 @@ done:
static herr_t
H5O_stab_free (void *mesg)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5O_stab_free, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_stab_free);
assert (mesg);
H5FL_FREE(H5O_stab_t,mesg);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -336,7 +326,7 @@ H5O_stab_delete(H5F_t *f, hid_t dxpl_id, const void *_mesg)
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_stab_delete, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5O_stab_delete);
/* check args */
assert(f);
@@ -371,9 +361,8 @@ H5O_stab_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
int indent, int fwidth)
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_stab_debug, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5O_stab_debug);
/* check args */
assert(f);
@@ -388,6 +377,5 @@ H5O_stab_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
"Name heap address:", stab->heap_addr);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5P.c b/src/H5P.c
index 2c198ce..af10283 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -19,6 +19,13 @@
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5P_init_interface
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5P_mask
+
/* Private header files */
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
@@ -29,14 +36,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Ppkg.h" /* Property lists */
-/* Pablo mask */
-#define PABLO_MASK H5P_mask
-
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5P_init_interface
-static herr_t H5P_init_interface(void);
-
/* Local variables */
/*
@@ -312,7 +311,7 @@ H5P_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5P_term_interface);
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
/* Destroy HDF5 library property classes & lists */
/* Check if there are any open property list classes or lists */
@@ -357,7 +356,7 @@ H5P_term_interface(void)
H5I_dec_type_ref(H5I_GENPROP_CLS);
n++; /*H5I*/
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
}
}
FUNC_LEAVE_NOAPI(n);
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index edf386e..1084ca3 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -14,6 +14,10 @@
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5P_dcpl_mask
+
/* Private header files */
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
@@ -23,13 +27,6 @@
#include "H5Ppkg.h" /* Property lists */
#include "H5Zprivate.h" /* Data filters */
-/* Pablo mask */
-#define PABLO_MASK H5Pdcpl_mask
-
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local datatypes */
/* Static function prototypes */
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index 94b115e..fc84cdf 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -14,19 +14,16 @@
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+/* Pablo mask */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5P_dxpl_mask
+
/* Private header files */
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
#include "H5Eprivate.h" /* Error handling */
#include "H5Ppkg.h" /* Property lists */
-/* Pablo mask */
-#define PABLO_MASK H5Pdxpl_mask
-
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local datatypes */
/* Static function prototypes */
diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c
index b7168dc..371e4c3 100644
--- a/src/H5Pfapl.c
+++ b/src/H5Pfapl.c
@@ -12,10 +12,12 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* $Id$ */
-
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5P_fapl_mask
+
/* Private header files */
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets */
@@ -28,13 +30,6 @@
/* Default file driver - see H5Pget_driver() */
#include "H5FDsec2.h" /* Posix unbuffered I/O file driver */
-/* Pablo mask */
-#define PABLO_MASK H5Pfapl_mask
-
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local datatypes */
/* Static function prototypes */
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 3d7d0ce..25e7b3f 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -12,10 +12,12 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* $Id$ */
-
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5P_fcpl_mask
+
/* Private header files */
#include "H5private.h" /* Generic Functions */
#include "H5Bprivate.h" /* B-tree subclass names */
@@ -23,13 +25,6 @@
#include "H5Fprivate.h" /* Files */
#include "H5Ppkg.h" /* Property lists */
-/* Pablo mask */
-#define PABLO_MASK H5Pfcpl_mask
-
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local datatypes */
/* Static function prototypes */
diff --git a/src/H5Ptest.c b/src/H5Ptest.c
index 56a5f1c..f92ee48 100644
--- a/src/H5Ptest.c
+++ b/src/H5Ptest.c
@@ -21,19 +21,16 @@
#define H5P_PACKAGE /*suppress error about including H5Ppkg */
#define H5P_TESTING /*suppress warning about H5P testing funcs*/
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5P_test_mask
+
/* Private header files */
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5Ppkg.h" /* Property lists */
-/* Pablo mask */
-#define PABLO_MASK H5Ptest_mask
-
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local variables */
/* Local typedefs */
diff --git a/src/H5R.c b/src/H5R.c
index 72e629d..cd28345 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -14,6 +14,13 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5R_init_interface
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5R_mask
+
#include "H5private.h" /* Generic Functions */
#include "H5Iprivate.h" /* ID Functions */
#include "H5Dprivate.h" /* Datasets */
@@ -26,12 +33,6 @@
#include "H5Sprivate.h" /* Dataspace functions */
#include "H5Tprivate.h" /* Datatypes */
-/* Interface initialization */
-#define PABLO_MASK H5R_mask
-#define INTERFACE_INIT H5R_init_interface
-static int interface_initialize_g = 0;
-static herr_t H5R_init_interface(void);
-
/* Static functions */
static herr_t H5R_create(void *ref, H5G_entry_t *loc, const char *name,
H5R_type_t ref_type, H5S_t *space, hid_t dxpl_id);
@@ -93,12 +94,12 @@ H5R_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5R_term_interface);
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_REFERENCE))) {
H5I_clear_type(H5I_REFERENCE, FALSE);
} else {
H5I_dec_type_ref(H5I_REFERENCE);
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}
diff --git a/src/H5RS.c b/src/H5RS.c
index d55d725..1a7b332 100644
--- a/src/H5RS.c
+++ b/src/H5RS.c
@@ -19,16 +19,13 @@
*
*/
-#include "H5Eprivate.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5RSprivate.h" /* Reference-counted strings */
-
/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5RS_mask
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
+#include "H5Eprivate.h" /* Error handling */
+#include "H5FLprivate.h" /* Free lists */
+#include "H5RSprivate.h" /* Reference-counted strings */
/* Private typedefs & structs */
struct H5RS_str_t {
@@ -226,9 +223,7 @@ done:
herr_t
H5RS_decr(H5RS_str_t *rs)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5RS_decr,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5RS_decr);
/* Sanity check */
assert(rs);
@@ -241,8 +236,7 @@ H5RS_decr(H5RS_str_t *rs)
H5FL_FREE(H5RS_str_t,rs);
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5RS_decr() */
@@ -267,9 +261,7 @@ done:
herr_t
H5RS_incr(H5RS_str_t *rs)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5RS_incr,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5RS_incr);
/* Sanity check */
assert(rs);
@@ -287,8 +279,7 @@ H5RS_incr(H5RS_str_t *rs)
/* Increment reference count for string */
rs->n++;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5RS_incr() */
@@ -314,14 +305,13 @@ done:
H5RS_str_t *
H5RS_dup(H5RS_str_t *ret_value)
{
- FUNC_ENTER_NOAPI(H5RS_dup,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5RS_dup);
/* Check for valid reference counted string */
if(ret_value!=NULL)
/* Increment reference count for string */
ret_value->n++;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5RS_dup() */
@@ -384,18 +374,13 @@ H5RS_cmp(const H5RS_str_t *rs1, const H5RS_str_t *rs2)
ssize_t
H5RS_len(const H5RS_str_t *rs)
{
- ssize_t ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5RS_len,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5RS_len);
/* Sanity check */
assert(rs);
assert(rs->s);
- ret_value=(ssize_t)HDstrlen(rs->s);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI((ssize_t)HDstrlen(rs->s));
} /* end H5RS_len() */
@@ -423,18 +408,13 @@ done:
char *
H5RS_get_str(const H5RS_str_t *rs)
{
- char *ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5RS_get_str,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5RS_get_str);
/* Sanity check */
assert(rs);
assert(rs->s);
- ret_value=rs->s;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(rs->s);
} /* end H5RS_get_str() */
@@ -460,17 +440,12 @@ done:
unsigned
H5RS_get_count(const H5RS_str_t *rs)
{
- unsigned ret_value; /* Return value */
-
- FUNC_ENTER_NOAPI(H5RS_get_count,0);
+ FUNC_ENTER_NOAPI_NOFUNC(H5RS_get_count);
/* Sanity check */
assert(rs);
assert(rs->n>0);
- ret_value=rs->n;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(rs->n);
} /* end H5RS_get_count() */
diff --git a/src/H5S.c b/src/H5S.c
index 1001395..c01ed89 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -14,6 +14,13 @@
#define H5S_PACKAGE /*suppress error about including H5Spkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5S_init_interface
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5S_mask
+
#define _H5S_IN_H5S_C
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
@@ -29,12 +36,6 @@ static herr_t H5S_set_extent_simple (H5S_t *space, unsigned rank,
const hsize_t *dims, const hsize_t *max);
static htri_t H5S_is_simple(const H5S_t *sdim);
-/* Interface initialization */
-#define PABLO_MASK H5S_mask
-#define INTERFACE_INIT H5S_init_interface
-static int interface_initialize_g = 0;
-static herr_t H5S_init_interface(void);
-
#ifdef H5S_DEBUG
/* Names of the selection names, for debugging */
static const char *H5S_sel_names[]={
@@ -134,7 +135,7 @@ H5S_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_term_interface);
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
if ((n=H5I_nmembers(H5I_DATASPACE))) {
H5I_clear_type(H5I_DATASPACE, FALSE);
} else {
@@ -265,7 +266,7 @@ H5S_term_interface(void)
H5S_nconv_g = H5S_aconv_g = 0;
/* Shut down interface */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
}
diff --git a/src/H5ST.c b/src/H5ST.c
index 90d61a3..e88af28 100644
--- a/src/H5ST.c
+++ b/src/H5ST.c
@@ -25,10 +25,6 @@ Bentley and Robert Sedgewick in the April, 1998, Dr. Dobb's Journal.
#include "H5FLprivate.h" /* Free lists */
#include "H5STprivate.h" /* Ternary search trees */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a free list to manage the H5ST_node_t struct */
H5FL_DEFINE_STATIC(H5ST_node_t);
@@ -253,7 +249,7 @@ H5ST_search(H5ST_tree_t *tree, const char *s)
H5ST_ptr_t p; /* Temporary pointer to TST node */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_search,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5ST_search);
p = tree->root;
while (p) {
@@ -550,7 +546,7 @@ H5ST_findnext(H5ST_ptr_t p)
H5ST_ptr_t q; /* Temporary pointer to TST node */
H5ST_ptr_t ret_value=NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5ST_findnext,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5ST_findnext);
/* Find the next node at the current level, or go back up the tree */
do {
@@ -743,7 +739,7 @@ done:
herr_t
H5ST_dump_internal(H5ST_ptr_t p)
{
- FUNC_ENTER_NOAPI_NOINIT(H5ST_dump_internal);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5ST_dump_internal);
if (p) {
printf("p=%p\n",p);
@@ -762,7 +758,6 @@ H5ST_dump_internal(H5ST_ptr_t p)
H5ST_dump_internal(p->hikid);
} /* end if */
-done:
FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5ST_dump_internal() */
@@ -788,14 +783,11 @@ done:
herr_t
H5ST_dump(H5ST_tree_t *tree)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5ST_dump,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5ST_dump,NULL);
/* Dump the tree */
H5ST_dump_internal(tree->root);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5ST_dump() */
#endif /* H5ST_DEBUG */
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 8b53cb9..13b89c0 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -23,7 +23,7 @@
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Sall_mask
+#define PABLO_MASK H5S_all_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
@@ -31,10 +31,6 @@
#include "H5Spkg.h" /* Dataspace functions */
#include "H5Vprivate.h" /* Vector functions */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Static function prototypes */
/* Selection callbacks */
@@ -113,9 +109,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_all[1] = {{
herr_t
H5S_all_iter_init (H5S_sel_iter_t *iter, const H5S_t *space)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_all_iter_init, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_iter_init);
/* Check args */
assert (space && H5S_SEL_ALL==H5S_GET_SELECT_TYPE(space));
@@ -131,8 +125,7 @@ H5S_all_iter_init (H5S_sel_iter_t *iter, const H5S_t *space)
/* Initialize type of selection iterator */
iter->type=H5S_sel_iter_all;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_all_iter_init() */
@@ -380,9 +373,7 @@ H5S_all_iter_release (H5S_sel_iter_t UNUSED * iter)
herr_t
H5S_all_release (H5S_t UNUSED * space)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_all_release, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_release);
/* Check args */
assert (space);
@@ -390,8 +381,7 @@ H5S_all_release (H5S_t UNUSED * space)
/* Reset the number of elements in the selection */
space->select.num_elem=0;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_all_release() */
@@ -417,9 +407,7 @@ done:
herr_t
H5S_all_copy(H5S_t *dst, const H5S_t *src, hbool_t UNUSED share_selection)
{
- herr_t ret_value=SUCCEED; /* return value */
-
- FUNC_ENTER_NOAPI(H5S_all_copy, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_copy);
assert(src);
assert(dst);
@@ -427,8 +415,7 @@ H5S_all_copy(H5S_t *dst, const H5S_t *src, hbool_t UNUSED share_selection)
/* Set number of elements in selection */
dst->select.num_elem=(hsize_t)H5S_GET_EXTENT_NPOINTS(dst);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5S_all_copy() */
@@ -455,14 +442,11 @@ done:
htri_t
H5S_all_is_valid (const H5S_t UNUSED *space)
{
- htri_t ret_value=TRUE; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_all_is_valid, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_is_valid);
assert(space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(TRUE);
} /* end H5S_all_is_valid() */
@@ -488,9 +472,7 @@ done:
hssize_t
H5S_all_serial_size (const H5S_t UNUSED *space)
{
- hssize_t ret_value=FAIL; /* return value */
-
- FUNC_ENTER_NOAPI(H5S_all_serial_size, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_serial_size);
assert(space);
@@ -498,10 +480,7 @@ H5S_all_serial_size (const H5S_t UNUSED *space)
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
* <length (4 bytes)> = 16 bytes
*/
- ret_value=16;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(16);
} /* end H5S_all_serial_size() */
@@ -527,9 +506,7 @@ done:
herr_t
H5S_all_serialize (const H5S_t *space, uint8_t *buf)
{
- herr_t ret_value=FAIL; /* return value */
-
- FUNC_ENTER_NOAPI(H5S_all_serialize, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_serialize);
assert(space);
@@ -539,11 +516,7 @@ H5S_all_serialize (const H5S_t *space, uint8_t *buf)
UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */
- /* Set success */
- ret_value=SUCCEED;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_all_serialize() */
@@ -614,9 +587,8 @@ H5S_all_bounds(const H5S_t *space, hssize_t *start, hssize_t *end)
{
int rank; /* Dataspace rank */
int i; /* index variable */
- herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5S_all_bounds, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_bounds);
assert(space);
assert(start);
@@ -631,8 +603,7 @@ H5S_all_bounds(const H5S_t *space, hssize_t *start, hssize_t *end)
H5_ASSIGN_OVERFLOW(end[i],space->extent.size[i]-1,hsize_t,hssize_t);
} /* end for */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5Sget_all_bounds() */
@@ -657,14 +628,11 @@ done:
htri_t
H5S_all_is_contiguous(const H5S_t UNUSED *space)
{
- htri_t ret_value=TRUE; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_all_is_contiguous, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_is_contiguous);
assert(space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(TRUE);
} /* H5S_all_is_contiguous() */
@@ -689,14 +657,11 @@ done:
htri_t
H5S_all_is_single(const H5S_t UNUSED *space)
{
- htri_t ret_value=TRUE; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_all_is_single, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_is_single);
assert(space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(TRUE);
} /* H5S_all_is_single() */
@@ -722,15 +687,12 @@ done:
htri_t
H5S_all_is_regular(const H5S_t UNUSED *space)
{
- htri_t ret_value=TRUE; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_all_is_regular, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_is_regular);
/* Check args */
assert(space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(TRUE);
} /* H5S_all_is_regular() */
@@ -852,9 +814,8 @@ H5S_all_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_i
hsize_t *off, size_t *len)
{
size_t elem_used; /* The number of elements used */
- herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI (H5S_all_get_seq_list, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_all_get_seq_list);
/* Check args */
assert(space);
@@ -885,7 +846,6 @@ H5S_all_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_i
iter->u.all.elmt_offset+=elem_used;
iter->u.all.byte_offset+=len[0];
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5S_all_get_seq_list() */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index c9acb26..572c58b 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -32,10 +32,6 @@
#include "H5Spkg.h" /* Dataspace functions */
#include "H5Vprivate.h" /* Vector functions */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local datatypes */
/* Static function prototypes */
@@ -136,7 +132,7 @@ H5FL_DEFINE_STATIC(H5S_hyper_span_info_t);
static herr_t
H5S_hyper_print_spans_helper(FILE *f, struct H5S_hyper_span_t *span,unsigned depth)
{
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_print_spans_helper);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_spans_helper);
while(span) {
HDfprintf(f,"%s: depth=%u, span=%p, (%d, %d), nelem=%u, pstride=%u\n",FUNC,depth,span,(int)span->low,(int)span->high,(unsigned)span->nelem,(unsigned)span->pstride);
@@ -153,7 +149,7 @@ H5S_hyper_print_spans_helper(FILE *f, struct H5S_hyper_span_t *span,unsigned dep
herr_t
H5S_hyper_print_spans(FILE *f, const struct H5S_hyper_span_info_t *span_lst)
{
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_print_spans);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_spans);
if(span_lst!=NULL) {
HDfprintf(f,"%s: spans=%p, count=%u, scratch=%p, head=%p\n",FUNC,span_lst,span_lst->count,span_lst->scratch,span_lst->head);
@@ -178,7 +174,7 @@ H5S_hyper_print_diminfo_helper(FILE *f, const char *field, unsigned ndims, const
{
unsigned u; /* Local index variable */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_print_diminfo_helper);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_print_diminfo_helper);
if(dinfo!=NULL) {
HDfprintf(f,"%s: %s: start=[",FUNC,field);
@@ -240,9 +236,8 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
unsigned rank; /* Dataspace's dimension rank */
unsigned u; /* Index variable */
int i; /* Index variable */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_hyper_iter_init, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_iter_init);
/* Check args */
assert(space && H5S_SEL_HYPERSLABS==H5S_GET_SELECT_TYPE(space));
@@ -400,8 +395,7 @@ H5S_hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
/* Initialize type of selection iterator */
iter->type=H5S_sel_iter_hyper;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_hyper_iter_init() */
@@ -1594,7 +1588,7 @@ H5S_hyper_copy (H5S_t *dst, const H5S_t *src, hbool_t share_selection)
/* Allocate space for the hyperslab selection information */
if((dst->select.sel_info.hslab=H5FL_MALLOC(H5S_hyper_sel_t))==NULL)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate hyperslab info");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "can't allocate hyperslab info");
/* Set temporary pointers */
dst_hslab=dst->select.sel_info.hslab;
@@ -1721,7 +1715,7 @@ H5S_hyper_is_valid (const H5S_t *space)
unsigned u; /* Counter */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_is_valid, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_valid);
assert(space);
@@ -1912,7 +1906,7 @@ H5S_hyper_serial_size (const H5S_t *space)
hssize_t block_count; /* block counter for regular hyperslabs */
hssize_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_serial_size, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_serial_size);
assert(space);
@@ -1935,7 +1929,6 @@ H5S_hyper_serial_size (const H5S_t *space)
ret_value+=8*space->extent.rank*block_count;
} /* end else */
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_hyper_serial_size() */
@@ -2054,9 +2047,8 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf)
int temp_dim; /* Temporary rank holder */
int ndims; /* Rank of the dataspace */
int done; /* Whether we are done with the iteration */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_hyper_serialize, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_serialize);
assert(space);
@@ -2174,8 +2166,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf)
/* Encode length */
UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_hyper_serialize() */
@@ -2299,7 +2290,7 @@ H5S_hyper_span_blocklist(H5S_hyper_span_info_t *spans, hssize_t start[], hssize_
hsize_t u; /* Index variable */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_span_blocklist, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_span_blocklist);
/* Sanity checks */
assert(spans);
@@ -2393,7 +2384,7 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_get_select_hyper_blocklist(H5S_t *space, hbool_t internal, hsize_t startblock, hsize_t numblocks, hsize_t *buf)
{
H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */
@@ -2625,16 +2616,15 @@ H5S_hyper_bounds_helper (const H5S_hyper_span_info_t *spans, const hssize_t *off
/* Recurse if this node has down spans */
if(curr->down!=NULL) {
- if(H5S_hyper_bounds_helper(curr->down,offset,rank+1,start,end)<0) {
- ret_value=FAIL;
- break;
- } /* end if */
+ if(H5S_hyper_bounds_helper(curr->down,offset,rank+1,start,end)<0)
+ HGOTO_DONE(FAIL)
} /* end if */
/* Advance to next node */
curr=curr->next;
} /* end while */
+done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_hyper_bounds_helper() */
@@ -2672,7 +2662,7 @@ H5S_hyper_bounds(const H5S_t *space, hssize_t *start, hssize_t *end)
int i; /* index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_hyper_bounds, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_bounds);
assert(space);
assert(start);
@@ -2703,7 +2693,6 @@ H5S_hyper_bounds(const H5S_t *space, hssize_t *start, hssize_t *end)
ret_value=H5S_hyper_bounds_helper(space->select.sel_info.hslab->span_lst,space->select.offset,(hsize_t)0,start,end);
} /* end if */
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_hyper_bounds() */
@@ -2736,7 +2725,7 @@ H5S_hyper_is_contiguous(const H5S_t *space)
large_contiguous; /* Flag for large contiguous block */
htri_t ret_value=FALSE; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_is_contiguous, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_contiguous);
assert(space);
@@ -2888,7 +2877,6 @@ H5S_hyper_is_contiguous(const H5S_t *space)
ret_value=TRUE;
} /* end else */
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_hyper_is_contiguous() */
@@ -2917,9 +2905,9 @@ H5S_hyper_is_single(const H5S_t *space)
H5S_hyper_span_info_t *spans; /* Hyperslab span info node */
H5S_hyper_span_t *span; /* Hyperslab span node */
unsigned u; /* index variable */
- htri_t ret_value=FALSE; /* return value */
+ htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_is_single, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_single);
assert(space);
@@ -2930,24 +2918,16 @@ H5S_hyper_is_single(const H5S_t *space)
* block (i.e. count==1 in all dimensions)
*/
- /* Initialize flags */
- ret_value=TRUE; /* assume true and reset if the dimensions don't match */
-
/* Check for a single block */
for(u=0; u<space->extent.rank; u++) {
- if(space->select.sel_info.hslab->opt_diminfo[u].count>1) {
- ret_value=FALSE;
- break;
- } /* end if */
+ if(space->select.sel_info.hslab->opt_diminfo[u].count>1)
+ HGOTO_DONE(FALSE)
} /* end for */
} /* end if */
else {
/*
* For a region to be single, it must have only one block
*/
- /* Initialize flags */
- ret_value=TRUE; /* assume true and reset if the dimensions don't match */
-
/* Get information for slowest changing information */
spans=space->select.sel_info.hslab->span_lst;
@@ -2956,14 +2936,11 @@ H5S_hyper_is_single(const H5S_t *space)
span=spans->head;
/* Check that this is the only span and it spans the entire dimension */
- if(span->next!=NULL) {
- ret_value=FALSE;
- break;
- } /* end if */
- else {
+ if(span->next!=NULL)
+ HGOTO_DONE(FALSE)
+ else
/* Walk down to the next span */
spans=span->down;
- } /* end else */
} /* end while */
} /* end else */
@@ -2997,7 +2974,7 @@ H5S_hyper_is_regular(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_hyper_is_regular, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_hyper_is_regular);
/* Check args */
assert(space);
@@ -3008,7 +2985,6 @@ H5S_hyper_is_regular(const H5S_t *space)
else
ret_value=FALSE;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_hyper_is_regular() */
@@ -3813,9 +3789,8 @@ static herr_t
H5S_hyper_adjust_helper (H5S_hyper_span_info_t *spans, const hssize_t *offset)
{
H5S_hyper_span_t *span; /* Pointer to current span in span tree */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_adjust_helper);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_adjust_helper);
/* Sanity check */
assert(spans);
@@ -3838,18 +3813,15 @@ H5S_hyper_adjust_helper (H5S_hyper_span_info_t *spans, const hssize_t *offset)
assert(span->high>=0);
/* Recursively adjust spans in next dimension down */
- if(span->down!=NULL) {
- if(H5S_hyper_adjust_helper(span->down,offset+1)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab adjustment");
- } /* end if */
+ if(span->down!=NULL)
+ H5S_hyper_adjust_helper(span->down,offset+1);
/* Advance to next span in this dimension */
span=span->next;
} /* end while */
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_hyper_adjust_helper() */
@@ -3928,9 +3900,8 @@ static herr_t
H5S_hyper_move_helper (H5S_hyper_span_info_t *spans, const hssize_t *offset)
{
H5S_hyper_span_t *span; /* Pointer to current span in span tree */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5S_hyper_move_helper);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_move_helper);
/* Sanity check */
assert(spans);
@@ -3953,18 +3924,15 @@ H5S_hyper_move_helper (H5S_hyper_span_info_t *spans, const hssize_t *offset)
assert(span->low>=0);
/* Recursively move spans in next dimension down */
- if(span->down!=NULL) {
- if(H5S_hyper_move_helper(span->down,offset+1)<0)
- HGOTO_ERROR(H5E_DATASPACE, H5E_BADSELECT, FAIL, "can't perform hyperslab movement");
- } /* end if */
+ if(span->down!=NULL)
+ H5S_hyper_move_helper(span->down,offset+1);
/* Advance to next span in this dimension */
span=span->next;
} /* end while */
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_hyper_move_helper() */
@@ -5284,7 +5252,6 @@ H5S_hyper_rebuild (H5S_t *space)
H5S_hyper_dim_t *app_diminfo; /* "Application view" per-dimension for the selection */
H5S_hyper_span_t *span; /* Current hyperslab span */
unsigned curr_dim; /* Current dimension being worked on */
- herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_rebuild);
@@ -5325,7 +5292,7 @@ H5S_hyper_rebuild (H5S_t *space)
space->select.sel_info.hslab->diminfo_valid=TRUE;
} /* end if */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_hyper_rebuild() */
@@ -6199,7 +6166,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
unsigned u; /* Counters */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI (H5S_select_hyperslab, FAIL);
+ FUNC_ENTER_NOAPI(H5S_select_hyperslab, FAIL);
/* Check args */
assert(space);
@@ -7711,14 +7678,14 @@ H5S_hyper_get_seq_list_opt(const H5S_t *space,H5S_sel_iter_t *iter,
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t *iter,
size_t maxseq, size_t maxelem, size_t *nseq, size_t *nelem,
hsize_t *off, size_t *len)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI (H5S_hyper_get_seq_list, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_hyper_get_seq_list);
/* Check args */
assert(space);
@@ -7738,7 +7705,6 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t
/* Call the general sequence generator routine */
ret_value=H5S_hyper_get_seq_list_gen(space,iter,maxseq,maxelem,nseq,nelem,off,len);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_hyper_get_seq_list() */
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 468d297..0207080 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -24,6 +24,10 @@
#define H5F_PACKAGE /*suppress error about including H5Fpkg */
#define H5S_PACKAGE /*suppress error about including H5Spkg */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5S_mpio_mask
+
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Fpkg.h" /* Files */
@@ -34,11 +38,6 @@
#ifdef H5_HAVE_PARALLEL
-/* Interface initialization */
-#define PABLO_MASK H5Sall_mask
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
static herr_t
H5S_mpio_all_type( const H5S_t *space, size_t elmt_size,
/* out: */
@@ -748,12 +747,11 @@ H5S_mpio_spaces_read(H5F_t *f, const H5D_dxpl_cache_t UNUSED *dxpl_cache, hid_t
{
herr_t ret_value;
- FUNC_ENTER_NOAPI(H5S_mpio_spaces_read, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_mpio_spaces_read);
ret_value = H5S_mpio_spaces_xfer(f, dset, elmt_size, file_space,
mem_space, dxpl_id, buf, 0/*read*/);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_mpio_spaces_read() */
@@ -787,13 +785,12 @@ H5S_mpio_spaces_write(H5F_t *f, const H5D_dxpl_cache_t UNUSED *dxpl_cache, hid_t
{
herr_t ret_value;
- FUNC_ENTER_NOAPI(H5S_mpio_spaces_write, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_mpio_spaces_write);
/*OKAY: CAST DISCARDS CONST QUALIFIER*/
ret_value = H5S_mpio_spaces_xfer(f, dset, elmt_size, file_space,
mem_space, dxpl_id, (void*)buf, 1/*write*/);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_mpio_spaces_write() */
diff --git a/src/H5Snone.c b/src/H5Snone.c
index 9e5e726..c051e04 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -23,7 +23,7 @@
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Snone_mask
+#define PABLO_MASK H5S_none_mask
#include "H5private.h"
#include "H5Eprivate.h"
@@ -32,10 +32,6 @@
#include "H5Vprivate.h"
#include "H5Dprivate.h"
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Static function prototypes */
/* Selection callbacks */
@@ -114,9 +110,7 @@ static const H5S_sel_iter_class_t H5S_sel_iter_none[1] = {{
herr_t
H5S_none_iter_init (H5S_sel_iter_t *iter, const H5S_t UNUSED *space)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_none_iter_init, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_none_iter_init);
/* Check args */
assert (space && H5S_SEL_NONE==H5S_GET_SELECT_TYPE(space));
@@ -125,8 +119,7 @@ H5S_none_iter_init (H5S_sel_iter_t *iter, const H5S_t UNUSED *space)
/* Initialize type of selection iterator */
iter->type=H5S_sel_iter_none;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_none_iter_init() */
@@ -348,18 +341,15 @@ H5S_none_iter_release (H5S_sel_iter_t UNUSED * iter)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_none_release (H5S_t UNUSED * space)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_none_release, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_release);
/* Check args */
assert (space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_none_release() */
@@ -382,12 +372,10 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_none_copy(H5S_t *dst, const H5S_t *src, hbool_t UNUSED share_selection)
{
- herr_t ret_value=SUCCEED; /* return value */
-
- FUNC_ENTER_NOAPI(H5S_none_copy, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_copy);
assert(src);
assert(dst);
@@ -395,8 +383,7 @@ H5S_none_copy(H5S_t *dst, const H5S_t *src, hbool_t UNUSED share_selection)
/* Set number of elements in selection */
dst->select.num_elem=0;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5S_none_copy() */
@@ -420,17 +407,14 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+static htri_t
H5S_none_is_valid (const H5S_t UNUSED *space)
{
- htri_t ret_value=TRUE; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_none_is_valid, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_is_valid);
assert(space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(TRUE);
} /* end H5S_none_is_valid() */
@@ -453,12 +437,10 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-hssize_t
+static hssize_t
H5S_none_serial_size (const H5S_t UNUSED *space)
{
- hssize_t ret_value; /* return value */
-
- FUNC_ENTER_NOAPI(H5S_none_serial_size, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_serial_size);
assert(space);
@@ -466,10 +448,7 @@ H5S_none_serial_size (const H5S_t UNUSED *space)
* <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> +
* <length (4 bytes)> = 16 bytes
*/
- ret_value=16;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(16);
} /* end H5S_none_serial_size() */
@@ -492,12 +471,10 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_none_serialize (const H5S_t *space, uint8_t *buf)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_none_serialize, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_serialize);
assert(space);
@@ -507,8 +484,7 @@ H5S_none_serialize (const H5S_t *space, uint8_t *buf)
UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_none_serialize() */
@@ -531,12 +507,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_none_deserialize (H5S_t *space, const uint8_t UNUSED *buf)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_none_deserialize, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_none_deserialize);
assert(space);
@@ -574,19 +550,16 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_none_bounds(const H5S_t UNUSED *space, hssize_t UNUSED *start, hssize_t UNUSED *end)
{
- herr_t ret_value=FAIL; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_none_bounds, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_bounds);
assert(space);
assert(start);
assert(end);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(FAIL);
} /* H5Sget_none_bounds() */
@@ -608,17 +581,14 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+static htri_t
H5S_none_is_contiguous(const H5S_t UNUSED *space)
{
- htri_t ret_value=FALSE; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_none_is_contiguous, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_is_contiguous);
assert(space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(FALSE);
} /* H5S_none_is_contiguous() */
@@ -640,17 +610,14 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+static htri_t
H5S_none_is_single(const H5S_t UNUSED *space)
{
- htri_t ret_value=FALSE; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_none_is_single, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_is_single);
assert(space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(FALSE);
} /* H5S_none_is_single() */
@@ -673,18 +640,15 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+static htri_t
H5S_none_is_regular(const H5S_t UNUSED *space)
{
- htri_t ret_value=TRUE; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_none_is_regular, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_is_regular);
/* Check args */
assert(space);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(TRUE);
} /* H5S_none_is_regular() */
@@ -797,14 +761,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_none_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_iter_t UNUSED *iter,
size_t UNUSED maxseq, size_t UNUSED maxelem, size_t *nseq, size_t *nelem,
hsize_t UNUSED *off, size_t UNUSED *len)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI (H5S_none_get_seq_list, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_none_get_seq_list);
/* Check args */
assert(space);
@@ -822,6 +784,5 @@ H5S_none_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_
/* They don't use any elements, either */
*nelem=0;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* end H5S_all_get_seq_list() */
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index dc42f11..11802e5 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -23,7 +23,7 @@
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Spoint_mask
+#define PABLO_MASK H5S_point_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
@@ -33,10 +33,6 @@
#include "H5Spkg.h" /* Dataspace functions */
#include "H5Vprivate.h" /* Vector functions */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Static function prototypes */
/* Selection callbacks */
@@ -121,9 +117,7 @@ H5FL_DEFINE_STATIC(H5S_pnt_list_t);
herr_t
H5S_point_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
{
- herr_t ret_value=SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5S_point_iter_init, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_point_iter_init);
/* Check args */
assert (space && H5S_SEL_POINTS==H5S_GET_SELECT_TYPE(space));
@@ -138,8 +132,7 @@ H5S_point_iter_init(H5S_sel_iter_t *iter, const H5S_t *space)
/* Initialize type of selection iterator */
iter->type=H5S_sel_iter_point;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_point_iter_init() */
@@ -394,7 +387,7 @@ H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hssize_t *
unsigned i; /* Counter */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_point_add, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_point_add);
assert(space);
assert(num_elem>0);
@@ -472,13 +465,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_point_release (H5S_t *space)
{
H5S_pnt_node_t *curr, *next; /* Point selection nodes */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_point_release, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_release);
/* Check args */
assert (space);
@@ -499,8 +491,7 @@ H5S_point_release (H5S_t *space)
/* Reset the number of elements in the selection */
space->select.num_elem=0;
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_point_release() */
@@ -591,13 +582,13 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_point_copy(H5S_t *dst, const H5S_t *src, hbool_t UNUSED share_selection)
{
H5S_pnt_node_t *curr, *new_node, *new_head; /* Point information nodes */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI(H5S_point_copy, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_point_copy);
assert(src);
assert(dst);
@@ -653,14 +644,14 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+static htri_t
H5S_point_is_valid (const H5S_t *space)
{
H5S_pnt_node_t *curr; /* Point information nodes */
unsigned u; /* Counter */
htri_t ret_value=TRUE; /* return value */
- FUNC_ENTER_NOAPI(H5S_point_is_valid, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_is_valid);
assert(space);
@@ -672,10 +663,8 @@ H5S_point_is_valid (const H5S_t *space)
/* Check if an offset has been defined */
/* Bounds check the selected point + offset against the extent */
if(((curr->pnt[u]+space->select.offset[u])>(hssize_t)space->extent.size[u])
- || ((curr->pnt[u]+space->select.offset[u])<0)) {
- ret_value=FALSE;
- break;
- } /* end if */
+ || ((curr->pnt[u]+space->select.offset[u])<0))
+ HGOTO_DONE(FALSE)
} /* end for */
curr=curr->next;
@@ -744,13 +733,13 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-hssize_t
+static hssize_t
H5S_point_serial_size (const H5S_t *space)
{
H5S_pnt_node_t *curr; /* Point information nodes */
hssize_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_point_serial_size, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_serial_size);
assert(space);
@@ -768,7 +757,6 @@ H5S_point_serial_size (const H5S_t *space)
curr=curr->next;
} /* end while */
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_point_serial_size() */
@@ -792,16 +780,15 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_point_serialize (const H5S_t *space, uint8_t *buf)
{
H5S_pnt_node_t *curr; /* Point information nodes */
uint8_t *lenp; /* pointer to length location for later storage */
uint32_t len=0; /* number of bytes used */
unsigned u; /* local counting variable */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_point_serialize, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_serialize);
assert(space);
@@ -836,8 +823,7 @@ H5S_point_serialize (const H5S_t *space, uint8_t *buf)
/* Encode length */
UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_point_serialize() */
@@ -860,7 +846,7 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_point_deserialize (H5S_t *space, const uint8_t *buf)
{
H5S_seloper_t op=H5S_SELECT_SET; /* Selection operation */
@@ -870,7 +856,7 @@ H5S_point_deserialize (H5S_t *space, const uint8_t *buf)
unsigned i,j; /* local counting variables */
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_point_deserialize, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_point_deserialize);
/* Check args */
assert(space);
@@ -1048,15 +1034,14 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_point_bounds(const H5S_t *space, hssize_t *start, hssize_t *end)
{
H5S_pnt_node_t *node; /* Point node */
int rank; /* Dataspace rank */
int i; /* index variable */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_point_bounds, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_bounds);
assert(space);
assert(start);
@@ -1083,8 +1068,7 @@ H5S_point_bounds(const H5S_t *space, hssize_t *start, hssize_t *end)
node=node->next;
} /* end while */
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_point_bounds() */
@@ -1109,12 +1093,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+static htri_t
H5S_point_is_contiguous(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_point_is_contiguous, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_is_contiguous);
assert(space);
@@ -1124,7 +1108,6 @@ H5S_point_is_contiguous(const H5S_t *space)
else /* More than one point might be contiguous, but it's complex to check and we don't need it right now */
ret_value=FALSE;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_point_is_contiguous() */
@@ -1147,12 +1130,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+static htri_t
H5S_point_is_single(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_point_is_single, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_is_single);
assert(space);
@@ -1162,7 +1145,6 @@ H5S_point_is_single(const H5S_t *space)
else
ret_value=FALSE;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_point_is_single() */
@@ -1188,12 +1170,12 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-htri_t
+static htri_t
H5S_point_is_regular(const H5S_t *space)
{
htri_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_point_is_regular, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5S_point_is_regular);
/* Check args */
assert(space);
@@ -1204,7 +1186,6 @@ H5S_point_is_regular(const H5S_t *space)
else
ret_value=FALSE;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_point_is_regular() */
@@ -1301,7 +1282,7 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-herr_t
+static herr_t
H5S_point_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter,
size_t maxseq, size_t maxelem, size_t *nseq, size_t *nelem,
hsize_t *off, size_t *len)
@@ -1317,7 +1298,7 @@ H5S_point_get_seq_list(const H5S_t *space, unsigned flags, H5S_sel_iter_t *iter,
int i; /* Local index variable */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI (H5S_point_get_seq_list, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT(H5S_point_get_seq_list);
/* Check args */
assert(space);
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 634b5df..89215cd 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -286,8 +286,6 @@ H5_DLL herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op,
/* Operations on hyperslab selections */
H5_DLL herr_t H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op, const hssize_t start[],
const hsize_t *stride, const hsize_t count[], const hsize_t *block);
-H5_DLL herr_t H5S_get_select_hyper_blocklist(H5S_t *space, hbool_t internal,
- hsize_t startblock, hsize_t numblocks, hsize_t *buf);
H5_DLL herr_t H5S_hyper_add_span_element(H5S_t *space, unsigned rank,
hssize_t *coords);
H5_DLL herr_t H5S_hyper_reset_scratch(H5S_t *space);
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index dc2aed0..56ab3b4 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -22,7 +22,7 @@
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Sselect_mask
+#define PABLO_MASK H5S_select_mask
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Datasets (for their properties) */
@@ -32,14 +32,12 @@
#include "H5Spkg.h" /* Dataspace functions */
#include "H5Vprivate.h" /* Vector functions */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local functions */
+#ifdef LATER
static herr_t H5S_select_iter_block (const H5S_sel_iter_t *iter, hssize_t *start, hssize_t *end);
static htri_t H5S_select_iter_has_next_block (const H5S_sel_iter_t *iter);
static herr_t H5S_select_iter_next_block(H5S_sel_iter_t *iter);
+#endif /* LATER */
/* Declare external the free list for hssize_t arrays */
H5FL_ARR_EXTERN(hssize_t);
@@ -76,9 +74,7 @@ H5FL_BLK_EXTERN(type_elem);
herr_t
H5S_select_offset(H5S_t *space, const hssize_t *offset)
{
- herr_t ret_value=SUCCEED; /* return value */
-
- FUNC_ENTER_NOAPI(H5S_select_offset, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_offset);
/* Check args */
assert(space);
@@ -88,8 +84,7 @@ H5S_select_offset(H5S_t *space, const hssize_t *offset)
/* Copy the offset over */
HDmemcpy(space->select.offset,offset,sizeof(hssize_t)*space->extent.rank);
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
} /* H5S_select_offset() */
@@ -163,14 +158,13 @@ H5S_select_release(H5S_t *ds)
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_release, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_release);
assert(ds);
/* Call the selection type's release function */
ret_value=(*ds->select.type->release)(ds);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_select_release() */
@@ -201,14 +195,13 @@ H5S_select_get_seq_list(const H5S_t *space, unsigned flags,
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_get_seq_list, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_get_seq_list);
assert(space);
/* Call the selection type's get_seq_list function */
ret_value=(*space->select.type->get_seq_list)(space,flags,iter,maxseq,maxbytes,nseq,nbytes,off,len);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_select_get_seq_list() */
@@ -237,14 +230,13 @@ H5S_select_serial_size(const H5S_t *space)
{
hssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_serial_size, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_serial_size);
assert(space);
/* Call the selection type's serial_size function */
ret_value=(*space->select.type->serial_size)(space);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_select_serial_size() */
@@ -276,7 +268,7 @@ H5S_select_serialize(const H5S_t *space, uint8_t *buf)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_serialize, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_serialize);
assert(space);
assert(buf);
@@ -284,7 +276,6 @@ H5S_select_serialize(const H5S_t *space, uint8_t *buf)
/* Call the selection type's serialize function */
ret_value=(*space->select.type->serialize)(space,buf);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_select_serialize() */
@@ -349,18 +340,12 @@ done:
hssize_t
H5S_get_select_npoints(const H5S_t *space)
{
- hssize_t ret_value; /* return value */
-
- FUNC_ENTER_NOAPI(H5S_get_select_npoints, 0);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_npoints);
/* Check args */
assert(space);
- /* Set return value */
- ret_value=space->select.num_elem;
-
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(space->select.num_elem);
} /* H5S_get_select_npoints() */
@@ -430,15 +415,14 @@ done:
htri_t
H5S_select_valid(const H5S_t *space)
{
- htri_t ret_value; /* return value */
+ htri_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_valid, 0);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_valid);
assert(space);
ret_value = (*space->select.type->is_valid)(space);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_valid() */
@@ -590,7 +574,7 @@ H5S_get_select_bounds(const H5S_t *space, hssize_t *start, hssize_t *end)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_get_select_bounds, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_bounds);
/* Check args */
assert(space);
@@ -599,7 +583,6 @@ H5S_get_select_bounds(const H5S_t *space, hssize_t *start, hssize_t *end)
ret_value = (*space->select.type->bounds)(space,start,end);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_get_select_bounds() */
@@ -630,14 +613,13 @@ H5S_select_is_contiguous(const H5S_t *space)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_is_contiguous, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_is_contiguous);
/* Check args */
assert(space);
ret_value = (*space->select.type->is_contiguous)(space);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_is_contiguous() */
@@ -668,14 +650,13 @@ H5S_select_is_single(const H5S_t *space)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_is_single, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_is_single);
/* Check args */
assert(space);
ret_value = (*space->select.type->is_single)(space);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_is_single() */
@@ -706,14 +687,13 @@ H5S_select_is_regular(const H5S_t *space)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_is_regular, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_is_regular);
/* Check args */
assert(space);
ret_value = (*space->select.type->is_regular)(space);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_is_regular() */
@@ -740,7 +720,7 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, const H5S_t *space, size_t elmt_s
{
herr_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_select_iter_init, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_init);
/* Check args */
assert(sel_iter);
@@ -764,7 +744,6 @@ H5S_select_iter_init(H5S_sel_iter_t *sel_iter, const H5S_t *space, size_t elmt_s
/* Call initialization routine for selection type */
ret_value= (*space->select.type->iter_init)(sel_iter, space);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_init() */
@@ -796,7 +775,7 @@ H5S_select_iter_coords (const H5S_sel_iter_t *sel_iter, hssize_t *coords)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_iter_coords, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_coords);
/* Check args */
assert(sel_iter);
@@ -805,10 +784,10 @@ H5S_select_iter_coords (const H5S_sel_iter_t *sel_iter, hssize_t *coords)
/* Call iter_coords routine for selection type */
ret_value = (*sel_iter->type->iter_coords)(sel_iter,coords);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_coords() */
+#ifdef LATER
/*--------------------------------------------------------------------------
NAME
@@ -850,6 +829,7 @@ H5S_select_iter_block (const H5S_sel_iter_t *iter, hssize_t *start, hssize_t *en
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_block() */
+#endif /* LATER */
/*--------------------------------------------------------------------------
@@ -877,7 +857,7 @@ H5S_select_iter_nelmts (const H5S_sel_iter_t *sel_iter)
{
hsize_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_iter_nelmts, 0);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_nelmts);
/* Check args */
assert(sel_iter);
@@ -885,10 +865,10 @@ H5S_select_iter_nelmts (const H5S_sel_iter_t *sel_iter)
/* Call iter_nelmts routine for selection type */
ret_value = (*sel_iter->type->iter_nelmts)(sel_iter);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_nelmts() */
+#ifdef LATER
/*--------------------------------------------------------------------------
NAME
@@ -926,6 +906,7 @@ H5S_select_iter_has_next_block (const H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_has_next_block() */
+#endif /* LATER */
/*--------------------------------------------------------------------------
@@ -955,7 +936,7 @@ H5S_select_iter_next(H5S_sel_iter_t *iter, size_t nelem)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_iter_next, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_next);
/* Check args */
assert(iter);
@@ -967,10 +948,10 @@ H5S_select_iter_next(H5S_sel_iter_t *iter, size_t nelem)
/* Decrement the number of elements left in selection */
iter->elmt_left-=nelem;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_next() */
+#ifdef LATER
/*--------------------------------------------------------------------------
NAME
@@ -1010,6 +991,7 @@ H5S_select_iter_next_block(H5S_sel_iter_t *iter)
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_next_block() */
+#endif /* LATER */
/*--------------------------------------------------------------------------
@@ -1037,7 +1019,7 @@ H5S_select_iter_release(H5S_sel_iter_t *sel_iter)
{
herr_t ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5S_select_iter_release, FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_select_iter_release);
/* Check args */
assert(sel_iter);
@@ -1045,7 +1027,6 @@ H5S_select_iter_release(H5S_sel_iter_t *sel_iter)
/* Call selection type-specific release routine */
ret_value = (*sel_iter->type->iter_release)(sel_iter);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* H5S_select_iter_release() */
@@ -1254,7 +1235,7 @@ H5S_get_select_type(const H5S_t *space)
{
H5S_sel_type ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5S_get_select_type, H5S_SEL_ERROR);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_type);
/* Check args */
assert(space);
@@ -1262,7 +1243,6 @@ H5S_get_select_type(const H5S_t *space)
/* Set return value */
ret_value=H5S_GET_SELECT_TYPE(space);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5S_get_select_type() */
diff --git a/src/H5Stest.c b/src/H5Stest.c
index 9062565..7580a0f 100644
--- a/src/H5Stest.c
+++ b/src/H5Stest.c
@@ -23,17 +23,13 @@
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Stest_mask
+#define PABLO_MASK H5S_test_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* ID Functions */
#include "H5Spkg.h" /* Dataspace functions */
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5T.c b/src/H5T.c
index 474768f..de6461c 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -21,6 +21,9 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5T_mask
@@ -40,10 +43,6 @@
#include <sys/fpu.h>
#endif /* H5_HAVE_SYS_FPU_H */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_interface
-
/*
* Predefined data types. These are initialized at runtime in H5Tinit.c and
* by H5T_init_interface() in this source file.
@@ -471,11 +470,11 @@ H5T_init(void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_init, FAIL);
+ FUNC_ENTER_NOAPI(H5T_init,FAIL);
/* FUNC_ENTER() does all the work */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
@@ -1263,7 +1262,7 @@ H5T_term_interface(void)
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_term_interface);
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
/* Unregister all conversion functions */
for (i=0; i<H5T_g.npaths; i++) {
path = H5T_g.path[i];
@@ -1398,7 +1397,7 @@ H5T_term_interface(void)
H5T_NATIVE_UINT_FAST64_g = FAIL;
/* Mark interface as closed */
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
n = 1; /*H5I*/
}
FUNC_LEAVE_NOAPI(n);
diff --git a/src/H5TB.c b/src/H5TB.c
index 98ded27..164380f 100644
--- a/src/H5TB.c
+++ b/src/H5TB.c
@@ -84,7 +84,9 @@
* void H5TB_free( ITM ***root, void (*df)(ITM *), void (*kf)(void *) );
*/
-/* $Id$ */
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5TB_mask
#include "H5private.h" /*library */
#include "H5Eprivate.h" /*error handling */
@@ -117,10 +119,6 @@ H5FL_DEFINE_STATIC(H5TB_NODE);
/* Declare a free list to manage the H5TB_TREE struct */
H5FL_DEFINE_STATIC(H5TB_TREE);
-#define PABLO_MASK H5TB_mask
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5TB_strcmp
@@ -414,7 +412,7 @@ H5TB_dfind(H5TB_TREE * tree, const void * key, H5TB_NODE ** pp)
{
H5TB_NODE *ret_value;
- FUNC_ENTER_NOAPI(H5TB_dfind, NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_dfind);
assert(tree);
@@ -429,7 +427,6 @@ H5TB_dfind(H5TB_TREE * tree, const void * key, H5TB_NODE ** pp)
ret_value=NULL;
} /* end else */
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_dfind() */
@@ -471,7 +468,7 @@ H5TB_find(H5TB_NODE * root, const void * key,
int side;
H5TB_NODE *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5TB_find, NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_find);
if(ptr) {
@@ -490,7 +487,6 @@ H5TB_find(H5TB_NODE * root, const void * key,
/* Set return value */
ret_value= (0 == cmp) ? ptr : NULL;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_find() */
@@ -526,14 +522,13 @@ H5TB_dless(H5TB_TREE * tree, void * key, H5TB_NODE ** pp)
{
H5TB_NODE *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5TB_dless,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_dless);
assert(tree);
/* Set return value */
ret_value= H5TB_less(tree->root, key, tree->compar, tree->cmparg, pp);
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_dless() */
@@ -576,7 +571,7 @@ H5TB_less(H5TB_NODE * root, void * key, H5TB_cmp_t compar, int arg, H5TB_NODE **
int side;
H5TB_NODE *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5TB_less,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_less);
/* Try to find an exact match */
if (ptr) {
@@ -613,7 +608,6 @@ H5TB_less(H5TB_NODE * root, void * key, H5TB_cmp_t compar, int arg, H5TB_NODE **
/* Set return value */
ret_value= (0 == cmp) ? ptr : NULL;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_less */
@@ -645,7 +639,7 @@ H5TB_index(H5TB_NODE * root, unsigned indx)
H5TB_NODE *ptr = root;
H5TB_NODE *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5TB_index,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_index);
if (NULL != ptr) {
/* Termination condition is if the index equals the number of children on
@@ -671,7 +665,6 @@ H5TB_index(H5TB_NODE * root, unsigned indx)
/* Set return value */
ret_value=ptr;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_index() */
@@ -702,7 +695,7 @@ H5TB_dins(H5TB_TREE * tree, void * item, void * key)
{
H5TB_NODE *ret_value; /* the node to return */
- FUNC_ENTER_NOAPI(H5TB_dins,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_dins);
assert(tree);
@@ -713,7 +706,6 @@ H5TB_dins(H5TB_TREE * tree, void * item, void * key)
if (ret_value != NULL)
tree->count++;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_dins() */
@@ -1003,7 +995,7 @@ H5TB_dfree(H5TB_TREE * tree, void(*fd) (void * /* item */), void(*fk) (void * /*
{
H5TB_TREE *ret_value=NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5TB_dfree,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_dfree);
if (tree != NULL) {
/* Free the actual tree */
@@ -1013,7 +1005,6 @@ H5TB_dfree(H5TB_TREE * tree, void(*fd) (void * /* item */), void(*fk) (void * /*
H5FL_FREE(H5TB_TREE,tree);
} /* end if */
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_dfree() */
@@ -1049,7 +1040,7 @@ H5TB_free(H5TB_NODE ** root, void(*fd) (void * /* item */), void(*fk) (void * /*
H5TB_NODE *par, *node = *root;
void *ret_value=NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5TB_free,NULL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_free);
/* While nodes left to be free()d */
while (NULL != *root) {
@@ -1085,7 +1076,6 @@ H5TB_free(H5TB_NODE ** root, void(*fd) (void * /* item */), void(*fk) (void * /*
} while (NULL != par); /* While moving back up tree */
} /* end while */
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_free() */
@@ -1112,12 +1102,11 @@ H5TB_count(H5TB_TREE * tree)
{
long ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5TB_count,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_count);
/* Set return value */
ret_value= (tree==NULL) ? FAIL : (long)tree->count;
-done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5TB_count() */
@@ -1147,7 +1136,7 @@ done:
herr_t
H5TB_dump(H5TB_TREE *tree, void (*key_dump)(void *,void *), int method)
{
- FUNC_ENTER_NOAPI(H5TB_dump,FAIL);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_dump);
printf("H5TB-tree dump %p:\n",tree);
printf("capacity = %ld\n\n",(long)tree->count);
@@ -1178,7 +1167,7 @@ H5TB_printNode(H5TB_NODE * node, void(*key_dump)(void *,void *))
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5TB_printNode);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5TB_printNode);
if (node == NULL) {
printf("ERROR: null node pointer\n");
@@ -1222,7 +1211,7 @@ H5TB_dumpNode(H5TB_NODE *node, void (*key_dump)(void *,void *),
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5TB_dumpNode);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5TB_dumpNode);
if (node == NULL)
HGOTO_DONE(FAIL);
@@ -1281,7 +1270,7 @@ done:
H5TB_NODE *
H5TB_end(H5TB_NODE * root, int side)
{
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5TB_end);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_end);
assert(root);
assert(side==LEFT || side==RIGHT);
@@ -1298,7 +1287,7 @@ H5TB_nbr(H5TB_NODE * ptr, int side)
{
H5TB_NODE *ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5TB_nbr);
+ FUNC_ENTER_NOAPI_NOFUNC(H5TB_nbr);
if (!HasChild(ptr, side))
HGOTO_DONE (ptr->link[side]);
diff --git a/src/H5TS.c b/src/H5TS.c
index ede88f9..ead5962 100644
--- a/src/H5TS.c
+++ b/src/H5TS.c
@@ -12,8 +12,6 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* $Id$ */
-
/* private headers */
#include "H5private.h" /*library */
#include "H5Eprivate.h" /*error handling */
diff --git a/src/H5Tarray.c b/src/H5Tarray.c
index 6c51307..b376899 100644
--- a/src/H5Tarray.c
+++ b/src/H5Tarray.c
@@ -19,9 +19,12 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_array_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tarray_mask
+#define PABLO_MASK H5T_array_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
@@ -29,11 +32,6 @@
#include "H5Iprivate.h" /* IDs */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_array_interface
-static herr_t H5T_init_array_interface(void);
-
/* Declare extern the free list for H5T_t's */
H5FL_EXTERN(H5T_t);
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index 8bcd1a4..452d44a 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -22,7 +22,7 @@
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tbit_mask
+#define PABLO_MASK H5T_bit_mask
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
@@ -30,10 +30,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Tpkg.h" /*data-type functions */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/*-------------------------------------------------------------------------
* Function: H5T_bit_copy
@@ -213,12 +209,12 @@ H5T_bit_shift (uint8_t *buf, ssize_t shift_dist, size_t offset, size_t size)
H5T_bit_copy (buf, offset+shift_dist, tmp_buf, 0, (size_t)(size-shift_dist));
/* Zero-set the left part*/
- H5T_bit_set(buf, offset, shift_dist, 0);
+ H5T_bit_set(buf, offset, (size_t)shift_dist, 0);
} else { /* right shift */
shift_dist = - shift_dist;
H5T_bit_copy(tmp_buf, 0, buf, offset+shift_dist, (size_t)(size-shift_dist));
H5T_bit_copy (buf, offset, tmp_buf, 0, (size_t)(size-shift_dist));
- H5T_bit_set(buf, offset+size-shift_dist, shift_dist, 0);
+ H5T_bit_set(buf, offset+size-shift_dist, (size_t)shift_dist, 0);
}
/* Free temporary buffer */
@@ -254,7 +250,7 @@ H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
size_t i, hs;
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_bit_get_d, 0);
+ FUNC_ENTER_NOAPI_NOFUNC(H5T_bit_get_d);
assert (8*sizeof(val)>=size);
@@ -278,7 +274,6 @@ H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
/* Set return value */
ret_value=val;
-done:
FUNC_LEAVE_NOAPI(ret_value);
}
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 757bb8c..d174aec 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -19,9 +19,12 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_commit_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tcommit_mask
+#define PABLO_MASK H5T_commit_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
@@ -29,12 +32,6 @@
#include "H5Oprivate.h" /* Object headers */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_commit_interface
-static herr_t H5T_init_commit_interface(void);
-
-
/* Static local functions */
static herr_t H5T_commit(H5G_entry_t *loc, const char *name, H5T_t *type, hid_t dxpl_id);
diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c
index f62f794..acd82ab 100644
--- a/src/H5Tcompound.c
+++ b/src/H5Tcompound.c
@@ -19,9 +19,12 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_compound_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tcompound_mask
+#define PABLO_MASK H5T_compound_mask
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
@@ -29,11 +32,6 @@
#include "H5MMprivate.h" /*memory management */
#include "H5Tpkg.h" /*data-type functions */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_compound_interface
-static herr_t H5T_init_compound_interface(void);
-
/* Local macros */
#define H5T_COMPND_INC 64 /*typical max numb of members per struct */
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 5b36f97..389de12 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -20,7 +20,7 @@
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tconv_mask
+#define PABLO_MASK H5T_conv_mask
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
@@ -52,10 +52,6 @@ typedef struct H5T_conv_hw_t {
size_t d_aligned; /*number destination elements aligned*/
} H5T_conv_hw_t;
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Declare a free list to manage pieces of vlen data */
H5FL_BLK_DEFINE_STATIC(vlen_seq);
@@ -2321,9 +2317,9 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
}
n -= priv->base;
- except_ret = H5T_CONV_UNHANDLED;
if (n<0 || n>=priv->length || priv->src2dst[n]<0) {
/*overflow*/
+ except_ret = H5T_CONV_UNHANDLED;
if(cb_struct.func) { /*If user's exception handler is present, use it*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
s, d, cb_struct.user_data);
@@ -2356,6 +2352,7 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
}
}
if (lt>=rt) {
+ except_ret = H5T_CONV_UNHANDLED;
if(cb_struct.func) { /*If user's exception handler is present, use it*/
except_ret = (cb_struct.func)(H5T_CONV_EXCEPT_RANGE_HI, src_id, dst_id,
src, d, cb_struct.user_data);
@@ -3406,6 +3403,10 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* The conversion loop */
for (elmtno=0; elmtno<nelmts; elmtno++) {
+ /* Set these variables to default */
+ except_ret = H5T_CONV_UNHANDLED;
+ reverse = TRUE;
+
/*
* If the source and destination buffers overlap then use a
* temporary buffer for the destination.
@@ -3532,10 +3533,6 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if (H5T_NORM_NONE==dst.u.f.norm)
mrsh++;
- /* Set these variables to default */
- except_ret = H5T_CONV_UNHANDLED;
- reverse = TRUE;
-
/*
* Calculate the destination exponent by adding the destination
* bias and clipping by the minimum and maximum possible
@@ -3614,13 +3611,13 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T_bit_set(d, dst.u.f.mpos, 1, TRUE);
} else if (mrsh==dst.u.f.msize) {
H5T_bit_set(d, dst.u.f.mpos, dst.u.f.msize, FALSE);
- H5T_bit_set_d(d, dst.u.f.mpos, MIN(2, dst.u.f.msize), implied);
+ H5T_bit_set_d(d, dst.u.f.mpos, MIN(2, dst.u.f.msize), (hsize_t)implied);
} else {
if (mrsh>0) {
H5T_bit_set(d, dst.u.f.mpos+dst.u.f.msize-mrsh, mrsh,
FALSE);
H5T_bit_set_d(d, dst.u.f.mpos+dst.u.f.msize-mrsh, 2,
- implied);
+ (hsize_t)implied);
}
if (mrsh+msize>=dst.u.f.msize) {
H5T_bit_copy(d, dst.u.f.mpos,
@@ -8756,7 +8753,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* Allocate enough space for the buffer holding temporary
* converted value
*/
- buf_size = (size_t)HDpow((double)2.0, (double)src.u.f.esize) / 8 + 1;
+ buf_size = (size_t)HDpow((double)2.0, (double)src.u.f.esize) / 8 + 1;
int_buf = (uint8_t*)H5MM_calloc(buf_size);
/* Get the plist structure. Do I need to close it? */
@@ -8772,6 +8769,11 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* The conversion loop */
for (elmtno=0; elmtno<nelmts; elmtno++) {
+ /* Set these variables to default */
+ except_ret = H5T_CONV_UNHANDLED;
+ truncated = FALSE;
+ reverse = TRUE;
+
/*
* If the source and destination buffers overlap then use a
* temporary buffer for the destination.
@@ -8919,11 +8921,6 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
sfirst = H5T_bit_find(int_buf, 0, 8*buf_size, H5T_BIT_MSB, TRUE);
first = (size_t)sfirst;
- /* Set these variables to default */
- except_ret = H5T_CONV_UNHANDLED;
- truncated = FALSE;
- reverse = TRUE;
-
if(sfirst < 0) {
/*
* The source has no bits set and must therefore be zero.
@@ -9240,10 +9237,15 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/* The conversion loop */
for (elmtno=0; elmtno<nelmts; elmtno++) {
+ /* Set these variables to default */
+ except_ret = H5T_CONV_UNHANDLED;
+ reverse = TRUE;
+
/* Make sure these variables are reset to 0. */
sign = 0; /*source sign bit value */
is_max_neg = 0; /*source is maximal negative value*/
do_round = 0; /*whether there is roundup */
+ sfirst = 0;
/*
* If the source and destination buffers overlap then use a
@@ -9333,15 +9335,11 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
H5T_bit_set(int_buf, src.prec, buf_size*8-src.prec, 0);
/* Set sign bit in destiny */
- H5T_bit_set_d(d, dst.u.f.sign, 1, sign);
+ H5T_bit_set_d(d, dst.u.f.sign, 1, (hsize_t)sign);
}
first = (size_t)sfirst;
- /* Set these variables to default */
- except_ret = H5T_CONV_UNHANDLED;
- reverse = TRUE;
-
/*
* Calculate the true destination exponent by adjusting according to
* the destination exponent bias.
@@ -9542,22 +9540,19 @@ done:
static herr_t
H5T_reverse_order(uint8_t *rev, uint8_t *s, size_t size, H5T_order_t order)
{
- herr_t ret_value = SUCCEED;
size_t i;
- FUNC_ENTER_NOAPI(H5T_reverse_order, FAIL);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_reverse_order);
assert(s);
assert(size);
- if (H5T_ORDER_BE == order) {
+ if (H5T_ORDER_BE == order)
for (i=0; i<size; i++)
rev[size-(i+1)] = s[i];
- } else {
+ else
for (i=0; i<size; i++)
rev[i] = s[i];
- }
-done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(SUCCEED);
}
diff --git a/src/H5Tcset.c b/src/H5Tcset.c
index 373b088..acc1064 100644
--- a/src/H5Tcset.c
+++ b/src/H5Tcset.c
@@ -19,18 +19,18 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_cset_interface
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5T_cset_mask
+
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
#include "H5Iprivate.h" /*ID functions */
#include "H5Tpkg.h" /*data-type functions */
-#define PABLO_MASK H5Tcset_mask
-
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_cset_interface
-static herr_t H5T_init_cset_interface(void);
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Tenum.c b/src/H5Tenum.c
index 7ea1b10..769ca12 100644
--- a/src/H5Tenum.c
+++ b/src/H5Tenum.c
@@ -19,6 +19,13 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_enum_interface
+
+/* Pablo information */
+/* (Put before include files to avoid problems with inline functions) */
+#define PABLO_MASK H5T_enum_mask
+
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
#include "H5FLprivate.h" /*Free Lists */
@@ -26,13 +33,6 @@
#include "H5MMprivate.h" /*memory management */
#include "H5Tpkg.h" /*data-type functions */
-#define PABLO_MASK H5Tenum_mask
-
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_enum_interface
-static herr_t H5T_init_enum_interface(void);
-
/* Declare extern the free list for H5T_t's */
H5FL_EXTERN(H5T_t);
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index e32763b..2ad9b92 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -19,9 +19,12 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_fields_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tfields_mask
+#define PABLO_MASK H5T_fields_mask
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
@@ -29,11 +32,6 @@
#include "H5MMprivate.h" /*memory management */
#include "H5Tpkg.h" /*data-type functions */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_fields_interface
-static herr_t H5T_init_fields_interface(void);
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index d91b3a2..946b677 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -19,20 +19,18 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_fixed_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tfixed_mask
+#define PABLO_MASK H5T_fixed_mask
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
#include "H5Iprivate.h" /*ID functions */
#include "H5Tpkg.h" /*data-type functions */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_fixed_interface
-static herr_t H5T_init_fixed_interface(void);
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Tfloat.c b/src/H5Tfloat.c
index 306ef09..f9a4b34 100644
--- a/src/H5Tfloat.c
+++ b/src/H5Tfloat.c
@@ -19,20 +19,18 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_float_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tfloat_mask
+#define PABLO_MASK H5T_float_mask
#include "H5private.h" /*generic functions */
#include "H5Eprivate.h" /*error handling */
#include "H5Iprivate.h" /*ID functions */
#include "H5Tpkg.h" /*data-type functions */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_float_interface
-static herr_t H5T_init_float_interface(void);
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index 20a2d40..c13d972 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -19,9 +19,12 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_native_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tnative_mask
+#define PABLO_MASK H5T_native_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
@@ -30,11 +33,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_native_interface
-static herr_t H5T_init_native_interface(void);
-
/* Static local functions */
static H5T_t *H5T_get_native_type(H5T_t *dt, H5T_direction_t direction,
size_t *struct_align, size_t *offset, size_t *comp_size);
diff --git a/src/H5Toffset.c b/src/H5Toffset.c
index 0d6577b..850737c 100644
--- a/src/H5Toffset.c
+++ b/src/H5Toffset.c
@@ -19,20 +19,18 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_offset_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Toffset_mask
+#define PABLO_MASK H5T_offset_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_offset_interface
-static herr_t H5T_init_offset_interface(void);
-
/* Static local functions */
static herr_t H5T_set_offset(H5T_t *dt, size_t offset);
diff --git a/src/H5Topaque.c b/src/H5Topaque.c
index b4b0764..96fed31 100644
--- a/src/H5Topaque.c
+++ b/src/H5Topaque.c
@@ -19,9 +19,12 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_opaque_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Topaque_mask
+#define PABLO_MASK H5T_opaque_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
@@ -29,11 +32,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_opaque_interface
-static herr_t H5T_init_opaque_interface(void);
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Torder.c b/src/H5Torder.c
index 9d1a864..48210cd 100644
--- a/src/H5Torder.c
+++ b/src/H5Torder.c
@@ -19,20 +19,18 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_order_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Torder_mask
+#define PABLO_MASK H5T_order_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_order_interface
-static herr_t H5T_init_order_interface(void);
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Tpad.c b/src/H5Tpad.c
index 33d1902..a6b818e 100644
--- a/src/H5Tpad.c
+++ b/src/H5Tpad.c
@@ -19,20 +19,18 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_pad_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tpad_mask
+#define PABLO_MASK H5T_pad_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_pad_interface
-static herr_t H5T_init_pad_interface(void);
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 6a80751..6b52d86 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -316,7 +316,6 @@ H5_DLLVAR double H5T_NATIVE_DOUBLE_POS_INF_g;
H5_DLLVAR double H5T_NATIVE_DOUBLE_NEG_INF_g;
/* Common functions */
-H5_DLL herr_t H5T_init_interface(void);
H5_DLL H5T_t *H5T_create(H5T_class_t type, size_t size);
H5_DLL herr_t H5T_free(H5T_t *dt);
H5_DLL H5T_sign_t H5T_get_sign(H5T_t const *dt);
diff --git a/src/H5Tprecis.c b/src/H5Tprecis.c
index 6175242..a22ff49 100644
--- a/src/H5Tprecis.c
+++ b/src/H5Tprecis.c
@@ -19,20 +19,18 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_precis_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tprecis_mask
+#define PABLO_MASK H5T_precis_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_precis_interface
-static herr_t H5T_init_precis_interface(void);
-
/* Static local functions */
static herr_t H5T_set_precision(H5T_t *dt, size_t prec);
diff --git a/src/H5Tstrpad.c b/src/H5Tstrpad.c
index cd7f9a2..250a7bd 100644
--- a/src/H5Tstrpad.c
+++ b/src/H5Tstrpad.c
@@ -19,20 +19,18 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_strpad_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tstrpad_mask
+#define PABLO_MASK H5T_strpad_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
#include "H5Iprivate.h" /* IDs */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_strpad_interface
-static herr_t H5T_init_strpad_interface(void);
-
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index f0f5267..c546f54 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -19,9 +19,12 @@
#define H5T_PACKAGE /*suppress error about including H5Tpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5T_init_vlen_interface
+
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Tvlen_mask
+#define PABLO_MASK H5T_vlen_mask
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Dataset functions */
@@ -33,11 +36,6 @@
#include "H5Pprivate.h" /* Property lists */
#include "H5Tpkg.h" /* Datatypes */
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT H5T_init_vlen_interface
-static herr_t H5T_init_vlen_interface(void);
-
/* Local functions */
static herr_t H5T_vlen_reclaim_recurse(void *elem, const H5T_t *dt, H5MM_free_t free_func, void *free_info);
static ssize_t H5T_vlen_seq_mem_getlen(void *_vl);
diff --git a/src/H5V.c b/src/H5V.c
index aabe701..ccdfffc 100644
--- a/src/H5V.c
+++ b/src/H5V.c
@@ -26,10 +26,6 @@
#include "H5Oprivate.h"
#include "H5Vprivate.h"
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Local macros */
#define H5V_HYPER_NDIMS H5O_LAYOUT_NDIMS
@@ -285,7 +281,7 @@ H5V_hyper_stride(unsigned n, const hsize_t *size,
int i; /*counter */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5V_hyper_stride, (HDabort(), 0)) /*lint !e527 Don't worry about unreachable statement */
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_hyper_stride)
assert(n <= H5V_HYPER_NDIMS);
assert(size);
@@ -355,7 +351,6 @@ H5V_hyper_stride(unsigned n, const hsize_t *size,
/* Set return value */
ret_value=skip;
-done:
FUNC_LEAVE_NOAPI(ret_value)
}
@@ -500,7 +495,7 @@ H5V_hyper_fill(unsigned n, const hsize_t *_size,
unsigned u;
#endif
- FUNC_ENTER_NOAPI(H5V_hyper_fill, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_hyper_fill)
/* check args */
assert(n > 0 && n <= H5V_HYPER_NDIMS);
@@ -525,7 +520,6 @@ H5V_hyper_fill(unsigned n, const hsize_t *_size,
ret_value = H5V_stride_fill(n, elmt_size, size, dst_stride, dst+dst_start,
fill_value);
-done:
FUNC_LEAVE_NOAPI(ret_value)
}
@@ -589,7 +583,7 @@ H5V_hyper_copy(unsigned n, const hsize_t *_size,
unsigned u;
#endif
- FUNC_ENTER_NOAPI(H5V_hyper_copy, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_hyper_copy)
/* check args */
assert(n > 0 && n <= H5V_HYPER_NDIMS);
@@ -727,7 +721,6 @@ H5V_hyper_copy(unsigned n, const hsize_t *_size,
ret_value = H5V_stride_copy(n, elmt_size, size,
dst_stride, dst+dst_start, src_stride, src+src_start);
-done:
FUNC_LEAVE_NOAPI(ret_value)
}
@@ -757,9 +750,8 @@ H5V_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
hsize_t i; /*counter */
int j; /*counter */
hbool_t carry; /*subtraction carray value */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5V_stride_fill, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_stride_fill)
assert (elmt_size < SIZET_MAX);
H5V_vector_cpy(n, idx, size);
@@ -782,8 +774,7 @@ H5V_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
}
}
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
@@ -820,9 +811,8 @@ H5V_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size,
hsize_t i; /*counter */
int j; /*counters */
hbool_t carry; /*carray for subtraction*/
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5V_stride_copy, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_stride_copy)
assert (elmt_size<SIZET_MAX);
if (n) {
@@ -852,8 +842,7 @@ H5V_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size,
HDmemcpy (dst, src, (size_t)elmt_size); /*lint !e671 The elmt_size will be OK */
}
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
#ifdef LATER
@@ -896,7 +885,7 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
int j; /* Local index variable */
hbool_t carry;
- FUNC_ENTER_NOAPI_NOINIT(H5V_stride_copy2)
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5V_stride_copy2)
assert (elmt_size < SIZET_MAX);
assert(dst_n>0);
@@ -960,9 +949,8 @@ H5V_array_fill(void *_dst, const void *src, size_t size, size_t count)
size_t copy_items; /* number of items currently copying*/
size_t items_left; /* number of items left to copy */
uint8_t *dst=(uint8_t*)_dst;/* alias for pointer arithmetic */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5V_array_fill, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_array_fill)
assert (dst);
assert (src);
@@ -990,8 +978,7 @@ H5V_array_fill(void *_dst, const void *src, size_t size, size_t count)
if (items_left > 0) /* if there are any items left to copy */
HDmemcpy(dst, _dst, items_left * size);
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5V_array_fill() */
@@ -1017,9 +1004,8 @@ H5V_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
{
hsize_t acc; /*accumulator */
int i; /*counter */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5V_array_down, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_array_down)
assert(n <= H5V_HYPER_NDIMS);
assert(total_size);
@@ -1032,8 +1018,7 @@ H5V_array_down(unsigned n, const hsize_t *total_size, hsize_t *down)
acc *= total_size[i];
} /* end for */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5V_array_down() */
@@ -1067,7 +1052,7 @@ H5V_array_offset_pre(unsigned n, const hsize_t *acc, const hssize_t *offset)
int i; /*counter */
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5V_array_offset_pre, (HDabort(), 0)) /*lint !e527 Don't worry about unreachable statement */
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_array_offset_pre)
assert(n <= H5V_HYPER_NDIMS);
assert(acc);
@@ -1082,7 +1067,6 @@ H5V_array_offset_pre(unsigned n, const hsize_t *acc, const hssize_t *offset)
/* Set return value */
ret_value=skip;
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5V_array_offset_pre() */
@@ -1158,9 +1142,8 @@ H5V_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hssize_t *
hsize_t acc; /* Size accumulator */
unsigned u; /* Local index variable */
int i; /* Local index variable */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5V_array_calc, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_array_calc)
/* Sanity check */
assert(n <= H5V_HYPER_NDIMS);
@@ -1181,8 +1164,7 @@ H5V_array_calc(hsize_t offset, unsigned n, const hsize_t *total_size, hssize_t *
offset %= idx[u];
} /* end for */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5V_array_calc() */
@@ -1234,9 +1216,8 @@ H5V_chunk_index(unsigned ndims, const hssize_t *coord, const size_t *chunk,
{
hssize_t scaled_coord[H5V_HYPER_NDIMS]; /* Scaled, coordinates, in terms of chunks */
unsigned u; /* Local index variable */
- herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5V_chunk_index, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_chunk_index)
/* Sanity check */
assert(ndims <= H5V_HYPER_NDIMS);
@@ -1253,8 +1234,7 @@ H5V_chunk_index(unsigned ndims, const hssize_t *coord, const size_t *chunk,
/* Compute the chunk index */
*chunk_idx=H5V_array_offset_pre(ndims,down_nchunks,scaled_coord); /*lint !e772 scaled_coord will always be initialized */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5V_chunk_index() */
@@ -1292,7 +1272,7 @@ H5V_memcpyvv(void *_dst,
size_t u,v; /* Local index variables */
ssize_t ret_value=0; /* Return value */
- FUNC_ENTER_NOAPI(H5V_memcpyvv, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5V_memcpyvv)
/* Sanity check */
assert(_dst);
@@ -1343,7 +1323,6 @@ H5V_memcpyvv(void *_dst,
*dst_curr_seq=u;
*src_curr_seq=v;
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5V_memcpyvv() */
diff --git a/src/H5Z.c b/src/H5Z.c
index cc3e3f5..8d4f267 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -14,6 +14,9 @@
#define H5Z_PACKAGE /*suppress error about including H5Zpkg */
+/* Interface initialization */
+#define H5_INTERFACE_INIT_FUNC H5Z_init_interface
+
/* Pablo mask */
/* (Put before include files to avoid problems with inline functions) */
#define PABLO_MASK H5Z_mask
@@ -28,11 +31,6 @@
#include "H5Sprivate.h" /* Dataspace functions */
#include "H5Zpkg.h" /* Data filters */
-/* Interface initialization */
-#define INTERFACE_INIT H5Z_init_interface
-static int interface_initialize_g = 0;
-static herr_t H5Z_init_interface (void);
-
/* Local typedefs */
#ifdef H5Z_DEBUG
typedef struct H5Z_stats_t {
@@ -130,7 +128,7 @@ H5Z_term_interface (void)
char comment[16], bandwidth[32];
#endif
- if (interface_initialize_g) {
+ if (H5_interface_initialize_g) {
#ifdef H5Z_DEBUG
if (H5DEBUG(Z)) {
for (i=0; i<H5Z_table_used_g; i++) {
@@ -185,7 +183,7 @@ H5Z_term_interface (void)
H5Z_stat_table_g = H5MM_xfree(H5Z_stat_table_g);
#endif /* H5Z_DEBUG */
H5Z_table_used_g = H5Z_table_alloc_g = 0;
- interface_initialize_g = 0;
+ H5_interface_initialize_g = 0;
}
return 0;
}
diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c
index 250bd3e..3202221 100644
--- a/src/H5Zdeflate.c
+++ b/src/H5Zdeflate.c
@@ -34,10 +34,6 @@
# include "zlib.h"
#endif
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local function prototypes */
static size_t H5Z_filter_deflate (unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
diff --git a/src/H5Zfletcher32.c b/src/H5Zfletcher32.c
index 1fd346e..dfd69cf 100644
--- a/src/H5Zfletcher32.c
+++ b/src/H5Zfletcher32.c
@@ -31,10 +31,6 @@
#ifdef H5_HAVE_FILTER_FLETCHER32
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local function prototypes */
static size_t H5Z_filter_fletcher32 (unsigned flags, size_t cd_nelmts,
const unsigned cd_values[], size_t nbytes, size_t *buf_size, void **buf);
diff --git a/src/H5Zshuffle.c b/src/H5Zshuffle.c
index 196f037..36b6f23 100644
--- a/src/H5Zshuffle.c
+++ b/src/H5Zshuffle.c
@@ -27,10 +27,6 @@
#ifdef H5_HAVE_FILTER_SHUFFLE
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local function prototypes */
static herr_t H5Z_set_local_shuffle(hid_t dcpl_id, hid_t type_id, hid_t space_id);
static size_t H5Z_filter_shuffle(unsigned flags, size_t cd_nelmts,
diff --git a/src/H5Zszip.c b/src/H5Zszip.c
index 9907f9c..6683776 100644
--- a/src/H5Zszip.c
+++ b/src/H5Zszip.c
@@ -33,10 +33,6 @@
# include "szlib.h"
#endif
-/* Interface initialization */
-#define INTERFACE_INIT NULL
-static int interface_initialize_g = 0;
-
/* Local function prototypes */
static herr_t H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
static herr_t H5Z_set_local_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id);
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index b7f242c..3a0931a 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -16,7 +16,7 @@
/* Pablo information */
/* (Put before include files to avoid problems with inline functions) */
-#define PABLO_MASK H5Z_deflate_mask
+#define PABLO_MASK H5Z_trans_mask
#include "H5private.h" /* Generic Functions */
#include "H5Eprivate.h" /* Error handling */
@@ -79,10 +79,6 @@ typedef struct {
const char *tok_last_end; /* The end of the last token */
} H5Z_token;
-/* Interface initialization */
-static int interface_initialize_g = 0;
-#define INTERFACE_INIT NULL
-
/* Local function prototypes */
static H5Z_token *H5Z_get_token(H5Z_token *current);
static H5Z_node *H5Z_parse_expression(H5Z_token *current);
@@ -344,10 +340,10 @@ H5Z_xform_parse(const char *expression)
H5Z_token tok;
void* ret_value;
- FUNC_ENTER_NOAPI(H5Z_xform_parse, NULL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5Z_xform_parse)
if (!expression)
- return NULL;
+ HGOTO_DONE(NULL)
/* Set up the initial H5Z_token for parsing */
tok.tok_expr = tok.tok_begin = tok.tok_end = expression;
@@ -683,7 +679,6 @@ H5Z_parse_factor(H5Z_token *current)
}
done:
-
FUNC_LEAVE_NOAPI(factor);
}
@@ -703,21 +698,16 @@ done:
static H5Z_node *
H5Z_new_node(H5Z_token_type type)
{
- H5Z_node* ret_value;
H5Z_node* new_node;
- FUNC_ENTER_NOAPI(H5Z_new_node, NULL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5Z_new_node)
new_node = H5MM_calloc(sizeof(H5Z_node));
+ assert(new_node);
- if (new_node)
- new_node->type = type;
- else
- assert(new_node);
+ new_node->type = type;
-done:
-
- FUNC_LEAVE_NOAPI(new_node);
+ FUNC_LEAVE_NOAPI(new_node);
}
@@ -1697,9 +1687,7 @@ done:
herr_t
H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop)
{
- herr_t ret_value=SUCCEED;
-
- FUNC_ENTER_NOAPI(H5Z_xform_destroy, FAIL)
+ FUNC_ENTER_NOAPI_NOFUNC(H5Z_xform_destroy)
if(data_xform_prop) {
/* Destroy the parse tree */
@@ -1712,8 +1700,7 @@ H5Z_xform_destroy(H5Z_data_xform_t *data_xform_prop)
H5MM_xfree(data_xform_prop);
} /* end if */
-done:
- FUNC_LEAVE_NOAPI(ret_value)
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5Z_xform_destroy() */
@@ -1741,7 +1728,7 @@ done:
herr_t
H5Z_xform_copy(H5Z_data_xform_t **data_xform_prop)
{
- H5Z_data_xform_t *new_data_xform_prop;
+ H5Z_data_xform_t *new_data_xform_prop=NULL;
herr_t ret_value=SUCCEED;
FUNC_ENTER_NOAPI(H5Z_xform_copy, FAIL)
@@ -1801,11 +1788,10 @@ H5Z_xform_noop(const H5Z_data_xform_t *data_xform_prop)
{
hbool_t ret_value;
- FUNC_ENTER_NOAPI(H5Z_xform_noop, TRUE)
+ FUNC_ENTER_NOAPI_NOFUNC(H5Z_xform_noop)
ret_value=(data_xform_prop ? FALSE : TRUE);
-done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5Z_xform_noop() */
diff --git a/src/H5detect.c b/src/H5detect.c
index 2e7e33f..5acfb56 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -499,34 +499,19 @@ print_results(int nd, detected_t *d, int na, malign_t *misc_align)
/* Include files */
printf("\
#define H5T_PACKAGE /*suppress error about including H5Tpkg.h*/\n\
-#define PABLO_MASK H5Tinit_mask\n\
+#define PABLO_MASK H5T_init_mask\n\
\n\
#include \"H5private.h\"\n\
#include \"H5Iprivate.h\"\n\
#include \"H5Eprivate.h\"\n\
#include \"H5FLprivate.h\"\n\
-#include \"H5MMprivate.h\"\n\
#include \"H5Tpkg.h\"\n\
\n\
-static int interface_initialize_g = 0;\n\
-#define INTERFACE_INIT NULL\n\
-\n\
/* Declare external the free list for H5T_t's */\n\
H5FL_EXTERN(H5T_t);\n\
\n\
\n");
- /* The interface termination function */
- printf("\n\
-int\n\
-H5TN_term_interface(void)\n\
-{\n\
- interface_initialize_g = 0;\n\
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5TN_term_interface);\n\
- \n\
- FUNC_LEAVE_NOAPI(0);\n\
-}\n");
-
/* The interface initialization function */
printf("\n\
herr_t\n\
diff --git a/src/H5private.h b/src/H5private.h
index c171363..71a92e0 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -451,15 +451,6 @@
#define HSSIZET_MIN (~(HSSIZET_MAX))
/*
- * Some compilers have problems declaring auto variables that point
- * to string constants. Use the CONSTR() macro so it's easy to fix
- * those compilers.
- */
-#ifndef CONSTR
-# define CONSTR(VAR,STR) static const char VAR[]=STR
-#endif
-
-/*
* A macro to portably increment enumerated types.
*/
#ifndef H5_INC_ENUM
@@ -1035,37 +1026,6 @@ H5_DLL double H5_trace(const double *calltime, const char *func, const char *typ
*
* Modifications:
*
- * Robb Matzke, 4 Aug 1997
- * The `interface_init_func' can be the null pointer. Changed
- * HGOTO_ERROR() to HRETURN_ERROR() since no clean-up needs to occur
- * when an error is detected at this point since this must be the
- * first executable statement in a function. This allows functions
- * to omit the `done:' label when convenient to do so.
- *
- * Robb Matzke, 4 Aug 1997
- * The pablo mask comes from the constant PABLO_MASK defined on
- * a per-file basis. The `pablo_func_id' is generated from the
- * `func_name' argument by prepending an `ID_' to the name. The
- * pablo function identifier should be saved in a local variable
- * so FUNC_LEAVE() can access it.
- *
- * Robb Matzke, 4 Aug 1997
- * It is safe to call this function even inside various library
- * initializing functions. Infinite recursion is no longer a
- * danger.
- *
- * Robb Matzke, 3 Dec 1997
- * The interface initialization function is no longer passed as an
- * argument unless the `FUNC_ENTER_INIT' form is called. Instead, the
- * function comes from the `INTERFACE_INIT' constant which must be
- * defined in every source file.
- *
- * Robb Matzke, 17 Jun 1998
- * Added auto variable RTYPE which is initialized by the tracing macros.
- *
- * Quincey Koziol, 28 May 2002
- * Split FUNC_ENTER macro into FUNC_ENTER_API, FUNC_ENTER_NOAPI and
- * FUNC_ENTER_NOAPI_NOINIT.
*-------------------------------------------------------------------------
*/
@@ -1150,12 +1110,31 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
/* Check if the function name is correct (if the compiler supports __FUNCTION__) */
#ifdef H5_HAVE_FUNCTION
#define H5_CHECK_FUNCNAME(func_name) \
- assert(func_name && !HDstrcmp(#func_name, __FUNCTION__))
+ assert(!HDstrcmp(#func_name, __FUNCTION__))
#else /* H5_HAVE_FUNCTION */
#define H5_CHECK_FUNCNAME(func_name) \
assert(func_name)
#endif /* H5_HAVE_FUNCTION */
+/* Macros for defining interface initialization routines */
+#ifdef H5_INTERFACE_INIT_FUNC
+static int H5_interface_initialize_g = 0;
+static herr_t H5_INTERFACE_INIT_FUNC(void);
+#define H5_INTERFACE_INIT(err) \
+ /* Initialize this interface or bust */ \
+ if (!H5_interface_initialize_g) { \
+ H5_interface_initialize_g = 1; \
+ if (H5_INTERFACE_INIT_FUNC()<0) { \
+ H5_interface_initialize_g = 0; \
+ HGOTO_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
+ "interface initialization failed") \
+ } \
+ }
+#else /* H5_INTERFACE_INIT_FUNC */
+#define H5_INTERFACE_INIT(err)
+#endif /* H5_INTERFACE_INIT_FUNC */
+
+
#define FUNC_ENTER_COMMON_NOFUNC(func_name,asrt) \
PABLO_SAVE (ID_ ## func_name) \
\
@@ -1169,8 +1148,8 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
PABLO_TRACE_ON (PABLO_MASK, pablo_func_id)
#define FUNC_ENTER_COMMON(func_name,asrt) \
- CONSTR (FUNC, #func_name); \
- FUNC_ENTER_COMMON_NOFUNC(func_name,asrt); \
+ static const char FUNC[]=#func_name; \
+ FUNC_ENTER_COMMON_NOFUNC(func_name,asrt);
/* Threadsafety initialization code for API routines */
#define FUNC_ENTER_API_THREADSAFE \
@@ -1196,7 +1175,7 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
FUNC_ENTER_API_VARS(func_name) \
FUNC_ENTER_COMMON(func_name,H5_IS_API(#func_name)); \
FUNC_ENTER_API_THREADSAFE; \
- FUNC_ENTER_API_COMMON(func_name,INTERFACE_INIT,err); \
+ FUNC_ENTER_API_COMMON(func_name,err); \
/* Clear thread error stack entering public functions */ \
H5E_clear(NULL); \
{
@@ -1209,7 +1188,7 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
FUNC_ENTER_API_VARS(func_name) \
FUNC_ENTER_COMMON(func_name,H5_IS_API(#func_name)); \
FUNC_ENTER_API_THREADSAFE; \
- FUNC_ENTER_API_COMMON(func_name,INTERFACE_INIT,err); \
+ FUNC_ENTER_API_COMMON(func_name,err); \
{
/*
@@ -1229,7 +1208,13 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
/* Use this macro for all "normal" non-API functions */
#define FUNC_ENTER_NOAPI(func_name,err) { \
FUNC_ENTER_COMMON(func_name,!H5_IS_API(#func_name)); \
- FUNC_ENTER_NOAPI_INIT(func_name,INTERFACE_INIT,err) \
+ FUNC_ENTER_NOAPI_INIT(func_name,err) \
+ {
+
+/* Use this macro for all non-API functions which don't issue errors */
+#define FUNC_ENTER_NOAPI_NOFUNC(func_name) { \
+ FUNC_ENTER_COMMON_NOFUNC(func_name,!H5_IS_API(#func_name)); \
+ FUNC_ENTER_NOAPI_INIT(func_name,err) \
{
/*
@@ -1266,12 +1251,16 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
* Use this macro for non-API functions which fall into these categories:
* - functions which shouldn't push their name on the function stack
* (so far, just the H5FS routines themselves)
+ *
+ * This macro is used for functions which fit the above categories _and_
+ * also don't use the 'FUNC' variable (i.e. don't push errors on the error stack)
+ *
*/
-#define FUNC_ENTER_NOAPI_NOFS(func_name) { \
- FUNC_ENTER_COMMON(func_name,!H5_IS_API(#func_name)); \
+#define FUNC_ENTER_NOAPI_NOFUNC_NOFS(func_name) { \
+ FUNC_ENTER_COMMON_NOFUNC(func_name,!H5_IS_API(#func_name)); \
{
-#define FUNC_ENTER_API_COMMON(func_name,interface_init_func,err) \
+#define FUNC_ENTER_API_COMMON(func_name,err) \
/* Initialize the library */ \
if (!(H5_INIT_GLOBAL)) { \
H5_INIT_GLOBAL = TRUE; \
@@ -1280,33 +1269,17 @@ extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
"library initialization failed") \
} \
\
- /* Initialize this interface or bust */ \
- if (!interface_initialize_g) { \
- interface_initialize_g = 1; \
- if (interface_init_func && \
- ((herr_t(*)(void))interface_init_func)()<0) { \
- interface_initialize_g = 0; \
- HGOTO_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
- "interface initialization failed") \
- } \
- } \
+ /* Initialize the interface, if appropriate */ \
+ H5_INTERFACE_INIT(err) \
\
/* Push the name of this function on the function stack */ \
H5_PUSH_FUNC(func_name); \
\
BEGIN_MPE_LOG(func_name)
-#define FUNC_ENTER_NOAPI_INIT(func_name,interface_init_func,err) \
- /* Initialize this interface or bust */ \
- if (!interface_initialize_g) { \
- interface_initialize_g = 1; \
- if (interface_init_func && \
- ((herr_t(*)(void))interface_init_func)()<0) { \
- interface_initialize_g = 0; \
- HGOTO_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
- "interface initialization failed") \
- } \
- } \
+#define FUNC_ENTER_NOAPI_INIT(func_name,err) \
+ /* Initialize the interface, if appropriate */ \
+ H5_INTERFACE_INIT(err) \
\
/* Push the name of this function on the function stack */ \
H5_PUSH_FUNC(func_name);
@@ -1394,7 +1367,6 @@ H5_DLL int H5I_term_interface(void);
H5_DLL int H5P_term_interface(void);
H5_DLL int H5R_term_interface(void);
H5_DLL int H5S_term_interface(void);
-H5_DLL int H5TN_term_interface(void);
H5_DLL int H5T_term_interface(void);
H5_DLL int H5Z_term_interface(void);