diff options
-rw-r--r-- | src/H5Topaque.c | 40 | ||||
-rw-r--r-- | src/H5Torder.c | 38 | ||||
-rw-r--r-- | src/H5Tpad.c | 38 | ||||
-rwxr-xr-x | src/hdf5.lnt | 3 |
4 files changed, 64 insertions, 55 deletions
diff --git a/src/H5Topaque.c b/src/H5Topaque.c index 2697178..3d708c7 100644 --- a/src/H5Topaque.c +++ b/src/H5Topaque.c @@ -19,14 +19,16 @@ #define H5T_PACKAGE /*suppress error about including H5Tpkg */ -#include "H5private.h" /*generic functions */ -#include "H5Eprivate.h" /*error handling */ -#include "H5Iprivate.h" /*ID functions */ -#include "H5MMprivate.h" /*memory management */ -#include "H5Tpkg.h" /*data-type functions */ - +/* Pablo information */ +/* (Put before include files to avoid problems with inline functions) */ #define PABLO_MASK H5Topaque_mask +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Tpkg.h" /* Datatypes */ + /* Interface initialization */ static int interface_initialize_g = 0; #define INTERFACE_INIT H5T_init_opaque_interface @@ -49,9 +51,9 @@ DESCRIPTION static herr_t H5T_init_opaque_interface(void) { - FUNC_ENTER_NOINIT(H5T_init_opaque_interface); + FUNC_ENTER_NOINIT(H5T_init_opaque_interface) - FUNC_LEAVE_NOAPI(H5T_init()); + FUNC_LEAVE_NOAPI(H5T_init()) } /* H5T_init_opaque_interface() */ @@ -75,27 +77,27 @@ H5Tset_tag(hid_t type_id, const char *tag) H5T_t *dt=NULL; herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_API(H5Tset_tag, FAIL); + FUNC_ENTER_API(H5Tset_tag, FAIL) H5TRACE2("e","is",type_id,tag); /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") if (H5T_STATE_TRANSIENT!=dt->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only"); + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") while (dt->parent) dt = dt->parent; /*defer to parent*/ if (H5T_OPAQUE!=dt->type) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type") if (!tag) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag") /* Commit */ H5MM_xfree(dt->u.opaque.tag); dt->u.opaque.tag = H5MM_strdup(tag); done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } @@ -120,21 +122,21 @@ H5Tget_tag(hid_t type_id) H5T_t *dt=NULL; char *ret_value; - FUNC_ENTER_API(H5Tget_tag, NULL); + FUNC_ENTER_API(H5Tget_tag, NULL) /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") while (dt->parent) dt = dt->parent; /*defer to parent*/ if (H5T_OPAQUE != dt->type) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class"); + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "operation not defined for data type class") /* result */ if (NULL==(ret_value=H5MM_strdup(dt->u.opaque.tag))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } diff --git a/src/H5Torder.c b/src/H5Torder.c index 2f39816..9e5d76e 100644 --- a/src/H5Torder.c +++ b/src/H5Torder.c @@ -19,13 +19,15 @@ #define H5T_PACKAGE /*suppress error about including H5Tpkg */ -#include "H5private.h" /*generic functions */ -#include "H5Eprivate.h" /*error handling */ -#include "H5Iprivate.h" /*ID functions */ -#include "H5Tpkg.h" /*data-type functions */ - +/* Pablo information */ +/* (Put before include files to avoid problems with inline functions) */ #define PABLO_MASK H5Torder_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 @@ -48,9 +50,9 @@ DESCRIPTION static herr_t H5T_init_order_interface(void) { - FUNC_ENTER_NOINIT(H5T_init_order_interface); + FUNC_ENTER_NOINIT(H5T_init_order_interface) - FUNC_LEAVE_NOAPI(H5T_init()); + FUNC_LEAVE_NOAPI(H5T_init()) } /* H5T_init_order_interface() */ @@ -78,22 +80,22 @@ H5Tget_order(hid_t type_id) H5T_t *dt = NULL; H5T_order_t ret_value; - FUNC_ENTER_API(H5Tget_order, H5T_ORDER_ERROR); + FUNC_ENTER_API(H5Tget_order, H5T_ORDER_ERROR) H5TRACE1("To","i",type_id); /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_ORDER_ERROR, "not a data type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_ORDER_ERROR, "not a data type") while (dt->parent) dt = dt->parent; /*defer to parent*/ if (!H5T_IS_ATOMIC(dt)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_ORDER_ERROR, "operation not defined for specified data type"); + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_ORDER_ERROR, "operation not defined for specified data type") /* Order */ ret_value = dt->u.atomic.order; done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } @@ -119,27 +121,27 @@ H5Tset_order(hid_t type_id, H5T_order_t order) H5T_t *dt = NULL; herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_API(H5Tset_order, FAIL); + FUNC_ENTER_API(H5Tset_order, FAIL) H5TRACE2("e","iTo",type_id,order); /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") if (H5T_STATE_TRANSIENT!=dt->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only"); + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") if (order < 0 || order > H5T_ORDER_NONE) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal byte order"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal byte order") if (H5T_ENUM==dt->type && dt->u.enumer.nmembs>0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined"); + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") while (dt->parent) dt = dt->parent; /*defer to parent*/ if (!H5T_IS_ATOMIC(dt)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_ORDER_ERROR, "operation not defined for specified data type"); + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, H5T_ORDER_ERROR, "operation not defined for specified data type") /* Commit */ dt->u.atomic.order = order; done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } diff --git a/src/H5Tpad.c b/src/H5Tpad.c index 3da45e7..c3fbd04 100644 --- a/src/H5Tpad.c +++ b/src/H5Tpad.c @@ -19,13 +19,15 @@ #define H5T_PACKAGE /*suppress error about including H5Tpkg */ -#include "H5private.h" /*generic functions */ -#include "H5Eprivate.h" /*error handling */ -#include "H5Iprivate.h" /*ID functions */ -#include "H5Tpkg.h" /*data-type functions */ - +/* Pablo information */ +/* (Put before include files to avoid problems with inline functions) */ #define PABLO_MASK H5Tpad_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 @@ -48,9 +50,9 @@ DESCRIPTION static herr_t H5T_init_pad_interface(void) { - FUNC_ENTER_NOINIT(H5T_init_pad_interface); + FUNC_ENTER_NOINIT(H5T_init_pad_interface) - FUNC_LEAVE_NOAPI(H5T_init()); + FUNC_LEAVE_NOAPI(H5T_init()) } /* H5T_init_pad_interface() */ @@ -78,16 +80,16 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/) H5T_t *dt = NULL; herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_API(H5Tget_pad, FAIL); + FUNC_ENTER_API(H5Tget_pad, FAIL) H5TRACE3("e","ixx",type_id,lsb,msb); /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") while (dt->parent) dt = dt->parent; /*defer to parent*/ if (!H5T_IS_ATOMIC(dt)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type"); + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type") /* Get values */ if (lsb) @@ -96,7 +98,7 @@ H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/) *msb = dt->u.atomic.msb_pad; done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } @@ -122,28 +124,28 @@ H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb) H5T_t *dt = NULL; herr_t ret_value=SUCCEED; /* Return value */ - FUNC_ENTER_API(H5Tset_pad, FAIL); + FUNC_ENTER_API(H5Tset_pad, FAIL) H5TRACE3("e","iTpTp",type_id,lsb,msb); /* Check args */ if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type") if (H5T_STATE_TRANSIENT!=dt->state) - HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only"); + HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only") if (lsb < 0 || lsb >= H5T_NPAD || msb < 0 || msb >= H5T_NPAD) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type"); + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid pad type") if (H5T_ENUM==dt->type && dt->u.enumer.nmembs>0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined"); + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not allowed after members are defined") while (dt->parent) dt = dt->parent; /*defer to parent*/ if (!H5T_IS_ATOMIC(dt)) - HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type"); + HGOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "operation not defined for specified data type") /* Commit */ dt->u.atomic.lsb_pad = lsb; dt->u.atomic.msb_pad = msb; done: - FUNC_LEAVE_API(ret_value); + FUNC_LEAVE_API(ret_value) } diff --git a/src/hdf5.lnt b/src/hdf5.lnt index e135ce5..d5ae28b 100755 --- a/src/hdf5.lnt +++ b/src/hdf5.lnt @@ -91,6 +91,9 @@ H5FL.c H5FO.c + H5Topaque.c + H5Torder.c + H5Tpad.c H5Tprecis.c H5Tstrpad.c H5Tvlen.c |