summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /fortran/test
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
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);