From 3f9b3bcb471221bc50e39248ec49c8db7de4d637 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Tue, 16 Sep 2008 12:00:11 -0500 Subject: [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. --- fortran/src/H5Tf.c | 6 +++--- 1 file 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; -- cgit v0.12