summaryrefslogtreecommitdiffstats
path: root/src/H5Tfixed.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tfixed.c')
-rw-r--r--src/H5Tfixed.c45
1 files changed, 10 insertions, 35 deletions
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index b2401d4..62b8e79 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -18,10 +18,7 @@
* integer) datatypes in the H5T interface.
*/
-#define H5T_PACKAGE /*suppress error about including H5Tpkg */
-
-/* Interface initialization */
-#define H5_INTERFACE_INIT_FUNC H5T_init_fixed_interface
+#include "H5Tmodule.h" /* This source code file is part of the H5T module */
#include "H5private.h" /*generic functions */
@@ -30,28 +27,6 @@
#include "H5Tpkg.h" /*data-type functions */
-/*--------------------------------------------------------------------------
-NAME
- H5T_init_fixed_interface -- Initialize interface-specific information
-USAGE
- herr_t H5T_init_fixed_interface()
-
-RETURNS
- Non-negative on success/Negative on failure
-DESCRIPTION
- Initializes any interface-specific data or routines. (Just calls
- H5T_init_iterface currently).
-
---------------------------------------------------------------------------*/
-static herr_t
-H5T_init_fixed_interface(void)
-{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
-
- FUNC_LEAVE_NOAPI(H5T_init())
-} /* H5T_init_fixed_interface() */
-
-
/*-------------------------------------------------------------------------
* Function: H5Tget_sign
*
@@ -79,8 +54,8 @@ H5Tget_sign(hid_t type_id)
H5TRACE1("Ts", "i", type_id);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR, "not an integer datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_SGN_ERROR, "not an integer datatype")
ret_value = H5T_get_sign(dt);
@@ -109,7 +84,7 @@ done:
H5T_sign_t
H5T_get_sign(H5T_t const *dt)
{
- H5T_sign_t ret_value;
+ H5T_sign_t ret_value = H5T_SGN_ERROR; /* Return value */
FUNC_ENTER_NOAPI(H5T_SGN_ERROR)
@@ -158,18 +133,18 @@ H5Tset_sign(hid_t type_id, H5T_sign_t sign)
H5TRACE2("e", "iTs", type_id, sign);
/* Check args */
- if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer datatype")
+ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_DATATYPE)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an integer datatype")
if (H5T_STATE_TRANSIENT!=dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
+ HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "datatype is read-only")
if (sign < H5T_SGN_NONE || sign >= H5T_NSGN)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal sign type")
if (H5T_ENUM==dt->shared->type && dt->shared->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->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
if (H5T_INTEGER!=dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class")
/* Commit */
dt->shared->u.atomic.u.i.sign = sign;