diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 22:28:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 22:28:33 (GMT) |
commit | 41a6b581aef055821796fc9d31f58778dc1c4197 (patch) | |
tree | f36f43cc54acdaeab80edd100183719402121508 /fortran/src | |
parent | 0e82707100cf3d1b698d2ec0cad08db61d552d63 (diff) | |
download | hdf5-41a6b581aef055821796fc9d31f58778dc1c4197.zip hdf5-41a6b581aef055821796fc9d31f58778dc1c4197.tar.gz hdf5-41a6b581aef055821796fc9d31f58778dc1c4197.tar.bz2 |
Sync Fortran w/ develop (#3296)
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5Af.c | 20 | ||||
-rw-r--r-- | fortran/src/H5Aff.F90 | 3 | ||||
-rw-r--r-- | fortran/src/H5Dff.F90 | 7 | ||||
-rw-r--r-- | fortran/src/H5ESff.F90 | 1 | ||||
-rw-r--r-- | fortran/src/H5Ef.c | 24 | ||||
-rw-r--r-- | fortran/src/H5Eff.F90 | 2 | ||||
-rw-r--r-- | fortran/src/H5Fff.F90 | 2 | ||||
-rw-r--r-- | fortran/src/H5Gff.F90 | 4 | ||||
-rw-r--r-- | fortran/src/H5Iff.F90 | 2 | ||||
-rw-r--r-- | fortran/src/H5Lf.c | 22 | ||||
-rw-r--r-- | fortran/src/H5Lff.F90 | 5 | ||||
-rw-r--r-- | fortran/src/H5Of.c | 8 | ||||
-rw-r--r-- | fortran/src/H5Off.F90 | 2 | ||||
-rw-r--r-- | fortran/src/H5Pf.c | 80 | ||||
-rw-r--r-- | fortran/src/H5Pff.F90 | 1 | ||||
-rw-r--r-- | fortran/src/H5Rf.c | 10 | ||||
-rw-r--r-- | fortran/src/H5Rff.F90 | 3 | ||||
-rw-r--r-- | fortran/src/H5Sf.c | 20 | ||||
-rw-r--r-- | fortran/src/H5Sff.F90 | 3 | ||||
-rw-r--r-- | fortran/src/H5Tf.c | 2 | ||||
-rw-r--r-- | fortran/src/H5Tff.F90 | 1 | ||||
-rw-r--r-- | fortran/src/H5VLff.F90 | 1 | ||||
-rw-r--r-- | fortran/src/H5Zff.F90 | 1 | ||||
-rw-r--r-- | fortran/src/H5_ff.F90 | 1 | ||||
-rw-r--r-- | fortran/src/H5f90kit.c | 4 |
25 files changed, 111 insertions, 118 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index da5488d..364d2c5 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -220,14 +220,14 @@ h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f * Convert FORTRAN name to C name */ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Adelete_by_name function. */ if (H5Adelete_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_obj_name) @@ -289,14 +289,14 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ * Convert FORTRAN name to C name */ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Allocate buffer to hold name of an attribute */ c_buf_size = (size_t)*size + 1; if (NULL == (c_buf = (char *)malloc(c_buf_size))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Aget_name_by_idx function. @@ -304,7 +304,7 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ c_size = H5Aget_name_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, c_buf, c_buf_size, (hid_t)*lapl_id); if (c_size < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Convert C name to FORTRAN and place it in the given buffer @@ -415,14 +415,14 @@ h5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ * Convert FORTRAN name to C name */ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Ainfo_by_idx function. */ if (H5Aget_info_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, &ainfo, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Unpack the structure */ *corder_valid = 0; @@ -477,15 +477,15 @@ h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fc * Convert FORTRAN name to C name */ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Ainfo_by_name function. */ if (H5Aget_info_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, &ainfo, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Unpack the structure */ *corder_valid = 0; diff --git a/fortran/src/H5Aff.F90 b/fortran/src/H5Aff.F90 index 57e4bdb..3cb1191 100644 --- a/fortran/src/H5Aff.F90 +++ b/fortran/src/H5Aff.F90 @@ -70,9 +70,8 @@ MODULE H5A - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_CHAR, C_LOC, C_INT - USE H5GLOBAL + IMPLICIT NONE PRIVATE h5awrite_char_scalar, h5awrite_ptr PRIVATE h5aread_char_scalar, h5aread_ptr diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90 index 5b571e5..6073570 100644 --- a/fortran/src/H5Dff.F90 +++ b/fortran/src/H5Dff.F90 @@ -85,10 +85,10 @@ MODULE H5D - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR USE H5GLOBAL USE H5LIB, ONLY : h5kind_to_type USE H5S, ONLY : H5Sget_simple_extent_ndims_f, H5Sclose_f + IMPLICIT NONE PRIVATE h5dread_vl_integer, h5dread_vl_real, h5dread_vl_string PRIVATE h5dwrite_vl_integer, h5dwrite_vl_real, h5dwrite_vl_string @@ -2266,6 +2266,9 @@ CONTAINS CALL h5dfill_ptr(f_ptr_fill_value, fill_type_id, f_ptr_buf, mem_type_id, space_id, hdferr) END SUBROUTINE h5dfill_char + +#endif + !> !! \ingroup FH5D !! @@ -2369,8 +2372,6 @@ CONTAINS END SUBROUTINE h5dwrite_multi_f -#endif - END MODULE H5D diff --git a/fortran/src/H5ESff.F90 b/fortran/src/H5ESff.F90 index f102d23..76e8488 100644 --- a/fortran/src/H5ESff.F90 +++ b/fortran/src/H5ESff.F90 @@ -33,7 +33,6 @@ MODULE H5ES - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_INT64_T, C_BOOL USE H5GLOBAL IMPLICIT NONE diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index 9631a87..7e3a25f 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -43,7 +43,7 @@ h5eclear_c(hid_t_f *estack_id) * Call H5Eclear function. */ if (H5Eclear2((hid_t)*estack_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; @@ -72,19 +72,19 @@ h5eprint_c1(_fcd name, int_f *namelen) int_f ret_value = 0; if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (file = fopen(c_name, "a"))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Eprint2 function. */ if (H5Eprint2(H5E_DEFAULT, file) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (file) - HDfclose(file); + fclose(file); if (c_name) free(c_name); @@ -115,7 +115,7 @@ h5eprint_c2(void) * Call H5Eprint2 function. */ if (H5Eprint2(H5E_DEFAULT, NULL) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; @@ -147,15 +147,15 @@ h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen) c_name = (char *)malloc(c_namelen + 1); if (!c_name) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Eget_msg function. */ H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen); HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen); - if (!HDstrcmp(c_name, "Invalid major error number")) - HGOTO_DONE(FAIL) + if (!strcmp(c_name, "Invalid major error number")) + HGOTO_DONE(FAIL); done: if (c_name) @@ -190,15 +190,15 @@ h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen) c_name = (char *)malloc(c_namelen + 1); if (!c_name) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Eget_msg function. */ H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen); HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen); - if (!HDstrcmp(c_name, "Invalid minor error number")) - HGOTO_DONE(FAIL) + if (!strcmp(c_name, "Invalid minor error number")) + HGOTO_DONE(FAIL); done: if (c_name) diff --git a/fortran/src/H5Eff.F90 b/fortran/src/H5Eff.F90 index a4c9e8c..4ef18c1 100644 --- a/fortran/src/H5Eff.F90 +++ b/fortran/src/H5Eff.F90 @@ -37,8 +37,8 @@ MODULE H5E - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR USE H5GLOBAL + IMPLICIT NONE INTEGER, PARAMETER :: PRINTON = 1 !< Turn on automatic printing of errors INTEGER, PARAMETER :: PRINTOFF = 0 !< Turn off automatic printing of errors diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90 index aec149f..f8a7405 100644 --- a/fortran/src/H5Fff.F90 +++ b/fortran/src/H5Fff.F90 @@ -36,7 +36,7 @@ ! MODULE H5F - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR + USE H5GLOBAL IMPLICIT NONE diff --git a/fortran/src/H5Gff.F90 b/fortran/src/H5Gff.F90 index 94a7285..8f805ab 100644 --- a/fortran/src/H5Gff.F90 +++ b/fortran/src/H5Gff.F90 @@ -36,10 +36,10 @@ ! MODULE H5G - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_CHAR, C_INT + USE H5GLOBAL USE H5P, ONLY : H5Pcreate_f, H5Pset_local_heap_size_hint_f, H5Pclose_f - + IMPLICIT NONE ! ! @brief Fortran2003 Derived Type for @ref H5G_info_t diff --git a/fortran/src/H5Iff.F90 b/fortran/src/H5Iff.F90 index 6e6662c..7c449ea 100644 --- a/fortran/src/H5Iff.F90 +++ b/fortran/src/H5Iff.F90 @@ -37,8 +37,8 @@ MODULE H5I - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR USE H5GLOBAL + IMPLICIT NONE CONTAINS diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 172c595..5fb5a34 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -57,16 +57,16 @@ h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *de * Convert FORTRAN name to C name */ if (NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Lcopy function. */ if (H5Lcopy((hid_t)*src_loc_id, c_src_name, (hid_t)*dest_loc_id, c_dest_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_src_name) @@ -350,16 +350,16 @@ h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *de * Convert FORTRAN name to C name */ if (NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Lmove function. */ if (H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dest_loc_id, c_dest_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_src_name) @@ -407,7 +407,7 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * Convert FORTRAN name to C name */ if (NULL == (c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); c_size = (size_t)*size + 1; @@ -415,12 +415,12 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * Allocate buffer to hold name of an attribute */ if (NULL == (c_name = (char *)malloc(c_size))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); 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) + HGOTO_DONE(FAIL); *size = (size_t_f)c_size_link; @@ -625,13 +625,13 @@ h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_ * Convert FORTRAN name to C name */ if (NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Lget_val */ if (H5Lget_val((hid_t)*link_loc_id, c_link_name, &linkval_buff, (size_t)*size, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_link_name) diff --git a/fortran/src/H5Lff.F90 b/fortran/src/H5Lff.F90 index 219ebec..c474754 100644 --- a/fortran/src/H5Lff.F90 +++ b/fortran/src/H5Lff.F90 @@ -37,12 +37,9 @@ MODULE H5L - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_INT USE H5GLOBAL - IMPLICIT NONE - TYPE, bind(c) :: union_t TYPE(H5O_TOKEN_T_F) :: token !< Type for object tokens INTEGER(size_t) :: val_size !< Size of a soft link or user-defined link value @@ -57,7 +54,7 @@ MODULE H5L !< \li H5L_TYPE_SOFT_F Soft link !< \li H5L_TYPE_EXTERNAL_F External link !< \li H5L_TYPE_ERROR_F Invalid link type id - ! LOGICAL(c_bool) :: corder_valid ! hbool_t corder_valid + ! LOGICAL(c_bool) :: corder_valid ! bool corder_valid INTEGER(c_int64_t) :: corder !< Creation order INTEGER(c_int) :: cset !< Character set of link name is encoded. Valid values include the following: !< \li H5T_CSET_ASCII US ASCII diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c index addc6e3..393f505 100644 --- a/fortran/src/H5Of.c +++ b/fortran/src/H5Of.c @@ -38,7 +38,7 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) object_info->type = (int_f)Oinfo.type; object_info->rc = (int_f)Oinfo.rc; - ts = HDgmtime(&Oinfo.atime); + ts = gmtime(&Oinfo.atime); object_info->atime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */ object_info->atime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */ @@ -49,7 +49,7 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) object_info->atime[6] = (int_f)ts->tm_sec; object_info->atime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */ - ts = HDgmtime(&Oinfo.btime); + ts = gmtime(&Oinfo.btime); object_info->btime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */ object_info->btime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */ @@ -60,7 +60,7 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) object_info->btime[6] = (int_f)ts->tm_sec; object_info->btime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */ - ts = HDgmtime(&Oinfo.ctime); + ts = gmtime(&Oinfo.ctime); object_info->ctime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */ object_info->ctime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */ @@ -71,7 +71,7 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) object_info->ctime[6] = (int_f)ts->tm_sec; object_info->ctime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */ - ts = HDgmtime(&Oinfo.mtime); + ts = gmtime(&Oinfo.mtime); object_info->mtime[0] = (int_f)ts->tm_year + 1900; /* year starts at 1900 */ object_info->mtime[1] = (int_f)ts->tm_mon + 1; /* month starts at 0 in C */ diff --git a/fortran/src/H5Off.F90 b/fortran/src/H5Off.F90 index 90e9990..75e0717 100644 --- a/fortran/src/H5Off.F90 +++ b/fortran/src/H5Off.F90 @@ -37,11 +37,9 @@ MODULE H5O - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_LONG, C_INT, C_LOC USE H5GLOBAL IMPLICIT NONE - !> @brief h5o_info_t derived type. The time values are an integer array as specified in the Fortran intrinsic DATE_AND_TIME(VALUES). TYPE, BIND(C) :: h5o_info_t INTEGER(C_LONG) :: fileno !< File number that object is located in diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index ecfa835..0efd205 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -61,7 +61,7 @@ h5pcreate_c(hid_t_f *cls, hid_t_f *prp_id) c_prp_id = H5Pcreate((hid_t)*cls); if (c_prp_id < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *prp_id = (hid_t_f)c_prp_id; @@ -115,7 +115,7 @@ h5pcopy_c(hid_t_f *prp_id, hid_t_f *new_prp_id) c_new_prp_id = H5Pcopy((hid_t)*prp_id); if (c_new_prp_id < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *new_prp_id = (hid_t_f)c_new_prp_id; @@ -146,7 +146,7 @@ h5pequal_c(hid_t_f *plist1_id, hid_t_f *plist2_id, int_f *c_flag) c_c_flag = H5Pequal((hid_t)*plist1_id, (hid_t)*plist2_id); if (c_c_flag < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *c_flag = (int_f)c_c_flag; @@ -176,7 +176,7 @@ h5pget_class_c(hid_t_f *prp_id, hid_t_f *classtype) int_f ret_value = 0; if ((c_classtype = H5Pget_class((hid_t)*prp_id)) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *classtype = (hid_t_f)c_classtype; @@ -202,10 +202,10 @@ int_f h5pset_preserve_c(hid_t_f *prp_id, int_f *flag) /******/ { - int ret_value = 0; - hid_t c_prp_id; - herr_t status; - hbool_t c_flag = 0; + int ret_value = 0; + hid_t c_prp_id; + herr_t status; + bool c_flag = 0; if (*flag > 0) c_flag = 1; @@ -1035,13 +1035,13 @@ int_f h5pset_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag) /******/ { - int ret_value = -1; - hid_t c_prp_id; - herr_t ret = -1; - size_t c_increment; - hbool_t c_backing_store; + int ret_value = -1; + hid_t c_prp_id; + herr_t ret = -1; + size_t c_increment; + bool c_backing_store; c_increment = (size_t)*increment; - c_backing_store = (hbool_t)*flag; + c_backing_store = (bool)*flag; /* * Call H5Pset_fapl_core function. @@ -1071,11 +1071,11 @@ int_f h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag) /******/ { - int ret_value = -1; - hid_t c_prp_id; - herr_t ret = -1; - size_t c_increment = 0; - hbool_t c_backing_store; + int ret_value = -1; + hid_t c_prp_id; + herr_t ret = -1; + size_t c_increment = 0; + bool c_backing_store; *flag = 0; /* * Call H5Pset_fapl_core function. @@ -2871,7 +2871,7 @@ h5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len) goto DONE; HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len); - ret_value = (int_f)HDstrlen(c_name); + ret_value = (int_f)strlen(c_name); H5free_memory(c_name); DONE: @@ -3130,14 +3130,14 @@ h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m hid_t c_memb_fapl[H5FD_MEM_NTYPES]; char *c_memb_name[H5FD_MEM_NTYPES]; haddr_t c_memb_addr[H5FD_MEM_NTYPES]; - hbool_t relax; + bool relax; herr_t status; char *tmp, *tmp_p, *tmp_pp; int i; int c_lenmax; long double tmp_max_addr; c_lenmax = (int)*lenmax; - relax = (hbool_t)*flag; + relax = (bool)*flag; /* * Check that we got correct values from Fortran for memb_addr array */ @@ -3206,12 +3206,12 @@ int_f h5pset_fapl_multi_sc(hid_t_f *prp_id, int_f *flag) /******/ { - int_f ret_value = -1; - hid_t c_prp_id; - hbool_t relax; - herr_t status; + int_f ret_value = -1; + hid_t c_prp_id; + bool relax; + herr_t status; - relax = (hbool_t)*flag; + relax = (bool)*flag; c_prp_id = (hid_t)*prp_id; /* * Call H5Pset_fapl_multi function @@ -3253,7 +3253,7 @@ h5pget_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd m hid_t c_memb_fapl[H5FD_MEM_NTYPES]; char *c_memb_name[H5FD_MEM_NTYPES]; haddr_t c_memb_addr[H5FD_MEM_NTYPES]; - hbool_t relax; + bool relax; herr_t status; char *tmp, *tmp_p; int i; @@ -3428,7 +3428,7 @@ h5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f *cd_nelmts = (size_t_f)c_cd_nelmts; *flags = (int_f)c_flags; - HD5packFstring(c_name, _fcdtocp(name), HDstrlen(c_name)); + HD5packFstring(c_name, _fcdtocp(name), strlen(c_name)); for (i = 0; i < c_cd_nelmts_in; i++) cd_values[i] = (int_f)c_cd_values[i]; @@ -3804,9 +3804,9 @@ int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { - int ret_value = -1; - hbool_t c_track_times = 0; - herr_t ret; + int ret_value = -1; + bool c_track_times = 0; + herr_t ret; /* * Call H5Pget_obj_track_times function. @@ -3841,11 +3841,11 @@ int_f h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag) /******/ { - int ret_value = -1; - hbool_t c_track_times; - herr_t ret; + int ret_value = -1; + bool c_track_times; + herr_t ret; - c_track_times = (hbool_t)*flag; + c_track_times = (bool)*flag; /* * Call H5Pset_obj_track_times function. @@ -4117,7 +4117,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le if (c_expression_len) { c_expression = (char *)malloc(c_expression_len); if (NULL == c_expression) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); } /* end if */ /* @@ -4125,7 +4125,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le */ ret = H5Pget_data_transform((hid_t)*plist_id, c_expression, c_expression_len); if (ret < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* or strlen ? */ HD5packFstring(c_expression, _fcdtocp(expression), (size_t)*expression_len); @@ -4170,13 +4170,13 @@ h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le * Convert FORTRAN name to C name */ if (NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Pset_data_transform function. */ if (H5Pset_data_transform((hid_t)*plist_id, c_expression) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_expression) diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 6be8337..5f76b6c 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -39,7 +39,6 @@ MODULE H5P - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR USE H5GLOBAL USE H5fortkit diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index ad99418..d9ef5d0 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -50,13 +50,13 @@ h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t * Convert FORTRAN name to C name */ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Rcreate function. */ if (H5Rcreate(&ref_c, (hid_t)*loc_id, c_name, H5R_DATASET_REGION, (hid_t)*space_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Copy the reference created */ memcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE); @@ -170,7 +170,7 @@ h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) * Call H5Rget_region function. */ if ((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Copy the dataspace ID */ *space_id = (hid_t_f)c_space_id; @@ -204,7 +204,7 @@ h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id) * Call H5Rget_region function. */ if ((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, ref)) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Copy the dataspace ID */ *space_id = (hid_t_f)c_space_id; @@ -240,7 +240,7 @@ h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) * Call H5Rget_object_type function. */ if (H5Rget_obj_type2((hid_t)*dset_id, H5R_OBJECT, &ref_c, &c_obj_type) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Copy the object type */ *obj_type = (int_f)c_obj_type; diff --git a/fortran/src/H5Rff.F90 b/fortran/src/H5Rff.F90 index 1b2cd8a..ea7cbb6 100644 --- a/fortran/src/H5Rff.F90 +++ b/fortran/src/H5Rff.F90 @@ -46,8 +46,9 @@ ! MODULE H5R - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_SIGNED_CHAR + USE H5GLOBAL + IMPLICIT NONE ! If you change the value of these parameters, do not forget to change corresponding ! values in the H5f90.h file. diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index e8524df..41616f8 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -57,7 +57,7 @@ h5screate_simple_c(int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *sp c_space_id = H5Screate_simple(*rank, c_dims, c_maxdims); if (c_space_id < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *space_id = (hid_t_f)c_space_id; @@ -323,10 +323,10 @@ h5sget_select_bounds_c(hid_t_f *space_id, hsize_t_f *start, hsize_t_f *end) c_space_id = (hid_t)*space_id; rank = H5Sget_simple_extent_ndims(c_space_id); if (rank < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (H5Sget_select_bounds(c_space_id, c_start, c_end) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); for (i = 0; i < rank; i++) { start[i] = (hsize_t_f)(c_start[rank - i - 1] + 1); @@ -644,7 +644,7 @@ h5soffset_simple_c(hid_t_f *space_id, hssize_t_f *offset) c_space_id = (hid_t)*space_id; rank = H5Sget_simple_extent_ndims(c_space_id); if (rank < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Reverse dimensions due to C-FORTRAN storage order. @@ -653,7 +653,7 @@ h5soffset_simple_c(hid_t_f *space_id, hssize_t_f *offset) c_offset[i] = offset[rank - i - 1]; if (H5Soffset_simple(c_space_id, c_offset) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; @@ -693,7 +693,7 @@ h5sset_extent_simple_c(hid_t_f *space_id, int_f *rank, hsize_t_f *current_size, } /* end for */ if (H5Sset_extent_simple((hid_t)*space_id, (int)*rank, c_current_size, c_maximum_size) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; @@ -729,10 +729,10 @@ h5sget_simple_extent_dims_c(hid_t_f *space_id, hsize_t_f *dims, hsize_t_f *maxdi c_space_id = (hid_t)*space_id; rank = H5Sget_simple_extent_ndims(c_space_id); if (rank < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (H5Sget_simple_extent_dims(c_space_id, c_dims, c_maxdims) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Reverse dimensions due to C-FORTRAN storage order. @@ -870,7 +870,7 @@ h5sselect_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f rank = H5Sget_simple_extent_ndims((hid_t)*space_id); if (rank < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Reverse dimensions due to C-FORTRAN storage order. @@ -885,7 +885,7 @@ h5sselect_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f } /* end for */ if (H5Sselect_hyperslab((hid_t)*space_id, (H5S_seloper_t)*op, c_start, c_stride, c_count, c_block) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90 index 79386f3..fff32c0 100644 --- a/fortran/src/H5Sff.F90 +++ b/fortran/src/H5Sff.F90 @@ -37,8 +37,9 @@ ! MODULE H5S - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_INT + USE H5GLOBAL + IMPLICIT NONE CONTAINS !> diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 32282d5..393873e 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -1743,7 +1743,7 @@ h5tget_tag_c(hid_t_f *type_id, _fcd tag, size_t_f *tag_size, int_f *taglen) return ret_value; HD5packFstring(c_tag, _fcdtocp(tag), (size_t)*tag_size); - *taglen = (int_f)HDstrlen(c_tag); + *taglen = (int_f)strlen(c_tag); H5free_memory(c_tag); ret_value = 0; return ret_value; diff --git a/fortran/src/H5Tff.F90 b/fortran/src/H5Tff.F90 index c69c122..b93e3c3 100644 --- a/fortran/src/H5Tff.F90 +++ b/fortran/src/H5Tff.F90 @@ -38,7 +38,6 @@ MODULE H5T - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_CHAR, C_NULL_PTR USE H5GLOBAL IMPLICIT NONE diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90 index 56edccb..5a1fa9f 100644 --- a/fortran/src/H5VLff.F90 +++ b/fortran/src/H5VLff.F90 @@ -37,7 +37,6 @@ MODULE H5VL - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_INT USE H5GLOBAL USE H5fortkit diff --git a/fortran/src/H5Zff.F90 b/fortran/src/H5Zff.F90 index a31e597..eae94c5 100644 --- a/fortran/src/H5Zff.F90 +++ b/fortran/src/H5Zff.F90 @@ -38,6 +38,7 @@ MODULE H5Z USE H5GLOBAL + IMPLICIT NONE CONTAINS diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index ecea23d..42e7058 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -51,7 +51,6 @@ MODULE H5LIB - USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_INTPTR_T, C_INT64_T USE H5GLOBAL IMPLICIT NONE diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c index ebe5955..5129bda 100644 --- a/fortran/src/H5f90kit.c +++ b/fortran/src/H5f90kit.c @@ -50,7 +50,7 @@ HD5f2cstring(_fcd fdesc, size_t len) /* Search for the end of the string */ str = _fcdtocp(fdesc); - for (i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--) + for (i = (int)len - 1; i >= 0 && isspace((int)str[i]) && str[i] == ' '; i--) /*EMPTY*/; /* Allocate C string */ @@ -90,7 +90,7 @@ void HD5packFstring(char *src, char *dest, size_t dst_len) /******/ { - size_t src_len = HDstrlen(src); + size_t src_len = strlen(src); /* Copy over the string information, up to the length of the src */ /* (Don't copy the NUL terminator from the C string to the FORTRAN string */ |