summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5_f.c
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2016-09-26 18:27:50 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2016-09-26 18:27:50 (GMT)
commit3befe647ee9783b763208a581675988fbaabd321 (patch)
tree6750ccc6ea3956043c03546ff644c19b7eecf644 /fortran/src/H5_f.c
parent41b22417b7e194f48c612c69c9259e83ddc3a3ac (diff)
downloadhdf5-3befe647ee9783b763208a581675988fbaabd321.zip
hdf5-3befe647ee9783b763208a581675988fbaabd321.tar.gz
hdf5-3befe647ee9783b763208a581675988fbaabd321.tar.bz2
Added number of integer KINDs found to the header files.
Diffstat (limited to 'fortran/src/H5_f.c')
-rw-r--r--fortran/src/H5_f.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index db05f67..f9fe927 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -34,16 +34,16 @@ int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF;
* Initialize predefined datatypes in Fortran
* INPUTS
* types - array with the predefined Native Fortran
- * type, its element and length must be the
- * same as the types array defined in the
+ * type, its element and length must be the
+ * same as the types array defined in the
* H5f90global.F90
* floatingtypes - array with the predefined Floating Fortran
- * type, its element and length must be the
- * same as the floatingtypes array defined in the
- * H5f90global.F90
+ * type, its element and length must be the
+ * same as the floatingtypes array defined in the
+ * H5f90global.F90
* integertypes - array with the predefined Integer Fortran
- * type, its element and length must be the
- * same as the integertypes array defined in the
+ * type, its element and length must be the
+ * same as the integertypes array defined in the
* H5f90global.F90
* RETURNS
* 0 on success, -1 on failure
@@ -68,8 +68,13 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
/*
* Find the HDF5 type of the Fortran Integer KIND.
*/
+
+ /* Initialized INTEGER KIND types to default to native integer */
for(i=0;i<5;i++) {
+ if ((types[i] = (hid_t_f)H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value;
+ }
+ for(i=0;i<H5_FORTRAN_NUM_INTEGER_KINDS;i++) {
if ( IntKinds_SizeOf[i] == sizeof(char)) {
if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value;
} /*end if */
@@ -83,7 +88,7 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
} /*end if */
else {
- if ((types[i] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value;
+ if ((types[i] = (hid_t_f)H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value;
if ( H5Tset_precision (types[i], 128) < 0) return ret_value;
} /*end else */