summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2008-09-16 17:00:11 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2008-09-16 17:00:11 (GMT)
commit3f9b3bcb471221bc50e39248ec49c8db7de4d637 (patch)
tree9d9e49a148138c10f3b100c911e084ab85ae7b33 /fortran
parentbdd7d59902483885dd8b883f3b2393e77383e5e8 (diff)
downloadhdf5-3f9b3bcb471221bc50e39248ec49c8db7de4d637.zip
hdf5-3f9b3bcb471221bc50e39248ec49c8db7de4d637.tar.gz
hdf5-3f9b3bcb471221bc50e39248ec49c8db7de4d637.tar.bz2
[svn-r15630] Description:
In nh5tget_offset_c: (1) The return value type of H5Tget_offset was set to size_t where it should be of type int. (2) Was if offset was equal to 0 it returned the error code of -1 back to Fortran, this was changed to return an error code of -1 when the offset value is < 0. In h5tget_norm_c: (1) was if the return value of H5Tget_norm = 0 it would return an error code to Fortran, but from enum of the return value: typedef enum H5T_norm_t { H5T_NORM_ERROR = -1, /*error */ H5T_NORM_IMPLIED = 0, /*msb of mantissa isn't stored, always 1 */ H5T_NORM_MSBSET = 1, /*msb of mantissa is always 1 */ H5T_NORM_NONE = 2 /*not normalized */ /*H5T_NORM_NONE must be last */ } H5T_norm_t; only when -1 is returned is there an error, changed it to return an error only if the value of H5T_NORM_ERROR = -1.
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Tf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index f1be9c6..13fea93 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -419,11 +419,11 @@ nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset)
{
int ret_value = -1;
hid_t c_type_id;
- size_t c_offset;
+ int c_offset;
c_type_id = *type_id;
c_offset = H5Tget_offset(c_type_id);
- if ( c_offset == 0 ) return ret_value;
+ if ( c_offset < 0 ) return ret_value;
*offset = (size_t_f)c_offset ;
ret_value = 0;
@@ -725,7 +725,7 @@ nh5tget_norm_c ( hid_t_f *type_id , int_f *norm)
c_type_id = *type_id;
c_norm = H5Tget_norm(c_type_id);
- if ( c_norm == 0 ) return ret_value;
+ if ( c_norm == H5T_NORM_ERROR ) return ret_value;
*norm = (int_f)c_norm;
ret_value = 0;