summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2015-03-23 21:23:39 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2015-03-23 21:23:39 (GMT)
commitce632854c3d542a22018221be1ec47cdad0affe2 (patch)
tree29b27353a506fe871196a1bad0bc01077ba8e934 /fortran/src
parent9630bfd9749c6a8f470325bb762e64835c3192e9 (diff)
downloadhdf5-ce632854c3d542a22018221be1ec47cdad0affe2.zip
hdf5-ce632854c3d542a22018221be1ec47cdad0affe2.tar.gz
hdf5-ce632854c3d542a22018221be1ec47cdad0affe2.tar.bz2
[svn-r26547] Merged changes from the trunk into the branch:
svn merge -r26029:26536 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran Tested: h5committest
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5Af.c6
-rw-r--r--fortran/src/H5Df.c34
-rw-r--r--fortran/src/H5Ff.c9
-rw-r--r--fortran/src/H5Gf.c39
-rw-r--r--fortran/src/H5Lf.c15
-rw-r--r--fortran/src/H5Of.c7
-rw-r--r--fortran/src/H5Off_F03.f905
-rw-r--r--fortran/src/H5Pf.c27
-rw-r--r--fortran/src/H5Pff.f90116
-rw-r--r--fortran/src/H5Rf.c6
-rw-r--r--fortran/src/H5Rff_F03.f9030
-rw-r--r--fortran/src/H5Rff_F90.f9024
-rw-r--r--fortran/src/H5Sf.c21
-rw-r--r--fortran/src/H5Tf.c331
-rw-r--r--fortran/src/H5Tff_F03.f901
-rw-r--r--fortran/src/H5Tff_F90.f901
-rw-r--r--fortran/src/H5_f.c21
-rw-r--r--fortran/src/H5f90global.f9031
-rw-r--r--fortran/src/H5f90proto.h2
-rw-r--r--fortran/src/H5match_types.c202
-rw-r--r--fortran/src/README3
-rw-r--r--fortran/src/h5fc.in2
22 files changed, 455 insertions, 478 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 8291320..240fbc3 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -1652,7 +1652,7 @@ nh5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder,
*corder = (int_f)ainfo.corder;
*cset = (int_f)ainfo.cset;
- *data_size = (hsize_t)ainfo.data_size;
+ *data_size = (hsize_t_f)ainfo.data_size;
done:
return ret_value;
@@ -1728,7 +1728,7 @@ nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
*corder_valid = 1;
*corder = (int_f)ainfo.corder;
*cset = (int_f)ainfo.cset;
- *data_size = (hsize_t)ainfo.data_size;
+ *data_size = (hsize_t_f)ainfo.data_size;
done:
if(c_obj_name)
@@ -1797,7 +1797,7 @@ nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
*corder_valid = 1;
*corder = (int_f)ainfo.corder;
*cset = (int_f)ainfo.cset;
- *data_size = (hsize_t)ainfo.data_size;
+ *data_size = (hsize_t_f)ainfo.data_size;
done:
if(c_obj_name)
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index ecfa946..f4082a9 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -621,7 +621,7 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
hid_t c_file_space_id;
hid_t c_xfer_prp;
hobj_ref_t *buf_c;
- int i, n;
+ unsigned int i, n;
/*
* Define transfer property
@@ -631,8 +631,8 @@ nh5dwrite_ref_obj_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
/*
* Allocate temporary buffer and copy references from Fortran.
*/
- n = (int)*dims;
- buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(n));
+ n = (unsigned int)*dims;
+ buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*n);
if ( buf_c != NULL ) {
for (i = 0; i < n; i++)
HDmemcpy(&buf_c[i], &buf[i], sizeof(haddr_t));
@@ -688,9 +688,9 @@ nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
hid_t c_file_space_id;
hid_t c_xfer_prp;
hdset_reg_ref_t *buf_c = NULL;
- int i, n;
+ unsigned int i, n;
- n = (int)*dims;
+ n = (unsigned int)*dims;
/*
* Define transfer property
*/
@@ -699,7 +699,7 @@ nh5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_
/*
* Allocate temporary buffer and copy references from Fortran.
*/
- buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*(n));
+ buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n);
if ( buf_c != NULL ) {
for (i = 0; i < n; i++) {
HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE);
@@ -1494,7 +1494,7 @@ nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims)
* Reverse dimensions due to C-FORTRAN storage order.
*/
for(i = 0; i < rank; i++)
- c_dims[i] = dims[rank - i - 1];
+ c_dims[i] = (hsize_t)dims[rank - i - 1];
status = H5Dset_extent((hid_t)*dset_id, c_dims);
@@ -1642,7 +1642,7 @@ nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_
hsize_t num_elem;
max_len = (size_t)dims[0];
- num_elem = dims[1];
+ num_elem = (hsize_t)dims[1];
c_dset_id = (hid_t)*dset_id;
c_mem_type_id = (hid_t)*mem_type_id;
@@ -1711,7 +1711,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s
size_t max_len;
hvl_t *c_buf;
- hssize_t i;
+ hsize_t i;
hssize_t num_elem;
c_dset_id = (hid_t)*dset_id;
@@ -1722,7 +1722,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s
max_len = (size_t)dims[0];
num_elem = H5Sget_select_npoints(c_mem_space_id);
- if(num_elem != dims[1]) return ret_value;
+ if(num_elem != (hssize_t)dims[1]) return ret_value;
c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
@@ -1731,7 +1731,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s
*/
status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
if ( status < 0 ) goto DONE;
- for (i=0; i < num_elem; i++) {
+ for (i=0; i < (hsize_t)num_elem; i++) {
len[i] = (size_t_f)c_buf[i].len;
memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(int_f));
}
@@ -1786,7 +1786,7 @@ nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_sp
hsize_t num_elem;
max_len = (size_t)dims[0];
- num_elem = dims[1];
+ num_elem = (hsize_t)dims[1];
c_dset_id = (hid_t)*dset_id;
c_mem_type_id = (hid_t)*mem_type_id;
@@ -1873,7 +1873,7 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
hsize_t num_elem;
max_len = (size_t)dims[0];
- num_elem = dims[1];
+ num_elem = (hsize_t)dims[1];
c_dset_id = (hid_t)*dset_id;
c_mem_type_id = (hid_t)*mem_type_id;
@@ -1957,7 +1957,7 @@ nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
hsize_t num_elem;
max_len = (size_t)dims[0];
- num_elem = dims[1];
+ num_elem = (hsize_t)dims[1];
c_dset_id = (hid_t)*dset_id;
c_mem_type_id = (hid_t)*mem_type_id;
@@ -2026,7 +2026,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
size_t max_len;
hvl_t *c_buf;
- hssize_t i;
+ hsize_t i;
hssize_t num_elem;
c_dset_id = (hid_t)*dset_id;
@@ -2037,7 +2037,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
max_len = (size_t)dims[0];
num_elem = H5Sget_select_npoints(c_mem_space_id);
- if(num_elem != dims[1]) return ret_value;
+ if(num_elem != (hssize_t)dims[1]) return ret_value;
c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
@@ -2046,7 +2046,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
*/
status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
if ( status <0 ) goto DONE;
- for (i=0; i < num_elem; i++) {
+ for (i=0; i < (hsize_t)num_elem; i++) {
len[i] = (size_t_f)c_buf[i].len;
memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(real_f));
}
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 7455fca..1696672 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -632,7 +632,7 @@ nh5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen)
/*
* Call H5Fget_name function
*/
- if ((size_c = (size_t_f)H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0)
+ if ((size_c = H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0)
HGOTO_DONE(FAIL);
/*
@@ -703,13 +703,16 @@ h5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f
/******/
{
herr_t ret_value=0; /* Return value */
-
+ ssize_t c_buf_req;
/*
* Call h5fget_file_image function
*/
- if ((*buf_req = (size_t_f)H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0)
+
+ if ( (c_buf_req = H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0)
HGOTO_DONE(FAIL);
+ *buf_req = (size_t_f)c_buf_req;
+
done:
return ret_value;
}
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index 5ebb3e7..7f755b3 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -67,7 +67,7 @@ nh5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint,
/*
* Call H5Gcreate function.
*/
- if(*size_hint == OBJECT_NAMELEN_DEFAULT_F ){
+ if(*size_hint == (size_t_f)OBJECT_NAMELEN_DEFAULT_F ){
c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name,(hid_t)*lcpl_id,(hid_t)*gcpl_id,(hid_t)*gapl_id);}
else {
/* Create the group creation property list */
@@ -178,7 +178,7 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
char *c_name = NULL;
size_t c_obj_namelen;
char *c_obj_name = NULL;
- hsize_t c_idx = *idx;
+ hsize_t c_idx = (hsize_t)*idx;
hid_t gid = (-1); /* Temporary group ID */
int ret_value = -1;
@@ -191,7 +191,7 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
/*
* Allocate buffer to hold name of the object
*/
- c_obj_namelen = *obj_namelen;
+ c_obj_namelen = (size_t)*obj_namelen;
if(c_obj_namelen)
if(NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1)))
goto DONE;
@@ -352,6 +352,23 @@ nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name,
goto DONE;
break;
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ case H5L_TYPE_EXTERNAL:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_MAX:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_ERROR:
+ ret_value = -1;
+ goto DONE;
+ break;
+ /* End of the warnings fix */
+
default: /* Unknown/unhandled link type */
goto DONE;
} /* end switch */
@@ -421,6 +438,22 @@ nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen,
if(H5Lcreate_soft(c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
break;
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ case H5L_TYPE_EXTERNAL:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_MAX:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_ERROR:
+ ret_value = -1;
+ goto DONE;
+ break;
+ /* End of the warnings fix */
default: /* Unknown/unhandled link type */
goto DONE;
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index 7efa10a..6523ab4 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -677,9 +677,9 @@ done:
/****if* H5Lf/h5lget_name_by_idx_c
* NAME
- * h5lget_name_by_idx_c
+ * h5lget_name_by_idx_c
* PURPOSE
- * Call H5Lget_name_by_idx
+ * Call H5Lget_name_by_idx
* INPUTS
*
* loc_id - File or group identifier specifying location of subject group
@@ -694,10 +694,10 @@ done:
* name - Buffer in which link value is returned
* size - The size of the link name on success
* RETURNS
- * 0 on success, -1 on failure
+ * 0 on success, -1 on failure
* AUTHOR
* M. Scot Breitenfeld
- * March 10, 2008
+ * March 10, 2008
* SOURCE
*/
int_f
@@ -706,9 +706,10 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
size_t_f *size, _fcd name, hid_t_f *lapl_id)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
+ char *c_group_name = NULL; /* Buffer to hold C string */
char *c_name = NULL; /* Buffer to hold C string */
size_t c_size;
+ ssize_t c_size_link;
int_f ret_value = 0; /* Return value */
/*
@@ -725,10 +726,12 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
if(NULL == (c_name = (char *)HDmalloc(c_size)))
HGOTO_DONE(FAIL)
- if((*size = (size_t_f)H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
+ if((c_size_link = H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
(H5_iter_order_t)*order, (hsize_t)*n,c_name, c_size, (hid_t)*lapl_id)) < 0)
HGOTO_DONE(FAIL)
+ *size = (size_t_f)c_size_link;
+
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index ad8b7ed..ae344a5 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -23,6 +23,8 @@
#include "H5f90.h"
#include "H5Eprivate.h"
+int_f
+fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info);
int_f
fill_h5o_info_t_f(H5O_info_t Oinfo, H5O_info_t_f *object_info) {
@@ -874,6 +876,7 @@ nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
char *c_comment = NULL; /* Buffer to hold C string */
char *c_name = NULL; /* Buffer to hold C string */
int_f ret_value = 0; /* Return value */
+ ssize_t c_bufsize;
size_t c_commentsize;
/*
@@ -895,9 +898,11 @@ nh5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
* Call H5Oget_comment_by_name function.
*/
- if((*bufsize = (size_t_f)H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,(hid_t)*lapl_id )) < 0)
+ if((c_bufsize = H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,(hid_t)*lapl_id )) < 0)
HGOTO_DONE(FAIL);
+ *bufsize = (size_t_f)c_bufsize;
+
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90
index e6b87ea..36b6246 100644
--- a/fortran/src/H5Off_F03.f90
+++ b/fortran/src/H5Off_F03.f90
@@ -40,11 +40,6 @@ MODULE H5O_PROVISIONAL
IMPLICIT NONE
- enum, bind(c)
- enumerator :: H5O_TYPE_UNKNOWN_F = -1
- enumerator :: H5O_TYPE_GROUP_F, H5O_TYPE_DATASET_F, H5O_TYPE_NAMED_DATATYPE_F, H5O_TYPE_NTYPES_F
- end enum
-
!****t* H5T (F03)/h5o_info_t
!
! Fortran2003 Derived Type:
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index fa4dc5b..e9082d6 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -160,41 +160,32 @@ done:
/****if* H5Pf/h5pget_class_c
* NAME
- * h5pget_class_c
+ * h5pget_class_c
* PURPOSE
- * Call H5Pget_class to determine property list class
+ * Call H5Pget_class to determine property list class
* INPUTS
- * prp_id - identifier of the dataspace
+ * prp_id - identifier of the dataspace
* OUTPUTS
- * classtype - class type; possible values are:
- * H5P_ROOT_F -1
- * H5P_FILE_CREATE_F 0
- * H5P_FILE_ACCESS_F 1
- * H5P_DATASET_CREATE_F 2
- * H5P_DATASET_XFER_F 3
- * H5P_FILE_MOUNT_F 4
+ * classtype - class type
* RETURNS
- * 0 on success, -1 on failure
+ * 0 on success, -1 on failure
* AUTHOR
* Elena Pourmal
- * Saturday, August 14, 1999
+ * Saturday, August 14, 1999
* SOURCE
*/
int_f
-nh5pget_class_c ( hid_t_f *prp_id , int_f *classtype)
+nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype)
/******/
{
hid_t c_classtype;
int_f ret_value = 0;
- c_classtype = H5Pget_class((hid_t)*prp_id);
- if(c_classtype == H5P_ROOT) {
- *classtype = H5P_ROOT;
+ if( (c_classtype = H5Pget_class((hid_t)*prp_id)) < 0)
HGOTO_DONE(FAIL)
- }
- *classtype = (int_f)c_classtype;
+ *classtype = (hid_t_f)c_classtype;
done:
return ret_value;
diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90
index 0d85252..3409f15 100644
--- a/fortran/src/H5Pff.f90
+++ b/fortran/src/H5Pff.f90
@@ -237,18 +237,10 @@ CONTAINS
! Returns the property list class for a property list.
!
! INPUTS
-!
! prp_id - property list identifier
+!
! OUTPUTS
-!
! classtype - property list class
-! Possible values are:
-! H5P_ROOT_F
-! H5P_FILE_CREATE_F
-! H5P_FILE_ACCESS_F
-! H5P_DATASET_CREATE_F
-! H5P_DATASET_XFER_F
-! H5P_FILE_MOUNT_F
! hdferr: - error code
! Success: 0
! Failure: -1
@@ -265,30 +257,21 @@ CONTAINS
! Fortran90 Interface:
SUBROUTINE h5pget_class_f(prp_id, classtype, hdferr)
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
- INTEGER, INTENT(OUT) :: classtype ! The type of the property list
- ! to be created. Possible values are:
- ! H5P_ROOT_F
- ! H5P_FILE_CREATE_F
- ! H5P_FILE_ACCESS_F
- ! H5P_DATASET_CREATE_F
- ! H5P_DATASET_XFER_F
- ! H5P_FILE_MOUNT_F
+ INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
+ INTEGER(HID_T), INTENT(OUT) :: classtype ! The type of the property list
+ ! to be created.
INTEGER, INTENT(OUT) :: hdferr ! Error code
! 0 on success and -1 on failure
!*****
-! INTEGER, EXTERNAL :: h5pget_class_c
-! MS FORTRAN needs explicit interface for C functions called here.
-!
INTERFACE
INTEGER FUNCTION h5pget_class_c(prp_id, classtype)
USE H5GLOBAL
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_CLASS_C'::h5pget_class_c
!DEC$ENDIF
- INTEGER(HID_T), INTENT(IN) :: prp_id
- INTEGER, INTENT(OUT) :: classtype
+ INTEGER(HID_T), INTENT(IN) :: prp_id
+ INTEGER(HID_T), INTENT(OUT) :: classtype
END FUNCTION h5pget_class_c
END INTERFACE
@@ -1449,7 +1432,7 @@ CONTAINS
!****s* H5P/h5pget_fapl_core_f
! NAME
-! h5pget_fapl_core_f
+! h5pget_fapl_core_f
!
! PURPOSE
! Queries core file driver properties.
@@ -1487,9 +1470,6 @@ CONTAINS
!*****
INTEGER :: backing_store_flag
-! INTEGER, EXTERNAL :: h5pget_fapl_core_c
-! MS FORTRAN needs explicit interface for C functions called here.
-!
INTERFACE
INTEGER FUNCTION h5pget_fapl_core_c(prp_id, increment, backing_store_flag)
USE H5GLOBAL
@@ -3644,7 +3624,7 @@ CONTAINS
! size - Actual length of the class name
! NOTE: If provided buffer "name" is smaller,
! than name will be truncated to fit into
-! provided user buffer
+! provided user buffer.
! hdferr: - error code
! Success: 0
! Failure: -1
@@ -4222,50 +4202,46 @@ CONTAINS
! Fortran90 Interface:
SUBROUTINE h5pset_fapl_multi_l(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr)
IMPLICIT NONE
- INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map ! Mapping array
- INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl ! Property list for each memory usage type
- CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name ! Names of member file
- REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_addr
- LOGICAL, INTENT(IN) :: relax ! Flag
- INTEGER, INTENT(OUT) :: hdferr ! Error code
- ! 0 on success and -1 on failure
+ INTEGER(HID_T), INTENT(IN) :: prp_id
+ INTEGER, DIMENSION(*), INTENT(IN) :: memb_map
+ INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl
+ CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name
+ REAL, DIMENSION(*), INTENT(IN) :: memb_addr
+ LOGICAL, INTENT(IN) :: relax
+ INTEGER, INTENT(OUT) :: hdferr
!*****
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm
+ INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm
INTEGER :: maxlen
- INTEGER :: flag
+ INTEGER :: flag = 0
INTEGER :: i
-! INTEGER, EXTERNAL :: h5pset_fapl_multi_c
-! MS FORTRAN needs explicit interface for C functions called here.
-!
INTERFACE
INTEGER FUNCTION h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, &
maxlen, memb_addr, flag)
USE H5GLOBAL
+ IMPLICIT NONE
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_C'::h5pset_fapl_multi_c
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: memb_name
INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_map
- INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_fapl
- CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_name
- REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(IN) :: memb_addr
- !INTEGER(HADDR_T), DIMENSION(H5FD_MEM_NTYPES_F), INTENT(IN) :: memb_addr
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm
+ INTEGER, DIMENSION(*), INTENT(IN) :: memb_map
+ INTEGER(HID_T), DIMENSION(*), INTENT(IN) :: memb_fapl
+ CHARACTER(LEN=*), DIMENSION(*), INTENT(IN) :: memb_name
+ REAL, DIMENSION(*), INTENT(IN) :: memb_addr
+ INTEGER, DIMENSION(*) :: lenm
INTEGER :: maxlen
INTEGER, INTENT(IN) :: flag
END FUNCTION h5pset_fapl_multi_c
END INTERFACE
+
maxlen = LEN(memb_name(1))
- DO i=0, H5FD_MEM_NTYPES_F-1
+ DO i=1, H5FD_MEM_NTYPES_F
lenm(i) = LEN_TRIM(memb_name(i))
ENDDO
- flag = 0
- IF (relax) flag = 1
- hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag)
-
+ IF(relax) flag = 1
+ hdferr = h5pset_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag)
+
END SUBROUTINE h5pset_fapl_multi_l
!****s* H5P/h5pset_fapl_multi_s
! NAME
@@ -4303,6 +4279,7 @@ CONTAINS
INTERFACE
INTEGER FUNCTION h5pset_fapl_multi_sc(prp_id,flag)
USE H5GLOBAL
+ IMPLICIT NONE
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5PSET_FAPL_MULTI_SC'::h5pset_fapl_multi_sc
!DEC$ENDIF
@@ -4346,51 +4323,50 @@ CONTAINS
SUBROUTINE h5pget_fapl_multi_f(prp_id, memb_map, memb_fapl, memb_name, memb_addr, relax, hdferr, maxlen_out)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_map
- INTEGER(HID_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_fapl
- CHARACTER(LEN=*), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_name
- !INTEGER(HADDR_T), DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr
- REAL, DIMENSION(0:H5FD_MEM_NTYPES_F-1), INTENT(OUT) :: memb_addr
+ INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map
+ INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl
+ CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name
+ REAL, DIMENSION(*), INTENT(OUT) :: memb_addr
INTEGER, OPTIONAL, INTENT(OUT) :: maxlen_out
LOGICAL, INTENT(OUT) :: relax
INTEGER, INTENT(OUT) :: hdferr ! Error code
! 0 on success and -1 on failure
!*****
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm
+ INTEGER, DIMENSION(1:H5FD_MEM_NTYPES_F) :: lenm
INTEGER :: maxlen
INTEGER :: c_maxlen_out
INTEGER :: flag
INTEGER :: i
-
-! INTEGER, EXTERNAL :: h5pget_fapl_multi_c
-! MS FORTRAN needs explicit interface for C functions called here.
!
INTERFACE
INTEGER FUNCTION h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, &
maxlen, memb_addr, flag, c_maxlen_out)
USE H5GLOBAL
+ IMPLICIT NONE
!DEC$IF DEFINED(HDF5F90_WINDOWS)
!DEC$ATTRIBUTES C,reference,decorate,alias:'H5PGET_FAPL_MULTI_C'::h5pget_fapl_multi_c
!DEC$ENDIF
!DEC$ATTRIBUTES reference :: memb_name
INTEGER(HID_T), INTENT(IN) :: prp_id ! File creation property list identifier
- INTEGER, DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_map
- INTEGER(HID_T), DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_fapl
- CHARACTER(LEN=*), DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_name
- REAL, DIMENSION(H5FD_MEM_NTYPES_F), INTENT(OUT) :: memb_addr
- INTEGER, DIMENSION(0:H5FD_MEM_NTYPES_F-1) :: lenm
+ INTEGER, DIMENSION(*), INTENT(OUT) :: memb_map
+ INTEGER(HID_T), DIMENSION(*), INTENT(OUT) :: memb_fapl
+ CHARACTER(LEN=*), DIMENSION(*), INTENT(OUT) :: memb_name
+ REAL, DIMENSION(*), INTENT(OUT) :: memb_addr
+ INTEGER, DIMENSION(*) :: lenm
INTEGER :: maxlen
INTEGER :: c_maxlen_out
INTEGER, INTENT(OUT) :: flag
END FUNCTION h5pget_fapl_multi_c
END INTERFACE
- maxlen = LEN(memb_name(0))
- DO i=0, H5FD_MEM_NTYPES_F-1
+
+ maxlen = LEN(memb_name(1))
+ DO i=1, H5FD_MEM_NTYPES_F
lenm(i) = LEN_TRIM(memb_name(i))
ENDDO
- hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out)
+ hdferr = h5pget_fapl_multi_c(prp_id, memb_map, memb_fapl, memb_name, lenm, maxlen, memb_addr, flag, c_maxlen_out)
+
relax = .TRUE.
- IF(flag .EQ. 0) relax = .FALSE.
+ IF(flag .EQ. 0) relax = .FALSE.
IF(PRESENT(maxlen_out)) maxlen_out = c_maxlen_out
END SUBROUTINE h5pget_fapl_multi_f
!****s* H5P/h5pset_szip_f
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c
index d2ed7a3..192baf2 100644
--- a/fortran/src/H5Rf.c
+++ b/fortran/src/H5Rf.c
@@ -148,13 +148,11 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r
{
int ret_value = -1;
char *c_name;
- size_t c_namelen;
/*
* Convert FORTRAN name to C name
*/
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL) return ret_value;
/*
@@ -567,7 +565,7 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_
/*
* Allocate buffer to hold name of an attribute
*/
- if ((c_buf = HDmalloc(c_bufsize)) == NULL)
+ if ((c_buf = (char *)HDmalloc(c_bufsize)) == NULL)
return ret_value;
/*
diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90
index fc4b2f3..8f40607 100644
--- a/fortran/src/H5Rff_F03.f90
+++ b/fortran/src/H5Rff_F03.f90
@@ -14,18 +14,18 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the files COPYING and Copyright.html. COPYING can be found at the root *
-! of the source code distribution tree; Copyright.html can be found at the *
-! root level of an installed copy of the electronic HDF5 document set and *
-! is linked from the top-level documents page. It can also be found at *
-! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
-! access to either file, you may request a copy from help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
@@ -551,7 +551,7 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: loc_id
TYPE(hobj_ref_t_f), INTENT(IN), TARGET :: ref
INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
- CHARACTER(LEN=*), INTENT(OUT) :: name
+ CHARACTER(LEN=*), INTENT(INOUT) :: name
INTEGER, INTENT(OUT) :: hdferr
!*****
@@ -598,7 +598,7 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: loc_id
TYPE(hdset_reg_ref_t_f), INTENT(IN), TARGET :: ref
INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
- CHARACTER(LEN=*), INTENT(OUT) :: name
+ CHARACTER(LEN=*), INTENT(INOUT) :: name
INTEGER, INTENT(OUT) :: hdferr
!*****
INTEGER(SIZE_T) :: size_default
@@ -647,7 +647,7 @@ CONTAINS
INTEGER(HID_T), INTENT(IN) :: loc_id
INTEGER, INTENT(IN) :: ref_type
TYPE(C_PTR), INTENT(IN) :: ref
- CHARACTER(LEN=*), INTENT(OUT) :: name
+ CHARACTER(LEN=*), INTENT(INOUT) :: name
INTEGER, INTENT(OUT) :: hdferr
INTEGER(SIZE_T), OPTIONAL, INTENT(OUT) :: size
!*****
diff --git a/fortran/src/H5Rff_F90.f90 b/fortran/src/H5Rff_F90.f90
index 3871d99..ac45857 100644
--- a/fortran/src/H5Rff_F90.f90
+++ b/fortran/src/H5Rff_F90.f90
@@ -14,18 +14,18 @@
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *
-! All rights reserved. *
-! *
-! This file is part of HDF5. The full HDF5 copyright notice, including *
-! terms governing use, modification, and redistribution, is contained in *
-! the files COPYING and Copyright.html. COPYING can be found at the root *
-! of the source code distribution tree; Copyright.html can be found at the *
-! root level of an installed copy of the electronic HDF5 document set and *
-! is linked from the top-level documents page. It can also be found at *
-! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
-! access to either file, you may request a copy from help@hdfgroup.org. *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index f6803ac..6947d64 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -298,7 +298,7 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock,
if (rank < 0 ) return ret_value;
c_startblock = (hsize_t)*startblock;
- c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_blocks*2*rank));
+ c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_blocks*2*(hsize_t)rank));
if (!c_buf) return ret_value;
ret_value = H5Sget_select_hyper_blocklist(c_space_id, c_startblock,
@@ -425,7 +425,7 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
if (rank < 0 ) return ret_value;
c_startpoint = (hsize_t)*startpoint;
- c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_points*rank));
+ c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_points*(hsize_t)rank));
if (!c_buf) return ret_value;
ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint,
c_num_points, c_buf);
@@ -434,7 +434,7 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
/* and add 1 to account for array's starting at one in Fortran */
i2 = 0;
for( i = 0; i < c_num_points; i++) {
- i1 = rank*(i+1);
+ i1 = (hsize_t)rank*(i+1);
for(j = 0; j < rank; j++) {
buf[i2] = (hsize_t_f)(c_buf[i1-1]+1);
i2 = i2 + 1;
@@ -442,10 +442,6 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
}
}
-/* for( i = 0; i < c_num_points*rank; i++) { */
-/* printf("%i \n", (int)c_buf[i]+1); */
-/* } */
-
if (ret_value >= 0 ) ret_value = 0;
HDfree(c_buf);
@@ -453,8 +449,6 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
return ret_value;
}
-
-
/****if* H5Sf/h5sselect_all_c
* NAME
* h5sselect_all_c
@@ -1230,7 +1224,8 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi
H5S_seloper_t c_op;
herr_t status;
int rank;
- int i, j;
+ size_t i;
+ int j;
hsize_t *c_coord;
size_t c_nelements;
@@ -1239,11 +1234,11 @@ nh5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsi
c_space_id = *space_id;
rank = H5Sget_simple_extent_ndims(c_space_id);
- c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank*(*nelements));
+ c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t)*(size_t)rank*((size_t)*nelements));
if(!c_coord) return ret_value;
- for (i=0; i< *nelements; i++) {
+ for (i=0; i< (size_t)*nelements; i++) {
for (j = 0; j < rank; j++) {
- c_coord[j+i*rank] = (hsize_t)coord[j + i*rank];
+ c_coord[(size_t)j+i*(size_t)rank] = (hsize_t)coord[(size_t)j + i*(size_t)rank];
}
}
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index 878119f..7e1aa42 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -26,9 +26,9 @@
/****if* H5Tf/h5topen_c
* NAME
- * h5topen_c
+ * h5topen_c
* PURPOSE
- * Call H5Topen2 to open a datatype
+ * Call H5Topen2 to open a datatype
* INPUTS
* loc_id - file or group identifier
* name - name of the datatype within file or group
@@ -78,9 +78,9 @@ done:
/****if* H5Tf/h5tcommit_c
* NAME
- * h5tcommit_c
+ * h5tcommit_c
* PURPOSE
- * Call H5Tcommit2 to commit a datatype
+ * Call H5Tcommit2 to commit a datatype
* INPUTS
* loc_id - file or group identifier
* name - name of the datatype within file or group
@@ -126,9 +126,9 @@ done:
/****if* H5Tf/h5tclose_c
* NAME
- * h5tclose_c
+ * h5tclose_c
* PURPOSE
- * Call H5Tclose to close the datatype
+ * Call H5Tclose to close the datatype
* INPUTS
* type_id - identifier of the datatype to be closed
* RETURNS
@@ -156,9 +156,9 @@ nh5tclose_c ( hid_t_f *type_id )
/****if* H5Tf/h5tcopy_c
* NAME
- * h5tcopy_c
+ * h5tcopy_c
* PURPOSE
- * Call H5Tcopy to copy a datatype
+ * Call H5Tcopy to copy a datatype
* INPUTS
* type_id - identifier of the datatype to be copied
* OUTPUTS
@@ -190,9 +190,9 @@ nh5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id)
/****if* H5Tf/h5tequal_c
* NAME
- * h5tequal_c
+ * h5tequal_c
* PURPOSE
- * Call H5Tequal to copy a datatype
+ * Call H5Tequal to copy a datatype
* INPUTS
* type1_id - datatype identifier
* type2_id - datatype identifier
@@ -289,9 +289,9 @@ nh5tget_class_c ( hid_t_f *type_id , int_f *classtype)
/****if* H5Tf/h5tget_order_c
* NAME
- * h5tget_order_c
+ * h5tget_order_c
* PURPOSE
- * Call H5Tget_order to determine byte order
+ * Call H5Tget_order to determine byte order
* INPUTS
* type_id - identifier of the dataspace
* OUTPUTS
@@ -333,9 +333,9 @@ nh5tget_order_c ( hid_t_f *type_id , int_f *order)
/****if* H5Tf/h5tset_order_c
* NAME
- * h5tset_order_c
+ * h5tset_order_c
* PURPOSE
- * Call H5Tset_order to set byte order
+ * Call H5Tset_order to set byte order
* INPUTS
* type_id - identifier of the dataspace
* order; possible values are:
@@ -374,9 +374,9 @@ nh5tset_order_c ( hid_t_f *type_id , int_f *order)
/****if* H5Tf/h5tget_size_c
* NAME
- * h5tget_size_c
+ * h5tget_size_c
* PURPOSE
- * Call H5Tget_size to get size of the datatype
+ * Call H5Tget_size to get size of the datatype
* INPUTS
* type_id - identifier of the dataspace
* OUTPUTS
@@ -409,9 +409,9 @@ nh5tget_size_c ( hid_t_f *type_id , size_t_f *size)
/****if* H5Tf/h5tset_size_c
* NAME
- * h5tset_size_c
+ * h5tset_size_c
* PURPOSE
- * Call H5Tget_size to get size of the datatype
+ * Call H5Tget_size to get size of the datatype
* INPUTS
* type_id - identifier of the dataspace
* OUTPUTS
@@ -445,9 +445,9 @@ nh5tset_size_c ( hid_t_f *type_id , size_t_f *size)
/****if* H5Tf/h5tget_precision_c
* NAME
- * h5tget_precision_c
+ * h5tget_precision_c
* PURPOSE
- * Call H5Tget_precision to get precision of the datatype
+ * Call H5Tget_precision to get precision of the datatype
* INPUTS
* type_id - identifier of the dataspace
* OUTPUTS
@@ -480,9 +480,9 @@ nh5tget_precision_c ( hid_t_f *type_id , size_t_f *precision)
/****if* H5Tf/h5tset_precision_c
* NAME
- * h5tset_precision_c
+ * h5tset_precision_c
* PURPOSE
- * Call H5Tset_precision to set precision of the datatype
+ * Call H5Tset_precision to set precision of the datatype
* INPUTS
* type_id - identifier of the dataspace
* precision - number of significant bits
@@ -515,9 +515,9 @@ nh5tset_precision_c ( hid_t_f *type_id , size_t_f *precision)
/****if* H5Tf/h5tget_offset_c
* NAME
- * h5tget_offset_c
+ * h5tget_offset_c
* PURPOSE
- * Call H5Tget_offset to get bit offset of the first
+ * Call H5Tget_offset to get bit offset of the first
* significant bit of the datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -552,9 +552,9 @@ nh5tget_offset_c ( hid_t_f *type_id , size_t_f *offset)
/****if* H5Tf/h5tset_offset_c
* NAME
- * h5tset_offset_c
+ * h5tset_offset_c
* PURPOSE
- * Call H5Tset_offset to set bit offset of the first
+ * Call H5Tset_offset to set bit offset of the first
* significant bit of the datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -588,9 +588,9 @@ nh5tset_offset_c ( hid_t_f *type_id , size_t_f *offset)
/****if* H5Tf/h5tget_pad_c
* NAME
- * h5tget_pad_c
+ * h5tget_pad_c
* PURPOSE
- * Call H5Tget_pad to get the padding type of the least and
+ * Call H5Tget_pad to get the padding type of the least and
* most-significant bit padding
*
* INPUTS
@@ -629,11 +629,11 @@ nh5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad)
/****if* H5Tf/h5tset_pad_c
* NAME
- * h5tset_pad_c
+ * h5tset_pad_c
* INPUTS
* type_id - identifier of the dataspace
* PURPOSE
- * Call H5Tset_pad to set the padding type of the least and
+ * Call H5Tset_pad to set the padding type of the least and
* most-significant bit padding
*
* INPUTS
@@ -670,9 +670,9 @@ nh5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad )
/****if* H5Tf/h5tget_sign_c
* NAME
- * h5tget_sign_c
+ * h5tget_sign_c
* PURPOSE
- * Call H5Tget_sign to get sign type for an integer type
+ * Call H5Tget_sign to get sign type for an integer type
* INPUTS
* type_id - identifier of the dataspace
* OUTPUTS
@@ -705,9 +705,9 @@ nh5tget_sign_c ( hid_t_f *type_id , int_f *sign)
/****if* H5Tf/h5tset_sign_c
* NAME
- * h5tset_sign_c
+ * h5tset_sign_c
* PURPOSE
- * Call H5Tset_sign to set sign type for an integer type
+ * Call H5Tset_sign to set sign type for an integer type
* INPUTS
* type_id - identifier of the dataspace
* sign - sign type for an integer typ
@@ -741,9 +741,9 @@ nh5tset_sign_c ( hid_t_f *type_id , int_f* sign)
/****if* H5Tf/h5tget_fields_c
* NAME
- * h5tget_fields_c
+ * h5tget_fields_c
* PURPOSE
- * Call H5Tget_fields to get floating point datatype
+ * Call H5Tget_fields to get floating point datatype
* bit field information
* INPUTS
* type_id - identifier of the dataspace
@@ -785,9 +785,9 @@ nh5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f*
/****if* H5Tf/h5tset_fields_c
* NAME
- * h5tset_fields_c
+ * h5tset_fields_c
* PURPOSE
- * Call H5Tset_fields to set floating point datatype
+ * Call H5Tset_fields to set floating point datatype
* bit field information
* INPUTS
* type_id - identifier of the dataspace
@@ -829,9 +829,9 @@ nh5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* e
/****if* H5Tf/h5tget_ebias_c
* NAME
- * h5tget_ebias_c
+ * h5tget_ebias_c
* PURPOSE
- * Call H5Tget_ebias to get exponent bias of a
+ * Call H5Tget_ebias to get exponent bias of a
* floating-point type of the datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -866,9 +866,9 @@ nh5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
/****if* H5Tf/h5tset_ebias_c
* NAME
- * h5tset_ebias_c
+ * h5tset_ebias_c
* PURPOSE
- * Call H5Tset_ebias to set exponent bias of a
+ * Call H5Tset_ebias to set exponent bias of a
* floating-point type of the datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -903,9 +903,9 @@ nh5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
/****if* H5Tf/h5tget_norm_c
* NAME
- * h5tget_norm_c
+ * h5tget_norm_c
* PURPOSE
- * Call H5Tget_norm to get mantissa normalization
+ * Call H5Tget_norm to get mantissa normalization
* of a floating-point datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -940,9 +940,9 @@ nh5tget_norm_c ( hid_t_f *type_id , int_f *norm)
/****if* H5Tf/h5tset_norm_c
* NAME
- * h5tset_norm_c
+ * h5tset_norm_c
* PURPOSE
- * Call H5Tset_norm to set mantissa normalization of
+ * Call H5Tset_norm to set mantissa normalization of
* floating-point type of the datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -977,9 +977,9 @@ nh5tset_norm_c ( hid_t_f *type_id , int_f *norm)
/****if* H5Tf/h5tget_inpad_c
* NAME
- * h5tget_inpad_c
+ * h5tget_inpad_c
* PURPOSE
- * Call H5Tget_inpad to get the padding type for
+ * Call H5Tget_inpad to get the padding type for
* unused bits in floating-point datatypes
*
* INPUTS
@@ -1016,11 +1016,11 @@ nh5tget_inpad_c ( hid_t_f *type_id , int_f * padtype)
/****if* H5Tf/h5tset_inpad_c
* NAME
- * h5tset_inpad_c
+ * h5tset_inpad_c
* INPUTS
* type_id - identifier of the dataspace
* PURPOSE
- * Call H5Tset_inpad to set the padding type
+ * Call H5Tset_inpad to set the padding type
* unused bits in floating-point datatype
*
* INPUTS
@@ -1057,9 +1057,9 @@ nh5tset_inpad_c ( hid_t_f *type_id, int_f * padtype)
/****if* H5Tf/h5tget_cset_c
* NAME
- * h5tget_cset_c
+ * h5tget_cset_c
* PURPOSE
- * Call H5Tget_cset to get character set
+ * Call H5Tget_cset to get character set
* type of a string datatype
*
* INPUTS
@@ -1095,11 +1095,11 @@ nh5tget_cset_c ( hid_t_f *type_id , int_f * cset)
/****if* H5Tf/h5tset_cset_c
* NAME
- * h5tset_cset_c
+ * h5tset_cset_c
* INPUTS
* type_id - identifier of the dataspace
* PURPOSE
- * Call H5Tset_cset to set character set
+ * Call H5Tset_cset to set character set
* type of a string datatype
*
* INPUTS
@@ -1135,9 +1135,9 @@ nh5tset_cset_c ( hid_t_f *type_id, int_f * cset)
/****if* H5Tf/h5tget_strpad_c
* NAME
- * h5tget_strpad_c
+ * h5tget_strpad_c
* PURPOSE
- * Call H5Tget_strpad to get string padding method
+ * Call H5Tget_strpad to get string padding method
* for a string datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -1171,11 +1171,11 @@ nh5tget_strpad_c ( hid_t_f *type_id , int_f * strpad)
/****if* H5Tf/h5tset_strpad_c
* NAME
- * h5tset_strpad_c
+ * h5tset_strpad_c
* INPUTS
* type_id - identifier of the dataspace
* PURPOSE
- * Call H5Tset_strpad to set string padding method
+ * Call H5Tset_strpad to set string padding method
* for a string datatype
*
* INPUTS
@@ -1211,9 +1211,9 @@ nh5tset_strpad_c ( hid_t_f *type_id, int_f * strpad)
/****if* H5Tf/h5tget_nmembers_c
* NAME
- * h5tget_nmembers_c
+ * h5tget_nmembers_c
* PURPOSE
- * Call H5Tget_nmembers to get number of fields
+ * Call H5Tget_nmembers to get number of fields
* in a compound datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -1246,9 +1246,9 @@ nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members)
/****if* H5Tf/h5tget_member_name_c
* NAME
- * h5tget_member_name_c
+ * h5tget_member_name_c
* PURPOSE
- * Call H5Tget_member_name to get name
+ * Call H5Tget_member_name to get name
* of a compound datatype
* INPUTS
* type_id - identifier of the dataspace
@@ -1287,9 +1287,9 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n
}
/****if* H5Tf/h5tget_member_index_c
* NAME
- * h5tget_member_index_c
+ * h5tget_member_index_c
* PURPOSE
- * Call H5Tget_member_index to get an index of
+ * Call H5Tget_member_index to get an index of
* the specified datatype filed or member.
* INPUTS
* type_id - datatype identifier
@@ -1301,7 +1301,7 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n
* 0 on success, -1 on failure
* AUTHOR
* Elena Pourmal
- * Thursday, September 26, 2002
+ * Thursday, September 26, 2002
* HISTORY
*
* SOURCE
@@ -1312,15 +1312,13 @@ nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx)
{
int ret_value = -1;
char *c_name;
- size_t c_namelen;
hid_t c_type_id;
int c_index;
/*
* Convert FORTRAN name to C name
*/
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL) return ret_value;
/*
@@ -1340,9 +1338,9 @@ DONE:
/****if* H5Tf/h5tget_member_offset_c
* NAME
- * h5tget_member_offset_c
+ * h5tget_member_offset_c
* PURPOSE
- * Call H5Tget_member_offset to get byte offset of the
+ * Call H5Tget_member_offset to get byte offset of the
* beginning of a field within a compound datatype with
* respect to the beginning of the compound data type datum
* INPUTS
@@ -1367,12 +1365,8 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset)
{
int ret_value = -1;
size_t c_offset;
- hid_t c_type_id;
- unsigned c_member_no;
- c_type_id = *type_id;
- c_member_no = *member_no;
- c_offset = H5Tget_member_offset(c_type_id, c_member_no);
+ c_offset = H5Tget_member_offset((hid_t)*type_id, (unsigned)*member_no);
*offset = (size_t_f)c_offset;
ret_value = 0;
return ret_value;
@@ -1380,9 +1374,9 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset)
/****if* H5Tf/h5tget_array_dims_c
* NAME
- * h5tget_array_dims_c
+ * h5tget_array_dims_c
* PURPOSE
- * Call H5Tget_array_dims2 to get
+ * Call H5Tget_array_dims2 to get
* dimensions of array datatype
* INPUTS
* type_id - identifier of the array datatype
@@ -1423,9 +1417,9 @@ DONE:
/****if* H5Tf/h5tget_array_ndims_c
* NAME
- * h5tget_array_ndims_c
+ * h5tget_array_ndims_c
* PURPOSE
- * Call H5Tget_array_ndims to get number
+ * Call H5Tget_array_ndims to get number
* of dimensions of array datatype
* INPUTS
* type_id - identifier of the array datatype
@@ -1460,9 +1454,9 @@ nh5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims)
/****if* H5Tf/h5tget_super_c
* NAME
- * h5tget_super_c
+ * h5tget_super_c
* PURPOSE
- * Call H5Tget_super to get base datatype from which
+ * Call H5Tget_super to get base datatype from which
* datatype was derived
* INPUTS
* type_id - identifier of the array datatype
@@ -1498,9 +1492,9 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id)
/****if* H5Tf/h5tget_member_type_c
* NAME
- * h5tget_member_type_c
+ * h5tget_member_type_c
* PURPOSE
- * Call H5Tget_member_type to get the identifier of a copy of
+ * Call H5Tget_member_type to get the identifier of a copy of
* the datatype of the field
* INPUTS
* type_id - identifier of the datatype
@@ -1511,7 +1505,7 @@ nh5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id)
* 0 on success, -1 on failure
* AUTHOR
* XIANGYANG SU
- * Thursday, February 3, 2000
+ * Thursday, February 3, 2000
* HISTORY
*
* SOURCE
@@ -1522,12 +1516,8 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
/******/
{
int ret_value = -1;
- hid_t c_type_id;
- unsigned c_field_idx;
- c_type_id = *type_id;
- c_field_idx = *field_idx;
- *datatype = (hid_t_f)H5Tget_member_type(c_type_id, c_field_idx);
+ *datatype = (hid_t_f)H5Tget_member_type((hid_t)*type_id, (unsigned)*field_idx);
if(*datatype < 0) return ret_value;
ret_value = 0;
@@ -1537,9 +1527,9 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
/****if* H5Tf/h5tcreate_c
* NAME
- * h5tcreate_c
+ * h5tcreate_c
* PURPOSE
- * Call H5Tcreate to create a datatype
+ * Call H5Tcreate to create a datatype
* INPUTS
* cls - class type
* size - size of the class memeber
@@ -1573,20 +1563,20 @@ nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id)
/****if* H5Tf/h5tinsert_c
* NAME
- * h5tinsert_c
+ * h5tinsert_c
* PURPOSE
- * Call H5Tinsert to adds another member to the compound datatype
+ * Call H5Tinsert to adds another member to the compound datatype
* INPUTS
- * type_id - identifier of the datatype
- * name - Name of the field to insert
- * namelen - length of the name
- * offset - Offset in memory structure of the field to insert
- * field_id - datatype identifier of the new member
+ * type_id - identifier of the datatype
+ * name - Name of the field to insert
+ * namelen - length of the name
+ * offset - Offset in memory structure of the field to insert
+ * field_id - datatype identifier of the new member
* RETURNS
- * 0 on success, -1 on failure
+ * 0 on success, -1 on failure
* AUTHOR
* XIANGYANG SU
- * Thursday, February 3, 2000
+ * Thursday, February 3, 2000
* HISTORY
*
* SOURCE
@@ -1597,21 +1587,14 @@ nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_
/******/
{
int ret_value = -1;
- hid_t c_type_id;
- hid_t c_field_id;
char* c_name;
- size_t c_namelen;
- size_t c_offset;
herr_t error;
- c_offset =(size_t) *offset;
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL) return ret_value;
- c_type_id = *type_id;
- c_field_id = *field_id;
- error = H5Tinsert(c_type_id, c_name, c_offset, c_field_id);
+ error = H5Tinsert((hid_t)*type_id, c_name, (size_t)*offset, (hid_t)*field_id);
+
HDfree(c_name);
if(error < 0) return ret_value;
ret_value = 0;
@@ -1621,18 +1604,18 @@ nh5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_
/****if* H5Tf/h5tpack_c
* NAME
- * h5tpack_c
+ * h5tpack_c
* PURPOSE
- * Call H5Tpack tor ecursively remove padding from
- * within a compound datatype to make it more efficient
- * (space-wise) to store that data
+ * Call H5Tpack tor ecursively remove padding from
+ * within a compound datatype to make it more efficient
+ * (space-wise) to store that data
* INPUTS
- * type_id - identifier of the datatype
+ * type_id - identifier of the datatype
* RETURNS
- * 0 on success, -1 on failure
+ * 0 on success, -1 on failure
* AUTHOR
* XIANGYANG SU
- * Thursday, February 3, 2000
+ * Thursday, February 3, 2000
* HISTORY
*
* SOURCE
@@ -1656,9 +1639,9 @@ nh5tpack_c(hid_t_f * type_id)
/****if* H5Tf/h5tarray_create_c
* NAME
- * h5tarray_create_c
+ * h5tarray_create_c
* PURPOSE
- * Call H5Tarray_create2 to create array datatype
+ * Call H5Tarray_create2 to create array datatype
* INPUTS
* base_id - identifier of array base datatype
* rank - array's rank
@@ -1668,7 +1651,7 @@ nh5tpack_c(hid_t_f * type_id)
* 0 on success, -1 on failure
* AUTHOR
* Elena Pourmal
- * Thursday, November 16, 2000
+ * Thursday, November 16, 2000
* HISTORY
*
* SOURCE
@@ -1687,7 +1670,7 @@ nh5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* typ
* Transpose dimension arrays because of C-FORTRAN storage order
*/
for(u = 0; u < (unsigned)*rank ; u++)
- c_dims[u] = (hsize_t)dims[(*rank - u) - 1];
+ c_dims[u] = (hsize_t)dims[((unsigned)*rank - u) - 1];
if((c_type_id = H5Tarray_create2((hid_t)*base_id, (unsigned)*rank, c_dims)) < 0)
goto DONE;
@@ -1702,19 +1685,19 @@ DONE:
/****if* H5Tf/h5tenum_create_c
* NAME
- * h5tenum_create_c
+ * h5tenum_create_c
* PURPOSE
- * Call H5Tenum_create to create a new enumeration datatype
+ * Call H5Tenum_create to create a new enumeration datatype
* INPUTS
- * parent_id - Datatype identifier for the base datatype
+ * parent_id - Datatype identifier for the base datatype
* OUTPUTS
- * new_type_id - datatype identifier for the new
- * enumeration datatype
+ * new_type_id - datatype identifier for the new
+ * enumeration datatype
* RETURNS
- * 0 on success, -1 on failure
+ * 0 on success, -1 on failure
* AUTHOR
* Xiangyang Su
- * Tuesday, February 15, 1999
+ * Tuesday, February 15, 1999
* HISTORY
*
* SOURCE
@@ -1725,11 +1708,9 @@ nh5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id)
/******/
{
int ret_value = 0;
- hid_t c_parent_id;
hid_t c_new_type_id;
- c_parent_id = *parent_id;
- c_new_type_id = H5Tenum_create(c_parent_id);
+ c_new_type_id = H5Tenum_create((hid_t)*parent_id);
if ( c_new_type_id < 0 ) ret_value = -1;
*new_type_id = (hid_t_f)c_new_type_id;
@@ -1764,12 +1745,10 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
{
int ret_value = -1;
char* c_name;
- size_t c_namelen;
herr_t error;
int_f c_value;
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL) return ret_value;
c_value = *value;
@@ -1785,9 +1764,9 @@ nh5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
/****if* H5Tf/h5tenum_nameof_c
* NAME
- * h5tenum_nameof_c
+ * h5tenum_nameof_c
* PURPOSE
- * Call H5Tenum_nameof to find the symbol name that corresponds to
+ * Call H5Tenum_nameof to find the symbol name that corresponds to
* the specified value of the enumeration datatype type
* INPUTS
* type_id - identifier of the datatype
@@ -1829,9 +1808,9 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen)
/****if* H5Tf/h5tenum_valueof_c
* NAME
- * h5tenum_valueof_c
+ * h5tenum_valueof_c
* PURPOSE
- * Call H5Tenum_valueof to find the value of that corresponds to
+ * Call H5Tenum_valueof to find the value of that corresponds to
* the specified name of the enumeration datatype type
* INPUTS
* type_id - identifier of the datatype
@@ -1853,16 +1832,12 @@ nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
/******/
{
int ret_value = -1;
- hid_t c_type_id;
char* c_name;
- size_t c_namelen;
herr_t error;
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL) return ret_value;
- c_type_id = *type_id;
- error = H5Tenum_valueof(c_type_id, c_name, value);
+ error = H5Tenum_valueof((hid_t)*type_id, c_name, value);
HDfree(c_name);
if(error < 0) return ret_value;
@@ -1873,9 +1848,9 @@ nh5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
/****if* H5Tf/h5tget_member_value_c
* NAME
- * h5tget_member_value_c
+ * h5tget_member_value_c
* PURPOSE
- * Call H5Tget_member_value to get the value of an
+ * Call H5Tget_member_value to get the value of an
* enumeration datatype member
* INPUTS
* type_id - identifier of the datatype
@@ -1896,14 +1871,10 @@ nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value)
/******/
{
int ret_value = -1;
- hid_t c_type_id;
- unsigned c_member_no;
int c_value;
herr_t error;
- c_type_id = *type_id;
- c_member_no = *member_no;
- error = H5Tget_member_value(c_type_id, c_member_no, &c_value);
+ error = H5Tget_member_value((hid_t)*type_id, (unsigned)*member_no, &c_value);
if(error < 0) return ret_value;
*value = (int_f)c_value;
@@ -1913,11 +1884,11 @@ nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value)
/****if* H5Tf/h5tset_tag_c
* NAME
- * h5tset_tag_c
+ * h5tset_tag_c
* INPUTS
* type_id - identifier of the dataspace
* PURPOSE
- * Call H5Tset_tag to set an opaque datatype tag
+ * Call H5Tset_tag to set an opaque datatype tag
* INPUTS
* type_id - identifier of the dataspace
* tag - Unique ASCII string with which the opaque
@@ -1937,16 +1908,12 @@ nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen)
/******/
{
int ret_value = -1;
- hid_t c_type_id;
herr_t status;
char* c_tag;
- size_t c_namelen;
- c_namelen = *namelen;
- c_tag = (char *)HD5f2cstring(tag, c_namelen);
+ c_tag = (char *)HD5f2cstring(tag, (size_t)*namelen);
- c_type_id = *type_id;
- status = H5Tset_tag(c_type_id, c_tag);
+ status = H5Tset_tag((hid_t)*type_id, c_tag);
HDfree(c_tag);
if ( status < 0 ) return ret_value;
@@ -1956,7 +1923,7 @@ nh5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen)
/****if* H5Tf/h5tget_tag_c
* NAME
- * h5tget_tag_c
+ * h5tget_tag_c
* PURPOSE
* Call H5Tset_tag to set an opaque datatype tag
* INPUTS
@@ -1994,9 +1961,9 @@ nh5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen)
}
/****if* H5Tf/h5tvlen_create_c
* NAME
- * h5tvlen_create_c
+ * h5tvlen_create_c
* PURPOSE
- * Call H5Tvlen_create to create VL dtatype
+ * Call H5Tvlen_create to create VL dtatype
* INPUTS
* type_id - identifier of the base datatype
* OUTPUTS
@@ -2027,9 +1994,9 @@ nh5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id)
}
/****if* H5Tf/h5tis_variable_str_c
* NAME
- * h5tis_variable_str_c
+ * h5tis_variable_str_c
* PURPOSE
- * Call H5Tis_variable_str to detrmine if the datatype
+ * Call H5Tis_variable_str to detrmine if the datatype
* is a variable string.
* INPUTS
* type_id - identifier of the dataspace
@@ -2062,9 +2029,9 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag )
}
/****if* H5Tf/h5tget_member_class_c
* NAME
- * h5tget_member_class_c
+ * h5tget_member_class_c
* PURPOSE
- * Call H5Tget_member_class to detrmine ithe class of the compound
+ * Call H5Tget_member_class to detrmine ithe class of the compound
* datatype member
* INPUTS
* type_id - identifier of the dataspace
@@ -2102,9 +2069,9 @@ nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls )
/****if* H5Tf/h5tcommit_anon_c
* NAME
- * h5tcommit_anon_c
+ * h5tcommit_anon_c
* PURPOSE
- * Call H5Tcommit_anon
+ * Call H5Tcommit_anon
* INPUTS
* loc_id - file or group identifier
* dtype_id - dataset identifier
@@ -2138,9 +2105,9 @@ nh5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id,
/****if* H5Tf/h5tcommitted_c
* NAME
- * h5tcommitted_c
+ * h5tcommitted_c
* PURPOSE
- * Call H5Tcommitted
+ * Call H5Tcommitted
* dtype_id - dataset identifier
* RETURNS
* a positive value, for TRUE, if the datatype has been committed,
@@ -2169,9 +2136,9 @@ nh5tcommitted_c(hid_t_f *dtype_id)
/****if* H5Tf/h5tdecode_c
* NAME
- * h5tdecode_c
+ * h5tdecode_c
* PURPOSE
- * Call H5Tdecode
+ * Call H5Tdecode
* INPUTS
*
* buf - Buffer for the data space object to be decoded.
@@ -2215,9 +2182,9 @@ nh5tdecode_c ( _fcd buf, hid_t_f *obj_id )
/****if* H5Tf/h5tencode_c
* NAME
- * h5tencode_c
+ * h5tencode_c
* PURPOSE
- * Call H5Tencode
+ * Call H5Tencode
* INPUTS
*
* obj_id - Identifier of the object to be encoded.
@@ -2285,9 +2252,9 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
/****if* H5Tf/h5tget_create_plist_c
* NAME
- * h5tget_create_plist_c
+ * h5tget_create_plist_c
* PURPOSE
- * Call H5Tget_create_plist
+ * Call H5Tget_create_plist
* INPUTS
* dtype_id - Datatype identifier
* OUTPUTS
@@ -2317,9 +2284,9 @@ nh5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id)
/****if* H5Tf/h5tcompiler_conv_c
* NAME
- * h5tcompiler_conv_c
+ * h5tcompiler_conv_c
* PURPOSE
- * Call H5Tcompiler_conv
+ * Call H5Tcompiler_conv
* INPUTS
*
* src_id - Identifier for the source datatype.
@@ -2351,9 +2318,9 @@ nh5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag)
}
/****if* H5Tf/h5tget_native_type_c
* NAME
- * h5tget_native_type_c
+ * h5tget_native_type_c
* PURPOSE
- * Call H5Tget_native_type
+ * Call H5Tget_native_type
* INPUTS
*
* dtype_id - Datatype identifier for the dataset datatype.
@@ -2449,13 +2416,11 @@ h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value)
int ret_value = -1;
hid_t status;
char *c_name;
- size_t c_namelen;
/*
* Convert FORTRAN name to C name
*/
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, c_namelen);
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
if (c_name == NULL) return ret_value;
status = H5Tenum_insert( (hid_t)*type_id, c_name, value);
diff --git a/fortran/src/H5Tff_F03.f90 b/fortran/src/H5Tff_F03.f90
index 2c9f212..e88eda6 100644
--- a/fortran/src/H5Tff_F03.f90
+++ b/fortran/src/H5Tff_F03.f90
@@ -219,5 +219,6 @@ CONTAINS
hdferr = h5tenum_insert_ptr_c(type_id, name, namelen, value)
END SUBROUTINE h5tenum_insert_f03
+
END MODULE H5T_PROVISIONAL
diff --git a/fortran/src/H5Tff_F90.f90 b/fortran/src/H5Tff_F90.f90
index 380fbec..7a9fd39 100644
--- a/fortran/src/H5Tff_F90.f90
+++ b/fortran/src/H5Tff_F90.f90
@@ -92,4 +92,5 @@ CONTAINS
hdferr = h5tenum_insert_c(type_id, name, namelen, value)
END SUBROUTINE h5tenum_insert_f
+
END MODULE H5T_PROVISIONAL
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 05e525d..a149109 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -471,14 +471,11 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
/*
* H5G flags
*/
-
- h5g_flags[0] = (int_f)H5O_TYPE_UNKNOWN;
- h5g_flags[1] = (int_f)H5O_TYPE_GROUP;
- h5g_flags[2] = (int_f)H5O_TYPE_DATASET;
- h5g_flags[3] = (int_f)H5O_TYPE_NAMED_DATATYPE;
-/* This value can no longer be returned and all these flags should be updated
- * to reflect the refinements between links and objects. -QAK */
-/* h5g_flags[4] = H5G_LINK; */
+ h5g_flags[0] = (int_f)H5O_TYPE_UNKNOWN; /* H5G_UNKNOWN is deprecated */
+ h5g_flags[1] = (int_f)H5O_TYPE_GROUP; /* H5G_GROUP is deprecated */
+ h5g_flags[2] = (int_f)H5O_TYPE_DATASET; /* H5G_DATASET is deprecated */
+ h5g_flags[3] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* H5G_TYPE is deprecated */
+ h5g_flags[4] = (int_f)H5L_SAME_LOC;
h5g_flags[5] = (int_f)H5L_TYPE_ERROR;
h5g_flags[6] = (int_f)H5L_TYPE_HARD;
h5g_flags[7] = (int_f)H5L_TYPE_SOFT;
@@ -491,7 +488,6 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
/*
* H5I flags
*/
-
h5i_flags[0] = (int_f)H5I_FILE;
h5i_flags[1] = (int_f)H5I_GROUP;
h5i_flags[2] = (int_f)H5I_DATATYPE;
@@ -551,10 +547,15 @@ nh5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES;
h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE;
+/* Types of objects in file */
+ h5o_flags[22] = (int_f)H5O_TYPE_UNKNOWN; /* Unknown object type */
+ h5o_flags[23] = (int_f)H5O_TYPE_GROUP; /* Object is a group */
+ h5o_flags[24] = (int_f)H5O_TYPE_DATASET; /* Object is a dataset */
+ h5o_flags[25] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* Object is a named data type */
+ h5o_flags[26] = (int_f)H5O_TYPE_NTYPES; /* Number of different object types */
/*
* H5P flags
*/
-
h5p_flags[0] = (hid_t_f)H5P_FILE_CREATE;
h5p_flags[1] = (hid_t_f)H5P_FILE_ACCESS;
h5p_flags[2] = (hid_t_f)H5P_DATASET_CREATE;
diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90
index da1837a..ca50e20 100644
--- a/fortran/src/H5f90global.f90
+++ b/fortran/src/H5f90global.f90
@@ -44,6 +44,8 @@
MODULE H5GLOBAL
USE H5FORTRAN_TYPES
+ IMPLICIT NONE
+
! Definitions for reference datatypes.
! If you change the value of these parameters, do not forget to change corresponding
! values in the H5f90.h file.
@@ -309,8 +311,6 @@ MODULE H5GLOBAL
EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F)
EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F)
EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F)
-
-
!
! H5G flags declaration
!
@@ -325,8 +325,9 @@ MODULE H5GLOBAL
INTEGER :: H5G_GROUP_F
INTEGER :: H5G_DATASET_F
INTEGER :: H5G_TYPE_F
- ! XXX: Fix problems with H5G_LINK_F! - QAK
INTEGER :: H5G_LINK_F
+ INTEGER :: H5G_UDLINK_F
+ INTEGER :: H5G_SAME_LOC_F
INTEGER :: H5G_LINK_ERROR_F
INTEGER :: H5G_LINK_HARD_F
INTEGER :: H5G_LINK_SOFT_F
@@ -335,16 +336,14 @@ MODULE H5GLOBAL
INTEGER :: H5G_STORAGE_TYPE_COMPACT_F
INTEGER :: H5G_STORAGE_TYPE_DENSE_F
- EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F)
- EQUIVALENCE(H5G_flags(2), H5G_GROUP_F)
- EQUIVALENCE(H5G_flags(3), H5G_DATASET_F)
- EQUIVALENCE(H5G_flags(4), H5G_TYPE_F)
- ! XXX: Fix problems with H5G_LINK_F! - QAK ! these are really H5L values -MSB-
- EQUIVALENCE(H5G_flags(5), H5G_LINK_F)
+ EQUIVALENCE(H5G_flags(1), H5G_UNKNOWN_F) ! Unknown object type
+ EQUIVALENCE(H5G_flags(2), H5G_GROUP_F) ! Object is a group
+ EQUIVALENCE(H5G_flags(3), H5G_DATASET_F) ! Object is a dataset
+ EQUIVALENCE(H5G_flags(4), H5G_TYPE_F) ! Object is a named data type
+ EQUIVALENCE(H5G_flags(5), H5G_SAME_LOC_F)
EQUIVALENCE(H5G_flags(6), H5G_LINK_ERROR_F)
EQUIVALENCE(H5G_flags(7), H5G_LINK_HARD_F)
EQUIVALENCE(H5G_flags(8), H5G_LINK_SOFT_F)
- ! XXX
EQUIVALENCE(H5G_flags(9), H5G_STORAGE_TYPE_UNKNOWN_F )
EQUIVALENCE(H5G_flags(10), H5G_STORAGE_TYPE_SYMBOL_TABLE_F)
@@ -574,7 +573,7 @@ MODULE H5GLOBAL
!
! H5O flags declaration
!
- INTEGER, PARAMETER :: H5O_FLAGS_LEN = 22
+ INTEGER, PARAMETER :: H5O_FLAGS_LEN = 27
INTEGER :: H5o_flags(H5O_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5O_FLAGS/
@@ -603,6 +602,11 @@ MODULE H5GLOBAL
INTEGER :: H5O_HDR_ALL_FLAGS_F
INTEGER :: H5O_SHMESG_MAX_NINDEXES_F
INTEGER :: H5O_SHMESG_MAX_LIST_SIZE_F
+ INTEGER :: H5O_TYPE_UNKNOWN_F
+ INTEGER :: H5O_TYPE_GROUP_F
+ INTEGER :: H5O_TYPE_DATASET_F
+ INTEGER :: H5O_TYPE_NAMED_DATATYPE_F
+ INTEGER :: H5O_TYPE_NTYPES_F
EQUIVALENCE(h5o_flags(1) , H5O_COPY_SHALLOW_HIERARCHY_F)
EQUIVALENCE(h5o_flags(2) , H5O_COPY_EXPAND_SOFT_LINK_F)
@@ -626,6 +630,11 @@ MODULE H5GLOBAL
EQUIVALENCE(h5o_flags(20) , H5O_HDR_ALL_FLAGS_F)
EQUIVALENCE(h5o_flags(21) , H5O_SHMESG_MAX_NINDEXES_F)
EQUIVALENCE(h5o_flags(22) , H5O_SHMESG_MAX_LIST_SIZE_F)
+ EQUIVALENCE(h5o_flags(23) , H5O_TYPE_UNKNOWN_F)
+ EQUIVALENCE(h5o_flags(24) , H5O_TYPE_GROUP_F)
+ EQUIVALENCE(h5o_flags(25) , H5O_TYPE_DATASET_F)
+ EQUIVALENCE(h5o_flags(26) , H5O_TYPE_NAMED_DATATYPE_F)
+ EQUIVALENCE(h5o_flags(27) , H5O_TYPE_NTYPES_F)
!
! H5P flags declaration
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index b5e40a8..6bde877 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -995,7 +995,7 @@ H5_FCDLL int_f nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id );
H5_FCDLL int_f nh5pclose_c ( hid_t_f *prp_id );
H5_FCDLL int_f nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id);
H5_FCDLL int_f nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag);
-H5_FCDLL int_f nh5pget_class_c ( hid_t_f *prp_id , int_f *classtype);
+H5_FCDLL int_f nh5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype);
H5_FCDLL int_f nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level);
H5_FCDLL int_f nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims );
H5_FCDLL int_f nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims );
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 3fa0efc..c4b7f73 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -48,11 +48,9 @@ FILE * fort_header;
#define FFILE "H5fortran_types.f90"
/* Prototypes for the write routines */
-void writeTypedef(const char* c_type, unsigned int size);
-void writeFloatTypedef(const char* c_type, unsigned int size);
-void writeTypedefDefault(unsigned int size);
-void writeToFiles(const char* fortran_type, const char* c_type, int size, unsigned int kind);
-void writeFloatToFiles(const char* fortran_type, const char* c_type, int size, unsigned int kind);
+void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size);
+void writeTypedefDefault(const char* c_typedef, unsigned int size);
+void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind);
static void
initCfile(void)
@@ -121,38 +119,23 @@ endFfile(void)
}
/* Define a c_int_x type in the C header */
-void writeTypedef(const char* c_type, unsigned int size)
+void writeTypedef(const char* c_typedef, const char* c_type, unsigned int size)
{
- fprintf(c_header, "#define c_int_%u %s\n", size, c_type);
-}
-
-/* Define a c_float_x type in the C header */
-void writeFloatTypedef(const char* c_type, unsigned int size)
-{
- fprintf(c_header, "#define c_float_%u %s\n", size, c_type);
+ fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type);
}
/* Call this function if there is no matching C type for sizes > 1 */
-void writeTypedefDefault(unsigned int size)
+void writeTypedefDefault(const char* c_typedef, unsigned int size)
{
assert(size %2 == 0);
-
- fprintf(c_header, "typedef struct {c_int_%u a; c_int_%u b;} c_int_%u\n", size / 2, size / 2, size);
+ fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size);
}
/* Create matching Fortran and C types by writing to both files */
-void writeToFiles(const char* fortran_type, const char* c_type, int size, unsigned int kind)
-{
- fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind);
- fprintf(c_header, "typedef c_int_%d %s;\n", size, c_type);
-}
-
-/* Create matching Fortran and C floating types by writing to both files */
-void writeFloatToFiles(const char* fortran_type, const char* c_type, int size, unsigned int kind)
+void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int size, unsigned int kind)
{
fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind);
-
- fprintf(c_header, "typedef c_float_%d %s;\n", size, c_type);
+ fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type);
}
int main(void)
@@ -180,68 +163,89 @@ int main(void)
#if defined H5_FORTRAN_HAS_INTEGER_1_KIND
if(sizeof(long long) == 1)
- writeTypedef("long long", 1);
+ writeTypedef("int", "long long", 1);
else if(sizeof(long) == 1)
- writeTypedef("long", 1);
+ writeTypedef("int", "long", 1);
else if(sizeof(int) == 1)
- writeTypedef("int", 1);
+ writeTypedef("int", "int", 1);
else if(sizeof(short) == 1)
- writeTypedef("short", 1);
+ writeTypedef("int", "short", 1);
else
- writeTypedef("char", 1);
+ writeTypedef("int", "char", 1);
/* Actually, char is not necessarily one byte.
* But if char isn't, then nothing is, so this
* is as close as we can get. */
+ if(sizeof(size_t) == 1)
+ writeTypedef("size_t", "size_t", 1);
+ if(sizeof(hsize_t) == 1)
+ writeTypedef("hsize_t", "hsize_t", 1);
#endif /*H5_FORTRAN_HAS_INTEGER_1_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_2_KIND
if(sizeof(long long) == 2)
- writeTypedef("long long", 2);
+ writeTypedef("int", "long long", 2);
else if(sizeof(long) == 2)
- writeTypedef("long", 2);
+ writeTypedef("int", "long", 2);
else if(sizeof(int) == 2)
- writeTypedef("int", 2);
+ writeTypedef("int", "int", 2);
else if(sizeof(short) == 2)
- writeTypedef("short", 2);
+ writeTypedef("int", "short", 2);
else
- writeTypedefDefault(2);
+ writeTypedefDefault("int",2);
+
+ if(sizeof(size_t) == 2)
+ writeTypedef("size_t", "size_t", 2);
+ if(sizeof(hsize_t) == 2)
+ writeTypedef("hsize_t", "hsize_t", 2);
#endif /*H5_FORTRAN_HAS_INTEGER_2_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_4_KIND
if(sizeof(long long) == 4)
- writeTypedef("long long", 4);
+ writeTypedef("int", "long long", 4);
else if(sizeof(long) == 4)
- writeTypedef("long", 4);
+ writeTypedef("int", "long", 4);
else if(sizeof(int) == 4)
- writeTypedef("int", 4);
+ writeTypedef("int", "int", 4);
else if(sizeof(short) == 4)
- writeTypedef("short", 4);
+ writeTypedef("int", "short", 4);
else
- writeTypedefDefault(4);
+ writeTypedefDefault("int",4);
+
+ if(sizeof(size_t) == 4)
+ writeTypedef("size_t", "size_t", 4);
+ if(sizeof(hsize_t) == 4)
+ writeTypedef("hsize_t", "hsize_t", 4);
+
#endif /*H5_FORTRAN_HAS_INTEGER_4_KIND*/
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND
if(sizeof(long long) == 8)
- writeTypedef("long long", 8);
+ writeTypedef("int", "long long", 8);
else if(sizeof(long) == 8)
- writeTypedef("long", 8);
+ writeTypedef("int", "long", 8);
else if(sizeof(int) == 8)
- writeTypedef("int", 8);
+ writeTypedef("int", "int", 8);
else if(sizeof(short) == 8)
- writeTypedef("short", 8);
+ writeTypedef("int", "short", 8);
else
- writeTypedefDefault(8);
+ writeTypedefDefault("int",8);
+
+ if(sizeof(size_t) == 8)
+ writeTypedef("size_t", "size_t", 8);
+ if(sizeof(hsize_t) == 8)
+ writeTypedef("hsize_t", "hsize_t", 8);
+
#endif /*H5_FORTRAN_HAS_INTEGER_8_KIND*/
/* Define c_float_x */
#if defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND || defined H5_FORTRAN_HAS_REAL_4_KIND
if(sizeof(long double) == 4)
- writeFloatTypedef("long double", 4);
+ writeTypedef("float", "long double", 4);
else if(sizeof(double) == 4)
- writeFloatTypedef("double", 4);
+ writeTypedef("float", "double", 4);
else if(sizeof(float) == 4)
- writeFloatTypedef("float", 4);
+ writeTypedef("float", "float", 4);
else
{ printf("Fortran REAL is 4 bytes, no corresponding C floating type\n");
printf("Quitting....\n");
@@ -251,11 +255,11 @@ int main(void)
#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND || defined H5_FORTRAN_HAS_REAL_8_KIND
if(sizeof(long double) == 8)
- writeFloatTypedef("long double", 8);
+ writeTypedef("float", "long double", 8);
else if(sizeof(double) == 8)
- writeFloatTypedef("double", 8);
+ writeTypedef("float", "double", 8);
else if(sizeof(float) == 8)
- writeFloatTypedef("float", 8);
+ writeTypedef("float", "float", 8);
else
{ printf("Fortran REAL is 16 bytes, no corresponding C floating type\n");
printf("Quitting....\n");
@@ -265,11 +269,11 @@ int main(void)
#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND || defined H5_FORTRAN_HAS_REAL_16_KIND
if(sizeof(long double) == 16)
- writeFloatTypedef("long double", 16);
+ writeTypedef("float", "long double", 16);
else if(sizeof(double) == 16)
- writeFloatTypedef("double", 16);
+ writeTypedef("float", "double", 16);
else if(sizeof(float) == 16)
- writeFloatTypedef("float", 16);
+ writeTypedef("float", "float", 16);
else /*C has no 16 byte float so disable it in Fortran*/
{ printf("warning: Fortran REAL is 16 bytes, no corresponding C floating type\n");
printf(" Disabling Fortran 16 byte REALs\n");
@@ -281,13 +285,13 @@ int main(void)
fprintf(c_header, "\n");
/* haddr_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HADDR_T >= 8
- writeToFiles("HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int","HADDR_T", "haddr_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HADDR_T >= 4
- writeToFiles("HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("int","HADDR_T", "haddr_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HADDR_T >= 2
- writeToFiles("HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("int","HADDR_T", "haddr_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HADDR_T >= 1
- writeToFiles("HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("int","HADDR_T", "haddr_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for haddr_t */
return -1;
@@ -295,13 +299,13 @@ int main(void)
/* hsize_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSIZE_T >= 8
- writeToFiles("HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSIZE_T >= 4
- writeToFiles("HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSIZE_T >= 2
- writeToFiles("HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSIZE_T >= 1
- writeToFiles("HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for hsize_t */
return -1;
@@ -309,13 +313,13 @@ int main(void)
/* hssize_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HSSIZE_T >= 8
- writeToFiles("HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int","HSSIZE_T", "hssize_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HSSIZE_T >= 4
- writeToFiles("HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("int","HSSIZE_T", "hssize_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HSSIZE_T >= 2
- writeToFiles("HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("int","HSSIZE_T", "hssize_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HSSIZE_T >= 1
- writeToFiles("HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("int","HSSIZE_T", "hssize_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for hssize_t */
return -1;
@@ -323,13 +327,13 @@ int main(void)
/* off_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_OFF_T >= 8
- writeToFiles("OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int","OFF_T", "off_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_OFF_T >= 4
- writeToFiles("OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("int","OFF_T", "off_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_OFF_T >= 2
- writeToFiles("OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("int","OFF_T", "off_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_OFF_T >= 1
- writeToFiles("OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("int","OFF_T", "off_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for off_t */
return -1;
@@ -337,13 +341,13 @@ int main(void)
/* size_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_SIZE_T >= 8
- writeToFiles("SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("size_t","SIZE_T", "size_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_SIZE_T >= 4
- writeToFiles("SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("size_t","SIZE_T", "size_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_SIZE_T >= 2
- writeToFiles("SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("size_t","SIZE_T", "size_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_SIZE_T >= 1
- writeToFiles("SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("size_t","SIZE_T", "size_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#else
/* Error: couldn't find a size for size_t */
return -1;
@@ -351,13 +355,13 @@ int main(void)
/* int */
#if defined H5_FORTRAN_HAS_NATIVE_8_KIND
- writeToFiles("Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND);
+ writeToFiles("int","Fortran_INTEGER", "int_f", 8, H5_FORTRAN_HAS_NATIVE_8_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_4_KIND
- writeToFiles("Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND);
+ writeToFiles("int","Fortran_INTEGER", "int_f", 4, H5_FORTRAN_HAS_NATIVE_4_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_2_KIND
- writeToFiles("Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND);
+ writeToFiles("int","Fortran_INTEGER", "int_f", 2, H5_FORTRAN_HAS_NATIVE_2_KIND);
#elif defined H5_FORTRAN_HAS_NATIVE_1_KIND
- writeToFiles("Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND);
+ writeToFiles("int","Fortran_INTEGER", "int_f", 1, H5_FORTRAN_HAS_NATIVE_1_KIND);
#else
/* Error: couldn't find a size for int */
return -1;
@@ -397,7 +401,7 @@ int main(void)
{
sprintf(chrA, "Fortran_INTEGER_%d", FoundIntSize[i]);
sprintf(chrB, "int_%d_f", FoundIntSize[i]);
- writeToFiles(chrA, chrB, FoundIntSize[i], FoundIntSizeKind[i]);
+ writeToFiles("int",chrA, chrB, FoundIntSize[i], FoundIntSizeKind[i]);
}
else /* Did not find the integer type */
{
@@ -408,7 +412,7 @@ int main(void)
{
sprintf(chrA, "Fortran_INTEGER_%d", (-1)*FoundIntSize[i]);
sprintf(chrB, "int_%d_f", (-1)*FoundIntSize[i]);
- writeToFiles(chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
+ writeToFiles("int",chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
flag = 1;
break;
}
@@ -421,7 +425,7 @@ int main(void)
{
sprintf(chrA, "Fortran_INTEGER_%d", (-1)*FoundIntSize[i]);
sprintf(chrB, "int_%d_f", (-1)*FoundIntSize[i]);
- writeToFiles(chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
+ writeToFiles("int",chrA, chrB, FoundIntSize[j], FoundIntSizeKind[j]);
flag = 1;
break;
}
@@ -464,7 +468,7 @@ int main(void)
{
sprintf(chrA, "Fortran_REAL_%d", FoundRealSize[i]);
sprintf(chrB, "real_%d_f", FoundRealSize[i]);
- writeFloatToFiles(chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]);
+ writeToFiles("float",chrA, chrB, FoundRealSize[i], FoundRealSizeKind[i]);
}
else /* Did not find the real type */
{
@@ -476,11 +480,11 @@ int main(void)
sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]);
sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]);
if(FoundRealSize[j]>4) {
- writeFloatToFiles(chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
+ writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
flag = 1;
}
/* else { */
-/* writeFloatToFiles(chrA, chrB, FoundRealSize[j]); */
+/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */
/* } */
flag = 1;
break;
@@ -495,9 +499,9 @@ int main(void)
sprintf(chrA, "Fortran_REAL_%d", (-1)*FoundRealSize[i]);
sprintf(chrB, "real_%d_f", (-1)*FoundRealSize[i]);
if(FoundRealSize[j]>4)
- writeFloatToFiles(chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
+ writeToFiles("float",chrA, chrB, FoundRealSize[j], FoundRealSizeKind[j]);
/* else { */
-/* writeFloatToFiles(chrA, chrB, FoundRealSize[j]); */
+/* writeToFiles("float", chrA, chrB, FoundRealSize[j]); */
/* } */
flag = 1;
break;
@@ -511,15 +515,15 @@ int main(void)
/* hid_t */
#if defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 8
- writeToFiles("HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_4_KIND && H5_SIZEOF_HID_T >= 4
- writeToFiles("HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
+ writeToFiles("int","HID_T", "hid_t_f", 4, H5_FORTRAN_HAS_INTEGER_4_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_2_KIND && H5_SIZEOF_HID_T >= 2
- writeToFiles("HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
+ writeToFiles("int","HID_T", "hid_t_f", 2, H5_FORTRAN_HAS_INTEGER_2_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_1_KIND && H5_SIZEOF_HID_T >= 1
- writeToFiles("HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
+ writeToFiles("int","HID_T", "hid_t_f", 1, H5_FORTRAN_HAS_INTEGER_1_KIND);
#elif defined H5_FORTRAN_HAS_INTEGER_8_KIND && H5_SIZEOF_HID_T >= 4
- writeToFiles("HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
+ writeToFiles("int","HID_T", "hid_t_f", 8, H5_FORTRAN_HAS_INTEGER_8_KIND);
#else
/* Error: couldn't find a size for hid_t */
return -1;
@@ -528,12 +532,12 @@ int main(void)
/* real_f */
#if defined H5_FORTRAN_HAS_REAL_NATIVE_16_KIND
if(H5_C_HAS_REAL_NATIVE_16 != 0) {
- writeFloatToFiles("Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND);
+ writeToFiles("float","Fortran_REAL", "real_f", 16, H5_FORTRAN_HAS_REAL_NATIVE_16_KIND);
}
#elif defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND
- writeFloatToFiles("Fortran_REAL", "real_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
+ writeToFiles("float", "Fortran_REAL", "real_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND
- writeFloatToFiles("Fortran_REAL", "real_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
+ writeToFiles("float", "Fortran_REAL", "real_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
#else
/* Error: couldn't find a size for real_f */
return -1;
@@ -542,13 +546,13 @@ int main(void)
/* double_f */
#if defined H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND
if(H5_C_HAS_REAL_NATIVE_16 != 0) { /* Check if C has 16 byte floats */
- writeFloatToFiles("Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND);
+ writeToFiles("float", "Fortran_DOUBLE", "double_f", 16, H5_FORTRAN_HAS_DOUBLE_NATIVE_16_KIND);
} else {
#if defined H5_FORTRAN_HAS_REAL_NATIVE_8_KIND /* Fall back to 8 byte floats */
- writeFloatToFiles("Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
+ writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_REAL_NATIVE_8_KIND);
}
#elif defined H5_FORTRAN_HAS_REAL_NATIVE_4_KIND /* Fall back to 4 byte floats */
- writeFloatToFiles("Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
+ writeToFiles("float", "Fortran_DOUBLE", "double_f", 4, H5_FORTRAN_HAS_REAL_NATIVE_4_KIND);
}
#else
/* Error: couldn't find a size for double_f when fortran has 16 byte reals */
@@ -557,7 +561,7 @@ int main(void)
#endif
#elif defined H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND
- writeFloatToFiles("Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND);
+ writeToFiles("float", "Fortran_DOUBLE", "double_f", 8, H5_FORTRAN_HAS_DOUBLE_NATIVE_8_KIND);
#else
/* Error: couldn't find a size for real_f */
return -1;
diff --git a/fortran/src/README b/fortran/src/README
index 508da69..c877050 100644
--- a/fortran/src/README
+++ b/fortran/src/README
@@ -35,8 +35,6 @@ following platforms and compilers:
* SunOS 5.6 with WorkshopCompilers 4.2 Fortran 90 1.2
* SunOS 5.7 with WorkshopCompilers 5.0 Fortran 90 2.0
* OSF1 V4.0 with Digital Fortran 90 4.1
- * IRIX64 6.5 (64 option only) with MIPSpro Compilers: Version 7.3.1m
- mpt.1.4
* Linux RedHat 6.1, Kernel 2.2.12 with PGF90
* T3E with Cray Fortran: Version 3.4.0.0
with mpt 1.3
@@ -55,7 +53,6 @@ Compilation
solaris
digunix
- irix
linux
Example: On Digital Unix systems use the following command
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index b5a6486..6e2c9d3 100644
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -313,7 +313,7 @@ if test "x$do_link" = "xyes"; then
hpux*) flag="-Wl,+b -Wl," ;;
freebsd*|solaris*) flag="-R" ;;
rs6000*|aix*) flag="-L" ;;
- irix*|sgi) flag="-rpath " ;;
+ sgi) flag="-rpath " ;;
*) flag="" ;;
esac