summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5_f.c
diff options
context:
space:
mode:
authorM. Scot Breitenfeld <brtnfld@hdfgroup.org>2016-09-23 19:08:04 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2016-09-23 19:08:04 (GMT)
commit3a89114ce59796045079e0a1ed83237cf395c333 (patch)
tree7e9e73efb154d3c9da6a494419e31e491f14f744 /fortran/src/H5_f.c
parent7b056aadff59de5760246d6dff3f5402d0b887bf (diff)
downloadhdf5-3a89114ce59796045079e0a1ed83237cf395c333.zip
hdf5-3a89114ce59796045079e0a1ed83237cf395c333.tar.gz
hdf5-3a89114ce59796045079e0a1ed83237cf395c333.tar.bz2
Misc. cleaning up of the program.
Diffstat (limited to 'fortran/src/H5_f.c')
-rw-r--r--fortran/src/H5_f.c49
1 files changed, 13 insertions, 36 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 9d4c297..db05f67 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -66,9 +66,9 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
*/
/*
- * FIND H5T_NATIVE_INTEGER_#
+ * Find the HDF5 type of the Fortran Integer KIND.
*/
- for(i=0;i<4;i++) {
+ for(i=0;i<5;i++) {
if ( IntKinds_SizeOf[i] == sizeof(char)) {
if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value;
@@ -89,52 +89,27 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
}
-#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0
- /*
- * FIND H5T_NATIVE_INTEGER_KIND(5), INTEGER*16
- */
- if (sizeof(int_16_f) == sizeof(char)) {
- if ((types[4] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value;
- } /*end if */
- else if (sizeof(int_16_f) == sizeof(short)) {
- if ((types[4] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value;
- } /*end if */
- else if (sizeof(int_16_f) == sizeof(int)) {
- if ((types[4] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
- } /*end if */
- else if (sizeof(int_16_f) == sizeof(long long)) {
- if ((types[4] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
- } /*end else */
- else {
- if ((types[4] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value;
- if ( H5Tset_precision (types[4], 128) < 0) return ret_value;
- } /*end else */
-#else
- if ((types[4] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value;
- if ( H5Tset_precision (types[4], 128) < 0) return ret_value;
-#endif
-
if (sizeof(int_f) == sizeof(int)) {
- if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
+ if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
} /*end if */
else if (sizeof(int_f) == sizeof(long)) {
- if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_LONG)) < 0) return ret_value;
+ if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_LONG)) < 0) return ret_value;
} /*end if */
else
- if (sizeof(int_f) == sizeof(long long)) {
- if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
+ if (sizeof(int_f) == sizeof(long long)) {
+ if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
} /*end else */
-
+
/* Find appropriate size to store Fortran REAL */
if(sizeof(real_f)==sizeof(float)) {
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
} /* end if */
else if(sizeof(real_f)==sizeof(double)){
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
} /* end if */
#if H5_SIZEOF_LONG_DOUBLE!=0
else if (sizeof(real_f) == sizeof(long double)) {
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
} /* end else */
#endif
@@ -226,12 +201,14 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0) return ret_value;
if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value;
- /*
+ /*
* FIND H5T_NATIVE_FLOAT_128
*/
if ((types[18] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
if ( H5Tset_precision (types[18], 128) < 0) return ret_value;
+ /*--------------------------------------------------------------------------------------*/
+
if ((floatingtypes[0] = (hid_t_f)H5Tcopy(H5T_IEEE_F32BE)) < 0) return ret_value;
if ((floatingtypes[1] = (hid_t_f)H5Tcopy(H5T_IEEE_F32LE)) < 0) return ret_value;
if ((floatingtypes[2] = (hid_t_f)H5Tcopy(H5T_IEEE_F64BE)) < 0) return ret_value;