summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5D.c11
-rw-r--r--src/H5P.c23
-rw-r--r--src/H5Pprivate.h1
-rw-r--r--src/H5T.c23
-rw-r--r--src/H5Tprivate.h1
5 files changed, 59 insertions, 0 deletions
diff --git a/src/H5D.c b/src/H5D.c
index ae59f67..ea9d811 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -80,6 +80,10 @@ static herr_t H5D_init_interface(void)
herr_t ret_value = SUCCEED;
FUNC_ENTER (H5D_init_interface, NULL, FAIL);
+ /* Make certain the H5T & H5P interfaces have been initialized */
+ H5T_init();
+ H5P_init();
+
/* Initialize the atom group for the file IDs */
if((ret_value=H5Ainit_group(H5_DATASET,H5A_DATASETID_HASHSIZE,H5D_RESERVED_ATOMS,NULL))!=FAIL)
ret_value=H5_add_exit(&H5D_term_interface);
@@ -202,6 +206,7 @@ hid_t H5D_find_name(hid_t grp_id, hobjtype_t obj_type, const char *name)
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
+printf("%s: check 1.0\n",FUNC);
/* Convert atom arguments to pointers */
if(H5Aatom_group(grp_id)!=H5_FILE)
HGOTO_ERROR(H5E_ATOM, H5E_BADTYPE, FAIL);
@@ -215,20 +220,25 @@ hid_t H5D_find_name(hid_t grp_id, hobjtype_t obj_type, const char *name)
dset->file = file;
dset->dirty = FALSE;
+printf("%s: check 2.0, name=%s\n",FUNC,name);
/* Open the dataset object */
if (NULL==(dset->ent=H5G_open (file, name))) {
HGOTO_ERROR (H5E_DATASET, H5E_NOTFOUND, FAIL);
}
+printf("%s: check 2.5\n",FUNC);
/* Get the dataset's type (currently only atomic types) */
if((type=HDcalloc(1,sizeof(h5_datatype_t)))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL);
+printf("%s: check 2.6\n",FUNC);
if (NULL==H5O_read (dset->file, NO_ADDR, dset->ent, H5O_SIM_DTYPE, 0,
type))
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL);
+printf("%s: check 2.7\n",FUNC);
if((dset->tid=H5Aregister_atom(H5_DATATYPE, (const VOIDP)type))==FAIL)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL);
+printf("%s: check 3.0\n",FUNC);
/* Get the dataset's dimensionality (currently only simple dataspaces) */
if((dim=HDcalloc(1,sizeof(H5P_dim_t)))==NULL)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL);
@@ -245,6 +255,7 @@ hid_t H5D_find_name(hid_t grp_id, hobjtype_t obj_type, const char *name)
HGOTO_ERROR(H5E_OHDR, H5E_NOTFOUND, FAIL);
dset->data_addr=store.off;
+printf("%s: check 4.0\n",FUNC);
/* Register the new OID and get an ID for it */
if((ret_value=H5Aregister_atom(H5_DATASET, (const VOIDP)dset))==FAIL)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL);
diff --git a/src/H5P.c b/src/H5P.c
index b6f8563..7d0cb86 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -70,6 +70,29 @@ static herr_t H5P_init_interface(void)
} /* H5P_init_interface */
/*--------------------------------------------------------------------------
+NAME
+ H5P_init -- Make certain that the interface has been initialized
+USAGE
+ herr_t H5P_init()
+
+RETURNS
+ SUCCEED/FAIL
+DESCRIPTION
+ Library public routine to make certain the H5P interface has been properly
+ initialized.
+
+--------------------------------------------------------------------------*/
+herr_t H5P_init(void)
+{
+ herr_t ret_value = SUCCEED;
+ FUNC_ENTER (H5P_init, H5P_init_interface, FAIL);
+
+ /* Actual work is done in the FUNC_ENTER macro */
+
+ FUNC_LEAVE(ret_value);
+} /* H5P_init */
+
+/*--------------------------------------------------------------------------
NAME
H5P_term_interface
PURPOSE
diff --git a/src/H5Pprivate.h b/src/H5Pprivate.h
index 9a1fb9b..ecffd69 100644
--- a/src/H5Pprivate.h
+++ b/src/H5Pprivate.h
@@ -39,6 +39,7 @@ typedef struct H5P_sdim_t {
#define H5P_RESERVED_ATOMS 2
/* Private functions */
+herr_t H5P_init(void);
hid_t H5P_create(hid_t owner_id, hobjtype_t type, const char *name);
uint32 H5P_get_lrank(H5P_sdim_t *sdim);
hbool_t H5P_is_simple(H5P_dim_t *sdim);
diff --git a/src/H5T.c b/src/H5T.c
index aab886e..7c6fdb6 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -81,6 +81,29 @@ static herr_t H5T_init_interface(void)
} /* H5T_init_interface */
/*--------------------------------------------------------------------------
+NAME
+ H5T_init -- Make certain that the interface has been initialized
+USAGE
+ herr_t H5T_init()
+
+RETURNS
+ SUCCEED/FAIL
+DESCRIPTION
+ Library public routine to make certain the H5T interface has been properly
+ initialized.
+
+--------------------------------------------------------------------------*/
+herr_t H5T_init(void)
+{
+ herr_t ret_value = SUCCEED;
+ FUNC_ENTER (H5T_init, H5T_init_interface, FAIL);
+
+ /* Actual work is done in the FUNC_ENTER macro */
+
+ FUNC_LEAVE(ret_value);
+} /* H5T_init */
+
+/*--------------------------------------------------------------------------
NAME
H5T_term_interface
PURPOSE
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index 0a3f2eb..3483405 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -51,6 +51,7 @@ typedef struct {
} h5_datatype_t;
/* Private functions */
+herr_t H5T_init(void);
hid_t H5T_create(hid_t owner_id, hobjtype_t type, const char *name);
hbool_t H5T_is_atomic(h5_datatype_t *type);
uintn H5T_size(h5_datatype_t *dt, hbool_t mem_flag);