summaryrefslogtreecommitdiffstats
path: root/src/H5Tfloat.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-08-31 01:48:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-08-31 01:48:01 (GMT)
commitf92d7f73df1846f4489fb6e2c2dd857b636b4deb (patch)
tree74d28cd355a39d0d9f8dc0c96484380b6b12628e /src/H5Tfloat.c
parentbd3510bea3638d5f4281bf9a6bbfe4c4a8b3ca9a (diff)
downloadhdf5-f92d7f73df1846f4489fb6e2c2dd857b636b4deb.zip
hdf5-f92d7f73df1846f4489fb6e2c2dd857b636b4deb.tar.gz
hdf5-f92d7f73df1846f4489fb6e2c2dd857b636b4deb.tar.bz2
[svn-r7434] Purpose:
Bug Fix and code cleanup Description: Correct error in H5T_detect_class that was causing nested compound datatypes with to not detect the datatype class of fields correctly, which caused errors with fill-values, variable-length datatypes and chunks later on. Return the rank of the array datatype from H5Tget_array_dims(), like H5Sget_dims(). Lots of cleanups to datatype code, to make the handling of arrays, compound types, variable-length strings and sequences and enumerated types more consistent and robust. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
Diffstat (limited to 'src/H5Tfloat.c')
-rw-r--r--src/H5Tfloat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/H5Tfloat.c b/src/H5Tfloat.c
index 1211d2b..ae520f7 100644
--- a/src/H5Tfloat.c
+++ b/src/H5Tfloat.c
@@ -91,7 +91,7 @@ H5Tget_fields(hid_t type_id, size_t *spos/*out*/,
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_FLOAT != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class");
@@ -145,7 +145,7 @@ H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize,
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");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_FLOAT != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class");
@@ -206,7 +206,7 @@ H5Tget_ebias(hid_t type_id)
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, 0, "not a data type");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_FLOAT != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, 0, "operation not defined for data type class");
@@ -249,7 +249,7 @@ H5Tset_ebias(hid_t type_id, size_t ebias)
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");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_FLOAT != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class");
@@ -293,7 +293,7 @@ H5Tget_norm(hid_t type_id)
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_NORM_ERROR, "not a data type");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_FLOAT != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_NORM_ERROR, "operation not defined for data type class");
@@ -339,7 +339,7 @@ H5Tset_norm(hid_t type_id, H5T_norm_t norm)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only");
if (norm < 0 || norm > H5T_NORM_NONE)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal normalization");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_FLOAT != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class");
@@ -385,7 +385,7 @@ H5Tget_inpad(hid_t type_id)
/* Check args */
if (NULL == (dt = H5I_object_verify(type_id,H5I_DATATYPE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5T_PAD_ERROR, "not a data type");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_FLOAT != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, H5T_PAD_ERROR, "operation not defined for data type class");
@@ -433,7 +433,7 @@ H5Tset_inpad(hid_t type_id, H5T_pad_t pad)
HGOTO_ERROR(H5E_ARGS, H5E_CANTINIT, FAIL, "data type is read-only");
if (pad < 0 || pad >= H5T_NPAD)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "illegal internal pad type");
- if (dt->parent)
+ while (dt->parent)
dt = dt->parent; /*defer to parent*/
if (H5T_FLOAT != dt->type)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "operation not defined for data type class");