diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-10-15 20:17:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-10-15 20:17:11 (GMT) |
commit | 179d839555d231fec7549384de0d7e71146f4c4b (patch) | |
tree | 071a58ce75f2b4145a554161bed984fe7854fc00 /fortran | |
parent | a4671842801cada7d59345c44ee324252a362956 (diff) | |
download | hdf5-179d839555d231fec7549384de0d7e71146f4c4b.zip hdf5-179d839555d231fec7549384de0d7e71146f4c4b.tar.gz hdf5-179d839555d231fec7549384de0d7e71146f4c4b.tar.bz2 |
[svn-r7643] Purpose:
Code cleanup
Description:
Clean up warnings, remove unused routines, tidy things up a lot.
Platforms tested:
h5committest
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5Af.c | 355 | ||||
-rw-r--r-- | fortran/src/H5Aff.f90 | 1156 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 35 |
3 files changed, 666 insertions, 880 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 696b8ed..a25161e 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -15,6 +15,7 @@ /* This files contains C stubs for H5A Fortran APIs */ #include "H5f90.h" +#include "H5Eprivate.h" /*---------------------------------------------------------------------------- * Name: h5acreate_c @@ -32,47 +33,26 @@ * Modifications: *---------------------------------------------------------------------------*/ int_f -nh5acreate_c (hid_t_f *obj_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *attr_id) +nh5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *attr_id) { - int ret_value = -1; - char *c_name; - int c_namelen; - hid_t c_obj_id; - hid_t c_type_id; - hid_t c_space_id; - hid_t c_attr_id; - hid_t c_crt_prp; - /* - * Define creation property - */ - c_crt_prp = (hid_t)*crt_prp; -/* - if ( H5P_DEFAULT_F == c_crt_prp ) c_crt_prp = H5P_DEFAULT; -*/ + char *c_name=NULL; /* Buffer to hold C string */ + int_f ret_value=0; /* Return value */ /* * Convert FORTRAN name to C name */ - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); - if (c_name == NULL) return ret_value; + if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL) + HGOTO_DONE(FAIL); /* * Call H5Acreate function. */ - c_obj_id = *obj_id; - c_type_id = *type_id; - c_space_id = *space_id; - c_attr_id = H5Acreate(c_obj_id, c_name, c_type_id, c_space_id, c_crt_prp); - + if((*attr_id = (hid_t_f)H5Acreate((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp))<0) + HGOTO_DONE(FAIL); - if (c_attr_id < 0) goto DONE; - *attr_id = (hid_t_f)c_attr_id; - ret_value = 0; - -DONE: - HDfree(c_name); - return ret_value; +done: + if(c_name) HDfree(c_name); + return ret_value; } /*---------------------------------------------------------------------------- @@ -88,33 +68,26 @@ DONE: * Modifications: *---------------------------------------------------------------------------*/ int_f -nh5aopen_name_c (hid_t_f *obj_id, _fcd name, int_f *namelen, hid_t_f *attr_id) +nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id) { - int ret_value = -1; - char *c_name; - int c_namelen; - hid_t c_obj_id; - hid_t c_attr_id; + char *c_name=NULL; /* Buffer to hold C string */ + int_f ret_value=0; /* Return value */ /* * Convert FORTRAN name to C name */ - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); - if (c_name == NULL) return ret_value; + if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL) + HGOTO_DONE(FAIL); + /* * Call H5Aopen function. */ - c_obj_id = *obj_id; - c_attr_id = H5Aopen_name(c_obj_id, c_name); + if ((*attr_id = (hid_t_f)H5Aopen_name((hid_t)*obj_id, c_name)) < 0) + HGOTO_DONE(FAIL); - if (c_attr_id < 0) goto DONE; - *attr_id = (hid_t_f)c_attr_id; - ret_value = 0; - -DONE: - HDfree(c_name); - return ret_value; +done: + if(c_name) HDfree(c_name); + return ret_value; } /*---------------------------------------------------------------------------- @@ -132,16 +105,12 @@ DONE: * April 4, 2001 *---------------------------------------------------------------------------*/ int_f -nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, int_f *dims) +nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) { - int ret_value = -1; - /* * Call h5awrite_c function. */ - ret_value = nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); - - return ret_value; + return nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } /*---------------------------------------------------------------------------- @@ -159,88 +128,20 @@ nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, int_f *dims) * April 4, 2001 *---------------------------------------------------------------------------*/ int_f -nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, int_f *dims) -{ - int ret_value = -1; - herr_t ret; - hid_t c_attr_id; - hid_t c_mem_type_id; - - /* - * Call H5Awrite function. - */ - c_attr_id = *attr_id; - c_mem_type_id = *mem_type_id; - ret = H5Awrite(c_attr_id, c_mem_type_id, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - -/*---------------------------------------------------------------------------- - * Name: h5awritec_c_b - * Purpose: Call h5awrite_c_b to write a character attribute - * Inputs: attr_id - dataset identifier - * mem_type_id - memory datatype identifier - * buf - character data buffer - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Tuesday, May 14, 2002 - * Modifications: This function was added to accomodate h5awrite_f call with - * dims buffer being of INTEGER(HSIZE_T) type - *---------------------------------------------------------------------------*/ -int_f -nh5awritec_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims) -{ - int ret_value = -1; - - /* - * Call h5awrite_c function. - */ - ret_value = nh5awrite_c_b(attr_id, mem_type_id, _fcdtocp(buf), dims); - - return ret_value; -} - -/*---------------------------------------------------------------------------- - * Name: h5awrite_c_b - * Purpose: Call H5Awrite to write a attribute - * Inputs: attr_id - attribute identifier - * mem_type_id - memory datatype identifier - * buf - data buffer - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Tuesday, May 14, 2002 - * Modifications: This function was added to accomodate h5awrite_f call with - * dims buffer being of INTEGER(HSIZE_T) type - *---------------------------------------------------------------------------*/ -int_f -nh5awrite_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims) +nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED *dims) { - int ret_value = -1; - herr_t ret; - hid_t c_attr_id; - hid_t c_mem_type_id; + int_f ret_value=0; /* Return value */ /* * Call H5Awrite function. */ - c_attr_id = *attr_id; - c_mem_type_id = *mem_type_id; - ret = H5Awrite(c_attr_id, c_mem_type_id, buf); + if (H5Awrite((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0) + HGOTO_DONE(FAIL); - if (ret < 0) return ret_value; - ret_value = 0; +done: return ret_value; } - - /*---------------------------------------------------------------------------- * Name: h5areadc_c * Purpose: Call h5aread_c to read character attribute @@ -256,16 +157,12 @@ nh5awrite_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dim * April 4, 2001 *---------------------------------------------------------------------------*/ int_f -nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, int_f *dims) +nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims) { - int ret_value = -1; - /* * Call h5aread_c function. */ - ret_value = nh5aread_c(attr_id, mem_type_id, (_fcdtocp(buf)), dims); - - return ret_value; + return nh5aread_c(attr_id, mem_type_id, _fcdtocp(buf), dims); } /*---------------------------------------------------------------------------- @@ -283,87 +180,21 @@ nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, int_f *dims) * April 4, 2001 *---------------------------------------------------------------------------*/ int_f -nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, int_f *dims) +nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void UNUSED * dims) { - int ret_value = -1; - herr_t ret; - hid_t c_attr_id; - hid_t c_mem_type_id; + int_f ret_value=0; /* Return value */ /* * Call H5Aread function. */ - c_attr_id = *attr_id; - c_mem_type_id = *mem_type_id; - ret = H5Aread(c_attr_id, c_mem_type_id, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} -/*---------------------------------------------------------------------------- - * Name: h5areadc_c_b - * Purpose: Call h5aread_c_b to read character attribute - * Inputs: dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * Outputs: buf - character data buffer - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Tuesday, May 14, 2002 - * Modifications: This function was added to accomodate h5aread_f call with - * dims buffer being of INTEGER(HSIZE_T) type - *---------------------------------------------------------------------------*/ -int_f -nh5areadc_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims) -{ - int ret_value = -1; - - /* - * Call h5aread_c function. - */ - ret_value = nh5aread_c_b(attr_id, mem_type_id, (_fcdtocp(buf)), dims); + if (H5Aread((hid_t)*attr_id, (hid_t)*mem_type_id, buf) < 0) + HGOTO_DONE(FAIL); +done: return ret_value; } /*---------------------------------------------------------------------------- - * Name: h5aread_c_b - * Purpose: Call H5Aread to read an attribute - * Inputs: dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * Outputs: buf - data buffer - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Tuesday, May 14, 2002 - * Modifications: This function was added to accomodate h5awrite_f call with - * dims buffer being of INTEGER(HSIZE_T) type - *---------------------------------------------------------------------------*/ -int_f -nh5aread_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims) -{ - int ret_value = -1; - herr_t ret; - hid_t c_attr_id; - hid_t c_mem_type_id; - - /* - * Call H5Aread function. - */ - c_attr_id = *attr_id; - c_mem_type_id = *mem_type_id; - ret = H5Aread(c_attr_id, c_mem_type_id, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} - - -/*---------------------------------------------------------------------------- * Name: h5aclose_c * Purpose: Call H5Aclose to close an attribute * Inputs: attr_id - identifier of an attribute to be closed @@ -376,11 +207,13 @@ nh5aread_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims int_f nh5aclose_c ( hid_t_f *attr_id ) { - int ret_value = 0; - hid_t c_attr_id; - c_attr_id = *attr_id; - if ( H5Aclose(c_attr_id) < 0 ) ret_value = -1; - return ret_value; + int_f ret_value=0; /* Return value */ + + if (H5Aclose((hid_t)*attr_id) < 0) + HGOTO_DONE(FAIL); + +done: + return ret_value; } /*---------------------------------------------------------------------------- @@ -395,33 +228,26 @@ nh5aclose_c ( hid_t_f *attr_id ) * Modifications: *---------------------------------------------------------------------------*/ int_f -nh5adelete_c (hid_t_f *obj_id, _fcd name, int_f *namelen) +nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen) { - int ret_value = -1; - herr_t status; - hid_t c_obj_id; - char *c_name; - int c_namelen; + char *c_name=NULL; /* Buffer to hold C string */ + int_f ret_value=0; /* Return value */ /* * Convert FORTRAN name to C name */ - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); - if (c_name == NULL) return ret_value; + if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL) + HGOTO_DONE(FAIL); /* * Call H5Adelete function. */ - c_obj_id = *obj_id; - status = H5Adelete(c_obj_id, c_name); - - if (status < 0) goto DONE; - ret_value = 0; + if (H5Adelete((hid_t)*obj_id, c_name) < 0) + HGOTO_DONE(FAIL); -DONE: - HDfree(c_name); - return ret_value; +done: + if(c_name) HDfree(c_name); + return ret_value; } @@ -439,21 +265,15 @@ DONE: int_f nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id) { - int ret_value = -1; - hid_t c_obj_id; - hid_t c_attr_id; - unsigned c_idx; - c_idx = (unsigned)*idx; + int_f ret_value=0; /* Return value */ /* * Call H5Aopen_idx function. */ - c_obj_id = *obj_id; - c_attr_id = H5Aopen_idx(c_obj_id, c_idx); + if ((*attr_id = (hid_t_f)H5Aopen_idx((hid_t)*obj_id, (unsigned)*idx)) < 0) + HGOTO_DONE(FAIL); - if (c_attr_id < 0) return ret_value; - *attr_id = (hid_t_f)c_attr_id; - ret_value = 0; +done: return ret_value; } @@ -471,19 +291,15 @@ nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id) int_f nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id) { - int ret_value = -1; - hid_t c_attr_id; - hid_t c_space_id; + int_f ret_value=0; /* Return value */ /* * Call H5Aget_space function. */ - c_attr_id = *attr_id; - c_space_id = H5Aget_space(c_attr_id); + if ((*space_id = (hid_t_f)H5Aget_space((hid_t)*attr_id)) < 0) + HGOTO_DONE(FAIL); - if (c_space_id < 0) return ret_value; - *space_id = (hid_t_f)c_space_id; - ret_value = 0; +done: return ret_value; } @@ -500,19 +316,15 @@ nh5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id) int_f nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id) { - int ret_value = -1; - hid_t c_attr_id; - hid_t c_type_id; + int_f ret_value=0; /* Return value */ /* * Call H5Aget_type function. */ - c_attr_id = *attr_id; - c_type_id = H5Aget_type(c_attr_id); + if ((*type_id = (hid_t_f)H5Aget_type((hid_t)*attr_id)) < 0) + HGOTO_DONE(FAIL); - if (c_type_id < 0) return ret_value; - *type_id = (hid_t_f)c_type_id; - ret_value = 0; +done: return ret_value; } @@ -530,23 +342,18 @@ nh5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id) int_f nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) { - int ret_value = -1; - hid_t c_obj_id; - int c_attr_num; + int_f ret_value=0; /* Return value */ /* * Call H5Aget_num_attrs function. */ - c_obj_id = *obj_id; - c_attr_num = H5Aget_num_attrs(c_obj_id); + if ((*attr_num = (int_f)H5Aget_num_attrs((hid_t)*obj_id)) < 0) + HGOTO_DONE(FAIL); - if (c_attr_num < 0) return ret_value; - *attr_num = c_attr_num; - ret_value = 0; +done: return ret_value; } - /*---------------------------------------------------------------------------- * Name: h5aget_name_c * Purpose: Call H5Aget_name to get attribute's name @@ -561,33 +368,27 @@ nh5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num) int_f nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf) { - int ret_value = -1; - hid_t c_attr_id; - ssize_t c_size; - size_t c_bufsize; - char *c_buf =NULL; + char *c_buf=NULL; /* Buffer to hold C string */ + int_f ret_value=0; /* Return value */ /* * Allocate buffer to hold name of an attribute */ - c_bufsize = *bufsize; - c_buf = (char *)HDmalloc(c_bufsize +1); - if (c_buf == NULL) return ret_value; + if ((c_buf = HDmalloc((size_t)*bufsize +1)) == NULL) + HGOTO_DONE(FAIL); /* * Call H5Aget_name function */ - c_attr_id = *attr_id; - c_size = H5Aget_name(c_attr_id, c_bufsize, c_buf); - if (c_size < 0) goto DONE; + if ((ret_value = (int_f)H5Aget_name((hid_t)*attr_id, (size_t)*bufsize, c_buf)) < 0) + HGOTO_DONE(FAIL); /* * Convert C name to FORTRAN and place it in the given buffer */ - HD5packFstring(c_buf, _fcdtocp(buf), (int)c_bufsize); - ret_value = (int_f)c_size; + HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*bufsize); -DONE: - HDfree(c_buf); +done: + if(c_buf) HDfree(c_buf); return ret_value; } diff --git a/fortran/src/H5Aff.f90 b/fortran/src/H5Aff.f90 index 645f36a..0576f1b 100644 --- a/fortran/src/H5Aff.f90 +++ b/fortran/src/H5Aff.f90 @@ -246,7 +246,7 @@ ! Attribute creation property ! list identifier INTEGER :: creation_prp_default - INTEGER :: namelen + INTEGER(SIZE_T) :: namelen ! INTEGER, EXTERNAL :: h5acreate_c ! MS FORTRAN needs explicit interface for C functions called here. ! @@ -260,7 +260,7 @@ !DEC$ATTRIBUTES reference :: name INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen + INTEGER(SIZE_T) :: namelen INTEGER(HID_T), INTENT(IN) :: type_id INTEGER(HID_T), INTENT(IN) :: space_id INTEGER :: creation_prp_default @@ -312,7 +312,7 @@ CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name INTEGER(HID_T), INTENT(OUT) :: attr_id ! Attribute identifier INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: namelen + INTEGER(SIZE_T) :: namelen ! INTEGER, EXTERNAL :: h5aopen_name_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -326,7 +326,7 @@ !DEC$ATTRIBUTES reference :: name INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen + INTEGER(SIZE_T) :: namelen INTEGER(HID_T), INTENT(OUT) :: attr_id END FUNCTION h5aopen_name_c END INTERFACE @@ -427,38 +427,6 @@ ! !---------------------------------------------------------------------- - SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5awrite_integer_scalar -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, DIMENSION(7) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5awrite_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c - !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN)::buf - END FUNCTION h5awrite_c - END INTERFACE - - hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_scalar - SUBROUTINE h5awrite_integer_1(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -468,7 +436,7 @@ INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER, DIMENSION(7) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN) , & DIMENSION(dims(1)) :: buf ! Attribute data @@ -483,7 +451,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -494,7 +462,6 @@ hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5awrite_integer_1 - SUBROUTINE h5awrite_integer_2(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -504,7 +471,7 @@ INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER, DIMENSION(7) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN) , & DIMENSION(dims(1),dims(2)) :: buf ! Attribute data @@ -519,7 +486,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -540,7 +507,7 @@ INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER, DIMENSION(7) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN) , & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data @@ -555,7 +522,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -591,7 +558,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -627,7 +594,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -663,7 +630,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -699,7 +666,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -711,38 +678,6 @@ END SUBROUTINE h5awrite_integer_7 - SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5awrite_real_scalar -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5awrite_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c - !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN)::buf - END FUNCTION h5awrite_c - END INTERFACE - - hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_scalar - SUBROUTINE h5awrite_real_1(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -767,7 +702,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -803,7 +738,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -839,7 +774,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -875,7 +810,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -911,7 +846,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -947,7 +882,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -983,7 +918,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(IN), & @@ -995,38 +930,6 @@ END SUBROUTINE h5awrite_real_7 - SUBROUTINE h5awrite_double_scalar(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5awrite_double_scalar -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5awrite_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c - !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN)::buf - END FUNCTION h5awrite_c - END INTERFACE - - hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_scalar - SUBROUTINE h5awrite_double_1(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -1050,7 +953,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -1086,7 +989,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -1122,7 +1025,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -1158,7 +1061,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -1194,7 +1097,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -1230,7 +1133,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -1266,7 +1169,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(IN), & @@ -1277,39 +1180,6 @@ hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5awrite_double_7 - SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5awrite_char_scalar -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*),INTENT(IN) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER, EXTERNAL :: h5awritec_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5awritec_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c - !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN)::buf - END FUNCTION h5awritec_c - END INTERFACE - - hdferr = h5awritec_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_scalar - SUBROUTINE h5awrite_char_1(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -1334,7 +1204,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), DIMENSION(dims(1))::buf @@ -1369,7 +1239,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims !DEC$ATTRIBUTES reference :: buf INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id @@ -1406,7 +1276,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -1442,7 +1312,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -1478,7 +1348,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -1514,7 +1384,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -1550,7 +1420,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(IN), & @@ -1561,6 +1431,136 @@ hdferr = h5awritec_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5awrite_char_7 + SUBROUTINE h5awrite_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5awrite_integer_scalar +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5awrite_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c + !DEC$ ENDIF + INTEGER, INTENT(IN), DIMENSION(7) :: dims + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN)::buf + END FUNCTION h5awrite_c + END INTERFACE + + hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_scalar + + + SUBROUTINE h5awrite_real_scalar(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5awrite_real_scalar +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5awrite_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c + !DEC$ ENDIF + INTEGER, INTENT(IN), DIMENSION(7) :: dims + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN)::buf + END FUNCTION h5awrite_c + END INTERFACE + + hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_scalar + + SUBROUTINE h5awrite_double_scalar(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5awrite_double_scalar +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5awrite_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c + !DEC$ ENDIF + INTEGER, INTENT(IN), DIMENSION(7) :: dims + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN)::buf + END FUNCTION h5awrite_c + END INTERFACE + + hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_scalar + + SUBROUTINE h5awrite_char_scalar(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5awrite_char_scalar +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*),INTENT(IN) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code +! INTEGER, EXTERNAL :: h5awritec_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5awritec_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c + !DEC$ ENDIF + INTEGER, INTENT(IN), DIMENSION(7) :: dims + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN)::buf + END FUNCTION h5awritec_c + END INTERFACE + + hdferr = h5awritec_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_scalar + !---------------------------------------------------------------------- ! Name: h5aread_f ! @@ -1594,38 +1594,6 @@ ! up to 7 dimensions. !---------------------------------------------------------------------- - SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5aread_integer_scalar -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(OUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5aread_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c - !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(OUT)::buf - END FUNCTION h5aread_c - END INTERFACE - - hdferr = h5aread_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_scalar - SUBROUTINE h5aread_integer_1(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -1649,7 +1617,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(OUT), & @@ -1684,7 +1652,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(OUT), & @@ -1719,7 +1687,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(OUT), & @@ -1755,7 +1723,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(OUT), & @@ -1791,7 +1759,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(OUT), & @@ -1827,7 +1795,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(OUT), & @@ -1863,7 +1831,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(OUT), & @@ -1875,38 +1843,6 @@ END SUBROUTINE h5aread_integer_7 - SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5aread_real_scalar -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes - REAL, INTENT(OUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5aread_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c - !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(OUT)::buf - END FUNCTION h5aread_c - END INTERFACE - - hdferr = h5aread_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_scalar - SUBROUTINE h5aread_real_1(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -1931,7 +1867,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(OUT), & @@ -1967,7 +1903,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(OUT), & @@ -2003,7 +1939,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(OUT), & @@ -2039,7 +1975,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(OUT), & @@ -2075,7 +2011,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(OUT), & @@ -2111,7 +2047,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(OUT), & @@ -2147,7 +2083,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id REAL, INTENT(OUT), & @@ -2159,38 +2095,6 @@ END SUBROUTINE h5aread_real_7 - SUBROUTINE h5aread_double_scalar(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5aread_double_scalar -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(OUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5aread_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c - !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(OUT)::buf - END FUNCTION h5aread_c - END INTERFACE - - hdferr = h5aread_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_scalar - SUBROUTINE h5aread_double_1(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -2215,7 +2119,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(OUT), & @@ -2251,7 +2155,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(OUT), & @@ -2287,7 +2191,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(OUT), & @@ -2323,7 +2227,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(OUT), & @@ -2359,7 +2263,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(OUT), & @@ -2395,7 +2299,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(OUT), & @@ -2431,7 +2335,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c !DEC$ ENDIF - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id DOUBLE PRECISION, INTENT(OUT), & @@ -2442,40 +2346,6 @@ hdferr = h5aread_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5aread_double_7 - SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5aread_char_scalar -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(OUT) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5areadc_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5areadc_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*) :: buf - END FUNCTION h5areadc_c - END INTERFACE - - hdferr = h5areadc_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_scalar - SUBROUTINE h5aread_char_1(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs @@ -2502,7 +2372,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(OUT), & @@ -2539,7 +2409,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(OUT), & @@ -2576,7 +2446,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(OUT), & @@ -2613,7 +2483,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(OUT), & @@ -2650,7 +2520,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(OUT), & @@ -2687,7 +2557,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(OUT), & @@ -2724,7 +2594,7 @@ !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c !DEC$ ENDIF !DEC$ATTRIBUTES reference :: buf - INTEGER, DIMENSION(7) :: dims + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id CHARACTER(LEN=*), INTENT(OUT), & @@ -2734,44 +2604,143 @@ hdferr = h5areadc_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5aread_char_7 + + SUBROUTINE h5aread_integer_scalar(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5aread_integer_scalar +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(OUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5aread_c +! MS FORTRAN needs explicit interface for C functions called here. ! -!OVERLOADING for bug #670 -! + INTERFACE + INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c + !DEC$ ENDIF + INTEGER, INTENT(IN), DIMENSION(7) :: dims + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(OUT)::buf + END FUNCTION h5aread_c + END INTERFACE + + hdferr = h5aread_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_scalar + + SUBROUTINE h5aread_real_scalar(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5aread_real_scalar +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes + REAL, INTENT(OUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5aread_c +! MS FORTRAN needs explicit interface for C functions called here. ! -!DEC$ IF (OVERLOAD_FLAG .EQ. 1) + INTERFACE + INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c + !DEC$ ENDIF + INTEGER, INTENT(IN), DIMENSION(7) :: dims + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(OUT)::buf + END FUNCTION h5aread_c + END INTERFACE + + hdferr = h5aread_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_scalar + + SUBROUTINE h5aread_double_scalar(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5aread_double_scalar +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(OUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5aread_c +! MS FORTRAN needs explicit interface for C functions called here. ! - SUBROUTINE h5awrite_integer_scalar_b(attr_id, memtype_id, buf, dims, hdferr) + INTERFACE + INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c + !DEC$ ENDIF + INTEGER, INTENT(IN), DIMENSION(7) :: dims + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(OUT)::buf + END FUNCTION h5aread_c + END INTERFACE + + hdferr = h5aread_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_scalar + + SUBROUTINE h5aread_char_scalar(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5awrite_integer_scalar_b +!DEC$attributes dllexport :: h5aread_char_scalar !DEC$endif IMPLICIT NONE INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(IN), DIMENSION(7) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(OUT) :: buf + ! Attribute data INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER, EXTERNAL :: h5awrite_c +! INTEGER, EXTERNAL :: h5areadc_c ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) + INTEGER FUNCTION h5areadc_c(attr_id, memtype_id, buf, dims) USE H5GLOBAL !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c + !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c !DEC$ ENDIF - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + !DEC$ATTRIBUTES reference :: buf + INTEGER, INTENT(IN), DIMENSION(7) :: dims INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(IN)::buf - END FUNCTION h5awrite_c + CHARACTER(LEN=*) :: buf + END FUNCTION h5areadc_c END INTERFACE - hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_integer_scalar_b + hdferr = h5areadc_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_scalar +! +!OVERLOADING for bug #670 +! +! +!DEC$ IF (OVERLOAD_FLAG .EQ. 1) +! SUBROUTINE h5awrite_integer_1_b(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -2781,7 +2750,7 @@ INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN) , & DIMENSION(dims(1)) :: buf ! Attribute data @@ -2796,7 +2765,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -2817,7 +2786,7 @@ INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN) , & DIMENSION(dims(1),dims(2)) :: buf ! Attribute data @@ -2832,7 +2801,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -2853,7 +2822,7 @@ INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN) , & DIMENSION(dims(1),dims(2),dims(3)) :: buf ! Attribute data @@ -2868,7 +2837,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -2889,7 +2858,7 @@ INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4)) :: buf ! Attribute data @@ -2904,7 +2873,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -2925,7 +2894,7 @@ INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype ! identifier (in memory) - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER, INTENT(IN), & DIMENSION(dims(1),dims(2),dims(3),dims(4),dims(5)) :: buf ! Attribute data @@ -2940,7 +2909,7 @@ !DEC$ IF DEFINED(HDF5F90_WINDOWS) !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c !DEC$ ENDIF - INTEGER(HSIZE_T), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes INTEGER(HID_T), INTENT(IN) :: attr_id INTEGER(HID_T), INTENT(IN) :: memtype_id INTEGER, INTENT(IN), & @@ -3024,38 +2993,6 @@ END SUBROUTINE h5awrite_integer_7_b - SUBROUTINE h5awrite_real_scalar_b(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5awrite_real_scalar_b -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5awrite_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c - !DEC$ ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(IN)::buf - END FUNCTION h5awrite_c - END INTERFACE - - hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_real_scalar_b - SUBROUTINE h5awrite_real_1_b(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -3308,38 +3245,6 @@ END SUBROUTINE h5awrite_real_7_b - SUBROUTINE h5awrite_double_scalar_b(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5awrite_double_scalar_b -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5awrite_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c - !DEC$ ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(IN)::buf - END FUNCTION h5awrite_c - END INTERFACE - - hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_double_scalar_b - SUBROUTINE h5awrite_double_1_b(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -3590,39 +3495,6 @@ hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5awrite_double_7_b - SUBROUTINE h5awrite_char_scalar_b(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5awrite_char_scalar_b -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*),INTENT(IN) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code -! INTEGER, EXTERNAL :: h5awritec_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5awritec_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c - !DEC$ ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - !DEC$ATTRIBUTES reference :: buf - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*), INTENT(IN)::buf - END FUNCTION h5awritec_c - END INTERFACE - - hdferr = h5awritec_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5awrite_char_scalar_b - SUBROUTINE h5awrite_char_1_b(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -3874,6 +3746,135 @@ hdferr = h5awritec_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5awrite_char_7_b + SUBROUTINE h5awrite_integer_scalar_b(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5awrite_integer_scalar_b +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5awrite_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c + !DEC$ ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(IN)::buf + END FUNCTION h5awrite_c + END INTERFACE + + hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_integer_scalar_b + + SUBROUTINE h5awrite_real_scalar_b(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5awrite_real_scalar_b +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5awrite_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c + !DEC$ ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(IN)::buf + END FUNCTION h5awrite_c + END INTERFACE + + hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_real_scalar_b + + SUBROUTINE h5awrite_double_scalar_b(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5awrite_double_scalar_b +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(IN) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5awrite_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5awrite_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AWRITE_C'::h5awrite_c + !DEC$ ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(IN)::buf + END FUNCTION h5awrite_c + END INTERFACE + + hdferr = h5awrite_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_double_scalar_b + + SUBROUTINE h5awrite_char_scalar_b(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5awrite_char_scalar_b +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*),INTENT(IN) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code +! INTEGER, EXTERNAL :: h5awritec_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5awritec_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AWRITEC_C'::h5awritec_c + !DEC$ ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + !DEC$ATTRIBUTES reference :: buf + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*), INTENT(IN)::buf + END FUNCTION h5awritec_c + END INTERFACE + + hdferr = h5awritec_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5awrite_char_scalar_b + !---------------------------------------------------------------------- ! Name: h5aread_f ! @@ -3907,38 +3908,6 @@ ! up to 7 dimensions. !---------------------------------------------------------------------- - SUBROUTINE h5aread_integer_scalar_b(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5aread_integer_scalar_b -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER, INTENT(OUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5aread_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c - !DEC$ ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - INTEGER, INTENT(OUT)::buf - END FUNCTION h5aread_c - END INTERFACE - - hdferr = h5aread_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_integer_scalar_b - SUBROUTINE h5aread_integer_1_b(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -4188,38 +4157,6 @@ END SUBROUTINE h5aread_integer_7_b - SUBROUTINE h5aread_real_scalar_b(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5aread_real_scalar_b -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - REAL, INTENT(OUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5aread_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c - !DEC$ ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - REAL, INTENT(OUT)::buf - END FUNCTION h5aread_c - END INTERFACE - - hdferr = h5aread_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_real_scalar_b - SUBROUTINE h5aread_real_1_b(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -4472,38 +4409,6 @@ END SUBROUTINE h5aread_real_7_b - SUBROUTINE h5aread_double_scalar_b(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5aread_double_scalar_b -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - DOUBLE PRECISION, INTENT(OUT) :: buf ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5aread_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c - !DEC$ ENDIF - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - DOUBLE PRECISION, INTENT(OUT)::buf - END FUNCTION h5aread_c - END INTERFACE - - hdferr = h5aread_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_double_scalar_b - SUBROUTINE h5aread_double_1_b(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs !DEC$if defined(BUILD_HDF5_DLL) @@ -4755,40 +4660,6 @@ hdferr = h5aread_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5aread_double_7_b - SUBROUTINE h5aread_char_scalar_b(attr_id, memtype_id, buf, dims, hdferr) -!This definition is needed for Windows DLLs -!DEC$if defined(BUILD_HDF5_DLL) -!DEC$attributes dllexport :: h5aread_char_scalar_b -!DEC$endif - IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier - INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype - ! identifier (in memory) - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - CHARACTER(LEN=*), INTENT(OUT) :: buf - ! Attribute data - INTEGER, INTENT(OUT) :: hdferr ! Error code - -! INTEGER, EXTERNAL :: h5areadc_c -! MS FORTRAN needs explicit interface for C functions called here. -! - INTERFACE - INTEGER FUNCTION h5areadc_c(attr_id, memtype_id, buf, dims) - USE H5GLOBAL - !DEC$ IF DEFINED(HDF5F90_WINDOWS) - !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c - !DEC$ ENDIF - !DEC$ATTRIBUTES reference :: buf - INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes - INTEGER(HID_T), INTENT(IN) :: attr_id - INTEGER(HID_T), INTENT(IN) :: memtype_id - CHARACTER(LEN=*) :: buf - END FUNCTION h5areadc_c - END INTERFACE - - hdferr = h5areadc_c(attr_id, memtype_id, buf, dims) - END SUBROUTINE h5aread_char_scalar_b - SUBROUTINE h5aread_char_1_b(attr_id, memtype_id, buf, dims, hdferr) !This definition is needed for Windows DLLs @@ -5047,6 +4918,137 @@ hdferr = h5areadc_c(attr_id, memtype_id, buf, dims) END SUBROUTINE h5aread_char_7_b + + SUBROUTINE h5aread_integer_scalar_b(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5aread_integer_scalar_b +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER, INTENT(OUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5aread_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c + !DEC$ ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + INTEGER, INTENT(OUT)::buf + END FUNCTION h5aread_c + END INTERFACE + + hdferr = h5aread_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_integer_scalar_b + + SUBROUTINE h5aread_real_scalar_b(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5aread_real_scalar_b +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + REAL, INTENT(OUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5aread_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c + !DEC$ ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + REAL, INTENT(OUT)::buf + END FUNCTION h5aread_c + END INTERFACE + + hdferr = h5aread_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_real_scalar_b + + SUBROUTINE h5aread_double_scalar_b(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5aread_double_scalar_b +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + DOUBLE PRECISION, INTENT(OUT) :: buf ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5aread_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5aread_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AREAD_C'::h5aread_c + !DEC$ ENDIF + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + DOUBLE PRECISION, INTENT(OUT)::buf + END FUNCTION h5aread_c + END INTERFACE + + hdferr = h5aread_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_double_scalar_b + + SUBROUTINE h5aread_char_scalar_b(attr_id, memtype_id, buf, dims, hdferr) +!This definition is needed for Windows DLLs +!DEC$if defined(BUILD_HDF5_DLL) +!DEC$attributes dllexport :: h5aread_char_scalar_b +!DEC$endif + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier + INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype + ! identifier (in memory) + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + CHARACTER(LEN=*), INTENT(OUT) :: buf + ! Attribute data + INTEGER, INTENT(OUT) :: hdferr ! Error code + +! INTEGER, EXTERNAL :: h5areadc_c +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER FUNCTION h5areadc_c(attr_id, memtype_id, buf, dims) + USE H5GLOBAL + !DEC$ IF DEFINED(HDF5F90_WINDOWS) + !MS$ATTRIBUTES C,reference,alias:'_H5AREADC_C'::h5areadc_c + !DEC$ ENDIF + !DEC$ATTRIBUTES reference :: buf + INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes + INTEGER(HID_T), INTENT(IN) :: attr_id + INTEGER(HID_T), INTENT(IN) :: memtype_id + CHARACTER(LEN=*) :: buf + END FUNCTION h5areadc_c + END INTERFACE + + hdferr = h5areadc_c(attr_id, memtype_id, buf, dims) + END SUBROUTINE h5aread_char_scalar_b + ! !END OVERLOADING ! @@ -5304,7 +5306,7 @@ INTEGER(HID_T), INTENT(IN) :: obj_id ! Object identifier CHARACTER(LEN=*), INTENT(IN) :: name ! Attribute name INTEGER, INTENT(OUT) :: hdferr ! Error code - INTEGER :: namelen + INTEGER(SIZE_T) :: namelen ! INTEGER, EXTERNAL :: h5adelete_c ! MS FORTRAN needs explicit interface for C functions called here. @@ -5318,7 +5320,7 @@ !DEC$ATTRIBUTES reference :: name INTEGER(HID_T), INTENT(IN) :: obj_id CHARACTER(LEN=*), INTENT(IN) :: name - INTEGER :: namelen + INTEGER(SIZE_T) :: namelen END FUNCTION h5adelete_c END INTERFACE diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index c66e5ee..ab27ac7 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -16,9 +16,8 @@ #ifndef _H5f90proto_H #define _H5f90proto_H -H5_DLL int HD5c2fstr(char *str, int len); -H5_DLL char * HD5f2cstring (_fcd fdesc, int len); -H5_DLL int HD5packFstring(char *src, char *dest, int len); +H5_DLL char * HD5f2cstring (_fcd fdesc, size_t len); +H5_DLL void HD5packFstring(char *src, char *dest, size_t len); /* * Functions from H5Ff.c @@ -463,12 +462,8 @@ H5_DLL int_f nh5gget_comment_c # define nh5aopen_name_c FNAME(H5AOPEN_NAME_C) # define nh5awrite_c FNAME(H5AWRITE_C) # define nh5awritec_c FNAME(H5AWRITEC_C) -# define nh5awrite_c_b FNAME(H5AWRITE_C_B) -# define nh5awritec_c_b FNAME(H5AWRITEC_C_B) # define nh5aread_c FNAME(H5AREAD_C) # define nh5areadc_c FNAME(H5AREADC_C) -# define nh5aread_c_b FNAME(H5AREAD_C_B) -# define nh5areadc_c_b FNAME(H5AREADC_C_B) # define nh5aget_name_c FNAME(H5AGET_NAME_C) # define nh5aopen_idx_c FNAME(H5AOPEN_IDX_C) # define nh5aget_space_c FNAME(H5AGET_SPACE_C) @@ -481,12 +476,8 @@ H5_DLL int_f nh5gget_comment_c # define nh5aopen_name_c FNAME(h5aopen_name_c) # define nh5awrite_c FNAME(h5awrite_c) # define nh5awritec_c FNAME(h5awritec_c) -# define nh5awrite_c_b FNAME(h5awrite_c_b) -# define nh5awritec_c_b FNAME(h5awritec_c_b) # define nh5aread_c FNAME(h5aread_c) # define nh5areadc_c FNAME(h5areadc_c) -# define nh5aread_c_b FNAME(h5aread_c_b) -# define nh5areadc_c_b FNAME(h5areadc_c_b) # define nh5aget_name_c FNAME(h5aget_name_c) # define nh5aopen_idx_c FNAME(h5aopen_idx_c) # define nh5aget_space_c FNAME(h5aget_space_c) @@ -497,30 +488,22 @@ H5_DLL int_f nh5gget_comment_c #endif -H5_DLL int_f nh5acreate_c (hid_t_f *obj_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *attr_id); +H5_DLL int_f nh5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *attr_id); H5_DLL int_f -nh5aopen_name_c (hid_t_f *obj_id, _fcd name, int_f *namelen, hid_t_f *attr_id); +nh5aopen_name_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_id); -H5_DLL int_f nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, int_f *dims); +H5_DLL int_f nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_DLL int_f nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, int_f *dims); +H5_DLL int_f nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); -H5_DLL int_f nh5awritec_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims); +H5_DLL int_f nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, void *dims); -H5_DLL int_f nh5awrite_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims); - -H5_DLL int_f nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, int_f *dims); - -H5_DLL int_f nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, int_f *dims); - -H5_DLL int_f nh5areadc_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims); - -H5_DLL int_f nh5aread_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims); +H5_DLL int_f nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, void *dims); H5_DLL int_f nh5aclose_c ( hid_t_f *attr_id ); -H5_DLL int_f nh5adelete_c (hid_t_f *obj_id, _fcd name, int_f *namelen); +H5_DLL int_f nh5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen); H5_DLL int_f nh5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); |