diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2008-09-16 17:05:25 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2008-09-16 17:05:25 (GMT) |
commit | d45346f76cfa5b2115cda3cb56121a9baa101407 (patch) | |
tree | 1a22257b1099cdf52862a962def224ad1ee10ce0 /fortran/src/H5Tf.c | |
parent | b9be0455961ca1098bc4977bf1138394932b75db (diff) | |
download | hdf5-d45346f76cfa5b2115cda3cb56121a9baa101407.zip hdf5-d45346f76cfa5b2115cda3cb56121a9baa101407.tar.gz hdf5-d45346f76cfa5b2115cda3cb56121a9baa101407.tar.bz2 |
[svn-r15631] 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/src/H5Tf.c')
-rw-r--r-- | fortran/src/H5Tf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 5873773..5f3d27c 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -413,17 +413,16 @@ nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision) * Tuesday, January 25, 2000 * Modifications: *---------------------------------------------------------------------------*/ - int_f 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 +724,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; |