summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-01 14:04:36 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-01 14:04:36 (GMT)
commitf1ba03cea5b82699a984c80bd2deac14fdc8df18 (patch)
treeebe777c3e0b83f4c4cec9212731da9ebe0a0cfd3 /fortran/test
parent10343c197906415388f2a4c8d292e21d25cf7381 (diff)
downloadhdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.zip
hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.tar.gz
hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.tar.bz2
Source formatted
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/t.c110
-rw-r--r--fortran/test/t.h22
2 files changed, 64 insertions, 68 deletions
diff --git a/fortran/test/t.c b/fortran/test/t.c
index 107e8d5..26cb2c0 100644
--- a/fortran/test/t.c
+++ b/fortran/test/t.c
@@ -21,7 +21,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "t.h"
#include "H5Eprivate.h"
@@ -40,34 +40,34 @@
* Modifications:
*---------------------------------------------------------------------------*/
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)
+nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_name, size_t_f *full_namelen)
{
- char *c_base_name = NULL;
- char *c_full_name = NULL;
- int_f ret_value = 0;
+ char *c_base_name = NULL;
+ char *c_full_name = NULL;
+ int_f ret_value = 0;
- /*
- * Convert FORTRAN name to C name
- */
- 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)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ 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, (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);
+ /*
+ * Call h5_fixname function.
+ */
+ 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)
+ if (c_base_name)
HDfree(c_base_name);
- if(c_full_name)
+ if (c_full_name)
HDfree(c_full_name);
- return ret_value;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -82,40 +82,41 @@ done:
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f* fapl)
+nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl)
{
- char filename[1024];
- int ret_value = -1;
- char *c_base_name[1];
- hid_t c_fapl;
+ char filename[1024];
+ int ret_value = -1;
+ char *c_base_name[1];
+ hid_t c_fapl;
- /*
- * Define ifile access property list
- */
- c_fapl = (hid_t)*fapl;
- /*c_fapl = H5Pcreate(H5P_FILE_ACCESS);*/
- /*
- * Convert FORTRAN name to C name
- */
- c_base_name[0] = (char *)HD5f2cstring(base_name, (size_t)*base_namelen);
- if (c_base_name[0] == NULL) goto DONE;
+ /*
+ * Define ifile access property list
+ */
+ c_fapl = (hid_t)*fapl;
+ /*c_fapl = H5Pcreate(H5P_FILE_ACCESS);*/
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_base_name[0] = (char *)HD5f2cstring(base_name, (size_t)*base_namelen);
+ if (c_base_name[0] == NULL)
+ goto DONE;
- /*
- * Call h5_cleanup function.
- */
- /*if (h5_cleanup(c_base_name, c_fapl) != 0) {
- ret_value = 0;
- goto DONE;
- }
+ /*
+ * Call h5_cleanup function.
+ */
+ /*if (h5_cleanup(c_base_name, c_fapl) != 0) {
+ ret_value = 0;
+ goto DONE;
+ }
*/
- h5_fixname(c_base_name[0], c_fapl, filename, sizeof(filename));
- HDremove(filename);
- ret_value =0;
+ h5_fixname(c_base_name[0], c_fapl, filename, sizeof(filename));
+ HDremove(filename);
+ ret_value = 0;
DONE:
- if (NULL != c_base_name[0]) HDfree(c_base_name[0]);
- return ret_value;
-
+ if (NULL != c_base_name[0])
+ HDfree(c_base_name[0]);
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -134,7 +135,7 @@ void
nh5_exit_c(int_f *status)
{
HDexit((int)*status);
-} /* h5_exit_c */
+} /* h5_exit_c */
/*----------------------------------------------------------------------------
* Name: h5_env_nocleanup_c
@@ -150,8 +151,7 @@ nh5_exit_c(int_f *status)
void
nh5_env_nocleanup_c(int_f *status)
{
- *status = (int_f)0;
- if (HDgetenv("HDF5_NOCLEANUP"))
- *status = (int_f)1;
-} /* h5_env_nocleanup_c */
-
+ *status = (int_f)0;
+ if (HDgetenv("HDF5_NOCLEANUP"))
+ *status = (int_f)1;
+} /* h5_env_nocleanup_c */
diff --git a/fortran/test/t.h b/fortran/test/t.h
index 81d2b5d..aa28ef1 100644
--- a/fortran/test/t.h
+++ b/fortran/test/t.h
@@ -21,20 +21,16 @@ char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
/*
* Functions from t.c
*/
-# define nh5_fixname_c H5_FC_FUNC_(h5_fixname_c, H5_FIXNAME_C)
-# define nh5_cleanup_c H5_FC_FUNC_(h5_cleanup_c, H5_CLEANUP_C)
-# define nh5_exit_c H5_FC_FUNC_(h5_exit_c, H5_EXIT_C)
-# define nh5_env_nocleanup_c H5_FC_FUNC_(h5_env_nocleanup_c, H5_ENV_NOCLEANUP_C)
+#define nh5_fixname_c H5_FC_FUNC_(h5_fixname_c, H5_FIXNAME_C)
+#define nh5_cleanup_c H5_FC_FUNC_(h5_cleanup_c, H5_CLEANUP_C)
+#define nh5_exit_c H5_FC_FUNC_(h5_exit_c, H5_EXIT_C)
+#define nh5_env_nocleanup_c H5_FC_FUNC_(h5_env_nocleanup_c, H5_ENV_NOCLEANUP_C)
-H5_FCTESTDLL 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);
+H5_FCTESTDLL 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);
-H5_FCTESTDLL int_f nh5_cleanup_c
-(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl);
+H5_FCTESTDLL int_f nh5_cleanup_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl);
-H5_FCTESTDLL H5_ATTR_NORETURN void nh5_exit_c
-(int_f *status);
-
-H5_FCTESTDLL void nh5_env_nocleanup_c
-(int_f *status);
+H5_FCTESTDLL H5_ATTR_NORETURN void nh5_exit_c(int_f *status);
+H5_FCTESTDLL void nh5_env_nocleanup_c(int_f *status);