summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/Makefile.in8
-rw-r--r--fortran/examples/Makefile.in8
-rwxr-xr-xfortran/examples/testh5fc.sh.in14
-rw-r--r--fortran/src/H5Af.c123
-rw-r--r--fortran/src/H5Ef.c189
-rw-r--r--fortran/src/H5Lf.c213
-rw-r--r--fortran/src/H5Lff.f9038
-rw-r--r--fortran/src/H5Pf.c155
-rw-r--r--fortran/src/H5Sf.c334
-rw-r--r--fortran/src/H5f90global.f9016
-rw-r--r--fortran/src/Makefile.in10
-rwxr-xr-xfortran/src/h5fc.in8
-rw-r--r--fortran/test/Makefile.in8
-rw-r--r--fortran/test/t.c37
-rw-r--r--fortran/test/tH5G_1_8.f9028
-rw-r--r--fortran/testpar/Makefile.in8
16 files changed, 568 insertions, 629 deletions
diff --git a/fortran/Makefile.in b/fortran/Makefile.in
index 65d8c2f..67fce8c 100644
--- a/fortran/Makefile.in
+++ b/fortran/Makefile.in
@@ -333,12 +333,12 @@ CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
-# We use RUNTESTS instead of RUNSERIAL directly because it may be that
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
-RUNTESTS = $(RUNSERIAL)
+RUNEXEC = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
@@ -868,7 +868,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
- $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
@@ -939,7 +939,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
- RUNTESTS="$(RUNPARALLEL)" || exit 1; \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \
diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in
index 684fd92..151bac5 100644
--- a/fortran/examples/Makefile.in
+++ b/fortran/examples/Makefile.in
@@ -295,12 +295,12 @@ CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
-# We use RUNTESTS instead of RUNSERIAL directly because it may be that
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
-RUNTESTS = $(RUNSERIAL)
+RUNEXEC = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
@@ -757,7 +757,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
- $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
@@ -828,7 +828,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
- RUNTESTS="$(RUNPARALLEL)" || exit 1; \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \
diff --git a/fortran/examples/testh5fc.sh.in b/fortran/examples/testh5fc.sh.in
index a25abbe..234d4e2 100755
--- a/fortran/examples/testh5fc.sh.in
+++ b/fortran/examples/testh5fc.sh.in
@@ -20,6 +20,10 @@
#
# Initializations
+TESTNAME=h5fc
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
# Where the tool is installed.
prefix="${prefix:-@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
@@ -35,7 +39,7 @@ H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary
CMP='cmp -s'
DIFF='diff -c'
-nerrors=0
+nerrors=$EXIT_SUCCESS
verbose=yes
# setup my machine information.
@@ -217,7 +221,9 @@ if test -z "$HDF5_NOCLEANUP"; then
fi
if test $nerrors -eq 0 ; then
- echo "All $H5TOOL tests passed."
+ echo "All $TESTNAME tests passed."
+ exit $EXIT_SUCCESS
+else
+ echo "$TESTNAME tests failed with $nerrors errors."
+ exit $EXIT_FAILURE
fi
-
-exit $nerrors
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 37718b9..939fd81 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -1196,32 +1196,27 @@ nh5adelete_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id)
{
char *c_obj_name = NULL; /* Buffer to hold C string */
- H5_index_t c_idx_type;
- H5_iter_order_t c_order;
int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- c_idx_type = (H5_index_t)*idx_type;
- c_order = (H5_iter_order_t)*order;
+ if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ HGOTO_DONE(FAIL)
/*
* Call H5Adelete_by_name function.
*/
-
- if(H5Adelete_by_idx((hid_t)*loc_id, c_obj_name, c_idx_type, c_order, (hsize_t)*n, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
+ 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)
done:
if(c_obj_name)
HDfree(c_obj_name);
+
return ret_value;
}
+
/*----------------------------------------------------------------------------
* Name: h5aget_name_by_idx_c
* Purpose: Call h5aget_name_by_idx
@@ -1264,45 +1259,43 @@ nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
size_t_f *size, hid_t_f *lapl_id)
{
char *c_obj_name = NULL; /* Buffer to hold C string */
- H5_index_t c_idx_type;
- H5_iter_order_t c_order;
- int_f ret_value = -1; /* Return value */
ssize_t c_size;
size_t c_buf_size;
- char *c_buf =NULL;
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ char *c_buf = NULL;
+ int_f ret_value = 0; /* Return value */
- c_idx_type = (H5_index_t)*idx_type;
- c_order = (H5_iter_order_t)*order;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ HGOTO_DONE(FAIL)
/*
* Allocate buffer to hold name of an attribute
*/
c_buf_size = (size_t)*size + 1;
- c_buf = (char *)HDmalloc(c_buf_size);
- if (c_buf == NULL) return ret_value;
+ if(NULL == (c_buf = (char *)HDmalloc(c_buf_size)))
+ HGOTO_DONE(FAIL)
+
/*
* Call H5Aget_name_by_idx function.
*/
- c_size = H5Aget_name_by_idx((hid_t)*loc_id, c_obj_name, c_idx_type, c_order, (hsize_t)*n, c_buf, c_buf_size,(hid_t)*lapl_id);
+ 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)
- if (c_size < 0) goto done;
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- HD5packFstring(c_buf, _fcdtocp(name), c_buf_size-1);
+ HD5packFstring(c_buf, _fcdtocp(name), c_buf_size - 1);
*size = (size_t_f)c_size;
- ret_value = 0;
done:
if(c_obj_name)
- HDfree(c_obj_name);
- HDfree(c_buf);
+ HDfree(c_obj_name);
+ if(c_buf)
+ HDfree(c_buf);
return ret_value;
}
@@ -1339,27 +1332,24 @@ nh5aopen_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
int_f *idx_type, int_f *order, hsize_t_f *n, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id )
{
char *c_obj_name = NULL; /* Buffer to hold C string */
- H5_index_t c_idx_type;
- H5_iter_order_t c_order;
int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- c_idx_type = (H5_index_t)*idx_type;
- c_order = (H5_iter_order_t)*order;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ HGOTO_DONE(FAIL)
/*
* Call H5Aopen_by_idx function.
*/
- if((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*loc_id, c_obj_name, c_idx_type, c_order, (hsize_t)*n, (hid_t)*aapl_id, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ if((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, (hid_t)*aapl_id, (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL)
+
done:
if(c_obj_name)
HDfree(c_obj_name);
+
return ret_value;
}
@@ -1445,36 +1435,34 @@ nh5aget_info_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
int_f *cset, hsize_t_f *data_size )
{
char *c_obj_name = NULL; /* Buffer to hold C string */
- H5_index_t c_idx_type;
- H5_iter_order_t c_order;
- int_f ret_value = 0; /* Return value */
H5A_info_t ainfo;
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ HGOTO_DONE(FAIL)
- c_idx_type = (H5_index_t)*idx_type;
- c_order = (H5_iter_order_t)*order;
/*
* Call H5Ainfo_by_idx function.
*/
- if(H5Aget_info_by_idx((hid_t)*loc_id, c_obj_name, c_idx_type, c_order, (hsize_t)*n,
- &ainfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ 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)
/* Unpack the structure */
-
*corder_valid = 0;
- if(ainfo.corder_valid > 0) *corder_valid = 1;
-
+ if(ainfo.corder_valid > 0)
+ *corder_valid = 1;
*corder = (int_f)ainfo.corder;
*cset = (int_f)ainfo.cset;
*data_size = (hsize_t)ainfo.data_size;
done:
+ if(c_obj_name)
+ HDfree(c_obj_name);
+
return ret_value;
}
@@ -1506,34 +1494,37 @@ nh5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
{
char *c_obj_name = NULL; /* Buffer to hold C string */
char *c_attr_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
H5A_info_t ainfo;
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ HGOTO_DONE(FAIL)
+ if(NULL == (c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)))
+ 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);
+ if(H5Aget_info_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, &ainfo, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL)
/* Unpack the structure */
-
*corder_valid = 0;
- if(ainfo.corder_valid > 0) *corder_valid = 1;
-
+ if(ainfo.corder_valid > 0)
+ *corder_valid = 1;
*corder = (int_f)ainfo.corder;
*cset = (int_f)ainfo.cset;
*data_size = (hsize_t)ainfo.data_size;
done:
+ if(c_obj_name)
+ HDfree(c_obj_name);
+ if(c_attr_name)
+ HDfree(c_attr_name);
+
return ret_value;
}
diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c
index d3983af..4f9d652 100644
--- a/fortran/src/H5Ef.c
+++ b/fortran/src/H5Ef.c
@@ -16,7 +16,7 @@
/* This files contains C stubs for H5E Fortran APIs */
#include "H5f90.h"
-
+#include "H5Eprivate.h"
/*----------------------------------------------------------------------------
* Name: h5eclear_c
@@ -30,18 +30,18 @@
*---------------------------------------------------------------------------*/
int_f
-nh5eclear_c( )
+nh5eclear_c(void)
{
- int ret_val = -1;
- herr_t status;
-
- /*
- * Call H5Eclear function.
- */
- status = H5Eclear2(H5E_DEFAULT);
- if(status < 0) return ret_val;
- ret_val = 0;
- return ret_val;
+ int_f ret_value = 0;
+
+ /*
+ * Call H5Eclear function.
+ */
+ if(H5Eclear2(H5E_DEFAULT) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -59,26 +59,28 @@ nh5eclear_c( )
int_f
nh5eprint_c1(_fcd name, int_f* namelen)
{
- int ret_val = -1;
- herr_t status;
- FILE * file;
- char* c_name;
- size_t c_namelen;
- c_namelen = *namelen;
- c_name = (char*)HD5f2cstring(name, c_namelen);
- if(c_name == NULL) return ret_val;
- file = fopen(c_name, "a");
- if(!file) goto DONE;
- /*
- * Call H5Eprint2 function.
- */
- status = H5Eprint2(H5E_DEFAULT, file);
- if (status >=0 ) ret_val = 0;
- fclose(file);
-
-DONE:
- HDfree(c_name);
- return ret_val;
+ FILE *file = NULL;
+ char *c_name = NULL;
+ int_f ret_value = 0;
+
+ if(NULL == (c_name = (char*)HD5f2cstring(name, (size_t)*namelen)))
+ HGOTO_DONE(FAIL)
+ if(NULL == (file = HDfopen(c_name, "a")))
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Call H5Eprint2 function.
+ */
+ if(H5Eprint2(H5E_DEFAULT, file) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
+ if(file)
+ HDfclose(file);
+ if(c_name)
+ HDfree(c_name);
+
+ return ret_value;
}
@@ -94,17 +96,18 @@ DONE:
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5eprint_c2()
+nh5eprint_c2(void)
{
- int ret_val = -1;
- herr_t status;
-
- /*
- * Call H5Eprint2 function.
- */
- status = H5Eprint2(H5E_DEFAULT, NULL);
- if(status >= 0) ret_val = 0;
- return ret_val;
+ int_f ret_value = 0;
+
+ /*
+ * Call H5Eprint2 function.
+ */
+ if(H5Eprint2(H5E_DEFAULT, NULL) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -121,24 +124,28 @@ nh5eprint_c2()
int_f
nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen)
{
- int ret_val = -1;
- char *c_name = NULL;
- size_t c_namelen;
- hid_t c_error_no;
- c_error_no = (hid_t)*error_no;
-
- c_namelen = (size_t)*namelen;
- if(c_namelen) c_name = (char*) HDmalloc(c_namelen + 1);
-
- /*
- * Call H5Eget_major function.
- */
- H5Eget_msg(c_error_no, NULL, c_name, c_namelen);
- HD5packFstring((char*)c_name, _fcdtocp(name), c_namelen);
-
- if(!strcmp(c_name, "Invalid major error number")) return ret_val;
- ret_val = 0;
- return ret_val;
+ char *c_name = NULL;
+ size_t c_namelen = (size_t)*namelen;
+ int_f ret_value = 0;
+
+ if(c_namelen) {
+ if(NULL == (c_name = (char *)HDmalloc(c_namelen + 1)))
+ HGOTO_DONE(FAIL)
+ } /* end if */
+
+ /*
+ * Call H5Eget_major 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)
+
+done:
+ if(c_name)
+ HDfree(c_name);
+
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -155,24 +162,28 @@ nh5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen)
int_f
nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen)
{
- int ret_val = -1;
- char *c_name = NULL;
- size_t c_namelen;
- hid_t c_error_no;
- c_error_no = (hid_t)*error_no;
-
- c_namelen = (size_t)*namelen;
- if(c_namelen) c_name = (char*) HDmalloc(c_namelen + 1);
-
- /*
- * Call H5Eget_minor function.
- */
- H5Eget_msg(c_error_no, NULL, c_name, c_namelen);
- HD5packFstring((char*)c_name, _fcdtocp(name), c_namelen);
-
- if(!strcmp(c_name, "Invalid minor error number")) return ret_val;
- ret_val = 0;
- return ret_val;
+ char *c_name = NULL;
+ size_t c_namelen = (size_t)*namelen;
+ int_f ret_value = 0;
+
+ if(c_namelen) {
+ if(NULL == (c_name = (char *)HDmalloc(c_namelen + 1)))
+ HGOTO_DONE(FAIL)
+ } /* end if */
+
+ /*
+ * Call H5Eget_minor 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)
+
+done:
+ if(c_name)
+ HDfree(c_name);
+
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -188,13 +199,17 @@ nh5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen)
int_f
nh5eset_auto_c(int_f* printflag)
{
- int ret_val = -1;
- herr_t status = -1;
-
- if (*printflag == 1)
- status = H5Eset_auto2(H5E_DEFAULT, H5Eprint2, stderr);
- else if (*printflag == 0)
- status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
- if (status >= 0) ret_val = 0;
- return ret_val;
+ herr_t status = -1;
+ int_f ret_value = 0;
+
+ if(*printflag == 1)
+ status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr);
+ else if(*printflag == 0)
+ status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
+ if(status < 0)
+ HGOTO_DONE(FAIL)
+
+done:
+ return ret_value;
}
+
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index 2832d44..4d3e31c 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -44,30 +44,30 @@ nh5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *d
_fcd dest_name, size_t_f *dest_namelen,
hid_t_f *lcpl_id, hid_t_f *lapl_id)
{
- char *c_src_name = NULL;
- char *c_dest_name = NULL;
- int ret_value = 0;
+ char *c_src_name = NULL;
+ char *c_dest_name = NULL;
+ int_f ret_value = 0;
- /*
- * Convert FORTRAN name to C name
- */
- if((c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if(NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)))
+ HGOTO_DONE(FAIL)
+ if(NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen)))
+ 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);
+ /*
+ * 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)
done:
- if(c_src_name)
- HDfree(c_src_name);
- if(c_dest_name)
- HDfree(c_dest_name);
+ if(c_src_name)
+ HDfree(c_src_name);
+ if(c_dest_name)
+ HDfree(c_dest_name);
return ret_value;
}
@@ -99,7 +99,7 @@ nh5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, siz
char *c_file_name = NULL;
char *c_obj_name = NULL;
char *c_link_name = NULL;
- int ret_value = 0;
+ int_f ret_value = 0;
/*
* Convert FORTRAN name to C name
@@ -149,7 +149,7 @@ int_f
nh5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id )
{
char *c_name = NULL;
- int ret_value = 0;
+ int_f ret_value = 0;
/*
* Convert FORTRAN name to C name
@@ -195,7 +195,7 @@ nh5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len,
{
char *c_target_path = NULL;
char *c_link_name = NULL;
- int ret_value = 0;
+ int_f ret_value = 0;
/*
* Convert FORTRAN name to C name
@@ -247,7 +247,7 @@ nh5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen,
{
char *c_obj_name = NULL;
char *c_link_name = NULL;
- int ret_value = 0;
+ int_f ret_value = 0;
/*
* Convert FORTRAN name to C name
@@ -400,8 +400,8 @@ nh5lget_info_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
hid_t_f *lapl_id)
{
char *c_link_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
H5L_info_t link_buff;
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
@@ -456,31 +456,26 @@ nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
int_f *link_type, int_f *corder_valid, int_f *corder, int_f *cset, haddr_t_f *address, size_t_f *val_size, hid_t_f *lapl_id)
{
char *c_group_name = NULL; /* Buffer to hold C string */
- H5_index_t c_index_field;
- H5_iter_order_t c_order;
- int_f ret_value = 0; /* Return value */
H5L_info_t link_buff;
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if(NULL == (c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)))
+ HGOTO_DONE(FAIL)
- c_index_field = (H5_index_t)*index_field;
- c_order = (H5_iter_order_t)*order;
/*
* Call H5Linfo_by_idx function.
*/
- if(H5Lget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
+ if(H5Lget_info_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field, (H5_iter_order_t)*order, (hsize_t)*n,
&link_buff, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ HGOTO_DONE(FAIL)
/* Unpack the structure */
-
*corder_valid = 0;
- if(link_buff.corder_valid > 0) *corder_valid = 1;
-
+ if(link_buff.corder_valid > 0)
+ *corder_valid = 1;
*corder = (int_f)link_buff.corder;
*cset = (int_f)link_buff.cset;
*link_type = (int_f)link_buff.type;
@@ -488,6 +483,9 @@ nh5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
*val_size = (size_t_f)link_buff.u.val_size;
done:
+ if(c_group_name)
+ HDfree(c_group_name);
+
return ret_value;
}
@@ -507,20 +505,14 @@ done:
int_f
nh5lis_registered_c(int_f *link_cls_id)
{
- int_f ret_value = 0; /* Return value */
- H5L_type_t c_link_cls_id; /* User-defined link class identifier */
- htri_t registered; /* registration status */
-
+ int_f ret_value; /* Return value */
- c_link_cls_id = (H5L_type_t)*link_cls_id;
- /*
- * Call H5Lis_registered
- */
- registered = H5Lis_registered(c_link_cls_id);
-
- ret_value = (int_f)registered;
+ /*
+ * Call H5Lis_registered
+ */
+ ret_value = (int_f)H5Lis_registered((H5L_type_t)*link_cls_id);
- return ret_value;
+ return ret_value;
}
@@ -553,18 +545,24 @@ nh5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *d
/*
* Convert FORTRAN name to C name
*/
- if((c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if(NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)))
+ HGOTO_DONE(FAIL)
+ if(NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen)))
+ 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)
+ HDfree(c_src_name);
+ if(c_dest_name)
+ HDfree(c_dest_name);
+
return ret_value;
}
@@ -594,85 +592,43 @@ nh5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
{
char *c_group_name = NULL; /* Buffer to hold C string */
char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
size_t c_size;
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if(NULL == (c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)))
+ HGOTO_DONE(FAIL)
c_size = (size_t)*size + 1;
- /*
- * Allocate buffer to hold name of an attribute
- */
+
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
if ((c_name = HDmalloc(c_size)) == NULL)
- HGOTO_DONE(FAIL);
+ HGOTO_DONE(FAIL)
if((*size = (size_t)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);
+ (H5_iter_order_t)*order, (hsize_t)*n,c_name, c_size, (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL)
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- if(c_name != NULL)
- HD5packFstring(c_name, _fcdtocp(name), c_size-1);
+ if(c_name)
+ HD5packFstring(c_name, _fcdtocp(name), c_size - 1);
+
done:
- if(c_group_name) HDfree(c_group_name);
- if(c_name) HDfree(c_name);
+ if(c_group_name)
+ HDfree(c_group_name);
+ if(c_name)
+ HDfree(c_name);
+
return ret_value;
}
/*----------------------------------------------------------------------------
- * Name: h5lget_val_c
- * Purpose: Call H5Lget_val
- * Inputs:
- * link_loc_id - File or group identifier.
- * link_name - Name of the link for which valrmation is being sought
- * link_namelen - Name length
- * size - Maximum number of characters of link value to be returned.
- * lapl_id - Link access property list
- * Outputs:
- * linkval_buff - The buffer to hold the returned link value.
- *
- * Returns: 0 on success, -1 on failure
- * Programmer: M.S. Breitenfeld
- * March 3, 2008
- * Modifications: N/A
- *---------------------------------------------------------------------------*/
-/* int_f */
-/* nh5lget_val_c (hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, */
-/* size_t_f *size, _fcd linkval_buff, */
-/* hid_t_f *lapl_id) */
-/* { */
-/* char *c_link_name = NULL; /\* Buffer to hold C string *\/ */
-/* int_f ret_value = 0; /\* Return value *\/ */
-/* void *c_linkval_buff = NULL; */
-
-/* /\* */
-/* * Convert FORTRAN name to C name */
-/* *\/ */
-/* if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL) */
-/* HGOTO_DONE(FAIL); */
-/* /\* */
-/* * Call H5Lval function. */
-/* *\/ */
-/* if(H5Lget_val((hid_t)*link_loc_id, c_link_name, &linkval_buff, (size_t)*size, (hid_t)*lapl_id) < 0) */
-/* HGOTO_DONE(FAIL); */
-/* /\* */
-/* * Convert C name to FORTRAN */
-/* *\/ */
-/* HD5packFstring(c_buf, _fcdtocp(buf), c_bufsize-1); */
-
-
-/* done: */
-/* return ret_value; */
-/* } */
-
-
-/*----------------------------------------------------------------------------
* Name: H5Lregistered_c
* Purpose: Call H5Lregistered
* Inputs:
@@ -796,24 +752,25 @@ int_f
nh5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_t_f *size,
void *linkval_buff, hid_t_f *lapl_id)
{
- int_f ret_value = 0; /* Return value */
- char *c_link_name = NULL; /* Buffer to hold C string */
+ char *c_link_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Lget_val
- */
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if(NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
+ HGOTO_DONE(FAIL)
- if(H5Lget_val( (hid_t)*link_loc_id, c_link_name, &linkval_buff, (size_t)*size, (hid_t)*lapl_id )< 0)
- 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)
done:
+ if(c_link_name)
+ HDfree(c_link_name);
+
return ret_value;
}
-
diff --git a/fortran/src/H5Lff.f90 b/fortran/src/H5Lff.f90
index 2f359e9..e38dade 100644
--- a/fortran/src/H5Lff.f90
+++ b/fortran/src/H5Lff.f90
@@ -576,10 +576,10 @@ CONTAINS
! corder - specifies the link’s creation order position.
!f_corder_valid - indicates whether the value in corder is valid.
! link_type - specifies the link class:
-! H5L_LINK_HARD_F - Hard link
-! H5L_LINK_SOFT_F - Soft link
-! H5L_LINK_EXTERNAL_F - External link
-! H5L_LINK_ERROR_ F - Error
+! H5L_TYPE_HARD_F - Hard link
+! H5L_TYPE_SOFT_F - Soft link
+! H5L_TYPE_EXTERNAL_F - External link
+! H5L_TYPE_ERROR_F - Error
! address - If the link is a hard link, address specifies the file address that the link points to
! val_size - If the link is a symbolic link, val_size will be the length of the link value, e.g.,
! the length of the name of the pointed-to object with a null terminator.
@@ -592,7 +592,12 @@ CONTAINS
! Programmer: M. S. Breitenfeld
! February 29, 2008
!
-! Modifications: N/A
+! Modifications:
+! Changed the link_type names to match those in C (bug 1720) from,
+! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F
+! to
+! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F
+! MSB January 8, 2010.
!
!----------------------------------------------------------------------
@@ -609,10 +614,10 @@ CONTAINS
INTEGER, INTENT(OUT) :: corder ! Specifies the link’s creation order position.
LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER, INTENT(OUT) :: link_type ! Specifies the link class:
- ! H5L_LINK_HARD_F - Hard link
- ! H5L_LINK_SOFT_F - Soft link
- ! H5L_LINK_EXTERNAL_F - External link
- ! H5L_LINK_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T), INTENT(OUT) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T), INTENT(OUT) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value, e.g.,
! the length of the name of the pointed-to object with a null terminator.
@@ -691,7 +696,12 @@ CONTAINS
! Programmer: M.S. Breitenfeld
! February 29, 2008
!
-! Modifications: N/A
+! Modifications:
+! Changed the link_type names to match those in C (bug 1720) from,
+! H5L_LINK_HARD_F, H5L_LINK_SOFT_F,H5L_LINK_EXTERNAL_F,H5L_LINK_ERROR_F
+! to
+! H5L_TYPE_HARD_F, H5L_TYPE_SOFT_F,H5L_TYPE_EXTERNAL_F,H5L_TYPE_ERROR_F
+! MSB January 8, 2010.
!
!----------------------------------------------------------------------
SUBROUTINE h5lget_info_by_idx_f(loc_id, group_name, index_field, order, n, &
@@ -711,10 +721,10 @@ CONTAINS
! H5_ITER_NATIVE_F - No particular order, whatever is fastest
INTEGER(HSIZE_T), INTENT(IN) :: n ! Attribute’s position in index
INTEGER, INTENT(OUT) :: link_type ! Specifies the link class:
- ! H5L_LINK_HARD_F - Hard link
- ! H5L_LINK_SOFT_F - Soft link
- ! H5L_LINK_EXTERNAL_F - External link
- ! H5L_LINK_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
LOGICAL, INTENT(OUT) :: f_corder_valid ! Indicates whether the creation order data is valid for this attribute
INTEGER, INTENT(OUT) :: corder ! Is a positive integer containing the creation order of the attribute
INTEGER, INTENT(OUT) :: cset ! Indicates the character set used for the attribute’s name
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 0929d7a..ee2145d 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -17,6 +17,7 @@
/* This files contains C stubs for H5P Fortran APIs */
#include "H5f90.h"
+#include "H5Eprivate.h"
/*----------------------------------------------------------------------------
* Name: h5pcreate_c
@@ -32,16 +33,17 @@
int_f
nh5pcreate_c ( hid_t_f *class, hid_t_f *prp_id )
{
- hid_t c_class;
- int ret_value = 0;
- hid_t c_prp_id;
+ hid_t c_prp_id;
+ int_f ret_value = 0;
- c_class = (hid_t)*class;
- c_prp_id = H5Pcreate(c_class);
+ c_prp_id = H5Pcreate((hid_t)*class);
+ if(c_prp_id < 0)
+ HGOTO_DONE(FAIL)
- if ( c_prp_id < 0 ) ret_value = -1;
- *prp_id = (hid_t_f)c_prp_id;
- return ret_value;
+ *prp_id = (hid_t_f)c_prp_id;
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -57,11 +59,12 @@ nh5pcreate_c ( hid_t_f *class, hid_t_f *prp_id )
int_f
nh5pclose_c ( hid_t_f *prp_id )
{
- int ret_value = 0;
- hid_t c_prp_id=(*prp_id);
+ int_f ret_value = 0;
- if ( H5Pclose(c_prp_id) < 0 ) ret_value = -1;
- return ret_value;
+ if(H5Pclose((hid_t)*prp_id) < 0)
+ ret_value = -1;
+
+ return ret_value;
}
@@ -79,15 +82,17 @@ nh5pclose_c ( hid_t_f *prp_id )
int_f
nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id)
{
- int ret_value = 0;
- hid_t c_prp_id;
- hid_t c_new_prp_id;
+ hid_t c_new_prp_id;
+ int_f ret_value = 0;
- c_prp_id = *prp_id;
- c_new_prp_id = H5Pcopy(c_prp_id);
- if ( c_new_prp_id < 0 ) ret_value = -1;
- *new_prp_id = (hid_t_f)c_new_prp_id;
- return ret_value;
+ c_new_prp_id = H5Pcopy((hid_t)*prp_id);
+ if(c_new_prp_id < 0)
+ HGOTO_DONE(FAIL)
+
+ *new_prp_id = (hid_t_f)c_new_prp_id;
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -105,17 +110,17 @@ nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id)
int_f
nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag)
{
- int ret_value = 0;
- hid_t c_plist1_id;
- hid_t c_plist2_id;
- htri_t c_c_flag;
-
- c_plist1_id = (hid_t)*plist1_id;
- c_plist2_id = (hid_t)*plist2_id;
- c_c_flag = H5Pequal(c_plist1_id, c_plist2_id);
- if ( c_c_flag < 0 ) ret_value = -1;
- *c_flag = (int_f)c_c_flag;
- return ret_value;
+ htri_t c_c_flag;
+ int_f ret_value = 0;
+
+ c_c_flag = H5Pequal((hid_t)*plist1_id, (hid_t)*plist2_id);
+ if(c_c_flag < 0)
+ HGOTO_DONE(FAIL)
+
+ *c_flag = (int_f)c_c_flag;
+
+done:
+ return ret_value;
}
@@ -139,20 +144,19 @@ nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag)
int_f
nh5pget_class_c ( hid_t_f *prp_id , int_f *classtype)
{
- int ret_value = 0;
- hid_t c_prp_id;
- hid_t c_classtype;
+ hid_t c_classtype;
+ int_f ret_value = 0;
- c_prp_id = *prp_id;
- c_classtype = H5Pget_class(c_prp_id);
- if (c_classtype == H5P_ROOT ) {
+ c_classtype = H5Pget_class((hid_t)*prp_id);
+ if(c_classtype == H5P_ROOT) {
*classtype = H5P_ROOT;
- ret_value = -1;
- return ret_value;
- }
- *classtype = (int_f)c_classtype;
+ HGOTO_DONE(FAIL)
+ }
- return ret_value;
+ *classtype = (int_f)c_classtype;
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -3962,33 +3966,39 @@ nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
int_f
nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size)
{
- int_f ret_value = -1;
- char *c_expression = NULL; /* Buffer to hold C string */
- size_t c_expression_len;
- ssize_t ret;
+ char *c_expression = NULL; /* Buffer to hold C string */
+ size_t c_expression_len;
+ ssize_t ret;
+ int_f ret_value = 0;
+ c_expression_len = (size_t)*expression_len + 1;
- c_expression_len = (size_t)*expression_len + 1;
+ /*
+ * Allocate memory to store the expression.
+ */
+ if(c_expression_len) {
+ c_expression = (char*)HDmalloc(c_expression_len);
+ if(NULL == c_expression)
+ HGOTO_DONE(FAIL)
+ } /* end if */
- /* should expression_len be size_t_f? */
- /*
- * Allocate memory to store the expression.
- */
- if( c_expression_len) c_expression = (char*) HDmalloc(c_expression_len);
- if (c_expression == NULL) return ret_value;
+ /*
+ * Call H5Pget_data_transform function.
+ */
+ ret = H5Pget_data_transform((hid_t)*plist_id, c_expression, c_expression_len);
+ if(ret < 0)
+ HGOTO_DONE(FAIL)
- /*
- * Call h5pget_data_transform function.
- */
- ret = H5Pget_data_transform((hid_t)*plist_id, c_expression, c_expression_len);
- if(ret < 0) return ret_value;
- /* or strlen ? */
- HD5packFstring(c_expression, _fcdtocp(expression), c_expression_len-1);
+ /* or strlen ? */
+ HD5packFstring(c_expression, _fcdtocp(expression), c_expression_len - 1);
- *size = (size_t_f)ret;
+ *size = (size_t_f)ret;
- ret_value = 0;
- return ret_value;
+done:
+ if(c_expression)
+ HDfree(c_expression);
+
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -4012,23 +4022,24 @@ nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_l
int_f
nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len)
{
- int_f ret_value = -1; /* Return value */
char* c_expression = NULL; /* Buffer to hold C string */
- herr_t ret;
+ int_f ret_value = 0; /* Return value */
+
/*
* Convert FORTRAN name to C name
*/
if(NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len)))
- return ret_value;
+ HGOTO_DONE(FAIL)
+
/*
- * Call h5pset_data_transform function.
+ * Call H5Pset_data_transform function.
*/
- ret = H5Pset_data_transform((hid_t)*plist_id, c_expression);
- if(ret<0) return ret_value;
+ if(H5Pset_data_transform((hid_t)*plist_id, c_expression) < 0)
+ HGOTO_DONE(FAIL)
- ret_value = 0;
- if(c_expression)
- HDfree(c_expression);
+done:
+ if(c_expression)
+ HDfree(c_expression);
return ret_value;
}
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index da3db6e..9b0356f 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -14,6 +14,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "H5f90.h"
+#include "H5Eprivate.h"
/*----------------------------------------------------------------------------
* Name: h5screate_simple_c
@@ -31,37 +32,30 @@
int_f
nh5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id )
{
- int ret_value = -1;
- hsize_t *c_dims;
- hsize_t *c_maxdims;
- hid_t c_space_id;
- int i;
-
- c_dims = malloc(sizeof(hsize_t) * (*rank ));
- if (!c_dims) return ret_value;
- c_maxdims = malloc(sizeof(hsize_t) * (*rank ));
- if (!c_maxdims) return ret_value;
-
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order
- */
- for (i = 0; i < *rank ; i++) {
- c_dims[i] = dims[*rank - i - 1];
- c_maxdims[i] = maxdims[*rank - i - 1];
- }
-
- c_space_id = H5Screate_simple(*rank, c_dims, c_maxdims);
- if (c_space_id < 0) return ret_value;
-
- *space_id = (hid_t_f)c_space_id;
- ret_value = 0;
- HDfree (c_dims);
- HDfree (c_maxdims);
- return ret_value;
+ hsize_t c_dims[H5S_MAX_RANK];
+ hsize_t c_maxdims[H5S_MAX_RANK];
+ hid_t c_space_id;
+ int i;
+ int_f ret_value = 0;
+
+ /*
+ * Transpose dimension arrays because of C-FORTRAN storage order
+ */
+ for(i = 0; i < *rank ; i++) {
+ c_dims[i] = dims[*rank - i - 1];
+ c_maxdims[i] = maxdims[*rank - i - 1];
+ } /* end for */
+
+ c_space_id = H5Screate_simple(*rank, c_dims, c_maxdims);
+ if(c_space_id < 0)
+ HGOTO_DONE(FAIL)
+
+ *space_id = (hid_t_f)c_space_id;
+
+done:
+ return ret_value;
}
-
-
/*----------------------------------------------------------------------------
* Name: h5sclose_c
* Purpose: Call H5Sclose to close the dataspace
@@ -282,33 +276,27 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock,
int_f
nh5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end)
{
- int ret_value = -1;
- hid_t c_space_id;
- hsize_t* c_start, *c_end;
- int i, rank;
-
- c_space_id = *space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if (rank < 0 ) return ret_value;
-
- c_start =(hsize_t*) malloc(sizeof(hsize_t)*rank);
- if (!c_start) return ret_value;
-
- c_end = (hsize_t*)malloc(sizeof(hsize_t)*rank);
- if(!c_end) return ret_value;
-
- ret_value = H5Sget_select_bounds(c_space_id, c_start, c_end);
- for(i = 0; i < rank; i++)
- {
- start[i] = (hsize_t_f)(c_start[rank-i-1]+1);
- end[i] = (hsize_t_f)(c_end[rank-i-1]+1);
- }
- if (ret_value >= 0 ) ret_value = 0;
-
- HDfree(c_start);
- HDfree(c_end);
-
- return ret_value;
+ hid_t c_space_id;
+ hsize_t c_start[H5S_MAX_RANK];
+ hsize_t c_end[H5S_MAX_RANK];
+ int i, rank;
+ int_f ret_value = 0;
+
+ c_space_id = *space_id;
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if(rank < 0 )
+ HGOTO_DONE(FAIL)
+
+ if(H5Sget_select_bounds(c_space_id, c_start, c_end) < 0)
+ HGOTO_DONE(FAIL)
+
+ for(i = 0; i < rank; i++) {
+ start[i] = (hsize_t_f)(c_start[rank - i - 1] + 1);
+ end[i] = (hsize_t_f)(c_end[rank - i - 1] + 1);
+ } /* end for */
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -574,29 +562,28 @@ nh5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype)
int_f
nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset)
{
- int ret_value = -1;
- hid_t c_space_id;
- int rank;
- hssize_t *c_offset;
- herr_t status;
- int i;
-
- c_space_id = *space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if (rank < 0) return ret_value;
-
- c_offset = malloc(sizeof(hssize_t)*rank);
- if (!c_offset) return ret_value;
-
- /*
- * Reverse dimensions due to C-FORTRAN storage order.
- */
- for (i=0; i < rank; i++) c_offset[i] = offset[rank - i - 1];
-
- status = H5Soffset_simple(c_space_id, c_offset);
- if ( status >= 0 ) ret_value = 0;
- HDfree(c_offset);
- return ret_value;
+ hid_t c_space_id;
+ int rank;
+ hssize_t c_offset[H5S_MAX_RANK];
+ int i;
+ int_f ret_value = 0;
+
+ c_space_id = *space_id;
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if(rank < 0)
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Reverse dimensions due to C-FORTRAN storage order.
+ */
+ for(i = 0; i < rank; i++)
+ c_offset[i] = offset[rank - i - 1];
+
+ if(H5Soffset_simple(c_space_id, c_offset) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -616,35 +603,24 @@ nh5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset)
int_f
nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size)
{
- int ret_value = -1;
- hid_t c_space_id;
- int c_rank;
- hsize_t *c_current_size;
- hsize_t *c_maximum_size;
- herr_t status;
- int i;
-
- c_current_size = malloc(sizeof(hsize_t)*(*rank));
- if (!c_current_size) return ret_value;
-
- c_maximum_size = malloc(sizeof(hsize_t)*(*rank));
- if (!c_maximum_size) return ret_value;
-
- /*
- * Reverse dimensions due to C-FORTRAN storage order.
- */
- for (i=0; i < *rank; i++) {
- c_current_size[i] = (hsize_t)current_size[*rank - i - 1];
- c_maximum_size[i] = (hsize_t)maximum_size[*rank - i - 1];
- }
-
- c_space_id = *space_id;
- c_rank = *rank;
- status = H5Sset_extent_simple(c_space_id, c_rank, c_current_size, c_maximum_size);
- if ( status >= 0 ) ret_value = 0;
- HDfree(c_current_size);
- HDfree(c_maximum_size);
- return ret_value;
+ hsize_t c_current_size[H5S_MAX_RANK];
+ hsize_t c_maximum_size[H5S_MAX_RANK];
+ int i;
+ int_f ret_value = 0;
+
+ /*
+ * Reverse dimensions due to C-FORTRAN storage order.
+ */
+ for(i = 0; i < *rank; i++) {
+ c_current_size[i] = (hsize_t)current_size[*rank - i - 1];
+ c_maximum_size[i] = (hsize_t)maximum_size[*rank - i - 1];
+ } /* end for */
+
+ if(H5Sset_extent_simple((hid_t)*space_id, (int)*rank, c_current_size, c_maximum_size) < 0)
+ HGOTO_DONE(FAIL)
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -663,37 +639,33 @@ nh5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_si
int_f
nh5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims)
{
- int ret_value = -1;
- hid_t c_space_id;
- hsize_t *c_dims;
- hsize_t *c_maxdims;
- int status;
- int rank;
- int i;
-
- c_space_id = *space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if (rank < 0) return ret_value;
-
- c_dims = malloc(sizeof(hsize_t)*rank);
- if (!c_dims) return ret_value;
-
- c_maxdims = malloc(sizeof(hsize_t)*rank);
- if (!c_maxdims) return ret_value;
-
- status = H5Sget_simple_extent_dims(c_space_id, c_dims, c_maxdims);
- /*
- * Reverse dimensions due to C-FORTRAN storage order.
- */
- for (i=0; i < rank; i++) {
- dims[rank - i - 1] = (hsize_t_f)c_dims[i];
- maxdims[rank - i - 1] = (hsize_t_f)c_maxdims[i];
- }
-
- if ( status >= 0 ) ret_value = rank;
- HDfree(c_dims);
- HDfree(c_maxdims);
- return ret_value;
+ hid_t c_space_id;
+ hsize_t c_dims[H5S_MAX_RANK];
+ hsize_t c_maxdims[H5S_MAX_RANK];
+ int rank;
+ int i;
+ int_f ret_value;
+
+ c_space_id = *space_id;
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if(rank < 0)
+ HGOTO_DONE(FAIL)
+
+ if(H5Sget_simple_extent_dims(c_space_id, c_dims, c_maxdims) < 0)
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Reverse dimensions due to C-FORTRAN storage order.
+ */
+ for(i = 0; i < rank; i++) {
+ dims[rank - i - 1] = (hsize_t_f)c_dims[i];
+ maxdims[rank - i - 1] = (hsize_t_f)c_maxdims[i];
+ } /* end for */
+
+ ret_value = rank;
+
+done:
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -792,61 +764,37 @@ nh5sset_extent_none_c ( hid_t_f *space_id )
int_f
nh5sselect_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block)
{
- int ret_value = -1;
- hid_t c_space_id;
- hsize_t *c_start = NULL;
- hsize_t *c_count = NULL;
- hsize_t *c_stride = NULL;
- hsize_t *c_block = NULL;
-
- H5S_seloper_t c_op;
- herr_t status;
- int rank;
- int i;
-
- rank = H5Sget_simple_extent_ndims(*space_id);
- if (rank < 0 ) return ret_value;
- c_start = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_start == NULL) goto DONE;
-
- c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_count == NULL) goto DONE;
-
- c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_stride == NULL) goto DONE;
-
- c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
- if (c_block == NULL) goto DONE;
-
-
- /*
- * Reverse dimensions due to C-FORTRAN storage order.
- */
-
- for (i=0; i < rank; i++) {
- int t= (rank - i) - 1;
- c_start[i] = (hsize_t)start[t];
- c_count[i] = (hsize_t)count[t];
- c_stride[i] = (hsize_t)stride[t];
- c_block[i] = (hsize_t)block[t];
- }
-
- c_op = (H5S_seloper_t)*op;
-/*
- if (*op == H5S_SELECT_SET_F) c_op = H5S_SELECT_SET;
- if (*op == H5S_SELECT_OR_F) c_op = H5S_SELECT_OR;
-*/
-
- c_space_id = *space_id;
- status = H5Sselect_hyperslab(c_space_id, c_op, c_start, c_stride, c_count, c_block);
- if ( status >= 0 ) ret_value = 0;
-DONE:
- if(c_start != NULL) HDfree(c_start);
- if(c_count != NULL) HDfree(c_count);
- if(c_stride!= NULL) HDfree(c_stride);
- if(c_block != NULL) HDfree(c_block);
- return ret_value;
+ hsize_t c_start[H5S_MAX_RANK];
+ hsize_t c_count[H5S_MAX_RANK];
+ hsize_t c_stride[H5S_MAX_RANK];
+ hsize_t c_block[H5S_MAX_RANK];
+ int rank;
+ int i;
+ int_f ret_value = 0;
+
+ rank = H5Sget_simple_extent_ndims((hid_t)*space_id);
+ if(rank < 0 )
+ HGOTO_DONE(FAIL)
+
+ /*
+ * Reverse dimensions due to C-FORTRAN storage order.
+ */
+ for(i = 0; i < rank; i++) {
+ int t = (rank - i) - 1;
+
+ c_start[i] = (hsize_t)start[t];
+ c_count[i] = (hsize_t)count[t];
+ c_stride[i] = (hsize_t)stride[t];
+ c_block[i] = (hsize_t)block[t];
+ } /* 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)
+
+done:
+ return ret_value;
}
+
#ifdef NEW_HYPERSLAB_API
/*----------------------------------------------------------------------------
* Name: h5scombine_hyperslab_c
diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90
index 28d00f7..da21f6e 100644
--- a/fortran/src/H5f90global.f90
+++ b/fortran/src/H5f90global.f90
@@ -473,10 +473,10 @@ MODULE H5GLOBAL
INTEGER, PARAMETER :: H5L_FLAGS_LEN = 6
INTEGER :: H5L_flags(H5L_FLAGS_LEN)
- INTEGER :: H5L_LINK_ERROR_F
- INTEGER :: H5L_LINK_HARD_F
- INTEGER :: H5L_LINK_SOFT_F
- INTEGER :: H5L_LINK_EXTERNAL_F
+ INTEGER :: H5L_TYPE_ERROR_F
+ INTEGER :: H5L_TYPE_HARD_F
+ INTEGER :: H5L_TYPE_SOFT_F
+ INTEGER :: H5L_TYPE_EXTERNAL_F
INTEGER :: H5L_SAME_LOC_F
INTEGER :: H5L_LINK_CLASS_T_VERS_F
@@ -485,10 +485,10 @@ MODULE H5GLOBAL
!DEC$endif
COMMON /H5L_FLAGS/ H5L_flags
- EQUIVALENCE(H5L_flags(1), H5L_LINK_ERROR_F)
- EQUIVALENCE(H5L_flags(2), H5L_LINK_HARD_F)
- EQUIVALENCE(H5L_flags(3), H5L_LINK_SOFT_F)
- EQUIVALENCE(H5L_flags(4), H5L_LINK_EXTERNAL_F)
+ EQUIVALENCE(H5L_flags(1), H5L_TYPE_ERROR_F)
+ EQUIVALENCE(H5L_flags(2), H5L_TYPE_HARD_F)
+ EQUIVALENCE(H5L_flags(3), H5L_TYPE_SOFT_F)
+ EQUIVALENCE(H5L_flags(4), H5L_TYPE_EXTERNAL_F)
EQUIVALENCE(H5L_flags(5), H5L_SAME_LOC_F)
EQUIVALENCE(H5L_flags(6), H5L_LINK_CLASS_T_VERS_F)
!
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 7138639..31b08ac 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -385,12 +385,12 @@ CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
-# We use RUNTESTS instead of RUNSERIAL directly because it may be that
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
-RUNTESTS = $(RUNSERIAL)
+RUNEXEC = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
@@ -424,7 +424,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog
# Add libtool shared library version numbers to the HDF5 library
# See libtool versioning documentation online.
LT_VERS_INTERFACE = 6
-LT_VERS_REVISION = 44
+LT_VERS_REVISION = 49
LT_VERS_AGE = 0
# Include src directory in both Fortran and C flags (C compiler is used
@@ -1087,7 +1087,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
- $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
@@ -1158,7 +1158,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
- RUNTESTS="$(RUNPARALLEL)" || exit 1; \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index df52971..db44600 100755
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -36,6 +36,10 @@ HL="@HL@"
## ##
############################################################################
+# Constants definitions
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
host_os="@host_os@"
prog_name="`basename $0`"
@@ -89,7 +93,7 @@ usage() {
echo " HDF5_FC - use a different Fortran 90 or 95 compiler"
echo " HDF5_FLINKER - use a different linker"
echo " "
- exit 1
+ exit $EXIT_FAILURE
}
# Show the configuration summary of the library recorded in the
@@ -101,7 +105,7 @@ showconfigure()
}
# Main
-status=0
+status=$EXIT_SUCCESS
if test "$#" = "0"; then
# No parameters specified, issue usage statement and exit.
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 7d5009a..f586adb 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -366,12 +366,12 @@ CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
-# We use RUNTESTS instead of RUNSERIAL directly because it may be that
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
-RUNTESTS = $(RUNSERIAL)
+RUNEXEC = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
@@ -960,7 +960,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
- $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
@@ -1031,7 +1031,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
- RUNTESTS="$(RUNPARALLEL)" || exit 1; \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \
diff --git a/fortran/test/t.c b/fortran/test/t.c
index 861a3e7..f2203d0 100644
--- a/fortran/test/t.c
+++ b/fortran/test/t.c
@@ -14,6 +14,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "t.h"
+#include "H5Eprivate.h"
/*----------------------------------------------------------------------------
* Name: h5_fixname_c
@@ -31,35 +32,31 @@
int_f
nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f* fapl, _fcd full_name, size_t_f *full_namelen)
{
- int ret_value = -1;
- char *c_base_name;
- char *c_full_name;
- hid_t c_fapl;
+ char *c_base_name = NULL;
+ char *c_full_name = NULL;
+ int_f ret_value = 0;
/*
- * Define ifile access property list
- */
- c_fapl = (hid_t)*fapl;
- /*
* Convert FORTRAN name to C name
*/
- c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen);
- if (c_base_name == NULL) goto DONE;
- c_full_name = (char *) HDmalloc((size_t)*full_namelen + 1);
- if (c_full_name == NULL) goto DONE;
+ if(NULL == (c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen)))
+ HGOTO_DONE(FAIL)
+ if(NULL == (c_full_name = (char *)HDmalloc((size_t)*full_namelen + 1)))
+ HGOTO_DONE(FAIL)
/*
* Call h5_fixname function.
*/
- if (NULL != h5_fixname(c_base_name, c_fapl, c_full_name, (size_t)*full_namelen + 1)) {
- HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen);
- ret_value = 0;
- goto DONE;
- }
+ if(NULL == h5_fixname(c_base_name, (hid_t)*fapl, c_full_name, (size_t)*full_namelen + 1))
+ HGOTO_DONE(FAIL)
+ HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen);
+
+done:
+ if(c_base_name)
+ HDfree(c_base_name);
+ if(c_full_name)
+ HDfree(c_full_name);
-DONE:
- if (NULL != c_base_name) HDfree(c_base_name);
- if (NULL != c_full_name) HDfree(c_full_name);
return ret_value;
}
diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.f90
index 9c28f75..725e21b 100644
--- a/fortran/test/tH5G_1_8.f90
+++ b/fortran/test/tH5G_1_8.f90
@@ -646,10 +646,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_LINK_HARD_F - Hard link
- ! H5L_LINK_SOFT_F - Soft link
- ! H5L_LINK_EXTERNAL_F - External link
- ! H5L_LINK_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
@@ -689,7 +689,7 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
! CALL VerifyLogical("H5Lget_info_by_idx_f11", f_corder_valid, .TRUE., total_error)
- CALL VERIFY("H5Lget_info_by_idx_f", H5L_LINK_SOFT_F, link_type, total_error)
+ CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_SOFT_F, link_type, total_error)
CALL VERIFY("H5Lget_info_by_idx_f", cset, H5T_CSET_ASCII_F, total_error)
! should be '/d1' + NULL character = 4
CALL VERIFY("H5Lget_info_by_idx_f", INT(val_size), 4, total_error)
@@ -753,10 +753,10 @@ SUBROUTINE group_info(cleanup, fapl, total_error)
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_LINK_HARD_F - Hard link
- ! H5L_LINK_SOFT_F - Soft link
- ! H5L_LINK_EXTERNAL_F - External link
- ! H5L_LINK_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
@@ -1318,7 +1318,7 @@ SUBROUTINE delete_by_idx(cleanup, fapl, total_error)
CALL VerifyLogical("H5Lget_info_by_idx_f", f_corder_valid, .TRUE., total_error)
- CALL VERIFY("H5Lget_info_by_idx_f", H5L_LINK_HARD_F, link_type, total_error)
+ CALL VERIFY("H5Lget_info_by_idx_f", H5L_TYPE_HARD_F, link_type, total_error)
IF(iorder.EQ.H5_ITER_INC_F)THEN
CALL VERIFY("H5Lget_info_by_idx_f", corder, u+1, total_error)
ELSE
@@ -1511,10 +1511,10 @@ SUBROUTINE link_info_by_idx_check(group_id, linkname, n, &
INTEGER :: corder ! Specifies the link’s creation order position.
LOGICAL :: f_corder_valid ! Indicates whether the value in corder is valid.
INTEGER :: link_type ! Specifies the link class:
- ! H5L_LINK_HARD_F - Hard link
- ! H5L_LINK_SOFT_F - Soft link
- ! H5L_LINK_EXTERNAL_F - External link
- ! H5L_LINK_ERROR _F - Error
+ ! H5L_TYPE_HARD_F - Hard link
+ ! H5L_TYPE_SOFT_F - Soft link
+ ! H5L_TYPE_EXTERNAL_F - External link
+ ! H5L_TYPE_ERROR _F - Error
INTEGER(HADDR_T) :: address ! If the link is a hard link, address specifies the file address that the link points to
INTEGER(SIZE_T) :: val_size ! If the link is a symbolic link, val_size will be the length of the link value
diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in
index edb9a66..6dcf2bd 100644
--- a/fortran/testpar/Makefile.in
+++ b/fortran/testpar/Makefile.in
@@ -319,12 +319,12 @@ CP = cp
# Some machines need a command to run executables; this is that command
# so that our tests will run.
-# We use RUNTESTS instead of RUNSERIAL directly because it may be that
+# We use RUNEXEC instead of RUNSERIAL directly because it may be that
# some tests need to be run with a different command. Older versions
# of the makefiles used the command
# $(LIBTOOL) --mode=execute
# in some directories, for instance.
-RUNTESTS = $(RUNSERIAL)
+RUNEXEC = $(RUNSERIAL)
# Libraries to link to while building
LIBHDF5 = $(top_builddir)/src/libhdf5.la
@@ -762,7 +762,7 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_:
fi; \
echo "============================" >> $${log}; \
srcdir="$(srcdir)" \
- $(TIME) $(RUNTESTS) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
+ $(TIME) $(RUNEXEC) ./$${tname} $(TEST_FLAGS) >> $${log} 2>&1 \
&& touch $(@:.chkexe_=.chkexe) || \
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
(cat $${log} && false) || exit 1; \
@@ -833,7 +833,7 @@ build-check-p: $(LIB) $(PROGS) $(TESTS)
@for test in $(TEST_PROG_PARA) dummy; do \
if test $$test != dummy; then \
$(MAKE) $(AM_MAKEFLAGS) $$test.chkexe_ \
- RUNTESTS="$(RUNPARALLEL)" || exit 1; \
+ RUNEXEC="$(RUNPARALLEL)" || exit 1; \
fi; \
done
@for test in $(TEST_SCRIPT_PARA) dummy; do \