summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-05 02:07:08 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-05 02:07:08 (GMT)
commite251f45b8741c7e7bf2dbd4d76a76d67dbfc6da1 (patch)
tree99ce978bac2ceec3646a60753b437d874a92de29 /src/H5D.c
parent6a3cb617d3aa57f439065118fbc68afcb1465a54 (diff)
downloadhdf5-e251f45b8741c7e7bf2dbd4d76a76d67dbfc6da1.zip
hdf5-e251f45b8741c7e7bf2dbd4d76a76d67dbfc6da1.tar.gz
hdf5-e251f45b8741c7e7bf2dbd4d76a76d67dbfc6da1.tar.bz2
[svn-r13] ./src/H5.c
Added an `_g' to the end of library_initialize, thread_initialize, and interface_initialize to abide by the naming convention. Removed setting of these variables from the various initialization functions since it happens in the FUNC_ENTER() macro now. Defined PABLO_MASK. Removed `CONSTR(FUNC,"function_name")' everywhere since it's handled by the various FUNC_ENTER macros. Fixed calls to FUNC_ENTER(), FUNC_LEAVE(), and HRETURN_ERROR() so they don't need so many arguments. Changed PABLO_TRACE_ON() to FUNC_ENTER() since there is no longer any danger of infinite recursion. H5_term_library() now returns SUCCEED/FAIL and uses FUNC_ENTER/FUNC_EXIT macros. ./src/H5A.c Changes similar to H5.c. Most (all?) of the functions called PABLO_TRACE_ON() and the package doesn't have an interface initializer that I can see, so the second argument to FUNC_ENTER() is always NULL. H5A_release_atom_node() returns SUCCEED/FAIL. ./src/H5AC.c Added error handling. Arguments for internal functions are checked with assert(). ./src/H5C.c Changes similar to H5.c Fixed the FUNC variable in H5C_get_default_atom() since it was initialized to the wrong name. ./src/H5D.c Changes similar to H5.c ./src/H5E.c Changes similar to H5.c Changed the pablo mask from H5_mask to H5E_mask in H5E_init_interface(). H5Eclear(), H5E_store(), and H5Epush() return SUCCEED/FAIL. Changed PABLO_TRACE_OFF() calls to FUNC_LEAVE() calls in the same functions. ./src/H5Eprivate.h ./src/H5Eproto.h Added additional error symbols for the H5AC package. Changed prototypes for H5Eclear() and H5Epush(). Changes to HRETURN_ERROR() and HGOTO_ERROR() to reduce the number of arguments. ./src/H5F.c Changes similr to H5.c Changed the pablo mask from H5_mask to H5F_mask for the FUNC_LEAVE() call of H5F_init_interface(). Added FUNC_ENTER() and FUNC_LEAVE() calls to some functions that didn't have them. ./src/H5M.c Changes similar to H5.c Fixed the FUNC variable in H5M_init_interface() since it was initialized to the wrong name. ./src/H5P.c Changes similar to H5.c ./src/H5T.c Changes similar to H5.c ./src/hdf5gen.c Changes to FUNC_ENTER() and FUNC_EXIT() to reduce the number of arguments. FUNC_ENTER() is now safe from infinite recursion since it updates the library_initialize_g, thread_initialize_g, or interface_initialize_g variables before calling the appropriate initialize function.
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/src/H5D.c b/src/H5D.c
index cd73c8f..79bf77f 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -36,10 +36,12 @@ static char RcsId[] = "@(#)$Revision$";
#include "H5private.h" /* Generic Functions */
#include "H5Dprivate.h" /* Dataset functions */
+#define PABLO_MASK H5D_mask
+
/*--------------------- Locally scoped variables -----------------------------*/
/* Whether we've installed the library termination function yet for this interface */
-static intn interface_initialize = FALSE;
+static intn interface_initialize_g = FALSE;
/*--------------------------------------------------------------------------
NAME
@@ -55,21 +57,13 @@ DESCRIPTION
--------------------------------------------------------------------------*/
static herr_t H5D_init_interface(void)
{
-#ifdef LATER
- CONSTR(FUNC, "H5D_init_interface"); /* For HERROR */
-#endif /* LATER */
herr_t ret_value = SUCCEED;
-
- /* Don't use "FUNC_ENTER" macro, to avoid potential infinite recursion */
- PABLO_TRACE_ON(H5D_mask, ID_H5D_init_interface);
-
- /* Don't call this routine again... */
- interface_initialize = TRUE;
+ FUNC_ENTER (H5D_init_interface, NULL, FAIL);
/* Initialize the atom group for the file IDs */
ret_value=H5Ainit_group(H5_DATASET,HDF5_DATASETID_HASHSIZE,H5D_RESERVED_ATOMS);
- FUNC_LEAVE(H5D_mask, ID_H5D_init_interface, ret_value);
+ FUNC_LEAVE(ret_value);
} /* H5D_init_interface */
/*--------------------------------------------------------------------------
@@ -89,11 +83,10 @@ static herr_t H5D_init_interface(void)
--------------------------------------------------------------------------*/
hatom_t H5D_create(hatom_t owner_id, hobjtype_t type, const char *name)
{
- CONSTR(FUNC, "H5D_create"); /* for HERROR */
H5D_dataset_t *new_dataset; /* new dataset object to create */
hatom_t ret_value = SUCCEED;
- FUNC_ENTER(H5D_mask, ID_H5D_create, H5D_init_interface, FAIL);
+ FUNC_ENTER(H5D_create, H5D_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -116,7 +109,7 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5D_mask, ID_H5D_create, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5D_create() */
/*--------------------------------------------------------------------------
@@ -134,11 +127,10 @@ done:
--------------------------------------------------------------------------*/
herr_t H5D_release(hatom_t oid)
{
- CONSTR(FUNC, "H5D_release"); /* for HERROR */
H5D_dataset_t *dataset; /* dataset object to release */
herr_t ret_value = SUCCEED;
- FUNC_ENTER(H5D_mask, ID_H5Drelease, H5D_init_interface, FAIL);
+ FUNC_ENTER(H5Drelease, H5D_init_interface, FAIL);
/* Clear errors and check args and all the boring stuff. */
H5ECLEAR;
@@ -156,7 +148,7 @@ done:
/* Normal function cleanup */
- FUNC_LEAVE(H5D_mask, ID_H5D_release, ret_value);
+ FUNC_LEAVE(ret_value);
} /* end H5D_release() */