summaryrefslogtreecommitdiffstats
path: root/src/H5Tfixed.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2022-04-13 21:17:29 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2022-04-13 21:17:29 (GMT)
commitcabc39c3e197e2591449d2604bfee26465fb60e1 (patch)
treed5f39f5f5965584bf9bf49646a2af617adfd3e4e /src/H5Tfixed.c
parent7355f4c505092a7a85474b47f18d5206028e2c95 (diff)
parentab69f5df770ee3cc6cd6c81d905a5317b894a002 (diff)
downloadhdf5-feature/coding_standards.zip
hdf5-feature/coding_standards.tar.gz
hdf5-feature/coding_standards.tar.bz2
Merge branch 'develop' into feature/coding_standardsfeature/coding_standards
Diffstat (limited to 'src/H5Tfixed.c')
-rw-r--r--src/H5Tfixed.c53
1 files changed, 19 insertions, 34 deletions
diff --git a/src/H5Tfixed.c b/src/H5Tfixed.c
index bc1d84d..9527a5a 100644
--- a/src/H5Tfixed.c
+++ b/src/H5Tfixed.c
@@ -6,7 +6,7 @@
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the COPYING file, which can be found at the root of the source code *
- * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * distribution tree, or in https://www.hdfgroup.org/licenses. *
* If you do not have access to either file, you may request a copy from *
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -16,15 +16,13 @@
* integer) datatypes in the H5T interface.
*/
-#include "H5Tmodule.h" /* This source code file is part of the H5T module */
+#include "H5Tmodule.h" /* This source code file is part of the H5T module */
+#include "H5private.h" /*generic functions */
+#include "H5Eprivate.h" /*error handling */
+#include "H5Iprivate.h" /*ID functions */
+#include "H5Tpkg.h" /*data-type functions */
-#include "H5private.h" /*generic functions */
-#include "H5Eprivate.h" /*error handling */
-#include "H5Iprivate.h" /*ID functions */
-#include "H5Tpkg.h" /*data-type functions */
-
-
/*-------------------------------------------------------------------------
* Function: H5Tget_sign
*
@@ -37,22 +35,19 @@
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived datatypes.
*-------------------------------------------------------------------------
*/
H5T_sign_t
H5Tget_sign(hid_t type_id)
{
- H5T_t *dt = NULL;
- H5T_sign_t ret_value;
+ H5T_t * dt = NULL;
+ H5T_sign_t ret_value;
FUNC_ENTER_API(H5T_SGN_ERROR)
H5TRACE1("Ts", "i", type_id);
/* Check args */
- if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_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);
@@ -61,7 +56,6 @@ done:
FUNC_LEAVE_API(ret_value)
}
-
/*-------------------------------------------------------------------------
* Function: H5T_get_sign
*
@@ -75,26 +69,24 @@ done:
* Programmer: Raymond Lu
* October 8, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
H5T_sign_t
H5T_get_sign(H5T_t const *dt)
{
- H5T_sign_t ret_value = H5T_SGN_ERROR; /* Return value */
+ H5T_sign_t ret_value = H5T_SGN_ERROR; /* Return value */
FUNC_ENTER_NOAPI(H5T_SGN_ERROR)
HDassert(dt);
/* Defer to parent */
- while(dt->shared->parent)
+ while (dt->shared->parent)
dt = dt->shared->parent;
/* Check args */
- if (H5T_INTEGER!=dt->shared->type)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_SGN_ERROR, "operation not defined for datatype class")
+ if (H5T_INTEGER != dt->shared->type)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_SGN_ERROR, "operation not defined for datatype class")
/* Sign */
ret_value = dt->shared->u.atomic.u.i.sign;
@@ -103,8 +95,6 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
}
-
-
/*-------------------------------------------------------------------------
* Function: H5Tset_sign
*
@@ -115,33 +105,29 @@ done:
* Programmer: Robb Matzke
* Wednesday, January 7, 1998
*
- * Modifications:
- * Robb Matzke, 22 Dec 1998
- * Also works with derived datatypes.
- *
*-------------------------------------------------------------------------
*/
herr_t
H5Tset_sign(hid_t type_id, H5T_sign_t sign)
{
- H5T_t *dt = NULL;
- herr_t ret_value=SUCCEED; /* Return value */
+ H5T_t *dt = NULL;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "iTs", type_id, sign);
/* Check args */
- if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id,H5I_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)
+ if (H5T_STATE_TRANSIENT != dt->shared->state)
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")
- if (H5T_ENUM==dt->shared->type && dt->shared->u.enumer.nmembs>0)
+ 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")
while (dt->shared->parent)
dt = dt->shared->parent; /*defer to parent*/
- if (H5T_INTEGER!=dt->shared->type)
+ if (H5T_INTEGER != dt->shared->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for datatype class")
/* Commit */
@@ -150,4 +136,3 @@ H5Tset_sign(hid_t type_id, H5T_sign_t sign)
done:
FUNC_LEAVE_API(ret_value)
}
-