summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Of.c
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/src/H5Of.c
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'fortran/src/H5Of.c')
-rw-r--r--fortran/src/H5Of.c911
1 files changed, 454 insertions, 457 deletions
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index edbfcbe..36dbbac 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -17,76 +17,75 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
-int_f
-fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info);
+int_f fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info);
int_f
-fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) {
-
- /* This function does not used the field parameter because we want
- * this function to fill the unfilled fields with C's default values.
- */
-
- struct tm *ts;
-
- object_info->fileno = Oinfo.fileno;
- object_info->token = Oinfo.token;
-
- object_info->type = (int_f)Oinfo.type;
- object_info->rc = (int_f)Oinfo.rc;
-
- ts = HDgmtime(&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 */
- object_info->atime[2] = (int_f)ts->tm_mday;
- object_info->atime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
- object_info->atime[4] = (int_f)ts->tm_hour;
- object_info->atime[5] = (int_f)ts->tm_min;
- 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);
-
- 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 */
- object_info->btime[2] = (int_f)ts->tm_mday;
- object_info->btime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
- object_info->btime[4] = (int_f)ts->tm_hour;
- object_info->btime[5] = (int_f)ts->tm_min;
- 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);
-
- 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 */
- object_info->ctime[2] = (int_f)ts->tm_mday;
- object_info->ctime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
- object_info->ctime[4] = (int_f)ts->tm_hour;
- object_info->ctime[5] = (int_f)ts->tm_min;
- 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);
-
- 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 */
- object_info->mtime[2] = (int_f)ts->tm_mday;
- object_info->mtime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
- object_info->mtime[4] = (int_f)ts->tm_hour;
- object_info->mtime[5] = (int_f)ts->tm_min;
- object_info->mtime[6] = (int_f)ts->tm_sec;
- object_info->mtime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
-
- object_info->num_attrs = (hsize_t_f)Oinfo.num_attrs;
-
- return 0;
+fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info)
+{
+ /* This function does not used the field parameter because we want
+ * this function to fill the unfilled fields with C's default values.
+ */
+
+ struct tm *ts;
+
+ object_info->fileno = Oinfo.fileno;
+ object_info->token = Oinfo.token;
+
+ object_info->type = (int_f)Oinfo.type;
+ object_info->rc = (int_f)Oinfo.rc;
+
+ ts = HDgmtime(&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 */
+ object_info->atime[2] = (int_f)ts->tm_mday;
+ object_info->atime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
+ object_info->atime[4] = (int_f)ts->tm_hour;
+ object_info->atime[5] = (int_f)ts->tm_min;
+ 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);
+
+ 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 */
+ object_info->btime[2] = (int_f)ts->tm_mday;
+ object_info->btime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
+ object_info->btime[4] = (int_f)ts->tm_hour;
+ object_info->btime[5] = (int_f)ts->tm_min;
+ 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);
+
+ 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 */
+ object_info->ctime[2] = (int_f)ts->tm_mday;
+ object_info->ctime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
+ object_info->ctime[4] = (int_f)ts->tm_hour;
+ object_info->ctime[5] = (int_f)ts->tm_min;
+ 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);
+
+ 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 */
+ object_info->mtime[2] = (int_f)ts->tm_mday;
+ object_info->mtime[3] = 0; /* time is expressed as UTC (or GMT timezone) */
+ object_info->mtime[4] = (int_f)ts->tm_hour;
+ object_info->mtime[5] = (int_f)ts->tm_min;
+ object_info->mtime[6] = (int_f)ts->tm_sec;
+ object_info->mtime[7] = -32767; /* millisecond is not available, assign it -HUGE(0) */
+
+ object_info->num_attrs = (hsize_t_f)Oinfo.num_attrs;
+
+ return 0;
}
/****if* H5Of/h5olink_c
@@ -107,32 +106,31 @@ fill_h5o_info_t_f(H5O_info2_t Oinfo, H5O_info_t_f *object_info) {
* M. Scot Breitenfeld
* April 21, 2008
* SOURCE
-*/
+ */
int_f
-h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id)
+h5olink_c(hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen, hid_t_f *lcpl_id,
+ hid_t_f *lapl_id)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN name to C name
- */
- if( (c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Olink function.
- */
- if((hid_t_f)H5Olink((hid_t)*object_id, (hid_t)*new_loc_id, c_name,
- (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Olink function.
+ */
+ if ((hid_t_f)H5Olink((hid_t)*object_id, (hid_t)*new_loc_id, c_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Of/h5oopen_c
@@ -153,30 +151,30 @@ h5olink_c (hid_t_f *object_id, hid_t_f *new_loc_id, _fcd name, size_t_f *namelen
* M. Scot Breitenfeld
* April 18, 2008
* SOURCE
-*/
+ */
int_f
-h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id)
+h5oopen_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_t_f *obj_id)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oopen function.
- */
- if((*obj_id = (hid_t_f)H5Oopen((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oopen function.
+ */
+ if ((*obj_id = (hid_t_f)H5Oopen((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Of/h5oclose_c
* NAME
@@ -191,18 +189,18 @@ h5oopen_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, hid_
* M. Scot Breitenfeld
* December 17, 2008
* SOURCE
-*/
+ */
int_f
-h5oclose_c ( hid_t_f *object_id )
+h5oclose_c(hid_t_f *object_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- if (H5Oclose((hid_t)*object_id) < 0)
- HGOTO_DONE(FAIL);
+ if (H5Oclose((hid_t)*object_id) < 0)
+ HGOTO_DONE(FAIL);
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Of/h5ovisit_c
@@ -228,24 +226,25 @@ h5oclose_c ( hid_t_f *object_id )
* M. Scot Breitenfeld
* November 19, 2008
* SOURCE
-*/
+ */
int_f
-h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate2_t op,
- void *op_data, int_f *fields )
+h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate2_t op, void *op_data,
+ int_f *fields)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t func_ret_value; /* H5Linterate return value */
+ int_f ret_value = -1; /* Return value */
+ herr_t func_ret_value; /* H5Linterate return value */
- /*
- * Call H5Ovisit
- */
+ /*
+ * Call H5Ovisit
+ */
- func_ret_value = H5Ovisit3( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data, (unsigned)*fields);
+ func_ret_value = H5Ovisit3((hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op,
+ op_data, (unsigned)*fields);
- ret_value = (int_f)func_ret_value;
+ ret_value = (int_f)func_ret_value;
- return ret_value;
+ return ret_value;
}
/****if* H5Of/h5oopen_by_token_c
@@ -266,21 +265,21 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate2_t op
* M. Scot Breitenfeld
* September 14, 2009
* SOURCE
-*/
+ */
int_f
h5oopen_by_token_c(hid_t_f *loc_id, H5O_token_t *token, hid_t_f *obj_id)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Oopen_by_token function.
- */
- if((*obj_id = (hid_t_f)H5Oopen_by_token((hid_t)*loc_id, *token)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Oopen_by_token function.
+ */
+ if ((*obj_id = (hid_t_f)H5Oopen_by_token((hid_t)*loc_id, *token)) < 0)
+ HGOTO_DONE(FAIL);
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Of/H5Oget_info_by_name_c
@@ -303,35 +302,34 @@ h5oopen_by_token_c(hid_t_f *loc_id, H5O_token_t *token, hid_t_f *obj_id)
* M. Scot Breitenfeld
* December 1, 2008
* SOURCE
-*/
+ */
int_f
-h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
- H5O_info_t_f *object_info, int_f *fields)
+h5oget_info_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
+ H5O_info_t_f *object_info, int_f *fields)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
- H5O_info2_t Oinfo;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oinfo_by_name function.
- */
- if(H5Oget_info_by_name3((hid_t)*loc_id, c_name,
- &Oinfo, (unsigned)*fields, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- ret_value = fill_h5o_info_t_f(Oinfo, object_info);
-
- done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ char * c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ H5O_info2_t Oinfo;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oinfo_by_name function.
+ */
+ if (H5Oget_info_by_name3((hid_t)*loc_id, c_name, &Oinfo, (unsigned)*fields, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+ ret_value = fill_h5o_info_t_f(Oinfo, object_info);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Of/H5Oget_info_by_idx_c
@@ -354,40 +352,40 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
* M. Scot Breitenfeld
* December 1, 2008
* SOURCE
-*/
+ */
int_f
-h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info, int_f *fields)
+h5oget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *namelen, int_f *index_field, int_f *order,
+ hsize_t_f *n, hid_t_f *lapl_id, H5O_info_t_f *object_info, int_f *fields)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
- H5O_info2_t Oinfo;
- H5_index_t c_index_field;
- H5_iter_order_t c_order;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_group_name = HD5f2cstring( group_name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- c_index_field = (H5_index_t)*index_field;
- c_order = (H5_iter_order_t)*order;
-
- /*
- * Call H5Oinfo_by_idx function.
- */
- if(H5Oget_info_by_idx3((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
- &Oinfo, (unsigned)*fields, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- ret_value = fill_h5o_info_t_f(Oinfo,object_info);
-
- done:
- if(c_group_name)
- HDfree(c_group_name);
- return ret_value;
+ char * c_group_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ H5O_info2_t Oinfo;
+ H5_index_t c_index_field;
+ H5_iter_order_t c_order;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ c_index_field = (H5_index_t)*index_field;
+ c_order = (H5_iter_order_t)*order;
+
+ /*
+ * Call H5Oinfo_by_idx function.
+ */
+ if (H5Oget_info_by_idx3((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n, &Oinfo,
+ (unsigned)*fields, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+ ret_value = fill_h5o_info_t_f(Oinfo, object_info);
+
+done:
+ if (c_group_name)
+ HDfree(c_group_name);
+ return ret_value;
}
/****if* H5Of/H5Oget_info_c
@@ -407,24 +405,24 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
* M. Scot Breitenfeld
* May 16, 2012
* SOURCE
-*/
+ */
int_f
-h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info, int_f *fields)
+h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info, int_f *fields)
/******/
{
- int_f ret_value = 0; /* Return value */
- H5O_info2_t Oinfo;
+ int_f ret_value = 0; /* Return value */
+ H5O_info2_t Oinfo;
- /*
- * Call H5Oinfo_by_name function.
- */
- if(H5Oget_info3((hid_t)*object_id, &Oinfo, (unsigned)*fields) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Oinfo_by_name function.
+ */
+ if (H5Oget_info3((hid_t)*object_id, &Oinfo, (unsigned)*fields) < 0)
+ HGOTO_DONE(FAIL);
- ret_value = fill_h5o_info_t_f(Oinfo,object_info);
+ ret_value = fill_h5o_info_t_f(Oinfo, object_info);
- done:
- return ret_value;
+done:
+ return ret_value;
}
/* ***if* H5Of/H5Ocopy_c
@@ -448,41 +446,39 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info, int_f *fields)
* M. Scot Breitenfeld
* March 14, 2012
* SOURCE
-*/
+ */
int_f
-h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
- hid_t_f *dst_loc_id, _fcd dst_name, size_t_f *dst_name_len,
- hid_t_f *ocpypl_id, hid_t_f *lcpl_id )
+h5ocopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len, hid_t_f *dst_loc_id, _fcd dst_name,
+ size_t_f *dst_name_len, hid_t_f *ocpypl_id, hid_t_f *lcpl_id)
/******/
{
- char *c_src_name = NULL; /* Buffer to hold C string */
- char *c_dst_name = NULL; /* Buffer to hold C string */
-
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_src_name = HD5f2cstring(src_name, (size_t)*src_name_len)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_dst_name = HD5f2cstring(dst_name, (size_t)*dst_name_len)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Ocopy function.
- */
- if(H5Ocopy( (hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name,
- (hid_t)*ocpypl_id, (hid_t)*lcpl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_src_name)
- HDfree(c_src_name);
- if(c_dst_name)
- HDfree(c_dst_name);
-
- return ret_value;
+ char *c_src_name = NULL; /* Buffer to hold C string */
+ char *c_dst_name = NULL; /* Buffer to hold C string */
+
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_src_name = HD5f2cstring(src_name, (size_t)*src_name_len)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_dst_name = HD5f2cstring(dst_name, (size_t)*dst_name_len)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Ocopy function.
+ */
+ if (H5Ocopy((hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name, (hid_t)*ocpypl_id,
+ (hid_t)*lcpl_id) < 0)
+ HGOTO_DONE(FAIL);
+done:
+ if (c_src_name)
+ HDfree(c_src_name);
+ if (c_dst_name)
+ HDfree(c_dst_name);
+
+ return ret_value;
}
/****if* H5Of/h5ovisit_by_name_c
@@ -508,34 +504,34 @@ h5ocopy_c (hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_name_len,
* M. Scot Breitenfeld
* May 16, 2012
* SOURCE
-*/
+ */
int_f
-h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order,
- H5O_iterate2_t op, void *op_data, hid_t_f *lapl_id, int_f *fields )
+h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f *index_type, int_f *order,
+ H5O_iterate2_t op, void *op_data, hid_t_f *lapl_id, int_f *fields)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t func_ret_value; /* H5Linterate return value */
- char *c_object_name = NULL; /* Buffer to hold C string */
-
- /*
- * Convert FORTRAN name to C name
- */
- if( (c_object_name = HD5f2cstring(object_name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Ovisit_by_name
- */
- func_ret_value = H5Ovisit_by_name3( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
- op, op_data, (unsigned)*fields, (hid_t)*lapl_id);
- ret_value = (int_f)func_ret_value;
-
- done:
- if(c_object_name)
- HDfree(c_object_name);
- return ret_value;
+ int_f ret_value = -1; /* Return value */
+ herr_t func_ret_value; /* H5Linterate return value */
+ char * c_object_name = NULL; /* Buffer to hold C string */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_object_name = HD5f2cstring(object_name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Ovisit_by_name
+ */
+ func_ret_value =
+ H5Ovisit_by_name3((hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order, op,
+ op_data, (unsigned)*fields, (hid_t)*lapl_id);
+ ret_value = (int_f)func_ret_value;
+done:
+ if (c_object_name)
+ HDfree(c_object_name);
+ return ret_value;
}
/****if* H5Of/h5odecr_refcount_c
@@ -551,21 +547,21 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f
* M. Scot Breitenfeld
* May 16, 2012
* SOURCE
-*/
+ */
int_f
-h5odecr_refcount_c (hid_t_f *object_id)
+h5odecr_refcount_c(hid_t_f *object_id)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Odecr_refcount function.
- */
- if((hid_t_f)H5Odecr_refcount((hid_t)*object_id) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Odecr_refcount function.
+ */
+ if ((hid_t_f)H5Odecr_refcount((hid_t)*object_id) < 0)
+ HGOTO_DONE(FAIL);
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Of/h5oexists_by_name_c
@@ -585,30 +581,30 @@ h5odecr_refcount_c (hid_t_f *object_id)
* M. Scot Breitenfeld
* May 17, 2012
* SOURCE
-*/
+ */
int_f
-h5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id)
+h5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oopen function.
- */
- if((ret_value = (int_f)H5Oexists_by_name((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oopen function.
+ */
+ if ((ret_value = (int_f)H5Oexists_by_name((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Of/h5oincr_refcount_c
@@ -624,21 +620,21 @@ h5oexists_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lap
* M. Scot Breitenfeld
* May 16, 2012
* SOURCE
-*/
+ */
int_f
-h5oincr_refcount_c (hid_t_f *object_id)
+h5oincr_refcount_c(hid_t_f *object_id)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- /*
- * Call H5Oincr_refcount function.
- */
- if((hid_t_f)H5Oincr_refcount((hid_t)*object_id) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Oincr_refcount function.
+ */
+ if ((hid_t_f)H5Oincr_refcount((hid_t)*object_id) < 0)
+ HGOTO_DONE(FAIL);
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Of/h5oset_comment_c
@@ -656,30 +652,30 @@ h5oincr_refcount_c (hid_t_f *object_id)
* M. Scot Breitenfeld
* May 17, 2012
* SOURCE
-*/
+ */
int_f
-h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen)
+h5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen)
/******/
{
- char *c_comment = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN string to C string
- */
- if((c_comment = HD5f2cstring(comment, (size_t)*commentlen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oset_comment function.
- */
- if((hid_t_f)H5Oset_comment((hid_t)*object_id, c_comment) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_comment)
- HDfree(c_comment);
- return ret_value;
+ char *c_comment = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_comment = HD5f2cstring(comment, (size_t)*commentlen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oset_comment function.
+ */
+ if ((hid_t_f)H5Oset_comment((hid_t)*object_id, c_comment) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_comment)
+ HDfree(c_comment);
+ return ret_value;
}
/****if* H5Of/h5oset_comment_by_name_c
@@ -701,38 +697,39 @@ h5oset_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentlen)
* M. Scot Breitenfeld
* May 17, 2012
* SOURCE
-*/
+ */
int_f
-h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen, hid_t_f *lapl_id)
+h5oset_comment_by_name_c(hid_t_f *object_id, _fcd name, size_t_f *namelen, _fcd comment, size_t_f *commentlen,
+ hid_t_f *lapl_id)
/******/
{
- char *c_comment = NULL; /* Buffer to hold C string */
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
-
- /*
- * Convert FORTRAN string to C string
- */
- if((c_comment = HD5f2cstring(comment, (size_t)*commentlen)) == NULL)
- HGOTO_DONE(FAIL);
- /*
- * Convert FORTRAN string to C string
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Oset_comment_by_name function.
- */
- if((hid_t_f)H5Oset_comment_by_name((hid_t)*object_id, c_name, c_comment, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_name)
- HDfree(c_name);
- if(c_comment)
- HDfree(c_comment);
- return ret_value;
+ char *c_comment = NULL; /* Buffer to hold C string */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_comment = HD5f2cstring(comment, (size_t)*commentlen)) == NULL)
+ HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Oset_comment_by_name function.
+ */
+ if ((hid_t_f)H5Oset_comment_by_name((hid_t)*object_id, c_name, c_comment, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_name)
+ HDfree(c_name);
+ if (c_comment)
+ HDfree(c_comment);
+ return ret_value;
}
/****if* H5Of/h5oopen_by_idx_c
* NAME
@@ -755,36 +752,37 @@ h5oset_comment_by_name_c (hid_t_f *object_id, _fcd name, size_t_f *namelen, _fc
* M. Scot Breitenfeld
* May 17, 2012
* SOURCE
-*/
+ */
int_f
-h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id)
+h5oopen_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_type, int_f *order,
+ hsize_t_f *n, hid_t_f *obj_id, hid_t_f *lapl_id)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0;
- H5_index_t c_index_type;
- H5_iter_order_t c_order;
-
- /*
- * Convert FORTRAN string to C string
- */
- if((c_group_name = HD5f2cstring( group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- c_index_type = (H5_index_t)*index_type;
- c_order = (H5_iter_order_t)*order;
-
- /*
- * Call H5Oopen_by_idx function.
- */
- if((*obj_id =(hid_t_f)H5Oopen_by_idx((hid_t)*loc_id, c_group_name, c_index_type, c_order, (hsize_t)*n, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_group_name)
- HDfree(c_group_name);
- return ret_value;
+ char * c_group_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0;
+ H5_index_t c_index_type;
+ H5_iter_order_t c_order;
+
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ c_index_type = (H5_index_t)*index_type;
+ c_order = (H5_iter_order_t)*order;
+
+ /*
+ * Call H5Oopen_by_idx function.
+ */
+ if ((*obj_id = (hid_t_f)H5Oopen_by_idx((hid_t)*loc_id, c_group_name, c_index_type, c_order, (hsize_t)*n,
+ (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_group_name)
+ HDfree(c_group_name);
+ return ret_value;
}
/****if* H5Of/h5oget_comment_c
@@ -804,43 +802,43 @@ h5oopen_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
* M. Scot Breitenfeld
* June 24, 2012
* SOURCE
-*/
+ */
int_f
-h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize)
+h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize)
/******/
{
- char *c_comment = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
- size_t c_commentsize;
+ char * c_comment = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ size_t c_commentsize;
- c_commentsize = (size_t)*commentsize + 1;
+ c_commentsize = (size_t)*commentsize + 1;
- /*
- * Allocate buffer to hold comment name
- */
+ /*
+ * Allocate buffer to hold comment name
+ */
- if(NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
- HGOTO_DONE(FAIL);
+ if (NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Oget_comment function.
- */
+ /*
+ * Call H5Oget_comment function.
+ */
- if((*bufsize = (hssize_t_f)H5Oget_comment((hid_t)*object_id, c_comment, (size_t)*commentsize)) < 0)
- HGOTO_DONE(FAIL);
+ if ((*bufsize = (hssize_t_f)H5Oget_comment((hid_t)*object_id, c_comment, (size_t)*commentsize)) < 0)
+ HGOTO_DONE(FAIL);
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- if(c_comment)
- HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
- return ret_value;
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ if (c_comment)
+ HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
+ return ret_value;
- done:
- if(c_comment)
- HDfree(c_comment);
+done:
+ if (c_comment)
+ HDfree(c_comment);
- return ret_value;
+ return ret_value;
}
/****if* H5Of/h5oget_comment_by_name_c
@@ -860,62 +858,63 @@ h5oget_comment_c (hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssi
* M. Scot Breitenfeld
* July 6, 2012
* SOURCE
-*/
+ */
int_f
-h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
- _fcd comment, size_t_f *commentsize, size_t_f *bufsize, hid_t_f *lapl_id)
+h5oget_comment_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *name_size, _fcd comment, size_t_f *commentsize,
+ size_t_f *bufsize, hid_t_f *lapl_id)
/******/
{
- char *c_comment = NULL; /* Buffer to hold C string */
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
- ssize_t c_bufsize;
- size_t c_commentsize;
+ char * c_comment = NULL; /* Buffer to hold C string */
+ char * c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ ssize_t c_bufsize;
+ size_t c_commentsize;
- /*
- * Convert FORTRAN string to C string
- */
- if((c_name = HD5f2cstring(name, (size_t)*name_size)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN string to C string
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*name_size)) == NULL)
+ HGOTO_DONE(FAIL);
- c_commentsize = (size_t)*commentsize + 1;
+ c_commentsize = (size_t)*commentsize + 1;
- /*
- * Allocate buffer to hold comment name
- */
+ /*
+ * Allocate buffer to hold comment name
+ */
- if(NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
- HGOTO_DONE(FAIL);
+ if (NULL == (c_comment = (char *)HDmalloc(c_commentsize)))
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Oget_comment_by_name function.
- */
+ /*
+ * Call H5Oget_comment_by_name function.
+ */
- if((c_bufsize = H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,(hid_t)*lapl_id )) < 0)
- HGOTO_DONE(FAIL);
+ if ((c_bufsize = H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, (size_t)*commentsize,
+ (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
- if(c_name)
- HDfree(c_name);
+ if (c_name)
+ HDfree(c_name);
- *bufsize = (size_t_f)c_bufsize;
+ *bufsize = (size_t_f)c_bufsize;
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- if(c_comment) {
- HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
- HDfree(c_comment);
- }
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ if (c_comment) {
+ HD5packFstring(c_comment, _fcdtocp(comment), c_commentsize - 1);
+ HDfree(c_comment);
+ }
- return ret_value;
+ return ret_value;
- done:
- if(c_comment)
- HDfree(c_comment);
- if(c_name)
- HDfree(c_name);
+done:
+ if (c_comment)
+ HDfree(c_comment);
+ if (c_name)
+ HDfree(c_name);
- return ret_value;
+ return ret_value;
}
/****if* H5Of/h5otoken_cmp_c
@@ -934,24 +933,22 @@ h5oget_comment_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *name_size,
* Quincey Koziol
* January 10, 2019
* SOURCE
-*/
+ */
int_f
-h5otoken_cmp_c(hid_t_f *loc_id, H5O_token_t *token1, H5O_token_t *token2,
- int_f *cmp_value_f)
+h5otoken_cmp_c(hid_t_f *loc_id, H5O_token_t *token1, H5O_token_t *token2, int_f *cmp_value_f)
/******/
{
- int cmp_value; /* Token comparison result */
- int_f ret_value = 0; /* Return value */
+ int cmp_value; /* Token comparison result */
+ int_f ret_value = 0; /* Return value */
- /* Call H5Otoken_cmp function */
- cmp_value = 0;
- if(H5Otoken_cmp((hid_t)*loc_id, token1, token2, &cmp_value) < 0)
- HGOTO_DONE(FAIL);
+ /* Call H5Otoken_cmp function */
+ cmp_value = 0;
+ if (H5Otoken_cmp((hid_t)*loc_id, token1, token2, &cmp_value) < 0)
+ HGOTO_DONE(FAIL);
- /* Set the comparison value to return */
- *cmp_value_f = cmp_value;
+ /* Set the comparison value to return */
+ *cmp_value_f = cmp_value;
done:
- return ret_value;
+ return ret_value;
}
-