summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Af.c694
-rw-r--r--fortran/src/H5Df.c1307
-rw-r--r--fortran/src/H5Ef.c98
-rw-r--r--fortran/src/H5Ff.c576
-rw-r--r--fortran/src/H5Gf.c516
-rw-r--r--fortran/src/H5If.c189
-rw-r--r--fortran/src/H5Lf.c516
-rw-r--r--fortran/src/H5Of.c911
-rw-r--r--fortran/src/H5Pf.c3994
-rw-r--r--fortran/src/H5Rf.c270
-rw-r--r--fortran/src/H5Sf.c987
-rw-r--r--fortran/src/H5Tf.c1610
-rw-r--r--fortran/src/H5Zf.c68
-rw-r--r--fortran/src/H5_f.c729
-rw-r--r--fortran/src/H5f90.h6
-rw-r--r--fortran/src/H5f90i.h5
-rw-r--r--fortran/src/H5f90kit.c25
-rw-r--r--fortran/src/H5f90proto.h734
-rw-r--r--fortran/src/H5match_types.c578
-rw-r--r--fortran/test/t.c110
-rw-r--r--fortran/test/t.h22
21 files changed, 7180 insertions, 6765 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 5e5bcc0..b1aca7c 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -44,29 +44,30 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id,
- hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id)
+h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id)
/*******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = HD5f2cstring(name, (size_t)*namelen)))
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL);
- /*
- * Call H5Acreate2 function.
- */
- if((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp, (hid_t)*aapl)) < 0)
+ /*
+ * Call H5Acreate2 function.
+ */
+ if ((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id,
+ (hid_t)*crt_prp, (hid_t)*aapl)) < 0)
HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -88,28 +89,28 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5adelete_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen)
+h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return 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)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
HGOTO_DONE(FAIL);
- /*
- * Call H5Adelete function.
- */
- if(H5Adelete((hid_t)*obj_id, c_name) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Adelete function.
+ */
+ if (H5Adelete((hid_t)*obj_id, c_name) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -132,25 +133,25 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num)
+h5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num)
/******/
{
- H5O_info2_t oinfo; /* Object info */
- int_f ret_value = 0; /* Return value */
+ H5O_info2_t oinfo; /* Object info */
+ int_f ret_value = 0; /* Return value */
/*
* Call H5Oget_info function.
*/
- if(H5Oget_info3((hid_t)*obj_id, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
+ if (H5Oget_info3((hid_t)*obj_id, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_DONE(FAIL);
/* Set number of attributes */
*attr_num = (int_f)oinfo.num_attrs;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5Af/h5aget_name_c
@@ -171,40 +172,40 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf)
/******/
{
- size_t c_bufsize;
- char *c_buf=NULL; /* Buffer to hold C string */
- int_f ret_value=0; /* Return value */
+ size_t c_bufsize;
+ char * c_buf = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- c_bufsize = (size_t)*bufsize+1;
+ c_bufsize = (size_t)*bufsize + 1;
- /*
- * Allocate buffer to hold name of an attribute
- */
- if(NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
- HGOTO_DONE(FAIL);
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
+ if (NULL == (c_buf = (char *)HDmalloc(c_bufsize)))
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Aget_name function
- */
- if ((ret_value = (int_f)H5Aget_name((hid_t)*attr_id, c_bufsize, c_buf)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aget_name function
+ */
+ if ((ret_value = (int_f)H5Aget_name((hid_t)*attr_id, c_bufsize, c_buf)) < 0)
+ HGOTO_DONE(FAIL);
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(buf), c_bufsize-1);
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(buf), c_bufsize - 1);
done:
- if(c_buf) HDfree(c_buf);
- return ret_value;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
-
/****if* H5Af/h5arename_by_name_c
* NAME
* h5arename_by_name_c
@@ -230,39 +231,38 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd old_attr_name, size_t_f *old_attr_namelen,
- _fcd new_attr_name, size_t_f *new_attr_namelen,
- hid_t_f *lapl_id )
+h5arename_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name,
+ size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen,
+ hid_t_f *lapl_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
- char *c_old_attr_name = NULL; /* Buffer to hold C string */
- char *c_new_attr_name = NULL; /* Buffer to hold C string */
- 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_old_attr_name = HD5f2cstring(old_attr_name, (size_t)*old_attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_new_attr_name = HD5f2cstring(new_attr_name, (size_t)*new_attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- if(H5Arename_by_name((hid_t)*loc_id,c_obj_name,c_old_attr_name,c_new_attr_name,(hid_t)*lapl_id) < 0)
+ char *c_obj_name = NULL; /* Buffer to hold C string */
+ char *c_old_attr_name = NULL; /* Buffer to hold C string */
+ char *c_new_attr_name = NULL; /* Buffer to hold C string */
+ 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_old_attr_name = HD5f2cstring(old_attr_name, (size_t)*old_attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_new_attr_name = HD5f2cstring(new_attr_name, (size_t)*new_attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ if (H5Arename_by_name((hid_t)*loc_id, c_obj_name, c_old_attr_name, c_new_attr_name, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
done:
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_old_attr_name)
- HDfree(c_old_attr_name);
- if(c_new_attr_name)
- HDfree(c_new_attr_name);
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_old_attr_name)
+ HDfree(c_old_attr_name);
+ if (c_new_attr_name)
+ HDfree(c_new_attr_name);
return ret_value;
}
@@ -286,28 +286,28 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5aopen_c (hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id)
+h5aopen_c(hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *attr_id)
/******/
{
- char *c_attr_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_attr_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen)) == NULL)
HGOTO_DONE(FAIL);
- /*
- * Call H5Aopen function.
- */
+ /*
+ * Call H5Aopen function.
+ */
- if((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_attr_name, (hid_t)*aapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ if ((*attr_id = (hid_t_f)H5Aopen((hid_t)*obj_id, c_attr_name, (hid_t)*aapl_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_attr_name)
+ if (c_attr_name)
HDfree(c_attr_name);
return ret_value;
}
@@ -334,33 +334,34 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5adelete_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id)
+h5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id)
/******/
{
- 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 */
-
- /*
- * 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);
-
- /*
- * Call H5Adelete_by_name function.
- */
- if(H5Adelete_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ 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 */
+
+ /*
+ * 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);
+
+ /*
+ * Call H5Adelete_by_name function.
+ */
+ if (H5Adelete_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_attr_name)
+ if (c_attr_name)
HDfree(c_attr_name);
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
return ret_value;
}
@@ -387,29 +388,30 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5adelete_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)
+h5adelete_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 */
- int_f ret_value = 0; /* Return value */
+ char *c_obj_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ /*
+ * Convert FORTRAN name to C name
+ */
+ 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, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, (hid_t)*lapl_id) < 0)
+ /*
+ * Call H5Adelete_by_name function.
+ */
+ if (H5Adelete_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order,
+ (hsize_t)*n, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
return ret_value;
@@ -457,51 +459,50 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5aget_name_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, _fcd name,
- size_t_f *size, hid_t_f *lapl_id)
+h5aget_name_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, _fcd name, size_t_f *size, hid_t_f *lapl_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
+ char * c_obj_name = NULL; /* Buffer to hold C string */
ssize_t c_size;
- size_t c_buf_size;
- char *c_buf = NULL;
- int_f ret_value = 0; /* Return value */
+ size_t c_buf_size;
+ char * c_buf = NULL;
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ 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;
- if(NULL == (c_buf = (char *)HDmalloc(c_buf_size)))
+ 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, (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)
+ /*
+ * Call H5Aget_name_by_idx function.
+ */
+ 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)
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(name), c_buf_size - 1);
- *size = (size_t_f)c_size;
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(name), c_buf_size - 1);
+ *size = (size_t_f)c_size;
done:
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_buf)
- HDfree(c_buf);
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_buf)
+ HDfree(c_buf);
return ret_value;
}
@@ -540,29 +541,31 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5aopen_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 )
+h5aopen_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 */
- int_f ret_value = 0; /* Return value */
+ char *c_obj_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ 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, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, (hid_t)*aapl_id, (hid_t)*lapl_id)) < 0)
+ /*
+ * Call H5Aopen_by_idx function.
+ */
+ 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)
+ if (c_obj_name)
HDfree(c_obj_name);
return ret_value;
@@ -590,30 +593,29 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5aget_info_c (hid_t_f *loc_id, int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size )
+h5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset, hsize_t_f *data_size)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
H5A_info_t ainfo;
-
- /*
- * Call H5Aget_info function.
- */
- if(H5Aget_info((hid_t)*loc_id,&ainfo) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aget_info function.
+ */
+ if (H5Aget_info((hid_t)*loc_id, &ainfo) < 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;
+ *corder = (int_f)ainfo.corder;
+ *cset = (int_f)ainfo.cset;
*data_size = (hsize_t_f)ainfo.data_size;
done:
@@ -659,41 +661,40 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5aget_info_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,
- int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size )
+h5aget_info_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, int_f *corder_valid, int_f *corder, int_f *cset,
+ hsize_t_f *data_size)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
+ char * c_obj_name = NULL; /* Buffer to hold C string */
H5A_info_t ainfo;
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Ainfo_by_idx function.
- */
- if(H5Aget_info_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n,
- &ainfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Ainfo_by_idx function.
+ */
+ if (H5Aget_info_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order,
+ (hsize_t)*n, &ainfo, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL)
/* Unpack the structure */
*corder_valid = 0;
- if(ainfo.corder_valid > 0)
+ if (ainfo.corder_valid > 0)
*corder_valid = 1;
- *corder = (int_f)ainfo.corder;
- *cset = (int_f)ainfo.cset;
+ *corder = (int_f)ainfo.corder;
+ *cset = (int_f)ainfo.cset;
*data_size = (hsize_t_f)ainfo.data_size;
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
return ret_value;
@@ -726,45 +727,44 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5aget_info_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id,
- int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size )
+h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid, int_f *corder,
+ int_f *cset, hsize_t_f *data_size)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold C string */
- char *c_attr_name = NULL; /* Buffer to hold C string */
+ char * c_obj_name = NULL; /* Buffer to hold C string */
+ char * c_attr_name = NULL; /* Buffer to hold C string */
H5A_info_t ainfo;
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)))
+ 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)))
+ 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)
+ /*
+ * 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)
/* Unpack the structure */
*corder_valid = 0;
- if(ainfo.corder_valid > 0)
+ if (ainfo.corder_valid > 0)
*corder_valid = 1;
- *corder = (int_f)ainfo.corder;
- *cset = (int_f)ainfo.cset;
+ *corder = (int_f)ainfo.corder;
+ *cset = (int_f)ainfo.cset;
*data_size = (hsize_t_f)ainfo.data_size;
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
- if(c_attr_name)
+ if (c_attr_name)
HDfree(c_attr_name);
return ret_value;
@@ -803,37 +803,37 @@ done:
* SOURCE
*/
int_f
-h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id,
- hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id,
- hid_t_f *lapl_id, hid_t_f *attr_id )
+h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *acpl_id,
+ 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 */
- char *c_attr_name = NULL; /* Buffer to hold C string */
- 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);
-
- /*
- * Call H5Acreate_by_name function.
- */
- if((*attr_id = (hid_t_f)H5Acreate_by_name((hid_t)*loc_id, c_obj_name, c_attr_name,
- (hid_t)*type_id, (hid_t)*space_id,(hid_t)*acpl_id,(hid_t)*aapl_id,(hid_t)*lapl_id )) < 0)
- HGOTO_DONE(FAIL);
+ 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 */
+
+ /*
+ * 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);
+
+ /*
+ * Call H5Acreate_by_name function.
+ */
+ if ((*attr_id = (hid_t_f)H5Acreate_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*type_id,
+ (hid_t)*space_id, (hid_t)*acpl_id, (hid_t)*aapl_id,
+ (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_attr_name)
- HDfree(c_attr_name);
- return ret_value;
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_attr_name)
+ HDfree(c_attr_name);
+ return ret_value;
}
/****if* H5Af/h5aexists_c
@@ -856,28 +856,28 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5aexists_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists)
+h5aexists_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return 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);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Aexists function.
- */
- if((*attr_exists = (hid_t_f)H5Aexists((hid_t)*obj_id, c_name)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Aexists function.
+ */
+ if ((*attr_exists = (hid_t_f)H5Aexists((hid_t)*obj_id, c_name)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -904,34 +904,35 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5aexists_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *lapl_id, int_f *attr_exists)
+h5aexists_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold object name C string */
- char *c_attr_name = NULL; /* Buffer to hold attribute name C string */
- 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);
-
- /*
- * Call H5Aexists_by_name function.
- */
- if((*attr_exists = (int_f)H5Aexists_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ char *c_obj_name = NULL; /* Buffer to hold object name C string */
+ char *c_attr_name = NULL; /* Buffer to hold attribute name C string */
+ 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);
+
+ /*
+ * Call H5Aexists_by_name function.
+ */
+ if ((*attr_exists = (int_f)H5Aexists_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*lapl_id)) <
+ 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
- if(c_attr_name)
+ if (c_attr_name)
HDfree(c_attr_name);
return ret_value;
}
@@ -959,36 +960,37 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id)
+h5aopen_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id)
/******/
{
- char *c_obj_name = NULL; /* Buffer to hold object name C string */
- char *c_attr_name = NULL; /* Buffer to hold attribute name C string */
- 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);
-
- /*
- * Call H5Aopen function.
- */
- if((*attr_id = (hid_t_f)H5Aopen_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*aapl_id, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_attr_name)
- HDfree(c_attr_name);
- return ret_value;
+ char *c_obj_name = NULL; /* Buffer to hold object name C string */
+ char *c_attr_name = NULL; /* Buffer to hold attribute name C string */
+ 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);
+
+ /*
+ * Call H5Aopen function.
+ */
+ if ((*attr_id = (hid_t_f)H5Aopen_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, (hid_t)*aapl_id,
+ (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_attr_name)
+ HDfree(c_attr_name);
+ return ret_value;
}
/****if* H5Af/h5arename_c
@@ -1012,33 +1014,32 @@ h5aopen_by_name_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd a
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5arename_c( hid_t_f *loc_id,
- _fcd old_attr_name, size_t_f *old_attr_namelen,
- _fcd new_attr_name, size_t_f *new_attr_namelen)
+h5arename_c(hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen, _fcd new_attr_name,
+ size_t_f *new_attr_namelen)
/******/
{
- char *c_old_attr_name = NULL; /* Buffer to hold C string */
- char *c_new_attr_name = NULL; /* Buffer to hold C string */
- int_f ret_value=0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_old_attr_name = HD5f2cstring(old_attr_name, (size_t)*old_attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_new_attr_name = HD5f2cstring(new_attr_name, (size_t)*new_attr_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- if(H5Arename((hid_t)*loc_id,c_old_attr_name,c_new_attr_name) < 0)
+ char *c_old_attr_name = NULL; /* Buffer to hold C string */
+ char *c_new_attr_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_old_attr_name = HD5f2cstring(old_attr_name, (size_t)*old_attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_new_attr_name = HD5f2cstring(new_attr_name, (size_t)*new_attr_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ if (H5Arename((hid_t)*loc_id, c_old_attr_name, c_new_attr_name) < 0)
HGOTO_DONE(FAIL);
done:
- if(c_old_attr_name)
- HDfree(c_old_attr_name);
- if(c_new_attr_name)
- HDfree(c_new_attr_name);
+ if (c_old_attr_name)
+ HDfree(c_old_attr_name);
+ if (c_new_attr_name)
+ HDfree(c_new_attr_name);
return ret_value;
}
/****if* H5Af/h5awrite_f_c
@@ -1059,19 +1060,20 @@ done:
*
*
* SOURCE
-*/
+ */
int_f
-h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
+h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- ret = H5Awrite( (hid_t)*attr_id, (hid_t)*mem_type_id, buf);
+ ret = H5Awrite((hid_t)*attr_id, (hid_t)*mem_type_id, buf);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Af/h5aread_f_c
@@ -1092,18 +1094,18 @@ h5awrite_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
*
*
* SOURCE
-*/
+ */
int_f
-h5aread_f_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
+h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- ret = H5Aread( (hid_t)*attr_id, (hid_t)*mem_type_id, buf);
+ ret = H5Aread((hid_t)*attr_id, (hid_t)*mem_type_id, buf);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index 8ef7936..7d1ea9e 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
@@ -44,34 +44,34 @@
* - Added optional parameters introduced in version 1.8
* February, 2008
* SOURCE
-*/
+ */
int_f
-h5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
- hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id)
+h5dcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *lcpl_id,
+ hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id)
/******/
{
- char *c_name = NULL;
- hid_t c_dset_id;
- int ret_value = -1;
-
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == ( c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- goto DONE;
-
- /*
- * Call H5Dcreate2 function.
- */
- if((c_dset_id = H5Dcreate2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*space_id,
- (hid_t)*lcpl_id, (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
- goto DONE;
- *dset_id = (hid_t_f)c_dset_id;
-
- ret_value = 0;
+ char *c_name = NULL;
+ hid_t c_dset_id;
+ int ret_value = -1;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ goto DONE;
+
+ /*
+ * Call H5Dcreate2 function.
+ */
+ if ((c_dset_id = H5Dcreate2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*lcpl_id,
+ (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
+ goto DONE;
+ *dset_id = (hid_t_f)c_dset_id;
+
+ ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -96,34 +96,34 @@ DONE:
* HISTORY
* Added 1.8 parameter: dapl_id
* SOURCE
-*/
+ */
int_f
h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id)
/******/
{
- char *c_name = NULL;
- hid_t c_dset_id;
- int ret_value = -1;
+ char *c_name = NULL;
+ hid_t c_dset_id;
+ int ret_value = -1;
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- goto DONE;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ goto DONE;
- /*
- * Call H5Dopen2 function.
- */
- if((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0)
- goto DONE;
+ /*
+ * Call H5Dopen2 function.
+ */
+ if ((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0)
+ goto DONE;
- *dset_id = (hid_t_f)c_dset_id;
- ret_value = 0;
+ *dset_id = (hid_t_f)c_dset_id;
+ ret_value = 0;
DONE:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Df/h5dwrite_ref_reg_c
@@ -148,52 +148,54 @@ DONE:
* This function was added to accomodate h5dwrite_f with the
* dims argument being of INTEGER(HSIZE_T) type
* SOURCE
-*/
+ */
int_f
-h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims)
+h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- hdset_reg_ref_t *buf_c = NULL;
- unsigned int i, n;
-
- n = (unsigned int)*dims;
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate temporary buffer and copy references from Fortran.
- */
- buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*n);
- if ( buf_c != NULL ) {
- for (i = 0; i < n; i++) {
- HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE);
- buf = buf + REF_REG_BUF_LEN_F;
- }
- }
- else return ret_value;
-
-
- /*
- * Call H5Dwrite function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- HDfree(buf_c);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ hdset_reg_ref_t *buf_c = NULL;
+ unsigned int i, n;
+
+ n = (unsigned int)*dims;
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate temporary buffer and copy references from Fortran.
+ */
+ buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * n);
+ if (buf_c != NULL) {
+ for (i = 0; i < n; i++) {
+ HDmemcpy(&buf_c[i], buf, H5R_DSET_REG_REF_BUF_SIZE);
+ buf = buf + REF_REG_BUF_LEN_F;
+ }
+ }
+ else
+ return ret_value;
+
+ /*
+ * Call H5Dwrite function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ HDfree(buf_c);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dread_ref_reg_c
@@ -218,54 +220,55 @@ h5dwrite_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_i
* This function was added to accomodate h5dread_f subroutine
* with the dims parameter being of INTEGER(HSIZE_T_F) size.
* SOURCE
-*/
+ */
int_f
-h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims)
+h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- herr_t ret = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- hdset_reg_ref_t *buf_c = NULL;
- hsize_t i, n;
- n = (hsize_t)*dims;
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate temporary buffer.
- */
- buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*(size_t)n);
- if ( buf_c != NULL ) {
- /*
- * Call H5Dread function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- if (ret >=0) {
+ int ret_value = -1;
+ herr_t ret = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ hdset_reg_ref_t *buf_c = NULL;
+ hsize_t i, n;
+ n = (hsize_t)*dims;
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate temporary buffer.
+ */
+ buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t) * (size_t)n);
+ if (buf_c != NULL) {
+ /*
+ * Call H5Dread function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ if (ret >= 0) {
for (i = 0; i < n; i++) {
- HDmemcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE);
- buf = buf + REF_REG_BUF_LEN_F;
+ HDmemcpy(buf, &buf_c[i], H5R_DSET_REG_REF_BUF_SIZE);
+ buf = buf + REF_REG_BUF_LEN_F;
}
- }
- if ( buf_c != NULL ) HDfree(buf_c);
- }
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ }
+ if (buf_c != NULL)
+ HDfree(buf_c);
+ }
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
-
/****if* H5Df/h5dclose_c
* NAME
* h5dclose_c
@@ -281,17 +284,18 @@ h5dread_ref_reg_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dclose_c ( hid_t_f *dset_id )
+h5dclose_c(hid_t_f *dset_id)
/******/
{
- int ret_value = 0;
- hid_t c_dset_id;
- c_dset_id = (hid_t)*dset_id;
- if ( H5Dclose(c_dset_id) < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_dset_id;
+ c_dset_id = (hid_t)*dset_id;
+ if (H5Dclose(c_dset_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Df/h5dget_space_c
@@ -311,22 +315,23 @@ h5dclose_c ( hid_t_f *dset_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id)
+h5dget_space_c(hid_t_f *dset_id, hid_t_f *space_id)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_space_id;
-
- c_dset_id = (hid_t)*dset_id;
- c_space_id = H5Dget_space(c_dset_id);
- if(c_space_id < 0 ) return ret_value;
- ret_value = 0;
- *space_id = (hid_t_f)c_space_id;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_space_id;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_space_id = H5Dget_space(c_dset_id);
+ if (c_space_id < 0)
+ return ret_value;
+ ret_value = 0;
+ *space_id = (hid_t_f)c_space_id;
+ return ret_value;
}
/****if* H5Df/h5dget_type_c
@@ -346,24 +351,25 @@ h5dget_space_c ( hid_t_f *dset_id , hid_t_f *space_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id)
+h5dget_type_c(hid_t_f *dset_id, hid_t_f *type_id)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_type_id;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_type_id;
- c_dset_id = (hid_t)*dset_id;
- c_type_id = H5Dget_type(c_dset_id);
+ c_dset_id = (hid_t)*dset_id;
+ c_type_id = H5Dget_type(c_dset_id);
- if(c_type_id < 0 ) return ret_value;
+ if (c_type_id < 0)
+ return ret_value;
- *type_id = (hid_t_f)c_type_id;
- ret_value = 0;
- return ret_value;
+ *type_id = (hid_t_f)c_type_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dget_create_plist_c
@@ -384,27 +390,27 @@ h5dget_type_c ( hid_t_f *dset_id , hid_t_f *type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id)
+h5dget_create_plist_c(hid_t_f *dset_id, hid_t_f *plist_id)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_plist_id;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_plist_id;
- c_dset_id = (hid_t)*dset_id;
- c_plist_id = H5Dget_create_plist(c_dset_id);
+ c_dset_id = (hid_t)*dset_id;
+ c_plist_id = H5Dget_create_plist(c_dset_id);
- if(c_plist_id < 0 ) return ret_value;
+ if (c_plist_id < 0)
+ return ret_value;
- ret_value = 0;
- *plist_id = (hid_t_f)c_plist_id;
- return ret_value;
+ ret_value = 0;
+ *plist_id = (hid_t_f)c_plist_id;
+ return ret_value;
}
-
/****if* H5Df/h5dset_extent_c
* NAME
* h5dset_extent_c
@@ -425,37 +431,38 @@ h5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id)
* to h5dset_extent in order to match new fortran interface.
* -MSB- March 14, 2008
* SOURCE
-*/
+ */
int_f
-h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims)
+h5dset_extent_c(hid_t_f *dset_id, hsize_t_f *dims)
/******/
{
- hid_t c_space_id;
- hsize_t c_dims[H5S_MAX_RANK];
- int rank;
- int i;
- int status;
- int ret_value = -1;
-
- if((c_space_id = H5Dget_space((hid_t)*dset_id)) < 0) return ret_value;
-
- rank = H5Sget_simple_extent_ndims(c_space_id);
- H5Sclose(c_space_id);
- if(rank < 0 ) return ret_value;
-
-
- /*
- * Reverse dimensions due to C-FORTRAN storage order.
- */
- for(i = 0; i < rank; i++)
- c_dims[i] = (hsize_t)dims[rank - i - 1];
-
- status = H5Dset_extent((hid_t)*dset_id, c_dims);
-
- if(status >= 0)
- ret_value = 0;
- return ret_value;
+ hid_t c_space_id;
+ hsize_t c_dims[H5S_MAX_RANK];
+ int rank;
+ int i;
+ int status;
+ int ret_value = -1;
+
+ if ((c_space_id = H5Dget_space((hid_t)*dset_id)) < 0)
+ return ret_value;
+
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ H5Sclose(c_space_id);
+ if (rank < 0)
+ return ret_value;
+
+ /*
+ * Reverse dimensions due to C-FORTRAN storage order.
+ */
+ for (i = 0; i < rank; i++)
+ c_dims[i] = (hsize_t)dims[rank - i - 1];
+
+ status = H5Dset_extent((hid_t)*dset_id, c_dims);
+
+ if (status >= 0)
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dget_storage_size_c
@@ -476,22 +483,23 @@ h5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size)
+h5dget_storage_size_c(hid_t_f *dset_id, hsize_t_f *size)
/******/
{
- int ret_value = -1;
- hsize_t c_size;
- hid_t c_dset_id;
-
- c_dset_id = (hid_t)*dset_id;
- c_size = H5Dget_storage_size(c_dset_id);
- if (c_size == 0) return ret_value;
- *size = (hsize_t_f)c_size;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hsize_t c_size;
+ hid_t c_dset_id;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_size = H5Dget_storage_size(c_dset_id);
+ if (c_size == 0)
+ return ret_value;
+ *size = (hsize_t_f)c_size;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dvlen_get_max_len_c
@@ -513,44 +521,48 @@ h5dget_storage_size_c ( hid_t_f *dset_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id, size_t_f *len)
+h5dvlen_get_max_len_c(hid_t_f *dset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len)
/******/
{
- int ret_value = -1;
- size_t c_len;
- hid_t c_dset_id;
- hid_t c_type_id;
- hid_t c_space_id;
- hvl_t *c_buf;
- int i;
- hssize_t num_elem;
- herr_t status;
-
- c_dset_id = (hid_t)*dset_id;
- c_type_id = (hid_t)*type_id;
- c_space_id = (hid_t)*space_id;
-
- num_elem = H5Sget_select_npoints(c_space_id);
- if( num_elem < 0) return ret_value;
-
- c_buf = (hvl_t *)HDmalloc(sizeof(hvl_t)*(size_t)num_elem);
- if (c_buf == NULL) return ret_value;
- status = H5Dread(c_dset_id, c_type_id, H5S_ALL, c_space_id, H5P_DEFAULT, c_buf);
- if(status < 0) goto DONE;
-
- c_len = 0;
- for (i=0; i < num_elem; i++) c_len = H5_MAX(c_len, c_buf[i].len);
- *len = (size_t_f)c_len;
- H5Treclaim(c_type_id, c_space_id, H5P_DEFAULT, c_buf);
- ret_value = 0;
+ int ret_value = -1;
+ size_t c_len;
+ hid_t c_dset_id;
+ hid_t c_type_id;
+ hid_t c_space_id;
+ hvl_t * c_buf;
+ int i;
+ hssize_t num_elem;
+ herr_t status;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_type_id = (hid_t)*type_id;
+ c_space_id = (hid_t)*space_id;
+
+ num_elem = H5Sget_select_npoints(c_space_id);
+ if (num_elem < 0)
+ return ret_value;
+
+ c_buf = (hvl_t *)HDmalloc(sizeof(hvl_t) * (size_t)num_elem);
+ if (c_buf == NULL)
+ return ret_value;
+ status = H5Dread(c_dset_id, c_type_id, H5S_ALL, c_space_id, H5P_DEFAULT, c_buf);
+ if (status < 0)
+ goto DONE;
+
+ c_len = 0;
+ for (i = 0; i < num_elem; i++)
+ c_len = H5_MAX(c_len, c_buf[i].len);
+ *len = (size_t_f)c_len;
+ H5Treclaim(c_type_id, c_space_id, H5P_DEFAULT, c_buf);
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/h5dwrite_vl_integer_c
* NAME
@@ -576,53 +588,56 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len)
+h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- int_f *tmp;
- size_t max_len;
-
- hvl_t *c_buf;
- hsize_t i;
- hsize_t num_elem;
-
- max_len = (size_t)dims[0];
- num_elem = (hsize_t)dims[1];
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
- if (c_buf == NULL) return ret_value;
- tmp = (int_f *)buf;
- for (i=0; i < num_elem; i++) {
- c_buf[i].len = (size_t)len[i];
- c_buf[i].p = tmp;
- tmp = tmp + max_len;
- }
- /*
- * Call H5Dwrite function.
- */
- status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
-
- if( status < 0) goto DONE;
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ int_f *tmp;
+ size_t max_len;
+
+ hvl_t * c_buf;
+ hsize_t i;
+ hsize_t num_elem;
+
+ max_len = (size_t)dims[0];
+ num_elem = (hsize_t)dims[1];
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ if (c_buf == NULL)
+ return ret_value;
+ tmp = (int_f *)buf;
+ for (i = 0; i < num_elem; i++) {
+ c_buf[i].len = (size_t)len[i];
+ c_buf[i].p = tmp;
+ tmp = tmp + max_len;
+ }
+ /*
+ * Call H5Dwrite function.
+ */
+ status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/h5dread_vl_integer_c
@@ -650,51 +665,55 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len)
+h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- size_t max_len;
-
- hvl_t *c_buf;
- hsize_t i;
- hssize_t num_elem;
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- max_len = (size_t)dims[0];
- num_elem = H5Sget_select_npoints(c_mem_space_id);
- if(num_elem != (hssize_t)dims[1]) return ret_value;
-
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
- if (c_buf == NULL) return ret_value;
- /*
- * Call H5Dread function.
- */
- status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
- if ( status < 0 ) goto DONE;
- for (i=0; i < (hsize_t)num_elem; i++) {
- len[i] = (size_t_f)c_buf[i].len;
- memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(int_f));
- }
- H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ size_t max_len;
+
+ hvl_t * c_buf;
+ hsize_t i;
+ hssize_t num_elem;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ max_len = (size_t)dims[0];
+ num_elem = H5Sget_select_npoints(c_mem_space_id);
+ if (num_elem != (hssize_t)dims[1])
+ return ret_value;
+
+ c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ if (c_buf == NULL)
+ return ret_value;
+ /*
+ * Call H5Dread function.
+ */
+ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+ if (status < 0)
+ goto DONE;
+ for (i = 0; i < (hsize_t)num_elem; i++) {
+ len[i] = (size_t_f)c_buf[i].len;
+ memcpy(&buf[i * max_len], c_buf[i].p, c_buf[i].len * sizeof(int_f));
+ }
+ H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/h5dwrite_vl_string_c
@@ -720,69 +739,73 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len)
+h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- char *tmp, *tmp_p;
- size_t max_len;
-
- char **c_buf;
- hsize_t i;
- hsize_t num_elem;
-
- max_len = (size_t)dims[0];
- num_elem = (hsize_t)dims[1];
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate arra of character pointers
- */
- c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
- if (c_buf == NULL) return ret_value;
-
- /* Copy data to long C string */
- tmp = (char *)HD5f2cstring(buf, (size_t)(max_len*num_elem));
- if (tmp == NULL) { HDfree(c_buf);
- return ret_value;
- }
- /*
- * Move data from temorary buffer
- */
- tmp_p = tmp;
- for (i=0; i < num_elem; i++) {
- c_buf[i] = (char *) HDmalloc((size_t)len[i]+1);
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ char * tmp, *tmp_p;
+ size_t max_len;
+
+ char ** c_buf;
+ hsize_t i;
+ hsize_t num_elem;
+
+ max_len = (size_t)dims[0];
+ num_elem = (hsize_t)dims[1];
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate arra of character pointers
+ */
+ c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
+ if (c_buf == NULL)
+ return ret_value;
+
+ /* Copy data to long C string */
+ tmp = (char *)HD5f2cstring(buf, (size_t)(max_len * num_elem));
+ if (tmp == NULL) {
+ HDfree(c_buf);
+ return ret_value;
+ }
+ /*
+ * Move data from temorary buffer
+ */
+ tmp_p = tmp;
+ for (i = 0; i < num_elem; i++) {
+ c_buf[i] = (char *)HDmalloc((size_t)len[i] + 1);
memcpy(c_buf[i], tmp_p, (size_t)len[i]);
c_buf[i][len[i]] = '\0';
- tmp_p = tmp_p + max_len;
- }
+ tmp_p = tmp_p + max_len;
+ }
- /*
- * Call H5Dwrite function.
- */
- status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+ /*
+ * Call H5Dwrite function.
+ */
+ status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
- if( status < 0) goto DONE;
- ret_value = 0;
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- HDfree(c_buf);
- HDfree(tmp);
- return ret_value;
+ H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
+ HDfree(c_buf);
+ HDfree(tmp);
+ return ret_value;
}
/****if* H5Df/h5dread_vl_string_c
* NAME
@@ -807,64 +830,68 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len)
+h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- char *tmp, *tmp_p;
- size_t max_len;
-
- char **c_buf;
- hsize_t i;
- hsize_t num_elem;
-
- max_len = (size_t)dims[0];
- num_elem = (hsize_t)dims[1];
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Allocate array of character pointers
- */
- c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
- if (c_buf == NULL) return ret_value;
-
- /*
- * Call H5Dread function.
- */
- status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
- if (status < 0) { HDfree(c_buf);
- return ret_value;
- }
- /* Copy data to long C string */
- tmp = (char *)HDmalloc((size_t)(max_len*num_elem) +1);
- tmp_p = tmp;
- for (i=0; i<max_len*num_elem; i++) tmp[i] = ' ';
- tmp[max_len*num_elem] = '\0';
- for (i=0; i < num_elem; i++) {
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ char * tmp, *tmp_p;
+ size_t max_len;
+
+ char ** c_buf;
+ hsize_t i;
+ hsize_t num_elem;
+
+ max_len = (size_t)dims[0];
+ num_elem = (hsize_t)dims[1];
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Allocate array of character pointers
+ */
+ c_buf = (char **)HDmalloc((size_t)num_elem * sizeof(char *));
+ if (c_buf == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Dread function.
+ */
+ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+ if (status < 0) {
+ HDfree(c_buf);
+ return ret_value;
+ }
+ /* Copy data to long C string */
+ tmp = (char *)HDmalloc((size_t)(max_len * num_elem) + 1);
+ tmp_p = tmp;
+ for (i = 0; i < max_len * num_elem; i++)
+ tmp[i] = ' ';
+ tmp[max_len * num_elem] = '\0';
+ for (i = 0; i < num_elem; i++) {
memcpy(tmp_p, c_buf[i], strlen(c_buf[i]));
len[i] = (size_t_f)strlen(c_buf[i]);
- tmp_p = tmp_p + max_len;
- }
- HD5packFstring(tmp, _fcdtocp(buf), (size_t)(max_len*num_elem));
- ret_value = 0;
- H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- HDfree(c_buf);
- HDfree(tmp);
- return ret_value;
+ tmp_p = tmp_p + max_len;
+ }
+ HD5packFstring(tmp, _fcdtocp(buf), (size_t)(max_len * num_elem));
+ ret_value = 0;
+ H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
+ HDfree(c_buf);
+ HDfree(tmp);
+ return ret_value;
}
/****if* H5Df/h5dwrite_vl_real_c
@@ -891,53 +918,56 @@ h5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len)
+h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- real_f *tmp;
- size_t max_len;
-
- hvl_t *c_buf;
- hsize_t i;
- hsize_t num_elem;
-
- max_len = (size_t)dims[0];
- num_elem = (hsize_t)dims[1];
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
- if (c_buf == NULL) return ret_value;
- tmp = (real_f *)buf;
- for (i=0; i < num_elem; i++) {
- c_buf[i].len = (size_t)len[i];
- c_buf[i].p = tmp;
- tmp = tmp + max_len;
- }
- /*
- * Call H5Dwrite function.
- */
- status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
-
- if( status < 0) goto DONE;
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ real_f *tmp;
+ size_t max_len;
+
+ hvl_t * c_buf;
+ hsize_t i;
+ hsize_t num_elem;
+
+ max_len = (size_t)dims[0];
+ num_elem = (hsize_t)dims[1];
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ if (c_buf == NULL)
+ return ret_value;
+ tmp = (real_f *)buf;
+ for (i = 0; i < num_elem; i++) {
+ c_buf[i].len = (size_t)len[i];
+ c_buf[i].p = tmp;
+ tmp = tmp + max_len;
+ }
+ /*
+ * Call H5Dwrite function.
+ */
+ status = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/h5dread_vl_real_c
@@ -965,52 +995,56 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len)
+h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
- size_t max_len;
-
- hvl_t *c_buf;
- hsize_t i;
- hssize_t num_elem;
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
-
- max_len = (size_t)dims[0];
- num_elem = H5Sget_select_npoints(c_mem_space_id);
- if(num_elem != (hssize_t)dims[1]) return ret_value;
-
- c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
- if (c_buf == NULL) return ret_value;
- /*
- * Call H5Dread function.
- */
- status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
- if ( status <0 ) goto DONE;
- for (i=0; i < (hsize_t)num_elem; i++) {
- len[i] = (size_t_f)c_buf[i].len;
- memcpy(&buf[i*max_len], c_buf[i].p, c_buf[i].len*sizeof(real_f));
- }
-
- H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+ size_t max_len;
+
+ hvl_t * c_buf;
+ hsize_t i;
+ hssize_t num_elem;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ max_len = (size_t)dims[0];
+ num_elem = H5Sget_select_npoints(c_mem_space_id);
+ if (num_elem != (hssize_t)dims[1])
+ return ret_value;
+
+ c_buf = (hvl_t *)HDmalloc((size_t)num_elem * sizeof(hvl_t));
+ if (c_buf == NULL)
+ return ret_value;
+ /*
+ * Call H5Dread function.
+ */
+ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, c_buf);
+ if (status < 0)
+ goto DONE;
+ for (i = 0; i < (hsize_t)num_elem; i++) {
+ len[i] = (size_t_f)c_buf[i].len;
+ memcpy(&buf[i * max_len], c_buf[i].p, c_buf[i].len * sizeof(real_f));
+ }
+
+ H5Treclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Df/h5dfill_c
@@ -1032,29 +1066,30 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dfill_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id)
+h5dfill_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf, hid_t_f *mem_type_id)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_fill_type_id;
- hid_t c_mem_type_id;
- hid_t c_space_id;
-
- c_fill_type_id = (hid_t)*fill_type_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_space_id = (hid_t)*space_id;
-
- /*
- * Call H5Dfill function.
- */
- ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
-
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_fill_type_id;
+ hid_t c_mem_type_id;
+ hid_t c_space_id;
+
+ c_fill_type_id = (hid_t)*fill_type_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_space_id = (hid_t)*space_id;
+
+ /*
+ * Call H5Dfill function.
+ */
+ ret = H5Dfill(fill_value, c_fill_type_id, buf, c_mem_type_id, c_space_id);
+
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dget_space_status_c
@@ -1074,27 +1109,28 @@ h5dfill_c (void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * b
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag)
+h5dget_space_status_c(hid_t_f *dset_id, int_f *flag)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- H5D_space_status_t c_flag;
-
- c_dset_id = (hid_t)*dset_id;
-
- /*
- * Call H5Dget_space_status
- */
- ret = H5Dget_space_status(c_dset_id, &c_flag);
-
- if (ret < 0) return ret_value;
- *flag = (int_f)c_flag;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ H5D_space_status_t c_flag;
+
+ c_dset_id = (hid_t)*dset_id;
+
+ /*
+ * Call H5Dget_space_status
+ */
+ ret = H5Dget_space_status(c_dset_id, &c_flag);
+
+ if (ret < 0)
+ return ret_value;
+ *flag = (int_f)c_flag;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dcreate_anon_c
* NAME
@@ -1118,25 +1154,25 @@ h5dget_space_status_c ( hid_t_f *dset_id, int_f *flag)
* M. Scot Breitenfeld
* February, 2008
* SOURCE
-*/
+ */
int_f
-h5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id,
- hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id)
+h5dcreate_anon_c(hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id, hid_t_f *dapl_id,
+ hid_t_f *dset_id)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call H5Dcreate2 function.
- */
- if((*dset_id = (hid_t_f)H5Dcreate_anon((hid_t)*loc_id, (hid_t)*type_id, (hid_t)*space_id,
- (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
- goto DONE;
+ /*
+ * Call H5Dcreate2 function.
+ */
+ if ((*dset_id = (hid_t_f)H5Dcreate_anon((hid_t)*loc_id, (hid_t)*type_id, (hid_t)*space_id,
+ (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
+ goto DONE;
- ret_value = 0;
+ ret_value = 0;
- DONE:
- return ret_value;
+DONE:
+ return ret_value;
}
/****if* H5Df/h5dwrite_f_c
@@ -1160,37 +1196,38 @@ h5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id,
*
*
* SOURCE
-*/
+ */
int_f
-h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
- hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf)
+h5dwrite_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf)
/******/
{
- int ret_value = -1;
- herr_t ret;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
-
- /*
- * Define transfer property
- */
- c_xfer_prp = (hid_t)*xfer_prp;
-
- /*
- * Call H5Dwrite function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
-
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+
+ /*
+ * Define transfer property
+ */
+ c_xfer_prp = (hid_t)*xfer_prp;
+
+ /*
+ * Call H5Dwrite function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dwrite(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
+
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dread_f_c
@@ -1218,33 +1255,34 @@ h5dwrite_f_c (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id,
- hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf)
+h5dread_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id,
+ hid_t_f *xfer_prp, void *buf)
/******/
{
- int ret_value = -1;
- hid_t c_dset_id;
- hid_t c_mem_type_id;
- hid_t c_mem_space_id;
- hid_t c_file_space_id;
- hid_t c_xfer_prp;
- herr_t status;
-
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- c_xfer_prp = (hid_t)*xfer_prp;
- /*
- * Call H5Dread function.
- */
- status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_dset_id;
+ hid_t c_mem_type_id;
+ hid_t c_mem_space_id;
+ hid_t c_file_space_id;
+ hid_t c_xfer_prp;
+ herr_t status;
+
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ c_xfer_prp = (hid_t)*xfer_prp;
+ /*
+ * Call H5Dread function.
+ */
+ status = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Df/h5dget_access_plist_c
* NAME
@@ -1262,22 +1300,22 @@ h5dread_f_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id,
* April 13, 2009
*
* SOURCE
-*/
+ */
int_f
-h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id)
+h5dget_access_plist_c(hid_t_f *dset_id, hid_t_f *plist_id)
/******/
{
- int ret_value = -1;
- /*
- * Call H5Dget_access_plist function.
- */
- if((*plist_id = (hid_t_f)H5Dget_access_plist((hid_t)*dset_id)) < 0)
- goto DONE;
+ int ret_value = -1;
+ /*
+ * Call H5Dget_access_plist function.
+ */
+ if ((*plist_id = (hid_t_f)H5Dget_access_plist((hid_t)*dset_id)) < 0)
+ goto DONE;
- ret_value = 0;
+ ret_value = 0;
- DONE:
- return ret_value;
+DONE:
+ return ret_value;
}
/****if* H5Df/h5dvlen_reclaim_c
@@ -1298,20 +1336,21 @@ h5dget_access_plist_c (hid_t_f *dset_id, hid_t_f *plist_id)
* January 15, 2011
*
* SOURCE
-*/
+ */
int_f
h5dvlen_reclaim_c(hid_t_f *type_id, hid_t_f *space_id, hid_t_f *plist_id, void *buf)
/******/
{
- int ret_value = -1;
- herr_t status;
+ int ret_value = -1;
+ herr_t status;
- /*
- * Call H5Treclaim function.
- */
- status = H5Treclaim((hid_t)*type_id, (hid_t)*space_id, (hid_t)*plist_id, buf);
- if ( status < 0 ) return ret_value;
+ /*
+ * Call H5Treclaim function.
+ */
+ status = H5Treclaim((hid_t)*type_id, (hid_t)*space_id, (hid_t)*plist_id, buf);
+ if (status < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c
index 6631d3a..a8aa312 100644
--- a/fortran/src/H5Ef.c
+++ b/fortran/src/H5Ef.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -38,18 +38,18 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5eclear_c(hid_t_f *estack_id )
+h5eclear_c(hid_t_f *estack_id)
/******/
{
- int_f ret_value = 0;
+ int_f ret_value = 0;
- /*
- * Call H5Eclear function.
- */
- if(H5Eclear2((hid_t)*estack_id) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Eclear function.
+ */
+ if (H5Eclear2((hid_t)*estack_id) < 0)
+ HGOTO_DONE(FAIL)
done:
return ret_value;
@@ -74,30 +74,30 @@ done:
* Bug fix: Added call to close the file with the error messages
* EP 11/26/01
* SOURCE
-*/
+ */
int_f
-h5eprint_c1(_fcd name, int_f* namelen)
+h5eprint_c1(_fcd name, int_f *namelen)
/******/
{
- FILE *file = NULL;
- char *c_name = NULL;
+ FILE *file = NULL;
+ char *c_name = NULL;
int_f ret_value = 0;
- if(NULL == (c_name = (char*)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL)
- if(NULL == (file = HDfopen(c_name, "a")))
+ if (NULL == (file = HDfopen(c_name, "a")))
HGOTO_DONE(FAIL)
/*
* Call H5Eprint2 function.
*/
- if(H5Eprint2(H5E_DEFAULT, file) < 0)
+ if (H5Eprint2(H5E_DEFAULT, file) < 0)
HGOTO_DONE(FAIL)
done:
- if(file)
+ if (file)
HDfclose(file);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -120,7 +120,7 @@ done:
* Wednesday, March 29, 2000
*
* SOURCE
-*/
+ */
int_f
h5eprint_c2(void)
/******/
@@ -130,7 +130,7 @@ h5eprint_c2(void)
/*
* Call H5Eprint2 function.
*/
- if(H5Eprint2(H5E_DEFAULT, NULL) < 0)
+ if (H5Eprint2(H5E_DEFAULT, NULL) < 0)
HGOTO_DONE(FAIL)
done:
@@ -155,31 +155,31 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen)
+h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen)
/******/
{
- char *c_name = NULL;
+ char * c_name = NULL;
size_t c_namelen = (size_t)*namelen;
- int_f ret_value = 0;
+ int_f ret_value = 0;
- if(c_namelen > 0)
+ if (c_namelen > 0)
c_name = (char *)HDmalloc(c_namelen + 1);
- if(!c_name)
+ if (!c_name)
HGOTO_DONE(FAIL)
/*
* Call H5Eget_msg function.
*/
H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen);
- HD5packFstring((char*)c_name, _fcdtocp(name), c_namelen);
- if(!HDstrcmp(c_name, "Invalid major error number"))
+ HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen);
+ if (!HDstrcmp(c_name, "Invalid major error number"))
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -203,19 +203,19 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen)
+h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen)
/******/
{
- char *c_name = NULL;
+ char * c_name = NULL;
size_t c_namelen = (size_t)*namelen;
- int_f ret_value = 0;
+ int_f ret_value = 0;
- if(c_namelen > 0)
+ if (c_namelen > 0)
c_name = (char *)HDmalloc(c_namelen + 1);
- if(!c_name)
+ if (!c_name)
HGOTO_DONE(FAIL)
/*
@@ -223,11 +223,11 @@ h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen)
*/
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"))
+ if (!HDstrcmp(c_name, "Invalid minor error number"))
HGOTO_DONE(FAIL)
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -249,7 +249,7 @@ done:
* M. Scot Breitenfeld
* July 22, 2009
* SOURCE
-*/
+ */
/* int_f */
/* h5eset_auto2_c(hid_t_f *estack_id, H5E_auto2_t *func, void *client_data) */
/* /\******\/ */
@@ -266,17 +266,17 @@ int_f
h5eset_auto2_c(int_f *printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data)
/******/
{
- int ret_val = -1;
- herr_t status = -1;
+ int ret_val = -1;
+ herr_t status = -1;
- if (*printflag == 1 && *estack_id == -1)
- status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr);
- else if (*printflag == 1)
- status = H5Eset_auto2((hid_t)*estack_id, func, client_data);
- else if (*printflag == 0)
- status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
- if (status >= 0) ret_val = 0;
+ if (*printflag == 1 && *estack_id == -1)
+ status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr);
+ else if (*printflag == 1)
+ status = H5Eset_auto2((hid_t)*estack_id, func, client_data);
+ else if (*printflag == 0)
+ status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
+ if (status >= 0)
+ ret_val = 0;
- return ret_val;
+ return ret_val;
}
-
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 7123f1d..1f1fc7b 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -41,54 +41,55 @@
* Elena Pourmal
* Monday, July 26, 1999
* SOURCE
-*/
+ */
int_f
-h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hid_t_f *acc_prp, hid_t_f *file_id)
+h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp,
+ hid_t_f *file_id)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- hid_t c_file_id;
- unsigned c_access_flags;
- hid_t c_crt_prp;
- hid_t c_acc_prp;
-
- /*
- * Define access flags
- */
- c_access_flags = (unsigned) *access_flags;
-
- /*
- * Define creation property
- */
- c_crt_prp = *crt_prp;
-
- /*
- * Define access property
- */
- c_acc_prp = *acc_prp;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
- if(c_name == NULL)
- return ret_value;
-
- /*
- * Call H5Fcreate function.
- */
- c_file_id = H5Fcreate(c_name, c_access_flags, c_crt_prp, c_acc_prp);
-
- if (c_file_id >= 0) {
- ret_value = 0;
- *file_id = c_file_id;
- }
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ hid_t c_file_id;
+ unsigned c_access_flags;
+ hid_t c_crt_prp;
+ hid_t c_acc_prp;
+
+ /*
+ * Define access flags
+ */
+ c_access_flags = (unsigned)*access_flags;
+
+ /*
+ * Define creation property
+ */
+ c_crt_prp = *crt_prp;
+
+ /*
+ * Define access property
+ */
+ c_acc_prp = *acc_prp;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fcreate function.
+ */
+ c_file_id = H5Fcreate(c_name, c_access_flags, c_crt_prp, c_acc_prp);
+
+ if (c_file_id >= 0) {
+ ret_value = 0;
+ *file_id = c_file_id;
+ }
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Ff/h5fflush_c
@@ -107,31 +108,31 @@ h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f* crt_prp, hi
* Xiangyang Su
* Friday, November 5, 1999
* SOURCE
-*/
+ */
int_f
-h5fflush_c (hid_t_f *object_id, int_f *scope)
+h5fflush_c(hid_t_f *object_id, int_f *scope)
/******/
{
- int ret_value = -1;
- hid_t c_file_id;
- H5F_scope_t c_scope;
- htri_t status;
- c_scope = (H5F_scope_t)*scope;
+ int ret_value = -1;
+ hid_t c_file_id;
+ H5F_scope_t c_scope;
+ htri_t status;
+ c_scope = (H5F_scope_t)*scope;
- /*
- * Call H5Fflush function.
- */
+ /*
+ * Call H5Fflush function.
+ */
- c_file_id = *object_id;
+ c_file_id = *object_id;
- status = H5Fflush(c_file_id, c_scope);
+ status = H5Fflush(c_file_id, c_scope);
- if (status >= 0) ret_value = 0;
+ if (status >= 0)
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
-
/****if* H5Ff/h5fmount_c
* NAME
* h5fmount_c
@@ -149,45 +150,47 @@ h5fflush_c (hid_t_f *object_id, int_f *scope)
* Xiangyang Su
* Monday, October 25, 1999
* HISTORY
-*/
+ */
int_f
-h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp)
+h5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- hid_t c_loc_id;
- hid_t c_file_id;
- hid_t c_acc_prp;
- htri_t status;
-
- /*
- * Define access property
- */
- c_acc_prp = *acc_prp;
-/*
- if ( H5P_DEFAULT_F == c_acc_prp ) c_acc_prp = H5P_DEFAULT;
-*/
-
- c_loc_id = *loc_id;
- c_file_id = *file_id;
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(dsetname, (size_t)c_namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Fmount function.
- */
- status = H5Fmount(c_loc_id, c_name, c_file_id, c_acc_prp);
-
- if (status >= 0) ret_value = 0;
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ hid_t c_loc_id;
+ hid_t c_file_id;
+ hid_t c_acc_prp;
+ htri_t status;
+
+ /*
+ * Define access property
+ */
+ c_acc_prp = *acc_prp;
+ /*
+ if ( H5P_DEFAULT_F == c_acc_prp ) c_acc_prp = H5P_DEFAULT;
+ */
+
+ c_loc_id = *loc_id;
+ c_file_id = *file_id;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(dsetname, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fmount function.
+ */
+ status = H5Fmount(c_loc_id, c_name, c_file_id, c_acc_prp);
+
+ if (status >= 0)
+ ret_value = 0;
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Ff/h5funmount_c
@@ -205,38 +208,38 @@ h5fmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hi
* Xiangyang Su
* Monday, October 25, 1999
* SOURCE
-*/
+ */
int_f
-h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen)
+h5funmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- hid_t c_loc_id;
- htri_t status;
-
- c_loc_id = *loc_id;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(dsetname, (size_t)c_namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Fmount function.
- */
- status = H5Funmount(c_loc_id, c_name);
-
- if (status >= 0) ret_value = 0;
-
- HDfree(c_name);
- return ret_value;
-}
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ hid_t c_loc_id;
+ htri_t status;
+ c_loc_id = *loc_id;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(dsetname, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fmount function.
+ */
+ status = H5Funmount(c_loc_id, c_name);
+
+ if (status >= 0)
+ ret_value = 0;
+
+ HDfree(c_name);
+ return ret_value;
+}
/****if* H5Ff/h5fopen_c
* NAME
@@ -256,49 +259,49 @@ h5funmount_c (hid_t_f *loc_id, _fcd dsetname, int_f *namelen)
* Elena Pourmal
* Tuesday, August 3, 1999
* SOURCE
-*/
+ */
int_f
-h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id)
+h5fopen_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id)
/******/
{
- int ret_value = -1;
- char *c_name;
- int_f c_namelen;
- hid_t c_file_id;
- unsigned c_access_flags;
- hid_t c_acc_prp;
- c_acc_prp = (hid_t)*acc_prp;
-
- /*
- * Define access flags
- */
- c_access_flags = (unsigned) *access_flags;
-
- /*
- * Define access property
- */
- c_acc_prp = *acc_prp;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_namelen = *namelen;
- c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
- if(c_name == NULL)
- return ret_value;
-
- /*
- * Call H5Fopen function.
- */
- c_file_id = H5Fopen(c_name, c_access_flags, c_acc_prp);
-
- if(c_file_id >= 0) {
- ret_value = 0;
- *file_id = (hid_t_f)c_file_id;
- } /* end if */
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char * c_name;
+ int_f c_namelen;
+ hid_t c_file_id;
+ unsigned c_access_flags;
+ hid_t c_acc_prp;
+ c_acc_prp = (hid_t)*acc_prp;
+
+ /*
+ * Define access flags
+ */
+ c_access_flags = (unsigned)*access_flags;
+
+ /*
+ * Define access property
+ */
+ c_acc_prp = *acc_prp;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_namelen = *namelen;
+ c_name = (char *)HD5f2cstring(name, (size_t)c_namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Fopen function.
+ */
+ c_file_id = H5Fopen(c_name, c_access_flags, c_acc_prp);
+
+ if (c_file_id >= 0) {
+ ret_value = 0;
+ *file_id = (hid_t_f)c_file_id;
+ } /* end if */
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Ff/h5freopen_c
@@ -316,22 +319,23 @@ h5fopen_c (_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid
* Xiangyang Su
* Wednesday, November 3, 1999
* SOURCE
-*/
+ */
int_f
-h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2)
+h5freopen_c(hid_t_f *file_id1, hid_t_f *file_id2)
/******/
{
- int ret_value = -1;
- hid_t c_file_id1, c_file_id2;
+ int ret_value = -1;
+ hid_t c_file_id1, c_file_id2;
- c_file_id1 = *file_id1;
- c_file_id2 = H5Freopen(c_file_id1);
+ c_file_id1 = *file_id1;
+ c_file_id2 = H5Freopen(c_file_id1);
- if (c_file_id2 < 0) return ret_value;
- *file_id2 = (hid_t_f)c_file_id2;
+ if (c_file_id2 < 0)
+ return ret_value;
+ *file_id2 = (hid_t_f)c_file_id2;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Ff/h5fget_create_plist_c
@@ -349,22 +353,23 @@ h5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2)
* Elena Pourmal, Xiangyang Su
* Wednesday, November 3, 1999
* SOURCE
-*/
+ */
int_f
-h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id)
+h5fget_create_plist_c(hid_t_f *file_id, hid_t_f *prop_id)
/******/
{
- int ret_value = -1;
- hid_t c_file_id, c_prop_id;
+ int ret_value = -1;
+ hid_t c_file_id, c_prop_id;
- c_file_id = (hid_t)*file_id;
- c_prop_id = H5Fget_create_plist(c_file_id);
+ c_file_id = (hid_t)*file_id;
+ c_prop_id = H5Fget_create_plist(c_file_id);
- if (c_prop_id < 0) return ret_value;
- *prop_id = (hid_t_f)c_prop_id;
+ if (c_prop_id < 0)
+ return ret_value;
+ *prop_id = (hid_t_f)c_prop_id;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Ff/h5fget_access_plist_c
@@ -384,22 +389,23 @@ h5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id)
+h5fget_access_plist_c(hid_t_f *file_id, hid_t_f *access_id)
/******/
{
- int ret_value = -1;
- hid_t c_file_id, c_access_id;
+ int ret_value = -1;
+ hid_t c_file_id, c_access_id;
- c_file_id = (hid_t)*file_id;
- c_access_id = H5Fget_access_plist(c_file_id);
+ c_file_id = (hid_t)*file_id;
+ c_access_id = H5Fget_access_plist(c_file_id);
- if (c_access_id < 0) return ret_value;
- *access_id = (hid_t_f)c_access_id;
+ if (c_access_id < 0)
+ return ret_value;
+ *access_id = (hid_t_f)c_access_id;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Ff/h5fclose_c
@@ -417,18 +423,19 @@ h5fget_access_plist_c (hid_t_f *file_id, hid_t_f *access_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5fclose_c ( hid_t_f *file_id )
+h5fclose_c(hid_t_f *file_id)
/******/
{
- int ret_value = 0;
- hid_t c_file_id;
+ int ret_value = 0;
+ hid_t c_file_id;
- c_file_id = (hid_t)*file_id;
- if ( H5Fclose(c_file_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_file_id = (hid_t)*file_id;
+ if (H5Fclose(c_file_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Ff/h5fget_obj_count_c
* NAME
@@ -449,23 +456,23 @@ h5fclose_c ( hid_t_f *file_id )
* Changed type of obj_count to size_t_f
* Thursday, September 25, 2008
* SOURCE
-*/
+ */
int_f
-h5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count)
+h5fget_obj_count_c(hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count)
/******/
{
- int ret_value = 0;
- hid_t c_file_id;
- unsigned c_obj_type;
- ssize_t c_obj_count;
-
+ int ret_value = 0;
+ hid_t c_file_id;
+ unsigned c_obj_type;
+ ssize_t c_obj_count;
- c_file_id = (hid_t)*file_id;
- c_obj_type = (unsigned) *obj_type;
- if ( (c_obj_count=H5Fget_obj_count(c_file_id, c_obj_type)) < 0 ) ret_value = -1;
- *obj_count = (size_t_f)c_obj_count;
- return ret_value;
+ c_file_id = (hid_t)*file_id;
+ c_obj_type = (unsigned)*obj_type;
+ if ((c_obj_count = H5Fget_obj_count(c_file_id, c_obj_type)) < 0)
+ ret_value = -1;
+ *obj_count = (size_t_f)c_obj_count;
+ return ret_value;
}
/****if* H5Ff/h5fget_obj_ids_c
* NAME
@@ -488,29 +495,28 @@ h5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count)
* Thursday, September 25, 2008 EIP
*
* SOURCE
-*/
+ */
int_f
-h5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs,
- hid_t_f *obj_ids, size_t_f *num_objs)
+h5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids, size_t_f *num_objs)
/******/
{
- int ret_value = 0;
- hid_t c_file_id;
+ int ret_value = 0;
+ hid_t c_file_id;
unsigned c_obj_type;
- size_t u;
- size_t c_max_objs;
- ssize_t c_num_objs;
- hid_t *c_obj_ids;
+ size_t u;
+ size_t c_max_objs;
+ ssize_t c_num_objs;
+ hid_t * c_obj_ids;
- c_file_id = (hid_t)*file_id;
- c_obj_type = (unsigned) *obj_type;
+ c_file_id = (hid_t)*file_id;
+ c_obj_type = (unsigned)*obj_type;
c_max_objs = (size_t)*max_objs;
- c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t)*c_max_objs);
+ c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t) * c_max_objs);
c_num_objs = H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, c_obj_ids);
- if(c_num_objs < 0)
+ if (c_num_objs < 0)
ret_value = -1;
- for(u = 0; u < c_max_objs; u++)
+ for (u = 0; u < c_max_objs; u++)
obj_ids[u] = (hid_t_f)c_obj_ids[u];
HDfree(c_obj_ids);
@@ -533,20 +539,21 @@ h5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs,
* Quincey Koziol
* Tuesday, October 7, 2003
* SOURCE
-*/
+ */
int_f
-h5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space)
+h5fget_freespace_c(hid_t_f *file_id, hssize_t_f *free_space)
/******/
{
- int ret_value = 0;
- hid_t c_file_id;
- hssize_t c_free_space;
-
- c_file_id = (hid_t)*file_id;
- if ( (c_free_space=H5Fget_freespace(c_file_id)) < 0 ) ret_value = -1;
- *free_space=(hssize_t_f)c_free_space;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_file_id;
+ hssize_t c_free_space;
+
+ c_file_id = (hid_t)*file_id;
+ if ((c_free_space = H5Fget_freespace(c_file_id)) < 0)
+ ret_value = -1;
+ *free_space = (hssize_t_f)c_free_space;
+ return ret_value;
}
/****if* H5Ff/h5fget_name_c
@@ -566,36 +573,37 @@ h5fget_freespace_c ( hid_t_f *file_id , hssize_t_f *free_space)
* Elena Pourmal
* Tuesday, July 6, 2004
* SOURCE
-*/
+ */
int_f
h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen)
/******/
{
- char *c_buf = NULL; /* Buffer to hold C string */
- ssize_t size_c = -1;
- int_f ret_value = 0; /* Return value */
-
- /*
- * Allocate buffer to hold name of an attribute
- */
- if(NULL == (c_buf = (char *)HDmalloc((size_t)*buflen + 1)))
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Fget_name function
- */
- if ((size_c = H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0)
- HGOTO_DONE(FAIL);
-
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*buflen);
+ char * c_buf = NULL; /* Buffer to hold C string */
+ ssize_t size_c = -1;
+ int_f ret_value = 0; /* Return value */
+
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
+ if (NULL == (c_buf = (char *)HDmalloc((size_t)*buflen + 1)))
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Fget_name function
+ */
+ if ((size_c = H5Fget_name((hid_t)*obj_id, c_buf, (size_t)*buflen)) < 0)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(buf), (size_t)*buflen);
done:
- *size = (size_t_f)size_c;
- if(c_buf) HDfree(c_buf);
- return ret_value;
+ *size = (size_t_f)size_c;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Ff/h5fget_filesize_c
@@ -613,23 +621,23 @@ done:
* Elena Pourmal
* Wednesday, July 7, 2004
* SOURCE
-*/
+ */
int_f
h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size)
/******/
{
hsize_t size_c;
- herr_t ret_value=0; /* Return value */
+ herr_t ret_value = 0; /* Return value */
- /*
- * Call H5Fget_filesize function
- */
- if ((ret_value = H5Fget_filesize((hid_t)*file_id, &size_c)) < 0)
- HGOTO_DONE(FAIL);
- *size = (hsize_t_f)size_c;
+ /*
+ * Call H5Fget_filesize function
+ */
+ if ((ret_value = H5Fget_filesize((hid_t)*file_id, &size_c)) < 0)
+ HGOTO_DONE(FAIL);
+ *size = (hsize_t_f)size_c;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5Ff/h5fget_fileno_c
@@ -647,23 +655,23 @@ done:
* Quincey Koziol
* Saturday, April 13, 2019
* SOURCE
-*/
+ */
int_f
h5fget_fileno_c(hid_t_f *file_id, int_f *fileno)
/******/
{
unsigned long fileno_c;
- herr_t ret_value=0; /* Return value */
+ herr_t ret_value = 0; /* Return value */
- /*
- * Call H5Fget_filesize function
- */
- if ((ret_value = H5Fget_fileno((hid_t)*file_id, &fileno_c)) < 0)
- HGOTO_DONE(FAIL);
- *fileno = (hsize_t_f)fileno_c;
+ /*
+ * Call H5Fget_filesize function
+ */
+ if ((ret_value = H5Fget_fileno((hid_t)*file_id, &fileno_c)) < 0)
+ HGOTO_DONE(FAIL);
+ *fileno = (hsize_t_f)fileno_c;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5Ff/h5fget_file_image_c
@@ -683,22 +691,22 @@ done:
* M. Scot Breitenfeld
* November 26, 2012
* SOURCE
-*/
+ */
int_f
h5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f *buf_req)
/******/
{
- herr_t ret_value=0; /* Return value */
+ herr_t ret_value = 0; /* Return value */
ssize_t c_buf_req;
/*
* Call h5fget_file_image function
*/
- if ( (c_buf_req = H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0)
- HGOTO_DONE(FAIL);
+ if ((c_buf_req = H5Fget_file_image((hid_t)*file_id, buf_ptr, (size_t)*buf_len)) < 0)
+ HGOTO_DONE(FAIL);
*buf_req = (size_t_f)c_buf_req;
done:
- return ret_value;
+ return ret_value;
}
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index 770752d..1e266e7 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -44,51 +44,52 @@
* H5Gcreate1 can be compiled out of the library
* QAK - 2007/08/23
* SOURCE
-*/
+ */
int_f
-h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint,
- hid_t_f *grp_id, hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id )
+h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id,
+ hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id)
/******/
{
- hid_t c_gcpl_id = -1; /* Group creation property list */
- char *c_name = NULL;
+ hid_t c_gcpl_id = -1; /* Group creation property list */
+ char *c_name = NULL;
hid_t c_grp_id;
int_f ret_value = -1;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Call H5Gcreate function.
*/
- if(*size_hint == (size_t_f)OBJECT_NAMELEN_DEFAULT_F ){
- c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name,(hid_t)*lcpl_id,(hid_t)*gcpl_id,(hid_t)*gapl_id);}
+ if (*size_hint == (size_t_f)OBJECT_NAMELEN_DEFAULT_F) {
+ c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, (hid_t)*lcpl_id, (hid_t)*gcpl_id, (hid_t)*gapl_id);
+ }
else {
- /* Create the group creation property list */
- if((c_gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
- goto DONE;
+ /* Create the group creation property list */
+ if ((c_gcpl_id = H5Pcreate(H5P_GROUP_CREATE)) < 0)
+ goto DONE;
- /* Set the local heap size hint */
- if(H5Pset_local_heap_size_hint(c_gcpl_id, (size_t)*size_hint) < 0)
- goto DONE;
+ /* Set the local heap size hint */
+ if (H5Pset_local_heap_size_hint(c_gcpl_id, (size_t)*size_hint) < 0)
+ goto DONE;
- /* Create the group */
- c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, H5P_DEFAULT, c_gcpl_id, H5P_DEFAULT);
+ /* Create the group */
+ c_grp_id = H5Gcreate2((hid_t)*loc_id, c_name, H5P_DEFAULT, c_gcpl_id, H5P_DEFAULT);
}
- if(c_grp_id < 0)
+ if (c_grp_id < 0)
goto DONE;
/* Everything OK, set values to return */
- *grp_id = (hid_t_f)c_grp_id;
+ *grp_id = (hid_t_f)c_grp_id;
ret_value = 0;
DONE:
- if(c_gcpl_id > 0)
+ if (c_gcpl_id > 0)
H5Pclose(c_gcpl_id);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -112,35 +113,35 @@ DONE:
* Wednesday, August 5, 1999
*
* SOURCE
-*/
+ */
int_f
h5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id)
/******/
{
- char *c_name = NULL;
- hid_t c_grp_id;
- int ret_value = -1;
-
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ char *c_name = NULL;
+ hid_t c_grp_id;
+ int ret_value = -1;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
- /*
- * Call H5Gopen function.
- */
- if((c_grp_id = H5Gopen2((hid_t)*loc_id, c_name, (hid_t)*gapl_id)) < 0)
+ /*
+ * Call H5Gopen function.
+ */
+ if ((c_grp_id = H5Gopen2((hid_t)*loc_id, c_name, (hid_t)*gapl_id)) < 0)
goto DONE;
/* Everything OK, set values to return */
- *grp_id = (hid_t_f)c_grp_id;
+ *grp_id = (hid_t_f)c_grp_id;
ret_value = 0;
DONE:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Gf/h5gget_obj_info_idx_c
@@ -164,48 +165,50 @@ DONE:
* Elena Pourmal
* Wednesday, August 5, 1999
* SOURCE
-*/
+ */
int_f
-h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
- _fcd obj_name, int_f *obj_namelen, int_f *obj_type)
+h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name,
+ int_f *obj_namelen, int_f *obj_type)
/******/
{
H5O_info2_t oinfo;
- hid_t c_loc_id = (hid_t)*loc_id;
- char *c_name = NULL;
- size_t c_obj_namelen;
- char *c_obj_name = NULL;
- hsize_t c_idx = (hsize_t)*idx;
- hid_t gid = (-1); /* Temporary group ID */
- int ret_value = -1;
+ hid_t c_loc_id = (hid_t)*loc_id;
+ char * c_name = NULL;
+ size_t c_obj_namelen;
+ char * c_obj_name = NULL;
+ hsize_t c_idx = (hsize_t)*idx;
+ hid_t gid = (-1); /* Temporary group ID */
+ int ret_value = -1;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Allocate buffer to hold name of the object
*/
c_obj_namelen = (size_t)*obj_namelen;
- if(c_obj_namelen)
- if(NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1)))
- goto DONE;
+ if (c_obj_namelen)
+ if (NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1)))
+ goto DONE;
/* Get a temporary group ID for the group to query */
- if((gid = H5Gopen2(c_loc_id, c_name, H5P_DEFAULT)) < 0)
+ if ((gid = H5Gopen2(c_loc_id, c_name, H5P_DEFAULT)) < 0)
goto DONE;
/* Query the object's information */
- if(H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen, H5P_DEFAULT) < 0)
+ if (H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen,
+ H5P_DEFAULT) < 0)
goto DONE;
- if(H5Oget_info_by_idx3(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
+ if (H5Oget_info_by_idx3(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5O_INFO_BASIC,
+ H5P_DEFAULT) < 0)
goto DONE;
-/* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't
- * work on non-hard links - QAK
- */
+ /* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't
+ * work on non-hard links - QAK
+ */
*obj_type = oinfo.type;
/*
@@ -216,12 +219,12 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
DONE:
/* Close the temporary group, if it was opened */
- if(gid > 0)
+ if (gid > 0)
H5Gclose(gid);
- if(c_obj_name)
+ if (c_obj_name)
HDfree(c_obj_name);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -243,30 +246,30 @@ DONE:
* Elena Pourmal
* Wednesday, August 5, 1999
* SOURCE
-*/
+ */
int_f
h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers)
/******/
{
- char *c_name = NULL;
+ char * c_name = NULL;
H5G_info_t ginfo;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/* Call H5Gget_info_by_name() for the number of objects in the group */
- if(H5Gget_info_by_name((hid_t)*loc_id, c_name, &ginfo, H5P_DEFAULT) < 0)
+ if (H5Gget_info_by_name((hid_t)*loc_id, c_name, &ginfo, H5P_DEFAULT) < 0)
goto DONE;
*nmembers = (int_f)ginfo.nlinks;
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -284,7 +287,7 @@ DONE:
* Elena Pourmal
* Wednesday, August 5, 1999
* SOURCE
-*/
+ */
int_f
h5gclose_c(hid_t_f *grp_id)
@@ -292,12 +295,11 @@ h5gclose_c(hid_t_f *grp_id)
{
int ret_value = 0;
- if(H5Gclose((hid_t)*grp_id) < 0)
+ if (H5Gclose((hid_t)*grp_id) < 0)
ret_value = -1;
return ret_value;
}
-
/****if* H5Gf/h5glink_c
* NAME
* h5glink_c
@@ -317,67 +319,68 @@ h5gclose_c(hid_t_f *grp_id)
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
-h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name,
- int_f *current_namelen, _fcd new_name, int_f *new_namelen)
+h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name,
+ int_f *new_namelen)
/******/
{
char *c_current_name = NULL, *c_new_name = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
- * Convert Fortran name to C name
- */
- if(NULL == (c_current_name = (char *)HD5f2cstring(current_name, (size_t)*current_namelen)))
+ * Convert Fortran name to C name
+ */
+ if (NULL == (c_current_name = (char *)HD5f2cstring(current_name, (size_t)*current_namelen)))
goto DONE;
- if(NULL == (c_new_name = (char *)HD5f2cstring(new_name, (size_t)*new_namelen)))
+ if (NULL == (c_new_name = (char *)HD5f2cstring(new_name, (size_t)*new_namelen)))
goto DONE;
/*
- * Call appropriate link creation function
- */
- switch((H5L_type_t)*link_type) {
+ * Call appropriate link creation function
+ */
+ switch ((H5L_type_t)*link_type) {
case H5L_TYPE_HARD:
- if(H5Lcreate_hard((hid_t)*loc_id, c_current_name, H5L_SAME_LOC, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_hard((hid_t)*loc_id, c_current_name, H5L_SAME_LOC, c_new_name, H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
goto DONE;
break;
case H5L_TYPE_SOFT:
- if(H5Lcreate_soft(c_current_name, (hid_t)*loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_soft(c_current_name, (hid_t)*loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
break;
- /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
case H5L_TYPE_EXTERNAL:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
case H5L_TYPE_MAX:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
case H5L_TYPE_ERROR:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
- /* End of the warnings fix */
+ /* End of the warnings fix */
- default: /* Unknown/unhandled link type */
+ default: /* Unknown/unhandled link type */
goto DONE;
} /* end switch */
ret_value = 0;
DONE:
- if(c_current_name)
+ if (c_current_name)
HDfree(c_current_name);
- if(c_new_name)
+ if (c_new_name)
HDfree(c_new_name);
- return ret_value ;
+ return ret_value;
}
/****if* H5Gf/h5glink2_c
@@ -404,65 +407,66 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen,
- int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen)
+h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id,
+ _fcd new_name, int_f *new_namelen)
/******/
{
char *c_cur_name = NULL, *c_new_name = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_cur_name = (char *)HD5f2cstring(cur_name, (size_t)*cur_namelen)))
+ if (NULL == (c_cur_name = (char *)HD5f2cstring(cur_name, (size_t)*cur_namelen)))
goto DONE;
- if(NULL == (c_new_name = (char *)HD5f2cstring(new_name, (size_t)*new_namelen)))
+ if (NULL == (c_new_name = (char *)HD5f2cstring(new_name, (size_t)*new_namelen)))
goto DONE;
/*
- * Call appropriate link creation function
- */
- switch((H5L_type_t)*link_type) {
+ * Call appropriate link creation function
+ */
+ switch ((H5L_type_t)*link_type) {
case H5L_TYPE_HARD:
- if(H5Lcreate_hard((hid_t)*cur_loc_id, c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_hard((hid_t)*cur_loc_id, c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT,
+ H5P_DEFAULT) < 0)
goto DONE;
break;
case H5L_TYPE_SOFT:
- if(H5Lcreate_soft(c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lcreate_soft(c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
break;
- /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
case H5L_TYPE_EXTERNAL:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
case H5L_TYPE_MAX:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
case H5L_TYPE_ERROR:
ret_value = -1;
- goto DONE;
+ goto DONE;
break;
- /* End of the warnings fix */
+ /* End of the warnings fix */
- default: /* Unknown/unhandled link type */
+ default: /* Unknown/unhandled link type */
goto DONE;
} /* end switch */
ret_value = 0;
DONE:
- if(c_cur_name)
+ if (c_cur_name)
HDfree(c_cur_name);
- if(c_new_name)
+ if (c_new_name)
HDfree(c_new_name);
- return ret_value ;
+ return ret_value;
}
/****if* H5Gf/h5gunlink_c
@@ -479,30 +483,30 @@ DONE:
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen)
/******/
{
- char *c_name = NULL;
- int ret_value = -1;
+ char *c_name = NULL;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Call H5Gunlink function
*/
- if(H5Ldelete((hid_t)*loc_id, c_name, H5P_DEFAULT) < 0)
+ if (H5Ldelete((hid_t)*loc_id, c_name, H5P_DEFAULT) < 0)
goto DONE;
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -524,35 +528,35 @@ DONE:
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
-h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f*dst_namelen)
+h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen)
/******/
{
char *c_src_name = NULL, *c_dst_name = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
+ if (NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
goto DONE;
- if(NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
+ if (NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
goto DONE;
/*
* Call H5Gmove function
*/
- if(H5Lmove((hid_t)*loc_id, c_src_name, H5L_SAME_LOC, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lmove((hid_t)*loc_id, c_src_name, H5L_SAME_LOC, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
ret_value = 0;
DONE:
- if(c_src_name)
+ if (c_src_name)
HDfree(c_src_name);
- if(c_dst_name)
+ if (c_dst_name)
HDfree(c_dst_name);
return ret_value;
}
@@ -576,35 +580,36 @@ DONE:
* Wednesday, September 25, 2002
*
* SOURCE
-*/
+ */
int_f
-h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name, int_f*dst_namelen)
+h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id, _fcd dst_name,
+ int_f *dst_namelen)
/******/
{
char *c_src_name = NULL, *c_dst_name = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
+ if (NULL == (c_src_name = (char *)HD5f2cstring(src_name, (size_t)*src_namelen)))
goto DONE;
- if(NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
+ if (NULL == (c_dst_name = (char *)HD5f2cstring(dst_name, (size_t)*dst_namelen)))
goto DONE;
/*
* Call H5Gmove2 function
*/
- if(H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
+ if (H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dst_loc_id, c_dst_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
ret_value = 0;
DONE:
- if(c_src_name)
+ if (c_src_name)
HDfree(c_src_name);
- if(c_dst_name)
+ if (c_dst_name)
HDfree(c_dst_name);
return ret_value;
}
@@ -627,37 +632,37 @@ DONE:
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
-h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size,
- _fcd value)
+h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value)
/******/
{
- char *c_name = NULL;
- char *c_value = NULL;
- int ret_value = -1;
+ char *c_name = NULL;
+ char *c_value = NULL;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Allocate buffer to hold name of the value
*/
- if(*size) c_value = (char *)HDmalloc((size_t)*size);
- if(c_value == NULL) {
- HDfree(c_name);
- return ret_value;
- }
+ if (*size)
+ c_value = (char *)HDmalloc((size_t)*size);
+ if (c_value == NULL) {
+ HDfree(c_name);
+ return ret_value;
+ }
/*
* Call H5Lget_val function
*/
- if(H5Lget_val((hid_t)*loc_id, c_name, c_value, (size_t)*size, H5P_DEFAULT) < 0)
- goto DONE;
+ if (H5Lget_val((hid_t)*loc_id, c_name, c_value, (size_t)*size, H5P_DEFAULT) < 0)
+ goto DONE;
/*
* Convert C name to FORTRAN and place it in the given buffer
@@ -666,9 +671,9 @@ h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size,
ret_value = 0;
DONE:
- if(c_value)
+ if (c_value)
HDfree(c_value);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -692,34 +697,33 @@ DONE:
* HISTORY
* Elena Pourmal
* SOURCE
-*/
+ */
int_f
-h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment,
- int_f *commentlen)
+h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen)
/******/
{
char *c_name = NULL, *c_comment = NULL;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
- if(NULL == (c_comment = (char *)HD5f2cstring(comment, (size_t)*commentlen)))
+ if (NULL == (c_comment = (char *)HD5f2cstring(comment, (size_t)*commentlen)))
goto DONE;
/*
* Call H5Oset_comment_by_name function
*/
- if(H5Oset_comment_by_name((hid_t)*loc_id, c_name, c_comment, H5P_DEFAULT) < 0)
+ if (H5Oset_comment_by_name((hid_t)*loc_id, c_name, c_comment, H5P_DEFAULT) < 0)
goto DONE;
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_comment)
+ if (c_comment)
HDfree(c_comment);
return ret_value;
}
@@ -741,47 +745,46 @@ DONE:
* Mingshi Chen
* Friday, August 6, 1999
* SOURCE
-*/
+ */
int_f
-h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize,
- _fcd comment)
+h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment)
/******/
{
- char *c_name = NULL, *c_comment = NULL;
+ char * c_name = NULL, *c_comment = NULL;
size_t c_bufsize;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert Fortran name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto DONE;
/*
* Allocate buffer to hold the comment
*/
c_bufsize = (size_t)*bufsize;
- if(c_bufsize) {
- if(NULL == (c_comment = (char *)HDmalloc(c_bufsize + 1)))
+ if (c_bufsize) {
+ if (NULL == (c_comment = (char *)HDmalloc(c_bufsize + 1)))
goto DONE;
} /* end if */
/*
* Call H5Oget_comment_by_name function
*/
- if(H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, c_bufsize, H5P_DEFAULT) < 0)
+ if (H5Oget_comment_by_name((hid_t)*loc_id, c_name, c_comment, c_bufsize, H5P_DEFAULT) < 0)
goto DONE;
/*
- * Convert C name to FORTRAN and place it in the given buffer
- */
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
HD5packFstring(c_comment, _fcdtocp(comment), c_bufsize);
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_comment)
+ if (c_comment)
HDfree(c_comment);
return ret_value;
}
@@ -805,16 +808,16 @@ DONE:
* M. Scot Breitenfeld
* February 15, 2008
* SOURCE
-*/
+ */
int_f
h5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- if ((*grp_id = (hid_t_f)H5Gcreate_anon((hid_t)*loc_id,(hid_t)*gcpl_id,(hid_t)*gapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ if ((*grp_id = (hid_t_f)H5Gcreate_anon((hid_t)*loc_id, (hid_t)*gcpl_id, (hid_t)*gapl_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
return ret_value;
@@ -837,21 +840,20 @@ done:
* M. Scot Breitenfeld
* February 15, 2008
* SOURCE
-*/
+ */
int_f
-h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id )
+h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id)
/******/
{
- int_f ret_value=0; /* Return value */
+ int_f ret_value = 0; /* Return value */
- if ((*gcpl_id = (hid_t_f)H5Gget_create_plist((hid_t)*grp_id)) < 0)
- HGOTO_DONE(FAIL);
+ if ((*gcpl_id = (hid_t_f)H5Gget_create_plist((hid_t)*grp_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
return ret_value;
}
-
/****if* H5Gf/h5gget_info_c
* NAME
* h5gget_info_c
@@ -881,34 +883,34 @@ done:
* M. Scot Breitenfeld
* July 16, 2008
* SOURCE
-*/
+ */
int_f
-h5gget_info_c (hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted )
+h5gget_info_c(hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted)
/******/
{
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
H5G_info_t ginfo;
- /*
- * Call H5Gget_info function.
- */
- if(H5Gget_info((hid_t)*group_id,&ginfo) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Gget_info function.
+ */
+ if (H5Gget_info((hid_t)*group_id, &ginfo) < 0)
+ HGOTO_DONE(FAIL);
/* Unpack the structure */
*storage_type = (int_f)ginfo.storage_type;
- *nlinks = (int_f)ginfo.nlinks;
- *max_corder = (int_f)ginfo.max_corder;
- *mounted = 0;
- if(ginfo.mounted) *mounted = 1;
+ *nlinks = (int_f)ginfo.nlinks;
+ *max_corder = (int_f)ginfo.max_corder;
+ *mounted = 0;
+ if (ginfo.mounted)
+ *mounted = 1;
done:
return ret_value;
}
-
/****if* H5Gf/h5gget_info_by_idx_c
* NAME
* h5gget_info_by_idx_c
@@ -945,41 +947,42 @@ done:
* M. Scot Breitenfeld
* July 16, 2008
* SOURCE
-*/
+ */
int_f
-h5gget_info_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 *lapl_id,
- int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted )
+h5gget_info_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 *lapl_id, int_f *storage_type, int_f *nlinks,
+ int_f *max_corder, int_f *mounted)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold group name C string */
- int_f ret_value = 0; /* Return value */
- H5G_info_t ginfo;
- /*
- * Convert FORTRAN name to C name
- */
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Gget_info_by_idx function.
- */
- if(H5Gget_info_by_idx((hid_t)*loc_id,c_group_name, (H5_index_t)*index_type,(H5_iter_order_t)*order,(hsize_t)*n,
- &ginfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- /* Unpack the structure */
-
- *storage_type = (int_f)ginfo.storage_type;
- *nlinks = (int_f)ginfo.nlinks;
- *max_corder = (int_f)ginfo.max_corder;
- *mounted = 0;
- if(ginfo.mounted) *mounted = 1;
-
- done:
- if(c_group_name)
- HDfree(c_group_name);
- return ret_value;
+ char * c_group_name = NULL; /* Buffer to hold group name C string */
+ int_f ret_value = 0; /* Return value */
+ H5G_info_t ginfo;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Gget_info_by_idx function.
+ */
+ if (H5Gget_info_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
+ (hsize_t)*n, &ginfo, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Unpack the structure */
+
+ *storage_type = (int_f)ginfo.storage_type;
+ *nlinks = (int_f)ginfo.nlinks;
+ *max_corder = (int_f)ginfo.max_corder;
+ *mounted = 0;
+ if (ginfo.mounted)
+ *mounted = 1;
+
+done:
+ if (c_group_name)
+ HDfree(c_group_name);
+ return ret_value;
}
/****if* H5Gf/h5gget_info_by_name_c
@@ -1015,37 +1018,38 @@ h5gget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
* M. Scot Breitenfeld
* July 16, 2008
* SOURCE
-*/
+ */
int_f
h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id,
- int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted)
+ int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold group name C string */
- int_f ret_value = 0; /* Return value */
- H5G_info_t ginfo;
- /*
- * Convert FORTRAN name to C name
- */
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Gget_info_by_name function.
- */
- if(H5Gget_info_by_name((hid_t)*loc_id, c_group_name, &ginfo, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- /* Unpack the structure */
-
- *storage_type = (int_f)ginfo.storage_type;
- *nlinks = (int_f)ginfo.nlinks;
- *max_corder = (int_f)ginfo.max_corder;
- *mounted = 0;
- if(ginfo.mounted) *mounted = 1;
-
- done:
- if(c_group_name)
- HDfree(c_group_name);
- return ret_value;
+ char * c_group_name = NULL; /* Buffer to hold group name C string */
+ int_f ret_value = 0; /* Return value */
+ H5G_info_t ginfo;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Gget_info_by_name function.
+ */
+ if (H5Gget_info_by_name((hid_t)*loc_id, c_group_name, &ginfo, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Unpack the structure */
+
+ *storage_type = (int_f)ginfo.storage_type;
+ *nlinks = (int_f)ginfo.nlinks;
+ *max_corder = (int_f)ginfo.max_corder;
+ *mounted = 0;
+ if (ginfo.mounted)
+ *mounted = 1;
+
+done:
+ if (c_group_name)
+ HDfree(c_group_name);
+ return ret_value;
}
diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c
index 8222817..1b44924 100644
--- a/fortran/src/H5If.c
+++ b/fortran/src/H5If.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -38,24 +38,25 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5iget_type_c (hid_t_f *obj_id, int_f *type)
+h5iget_type_c(hid_t_f *obj_id, int_f *type)
/******/
{
- int ret_value = -1;
- hid_t c_obj_id;
- H5I_type_t c_type;
+ int ret_value = -1;
+ hid_t c_obj_id;
+ H5I_type_t c_type;
- /*
- * Call H5Iget_type function.
- */
- c_obj_id = *obj_id;
- c_type = H5Iget_type(c_obj_id);
- if (c_type == H5I_BADID) return ret_value;
- *type = (int_f)c_type;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Iget_type function.
+ */
+ c_obj_id = *obj_id;
+ c_type = H5Iget_type(c_obj_id);
+ if (c_type == H5I_BADID)
+ return ret_value;
+ *type = (int_f)c_type;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5If/h5iget_name_c
* NAME
@@ -79,41 +80,43 @@ h5iget_type_c (hid_t_f *obj_id, int_f *type)
* exact size of the string (buf_size) is passed in.
* M. Scot Breitenfeld, April 21, 2008
* SOURCE
-*/
+ */
int_f
h5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_size)
/******/
{
- int ret_value = -1;
- hid_t c_obj_id;
- ssize_t c_size;
- size_t c_buf_size;
- char *c_buf =NULL;
+ int ret_value = -1;
+ hid_t c_obj_id;
+ ssize_t c_size;
+ size_t c_buf_size;
+ char * c_buf = NULL;
- /*
- * Allocate buffer to hold name of an object
- */
- c_buf_size = (size_t)*buf_size +1;
- c_buf = (char *)HDmalloc(c_buf_size);
- if (c_buf == NULL) return ret_value;
+ /*
+ * Allocate buffer to hold name of an object
+ */
+ c_buf_size = (size_t)*buf_size + 1;
+ c_buf = (char *)HDmalloc(c_buf_size);
+ if (c_buf == NULL)
+ return ret_value;
- /*
- * Call H5IAget_name function
- */
- c_obj_id = (hid_t)*obj_id;
- c_size = H5Iget_name(c_obj_id, c_buf, c_buf_size);
- if (c_size < 0) goto DONE;
+ /*
+ * Call H5IAget_name function
+ */
+ c_obj_id = (hid_t)*obj_id;
+ c_size = H5Iget_name(c_obj_id, c_buf, c_buf_size);
+ if (c_size < 0)
+ goto DONE;
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(buf), c_buf_size-1);
- *name_size = (size_t_f)c_size;
- ret_value = 0;
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(buf), c_buf_size - 1);
+ *name_size = (size_t_f)c_size;
+ ret_value = 0;
DONE:
- HDfree(c_buf);
- return ret_value;
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5If/h5iinc_ref_c
@@ -131,25 +134,25 @@ DONE:
* Quincey Koziol
* Tuesday, December 9, 2003
* SOURCE
-*/
+ */
int_f
h5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
- int ret_value;
+ int ret_value;
- /*
- * Call H5Iinc_ref function
- */
- if ((ret_value = H5Iinc_ref(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Iinc_ref function
+ */
+ if ((ret_value = H5Iinc_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
/* Set output & return values */
- *ref_count=ret_value;
- ret_value=0;
+ *ref_count = ret_value;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5If/h5idec_ref_c
@@ -167,25 +170,25 @@ done:
* Quincey Koziol
* Tuesday, December 9, 2003
* SOURCE
-*/
+ */
int_f
h5idec_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
- int ret_value;
+ int ret_value;
- /*
- * Call H5Idec_ref function
- */
- if ((ret_value = H5Idec_ref(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Idec_ref function
+ */
+ if ((ret_value = H5Idec_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
/* Set output & return values */
- *ref_count=ret_value;
- ret_value=0;
+ *ref_count = ret_value;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5If/h5iget_ref_c
@@ -204,25 +207,25 @@ done:
* Tuesday, December 9, 2003
*
* SOURCE
-*/
+ */
int_f
h5iget_ref_c(hid_t_f *obj_id, int_f *ref_count)
/******/
{
- int ret_value;
+ int ret_value;
- /*
- * Call H5Iget_ref function
- */
- if ((ret_value = H5Iget_ref(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Iget_ref function
+ */
+ if ((ret_value = H5Iget_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
/* Set output & return values */
- *ref_count=ret_value;
- ret_value=0;
+ *ref_count = ret_value;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
/****if* H5If/h5iget_file_id_c
@@ -241,26 +244,26 @@ done:
* Tuesday, August 24, 2004
*
* SOURCE
-*/
+ */
int_f
h5iget_file_id_c(hid_t_f *obj_id, hid_t_f *file_id)
/******/
{
- int ret_value;
- hid_t c_file_id;
+ int ret_value;
+ hid_t c_file_id;
- /*
- * Call H5Iget_file_id
- */
- if ((c_file_id = H5Iget_file_id(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Iget_file_id
+ */
+ if ((c_file_id = H5Iget_file_id(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
/* Set output & return values */
- *file_id=(hid_t_f)c_file_id;
- ret_value=0;
+ *file_id = (hid_t_f)c_file_id;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -276,19 +279,19 @@ done:
int_f
h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid)
{
- int ret_value;
- htri_t c_ret_value;
+ int ret_value;
+ htri_t c_ret_value;
- /*
- * Call H5Iis_valid
- */
- if ((c_ret_value = H5Iis_valid(*obj_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Iis_valid
+ */
+ if ((c_ret_value = H5Iis_valid(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
- /* Set output & return values */
- *c_valid = (int_f)c_ret_value;
- ret_value=0;
+ /* Set output & return values */
+ *c_valid = (int_f)c_ret_value;
+ ret_value = 0;
done:
- return ret_value;
+ return ret_value;
}
diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c
index 1fee5e8..2614c10 100644
--- a/fortran/src/H5Lf.c
+++ b/fortran/src/H5Lf.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -48,40 +48,39 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
- _fcd dest_name, size_t_f *dest_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id)
+h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _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_src_name = NULL;
char *c_dest_name = NULL;
- int_f ret_value = 0;
+ int_f ret_value = 0;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)))
+ 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)))
+ 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)
+ 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)
+ if (c_src_name)
HDfree(c_src_name);
- if(c_dest_name)
+ if (c_dest_name)
HDfree(c_dest_name);
- return ret_value;
+ return ret_value;
}
/****if* H5Lf/h5lcreate_external_c
@@ -105,45 +104,45 @@ done:
* M. Scot Breitenfeld
* February 29, 2008
* SOURCE
-*/
+ */
int_f
h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen,
- hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id)
+ hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id,
+ hid_t_f *lapl_id)
/******/
{
- char *c_file_name = NULL;
- char *c_obj_name = NULL;
- char *c_link_name = NULL;
- int_f ret_value = 0;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_file_name = HD5f2cstring(file_name, (size_t)*file_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Lcopy function.
- */
- if( H5Lcreate_external( c_file_name, c_obj_name, (hid_t) *link_loc_id, c_link_name,
- (hid_t) *lcpl_id, (hid_t) *lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ char *c_file_name = NULL;
+ char *c_obj_name = NULL;
+ char *c_link_name = NULL;
+ int_f ret_value = 0;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_file_name = HD5f2cstring(file_name, (size_t)*file_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Lcopy function.
+ */
+ if (H5Lcreate_external(c_file_name, c_obj_name, (hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id,
+ (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_file_name)
- HDfree(c_file_name);
- if(c_obj_name)
- HDfree(c_obj_name);
- if(c_link_name)
- HDfree(c_link_name);
-
- return ret_value;
+ if (c_file_name)
+ HDfree(c_file_name);
+ if (c_obj_name)
+ HDfree(c_obj_name);
+ if (c_link_name)
+ HDfree(c_link_name);
+
+ return ret_value;
}
/****if* H5Lf/h5ldelete_c
@@ -165,29 +164,29 @@ done:
* M. Scot Breitenfeld
* January, 2008
* SOURCE
-*/
+ */
int_f
-h5ldelete_c ( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id )
+h5ldelete_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id)
/******/
{
- char *c_name = NULL;
- int_f ret_value = 0;
+ char *c_name = NULL;
+ int_f ret_value = 0;
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Ldelete function.
- */
- if( H5Ldelete( (hid_t)*loc_id, c_name, (hid_t)*lapl_id ) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Ldelete function.
+ */
+ if (H5Ldelete((hid_t)*loc_id, c_name, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -213,37 +212,35 @@ done:
* M. Scot Breitenfeld
* February 20, 2008
* SOURCE
-*/
+ */
int_f
-h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len,
- hid_t_f *link_loc_id,
- _fcd link_name, size_t_f *link_name_len,
- hid_t_f *lcpl_id, hid_t_f *lapl_id )
+h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id, _fcd link_name,
+ size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id)
/******/
{
- char *c_target_path = NULL;
- char *c_link_name = NULL;
- int_f ret_value = 0;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_target_path = HD5f2cstring(target_path, (size_t)*target_path_len)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_name_len)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Adelete function.
- */
- if ( H5Lcreate_soft(c_target_path,(hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_target_path)
+ char *c_target_path = NULL;
+ char *c_link_name = NULL;
+ int_f ret_value = 0;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_target_path = HD5f2cstring(target_path, (size_t)*target_path_len)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_link_name = HD5f2cstring(link_name, (size_t)*link_name_len)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Adelete function.
+ */
+ if (H5Lcreate_soft(c_target_path, (hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_target_path)
HDfree(c_target_path);
- if(c_link_name)
+ if (c_link_name)
HDfree(c_link_name);
return ret_value;
@@ -271,36 +268,35 @@ h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len,
* M. Scot Breitenfeld
* February 27, 2008
* SOURCE
-*/
+ */
int_f
-h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen,
- hid_t_f *link_loc_id,
- _fcd link_name, size_t_f *link_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id )
+h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen, hid_t_f *link_loc_id,
+ _fcd link_name, size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id)
/******/
{
- char *c_obj_name = NULL;
- char *c_link_name = NULL;
- int_f ret_value = 0;
-
- /*
- * Convert FORTRAN name to C name
- */
- if((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
- HGOTO_DONE(FAIL);
- if((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
- HGOTO_DONE(FAIL);
-
- /*
- * Call H5Lcreate_hard function.
- */
- if ( H5Lcreate_hard((hid_t)*obj_loc_id, c_obj_name, (hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
-
- done:
- if(c_obj_name)
+ char *c_obj_name = NULL;
+ char *c_link_name = NULL;
+ int_f ret_value = 0;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+ if ((c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
+
+ /*
+ * Call H5Lcreate_hard function.
+ */
+ if (H5Lcreate_hard((hid_t)*obj_loc_id, c_obj_name, (hid_t)*link_loc_id, c_link_name, (hid_t)*lcpl_id,
+ (hid_t)*lapl_id) < 0)
+ HGOTO_DONE(FAIL);
+
+done:
+ if (c_obj_name)
HDfree(c_obj_name);
- if(c_link_name)
+ if (c_link_name)
HDfree(c_link_name);
return ret_value;
@@ -340,34 +336,35 @@ h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen,
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5ldelete_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id)
+h5ldelete_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field,
+ int_f *order, hsize_t_f *n, hid_t_f *lapl_id)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- H5_index_t c_index_field;
+ 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 */
+ 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);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ HGOTO_DONE(FAIL);
c_index_field = (H5_index_t)*index_field;
- c_order = (H5_iter_order_t)*order;
+ c_order = (H5_iter_order_t)*order;
- /*
- * Call H5Ldelete_by_name function.
- */
- if(H5Ldelete_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Ldelete_by_name function.
+ */
+ if (H5Ldelete_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n, (hid_t)*lapl_id) <
+ 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_group_name)
+ if (c_group_name)
HDfree(c_group_name);
return ret_value;
}
@@ -393,28 +390,28 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5lexists_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists)
+h5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists)
/******/
{
- char *c_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return 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);
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ HGOTO_DONE(FAIL);
- /*
- * Call H5Lexists function.
- */
- if((*link_exists = (int_f)H5Lexists((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
- HGOTO_DONE(FAIL);
+ /*
+ * Call H5Lexists function.
+ */
+ if ((*link_exists = (int_f)H5Lexists((hid_t)*loc_id, c_name, (hid_t)*lapl_id)) < 0)
+ HGOTO_DONE(FAIL);
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -452,40 +449,40 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
- int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type,
- H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id)
+h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset, int_f *corder,
+ int_f *corder_valid, int_f *link_type, H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id)
/******/
{
- char *c_link_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char * c_link_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
H5L_info2_t link_buff;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
+ if (NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
HGOTO_DONE(FAIL);
/*
* Call H5Linfo function.
*/
- if(H5Lget_info2((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0)
+ if (H5Lget_info2((hid_t)*link_loc_id, c_link_name, &link_buff, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
/* Unpack the structure */
- *cset = (int_f)link_buff.cset;
- *corder = (int_f)link_buff.corder;
+ *cset = (int_f)link_buff.cset;
+ *corder = (int_f)link_buff.corder;
*corder_valid = 0;
- if(link_buff.corder_valid > 0) *corder_valid = 1;
+ if (link_buff.corder_valid > 0)
+ *corder_valid = 1;
*link_type = (int_f)link_buff.type;
- *token = link_buff.u.token;
- *val_size = (size_t_f)link_buff.u.val_size;
+ *token = link_buff.u.token;
+ *val_size = (size_t_f)link_buff.u.val_size;
done:
- if(c_link_name)
+ if (c_link_name)
HDfree(c_link_name);
return ret_value;
@@ -520,45 +517,45 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n,
- int_f *link_type, int_f *corder_valid, int_f *corder,
- int_f *cset, H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id)
+h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field,
+ int_f *order, hsize_t_f *n, int_f *link_type, int_f *corder_valid, int_f *corder,
+ int_f *cset, H5O_token_t *token, 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;
+ 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_info2_t link_buff;
+ int_f ret_value = 0; /* Return value */
+ H5L_info2_t link_buff;
/*
* Convert FORTRAN name to C name
*/
- if((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
- HGOTO_DONE(FAIL);
+ if ((c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)) == NULL)
+ 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_idx2((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
- &link_buff, (hid_t)*lapl_id) < 0)
- HGOTO_DONE(FAIL);
+ c_order = (H5_iter_order_t)*order;
+ /*
+ * Call H5Linfo_by_idx function.
+ */
+ if (H5Lget_info_by_idx2((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n, &link_buff,
+ (hid_t)*lapl_id) < 0)
+ 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;
+ *corder = (int_f)link_buff.corder;
+ *cset = (int_f)link_buff.cset;
*link_type = (int_f)link_buff.type;
- *token = link_buff.u.token;
- *val_size = (size_t_f)link_buff.u.val_size;
+ *token = link_buff.u.token;
+ *val_size = (size_t_f)link_buff.u.val_size;
done:
return ret_value;
@@ -584,12 +581,12 @@ done:
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
h5lis_registered_c(int_f *link_cls_id)
/******/
{
- int_f ret_value; /* Return value */
+ int_f ret_value; /* Return value */
/*
* Call H5Lis_registered
@@ -604,7 +601,6 @@ h5lis_registered_c(int_f *link_cls_id)
/* H5L_type_t c_link_cls_id; /\* User-defined link class identifier *\/ */
/* htri_t registered; /\* registration status *\/ */
-
/* c_link_cls_id = (H5L_type_t)*link_cls_id; */
/* /\* */
/* * Call H5Lis_registered */
@@ -616,7 +612,6 @@ h5lis_registered_c(int_f *link_cls_id)
/* return ret_value; */
/* } */
-
/****if* H5Lf/h5lmove_c
* NAME
* h5lmove_c
@@ -639,35 +634,35 @@ h5lis_registered_c(int_f *link_cls_id)
* M. Scot Breitenfeld
* March 3, 2008
* SOURCE
-*/
+ */
int_f
-h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
- _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id)
+h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id, _fcd dest_name,
+ size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id)
/******/
{
- char *c_src_name = NULL; /* Buffer to hold C string */
+ char *c_src_name = NULL; /* Buffer to hold C string */
char *c_dest_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen)))
+ 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)))
+ 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)
+ /*
+ * 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)
done:
- if(c_src_name)
+ if (c_src_name)
HDfree(c_src_name);
- if(c_dest_name)
+ if (c_dest_name)
HDfree(c_dest_name);
return ret_value;
@@ -697,23 +692,22 @@ done:
* M. Scot Breitenfeld
* March 10, 2008
* SOURCE
-*/
+ */
int_f
-h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n,
- size_t_f *size, _fcd name, hid_t_f *lapl_id)
+h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, int_f *index_field,
+ int_f *order, hsize_t_f *n, size_t_f *size, _fcd name, hid_t_f *lapl_id)
/******/
{
- char *c_group_name = NULL; /* Buffer to hold C string */
- char *c_name = NULL; /* Buffer to hold C string */
- size_t c_size;
+ char * c_group_name = NULL; /* Buffer to hold C string */
+ char * c_name = NULL; /* Buffer to hold C string */
+ size_t c_size;
ssize_t c_size_link;
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)))
+ if (NULL == (c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen)))
HGOTO_DONE(FAIL)
c_size = (size_t)*size + 1;
@@ -721,11 +715,12 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
/*
* Allocate buffer to hold name of an attribute
*/
- if(NULL == (c_name = (char *)HDmalloc(c_size)))
+ if (NULL == (c_name = (char *)HDmalloc(c_size)))
HGOTO_DONE(FAIL)
- if((c_size_link = H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
- (H5_iter_order_t)*order, (hsize_t)*n,c_name, c_size, (hid_t)*lapl_id)) < 0)
+ if ((c_size_link =
+ H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field,
+ (H5_iter_order_t)*order, (hsize_t)*n, c_name, c_size, (hid_t)*lapl_id)) < 0)
HGOTO_DONE(FAIL)
*size = (size_t_f)c_size_link;
@@ -733,19 +728,18 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- if(c_name)
+ if (c_name)
HD5packFstring(c_name, _fcdtocp(name), c_size - 1);
done:
- if(c_group_name)
+ if (c_group_name)
HDfree(c_group_name);
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
-
/* /\****if* H5Lf/h5lget_val_c */
/* * NAME */
/* * h5lget_val_c */
@@ -795,12 +789,10 @@ done:
/* *\/ */
/* HD5packFstring(c_buf, _fcdtocp(buf), c_bufsize-1); */
-
/* done: */
/* return ret_value; */
/* } */
-
/* /\****if* H5Lf/ */
/* * NAME */
/* * H5Lregistered_c */
@@ -934,29 +926,29 @@ done:
* M. Scot Breitenfeld
* April 11, 2008
* SOURCE
-*/
+ */
int_f
-h5lget_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)
+h5lget_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)
/******/
{
char *c_link_name = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
+ if (NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen)))
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)
+ 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)
+ if (c_link_name)
HDfree(c_link_name);
return ret_value;
@@ -986,27 +978,29 @@ done:
* M. Scot Breitenfeld
* July 8, 2008
* SOURCE
-*/
+ */
int_f
-h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data )
+h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op,
+ void *op_data)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t func_ret_value; /* H5Linterate return value */
- hsize_t idx_c = 0;
+ int_f ret_value = -1; /* Return value */
+ herr_t func_ret_value; /* H5Linterate return value */
+ hsize_t idx_c = 0;
- idx_c = (hsize_t)*idx;
+ idx_c = (hsize_t)*idx;
- /*
- * Call H5Linterate
- */
+ /*
+ * Call H5Linterate
+ */
- func_ret_value = H5Literate2( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, &idx_c, op, op_data);
+ func_ret_value =
+ H5Literate2((hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, &idx_c, op, op_data);
- ret_value = (int_f)func_ret_value;
- *idx = (hsize_t_f)idx_c;
+ ret_value = (int_f)func_ret_value;
+ *idx = (hsize_t_f)idx_c;
- return ret_value;
+ return ret_value;
}
/****if* H5Lf/h5literate_by_name_c
@@ -1036,35 +1030,37 @@ h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx,
* M. Scot Breitenfeld
* August 18, 2008
* SOURCE
-*/
+ */
int_f
-h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data, hid_t_f *lapl_id)
+h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order,
+ hsize_t_f *idx, H5L_iterate2_t op, void *op_data, hid_t_f *lapl_id)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t func_ret_value; /* H5Linterate return value */
- hsize_t idx_c = 0;
- char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = -1; /* Return value */
+ herr_t func_ret_value; /* H5Linterate return value */
+ hsize_t idx_c = 0;
+ char * c_name = NULL; /* Buffer to hold C string */
- /*
- * Convert FORTRAN name to C name
- */
- if((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
- return ret_value=-1;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ return ret_value = -1;
- idx_c = (hsize_t)*idx;
+ idx_c = (hsize_t)*idx;
- /*
- * Call H5Linterate
- */
+ /*
+ * Call H5Linterate
+ */
- func_ret_value = H5Literate_by_name2((hid_t)*loc_id, c_name,(H5_index_t)*index_type,(H5_iter_order_t)*order,&idx_c,op,op_data,(hid_t)*lapl_id);
+ func_ret_value = H5Literate_by_name2((hid_t)*loc_id, c_name, (H5_index_t)*index_type,
+ (H5_iter_order_t)*order, &idx_c, op, op_data, (hid_t)*lapl_id);
- ret_value = (int_f)func_ret_value;
- *idx = (hsize_t_f)idx_c;
+ ret_value = (int_f)func_ret_value;
+ *idx = (hsize_t_f)idx_c;
- if(c_name) HDfree(c_name);
+ if (c_name)
+ HDfree(c_name);
- return ret_value;
+ return ret_value;
}
-
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;
}
-
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index e65e60f..d52f537 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -55,17 +55,17 @@
* Wednesday, October 9, 2002
*
* SOURCE
-*/
+ */
int_f
-h5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id )
+h5pcreate_c(hid_t_f *cls, hid_t_f *prp_id)
/******/
{
hid_t c_prp_id;
int_f ret_value = 0;
c_prp_id = H5Pcreate((hid_t)*cls);
- if(c_prp_id < 0)
+ if (c_prp_id < 0)
HGOTO_DONE(FAIL)
*prp_id = (hid_t_f)c_prp_id;
@@ -88,21 +88,20 @@ done:
* Saturday, August 14, 1999
*
* SOURCE
-*/
+ */
int_f
-h5pclose_c ( hid_t_f *prp_id )
+h5pclose_c(hid_t_f *prp_id)
/******/
{
int_f ret_value = 0;
- if(H5Pclose((hid_t)*prp_id) < 0)
+ if (H5Pclose((hid_t)*prp_id) < 0)
ret_value = -1;
return ret_value;
}
-
/****if* H5Pf/h5pcopy_c
* NAME
* h5pcopy_c
@@ -119,16 +118,16 @@ h5pclose_c ( hid_t_f *prp_id )
* Saturday, August 14, 1999
*
* SOURCE
-*/
+ */
int_f
-h5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id)
+h5pcopy_c(hid_t_f *prp_id, hid_t_f *new_prp_id)
/******/
{
hid_t c_new_prp_id;
int_f ret_value = 0;
c_new_prp_id = H5Pcopy((hid_t)*prp_id);
- if(c_new_prp_id < 0)
+ if (c_new_prp_id < 0)
HGOTO_DONE(FAIL)
*new_prp_id = (hid_t_f)c_new_prp_id;
@@ -154,16 +153,16 @@ done:
* Monday, September 30, 2002
*
* SOURCE
-*/
+ */
int_f
-h5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag)
+h5pequal_c(hid_t_f *plist1_id, hid_t_f *plist2_id, int_f *c_flag)
/******/
{
htri_t c_c_flag;
- int_f ret_value = 0;
+ int_f ret_value = 0;
c_c_flag = H5Pequal((hid_t)*plist1_id, (hid_t)*plist2_id);
- if(c_c_flag < 0)
+ if (c_c_flag < 0)
HGOTO_DONE(FAIL)
*c_flag = (int_f)c_c_flag;
@@ -172,7 +171,6 @@ done:
return ret_value;
}
-
/****if* H5Pf/h5pget_class_c
* NAME
* h5pget_class_c
@@ -188,17 +186,17 @@ done:
* Elena Pourmal
* Saturday, August 14, 1999
* SOURCE
-*/
+ */
int_f
-h5pget_class_c ( hid_t_f *prp_id , hid_t_f *classtype)
+h5pget_class_c(hid_t_f *prp_id, hid_t_f *classtype)
/******/
{
hid_t c_classtype;
int_f ret_value = 0;
- if( (c_classtype = H5Pget_class((hid_t)*prp_id)) < 0)
- HGOTO_DONE(FAIL)
+ if ((c_classtype = H5Pget_class((hid_t)*prp_id)) < 0)
+ HGOTO_DONE(FAIL)
*classtype = (hid_t_f)c_classtype;
@@ -221,25 +219,26 @@ done:
* Elena Pourmal
* Thursday, February 17, 2000
* SOURCE
-*/
+ */
int_f
-h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag)
+h5pset_preserve_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- herr_t status;
- hbool_t c_flag = 0;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ herr_t status;
+ hbool_t c_flag = 0;
- if (*flag > 0) c_flag = 1;
- c_prp_id = (hid_t)*prp_id;
- status = H5Pset_preserve(c_prp_id, c_flag);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ if (*flag > 0)
+ c_flag = 1;
+ c_prp_id = (hid_t)*prp_id;
+ status = H5Pset_preserve(c_prp_id, c_flag);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
-
/****if* H5Pf/h5pget_preserve_c
* NAME
* h5pget_preserve_c
@@ -256,21 +255,22 @@ h5pset_preserve_c ( hid_t_f *prp_id , int_f *flag)
* Elena Pourmal
* Thursday, February 17, 2000
* SOURCE
-*/
+ */
int_f
-h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag)
+h5pget_preserve_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- int c_flag;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ int c_flag;
- c_prp_id = (hid_t)*prp_id;
- c_flag = H5Pget_preserve(c_prp_id);
- if ( c_flag < 0 ) ret_value = -1;
- *flag = (int_f)c_flag;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = H5Pget_preserve(c_prp_id);
+ if (c_flag < 0)
+ ret_value = -1;
+ *flag = (int_f)c_flag;
+ return ret_value;
}
/****if* H5Pf/h5pset_deflate_c
@@ -287,26 +287,25 @@ h5pget_preserve_c ( hid_t_f *prp_id , int_f *flag)
* Elena Pourmal
* Saturday, August 14, 1999
* SOURCE
-*/
+ */
int_f
-h5pset_deflate_c ( hid_t_f *prp_id , int_f *level)
+h5pset_deflate_c(hid_t_f *prp_id, int_f *level)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- unsigned c_level;
- herr_t status;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ unsigned c_level;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- c_level = (unsigned)*level;
- status = H5Pset_deflate(c_prp_id, c_level);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_level = (unsigned)*level;
+ status = H5Pset_deflate(c_prp_id, c_level);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
-
-
/****if* H5Pf/h5pset_chunk_c
* NAME
* h5pset_chunk_c
@@ -323,34 +322,34 @@ h5pset_deflate_c ( hid_t_f *prp_id , int_f *level)
* AUTHOR
* Elena Pourmal
* SOURCE
-*/
+ */
int_f
-h5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims )
+h5pset_chunk_c(hid_t_f *prp_id, int_f *rank, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id = (hid_t)*prp_id;
- int c_rank = (int)*rank;
- hsize_t c_dims[H5S_MAX_RANK];
- herr_t status;
- int i;
+ int ret_value = -1;
+ hid_t c_prp_id = (hid_t)*prp_id;
+ int c_rank = (int)*rank;
+ hsize_t c_dims[H5S_MAX_RANK];
+ herr_t status;
+ int i;
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order
- */
- for (i = 0; i < c_rank ; i++)
- c_dims[i] = (hsize_t)dims[c_rank - i - 1];
+ /*
+ * Transpose dimension arrays because of C-FORTRAN storage order
+ */
+ for (i = 0; i < c_rank; i++)
+ c_dims[i] = (hsize_t)dims[c_rank - i - 1];
- status = H5Pset_chunk(c_prp_id, c_rank, c_dims);
- if (status < 0) goto DONE;
- ret_value = 0;
+ status = H5Pset_chunk(c_prp_id, c_rank, c_dims);
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- return ret_value;
+ return ret_value;
}
-
/****if* H5Pf/h5pget_chunk_c
* NAME
* h5pget_chunk_c
@@ -367,29 +366,30 @@ DONE:
* AUTHOR
* Elena Pourmal
* SOURCE
-*/
+ */
int_f
-h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims )
+h5pget_chunk_c(hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id = (hid_t)*prp_id;
- hsize_t c_dims[H5S_MAX_RANK];
- int rank;
- int c_max_rank = (int)*max_rank;
- int i;
+ int ret_value = -1;
+ hid_t c_prp_id = (hid_t)*prp_id;
+ hsize_t c_dims[H5S_MAX_RANK];
+ int rank;
+ int c_max_rank = (int)*max_rank;
+ int i;
- rank = H5Pget_chunk(c_prp_id, c_max_rank, c_dims);
+ rank = H5Pget_chunk(c_prp_id, c_max_rank, c_dims);
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order
- */
- for (i = 0; i < c_max_rank ; i++)
- dims[c_max_rank - i - 1] = (hsize_t_f)c_dims[i];
- if (rank < 0) return ret_value;
- ret_value = (int_f)rank;
- return ret_value;
+ /*
+ * Transpose dimension arrays because of C-FORTRAN storage order
+ */
+ for (i = 0; i < c_max_rank; i++)
+ dims[c_max_rank - i - 1] = (hsize_t_f)c_dims[i];
+ if (rank < 0)
+ return ret_value;
+ ret_value = (int_f)rank;
+ return ret_value;
}
/****if* H5Pf/h5pset_fill_value_c
@@ -407,26 +407,27 @@ h5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims )
* Elena Pourmal
* Saturday, August 14, 1999
* SOURCE
-*/
+ */
int_f
-h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- hid_t c_type_id;
- herr_t ret;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hid_t c_type_id;
+ herr_t ret;
- /*
- * Call H5Pset_fill_value function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_type_id = (hid_t)*type_id;
- ret = H5Pset_fill_value(c_prp_id, c_type_id, fillvalue);
+ /*
+ * Call H5Pset_fill_value function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_type_id = (hid_t)*type_id;
+ ret = H5Pset_fill_value(c_prp_id, c_type_id, fillvalue);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fill_value_c
@@ -444,26 +445,27 @@ h5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
* Elena Pourmal
* Saturday, August 14, 1999
* SOURCE
-*/
+ */
int_f
-h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
+h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- hid_t c_type_id;
- herr_t ret;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hid_t c_type_id;
+ herr_t ret;
- /*
- * Call H5Pget_fill_value function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_type_id = (hid_t)*type_id;
- ret = H5Pget_fill_value(c_prp_id, c_type_id, fillvalue);
+ /*
+ * Call H5Pget_fill_value function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_type_id = (hid_t)*type_id;
+ ret = H5Pget_fill_value(c_prp_id, c_type_id, fillvalue);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_version_c
@@ -487,45 +489,46 @@ h5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
* HISTORY
* Removed extra length parameters EP 7/6/00
* SOURCE
-*/
+ */
#ifdef H5_NO_DEPRECATED_SYMBOLS
int_f
-h5pget_version_c (hid_t_f H5_ATTR_UNUSED *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr)
+h5pget_version_c(hid_t_f H5_ATTR_UNUSED *prp_id, int_f *boot, int_f *freelist, int_f *stab, int_f *shhdr)
/******/
{
- /*
- * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ]
- */
- *boot = (int_f)0;
- *freelist = (int_f)0;
- *stab = (int_f)0;
- *shhdr = (int_f)0;
+ /*
+ * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ]
+ */
+ *boot = (int_f)0;
+ *freelist = (int_f)0;
+ *stab = (int_f)0;
+ *shhdr = (int_f)0;
- return 0;
+ return 0;
}
-#else /* H5_NO_DEPRECATED_SYMBOLS */
+#else /* H5_NO_DEPRECATED_SYMBOLS */
int_f
-h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr)
+h5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int_f *shhdr)
/******/
{
- herr_t ret;
- unsigned c_boot;
- unsigned c_freelist;
- unsigned c_stab;
- unsigned c_shhdr;
+ herr_t ret;
+ unsigned c_boot;
+ unsigned c_freelist;
+ unsigned c_stab;
+ unsigned c_shhdr;
- /*
- * Call H5Pget_version function.
- */
- ret = H5Pget_version((hid_t)*prp_id, &c_boot, &c_freelist, &c_stab, &c_shhdr);
- if (ret < 0) return -1;
+ /*
+ * Call H5Pget_version function.
+ */
+ ret = H5Pget_version((hid_t)*prp_id, &c_boot, &c_freelist, &c_stab, &c_shhdr);
+ if (ret < 0)
+ return -1;
- *boot = (int_f)c_boot;
- *freelist = (int_f)c_freelist;
- *stab = (int_f)c_stab;
- *shhdr = (int_f)c_shhdr;
+ *boot = (int_f)c_boot;
+ *freelist = (int_f)c_freelist;
+ *stab = (int_f)c_stab;
+ *shhdr = (int_f)c_shhdr;
- return 0;
+ return 0;
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */
@@ -544,27 +547,28 @@ h5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab,
* Xiangyang Su
* Wednesday, February 23, 2000
* SOURCE
-*/
+ */
int_f
-h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
+h5pget_userblock_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_size;
- /*
- * Call H5Pget_userblock function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_userblock(c_prp_id, &c_size);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pget_userblock function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_userblock(c_prp_id, &c_size);
+ if (ret < 0)
+ return ret_value;
- *size = (hsize_t_f)c_size;
- ret_value = 0;
+ *size = (hsize_t_f)c_size;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_userblock_c
@@ -582,26 +586,27 @@ h5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
* Xiangyang Su
* Wednesday, February 23, 2000
* SOURCE
-*/
+ */
int_f
-h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
+h5pset_userblock_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_size;
- c_size = (hsize_t)*size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_size;
+ c_size = (hsize_t)*size;
- /*
- * Call H5Pset_userblock function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_userblock(c_prp_id, c_size);
+ /*
+ * Call H5Pset_userblock function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_userblock(c_prp_id, c_size);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_sizes_c
@@ -622,29 +627,30 @@ h5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
* HISTORY
* Deleted extra length parameters. EP 6/7/00
* SOURCE
-*/
+ */
int_f
-h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size)
+h5pget_sizes_c(hid_t_f *prp_id, size_t_f *sizeof_addr, size_t_f *sizeof_size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- size_t c_sizeof_addr;
- size_t c_sizeof_size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ size_t c_sizeof_addr;
+ size_t c_sizeof_size;
- /*
- * Call H5Pget_sizes function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_sizes(c_prp_id, &c_sizeof_addr, &c_sizeof_size);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pget_sizes function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_sizes(c_prp_id, &c_sizeof_addr, &c_sizeof_size);
+ if (ret < 0)
+ return ret_value;
- *sizeof_addr = (size_t_f)c_sizeof_addr;
- *sizeof_size = (size_t_f)c_sizeof_size;
- ret_value = 0;
+ *sizeof_addr = (size_t_f)c_sizeof_addr;
+ *sizeof_size = (size_t_f)c_sizeof_size;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_sizes_c
@@ -664,27 +670,28 @@ h5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size)
+h5pset_sizes_c(hid_t_f *prp_id, size_t_f *sizeof_addr, size_t_f *sizeof_size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- size_t c_addr, c_size;
- c_addr = (size_t)*sizeof_addr;
- c_size = (size_t)*sizeof_size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ size_t c_addr, c_size;
+ c_addr = (size_t)*sizeof_addr;
+ c_size = (size_t)*sizeof_size;
- /*
- * Call H5Pset_sizes function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_sizes(c_prp_id, c_addr, c_size);
+ /*
+ * Call H5Pset_sizes function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_sizes(c_prp_id, c_addr, c_size);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_sym_k_c
@@ -703,28 +710,29 @@ h5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size)
* Xiangyang Su
* Friday, February 25, 2000
* SOURCE
-*/
+ */
int_f
-h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
+h5pset_sym_k_c(hid_t_f *prp_id, int_f *ik, int_f *lk)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- unsigned c_ik;
- unsigned c_lk;
- herr_t ret;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_ik;
+ unsigned c_lk;
+ herr_t ret;
- /*
- * Call H5Pset_sym_k function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_ik = (unsigned)*ik;
- c_lk = (unsigned)*lk;
- ret = H5Pset_sym_k(c_prp_id, c_ik, c_lk);
+ /*
+ * Call H5Pset_sym_k function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_ik = (unsigned)*ik;
+ c_lk = (unsigned)*lk;
+ ret = H5Pset_sym_k(c_prp_id, c_ik, c_lk);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_sym_k_c
@@ -746,27 +754,28 @@ h5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
+h5pget_sym_k_c(hid_t_f *prp_id, int_f *ik, int_f *lk)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- unsigned c_ik;
- unsigned c_lk;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ unsigned c_ik;
+ unsigned c_lk;
- /*
- * Call H5Pget_sym_k function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_sym_k(c_prp_id, &c_ik, &c_lk);
- *ik = (int_f)c_ik;
- *lk = (int_f)c_lk;
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pget_sym_k function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_sym_k(c_prp_id, &c_ik, &c_lk);
+ *ik = (int_f)c_ik;
+ *lk = (int_f)c_lk;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_istore_k_c
@@ -786,26 +795,27 @@ h5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik)
+h5pset_istore_k_c(hid_t_f *prp_id, int_f *ik)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- unsigned c_ik;
- herr_t ret;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_ik;
+ herr_t ret;
- /*
- * Call H5Pset_istore_k function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_ik = (unsigned)*ik;
- ret = H5Pset_istore_k(c_prp_id, c_ik);
+ /*
+ * Call H5Pset_istore_k function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_ik = (unsigned)*ik;
+ ret = H5Pset_istore_k(c_prp_id, c_ik);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_istore_k_c
@@ -826,25 +836,26 @@ h5pset_istore_k_c (hid_t_f *prp_id, int_f* ik)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik)
+h5pget_istore_k_c(hid_t_f *prp_id, int_f *ik)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- unsigned c_ik;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ unsigned c_ik;
- /*
- * Call H5Pget_istore_k function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_istore_k(c_prp_id, &c_ik);
- *ik = (int_f)c_ik;
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pget_istore_k function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_istore_k(c_prp_id, &c_ik);
+ *ik = (int_f)c_ik;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_driver_c
@@ -864,25 +875,26 @@ h5pget_istore_k_c (hid_t_f *prp_id, int_f* ik)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver)
+h5pget_driver_c(hid_t_f *prp_id, hid_t_f *driver)
/******/
{
- int ret_value = -1;
- hid_t c_driver;
+ int ret_value = -1;
+ hid_t c_driver;
- /*
- * Call H5Pget_driver function.
- */
- c_driver = H5Pget_driver((hid_t)*prp_id);
- if (c_driver < 0) goto DONE;
+ /*
+ * Call H5Pget_driver function.
+ */
+ c_driver = H5Pget_driver((hid_t)*prp_id);
+ if (c_driver < 0)
+ goto DONE;
- *driver = (hid_t_f) c_driver;
- ret_value = 0;
+ *driver = (hid_t_f)c_driver;
+ ret_value = 0;
DONE:
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_stdio_c
@@ -901,22 +913,23 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fapl_stdio_c (hid_t_f *prp_id)
+h5pset_fapl_stdio_c(hid_t_f *prp_id)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- /*
- * Call H5Pset_fapl_stdio function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_fapl_stdio(c_prp_id);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ /*
+ * Call H5Pset_fapl_stdio function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_fapl_stdio(c_prp_id);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
#ifdef NO_SUCH_F90_FUNCTION
/****if* H5Pf/h5pget_fapl_stdio_c
@@ -938,23 +951,24 @@ h5pset_fapl_stdio_c (hid_t_f *prp_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io)
+h5pget_fapl_stdio_c(hid_t_f *prp_id, int_f *io)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- /*
- * Call H5Pget_fapl_stdio function.
- */
- c_prp_id = *prp_id;
- ret = H5Pget_fapl_stdio(c_prp_id);
- if (ret < 0) return ret_value;
- *io = (int_f)ret;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ /*
+ * Call H5Pget_fapl_stdio function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pget_fapl_stdio(c_prp_id);
+ if (ret < 0)
+ return ret_value;
+ *io = (int_f)ret;
+ ret_value = 0;
+ return ret_value;
}
#endif /*NO_SUCH_F90_FUNCTION*/
@@ -975,22 +989,23 @@ h5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fapl_sec2_c (hid_t_f *prp_id)
+h5pset_fapl_sec2_c(hid_t_f *prp_id)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- /*
- * Call H5Pset_fapl_sec2 function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_fapl_sec2(c_prp_id);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ /*
+ * Call H5Pset_fapl_sec2 function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_fapl_sec2(c_prp_id);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
#ifdef NO_SUCH_F90_FUNCTION
@@ -1013,23 +1028,24 @@ h5pset_fapl_sec2_c (hid_t_f *prp_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2)
+h5pget_fapl_sec2_c(hid_t_f *prp_id, int_f *sec2)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- /*
- * Call H5Pget_fapl_sec2 function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_fapl_sec2(c_prp_id);
- if (ret < 0) return ret_value;
- *sec2 = (int_f)ret;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ /*
+ * Call H5Pget_fapl_sec2 function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_fapl_sec2(c_prp_id);
+ if (ret < 0)
+ return ret_value;
+ *sec2 = (int_f)ret;
+ ret_value = 0;
+ return ret_value;
}
#endif /*NO_SUCH_F90_FUNCTION*/
@@ -1051,25 +1067,26 @@ h5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment)
+h5pset_alignment_c(hid_t_f *prp_id, hsize_t_f *threshold, hsize_t_f *alignment)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_threshold, c_alignment;
- c_threshold = (hsize_t)*threshold;
- c_alignment = (hsize_t)* alignment;
- /*
- * Call H5Pset_alignment function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_alignment(c_prp_id, c_threshold, c_alignment);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_threshold, c_alignment;
+ c_threshold = (hsize_t)*threshold;
+ c_alignment = (hsize_t)*alignment;
+ /*
+ * Call H5Pset_alignment function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_alignment(c_prp_id, c_threshold, c_alignment);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_alignment_c
@@ -1090,26 +1107,27 @@ h5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment)
+h5pget_alignment_c(hid_t_f *prp_id, hsize_t_f *threshold, hsize_t_f *alignment)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_threshold, c_alignment;
- /*
- * Call H5Pget_alignment function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_alignment(c_prp_id, &c_threshold, &c_alignment);
- if (ret < 0) return ret_value;
- *threshold = (hsize_t_f)c_threshold;
- *alignment = (hsize_t_f)c_alignment;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_threshold, c_alignment;
+ /*
+ * Call H5Pget_alignment function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_alignment(c_prp_id, &c_threshold, &c_alignment);
+ if (ret < 0)
+ return ret_value;
+ *threshold = (hsize_t_f)c_threshold;
+ *alignment = (hsize_t_f)c_alignment;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_core_c
@@ -1131,27 +1149,28 @@ h5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
+h5pset_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- size_t c_increment;
- hbool_t c_backing_store;
- c_increment = (size_t)*increment;
- c_backing_store = (hbool_t)*flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ size_t c_increment;
+ hbool_t c_backing_store;
+ c_increment = (size_t)*increment;
+ c_backing_store = (hbool_t)*flag;
- /*
- * Call H5Pset_fapl_core function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_fapl_core(c_prp_id, c_increment, c_backing_store);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pset_fapl_core function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_fapl_core(c_prp_id, c_increment, c_backing_store);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_core_c
@@ -1171,27 +1190,29 @@ h5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
+h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- size_t c_increment = 0;
- hbool_t c_backing_store;
- *flag = 0;
- /*
- * Call H5Pset_fapl_core function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_fapl_core(c_prp_id, &c_increment, &c_backing_store);
- if (ret < 0) return ret_value;
- *increment = (size_t_f)c_increment;
- if(c_backing_store > 0) *flag = 1;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ size_t c_increment = 0;
+ hbool_t c_backing_store;
+ *flag = 0;
+ /*
+ * Call H5Pset_fapl_core function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_fapl_core(c_prp_id, &c_increment, &c_backing_store);
+ if (ret < 0)
+ return ret_value;
+ *increment = (size_t_f)c_increment;
+ if (c_backing_store > 0)
+ *flag = 1;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_family_c
@@ -1213,26 +1234,27 @@ h5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist )
+h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f *memb_size, hid_t_f *memb_plist)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- hsize_t c_memb_size;
- hid_t c_memb_plist;
- c_memb_size =(hsize_t) *memb_size;
- c_memb_plist =(hid_t) *memb_plist;
- /*
- * Call H5Pset_fapl_family function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_fapl_family(c_prp_id, c_memb_size, c_memb_plist);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ hsize_t c_memb_size;
+ hid_t c_memb_plist;
+ c_memb_size = (hsize_t)*memb_size;
+ c_memb_plist = (hid_t)*memb_plist;
+ /*
+ * Call H5Pset_fapl_family function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_fapl_family(c_prp_id, c_memb_size, c_memb_plist);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_family_c
@@ -1254,27 +1276,28 @@ h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist)
+h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f *memb_size, hid_t_f *memb_plist)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- hsize_t c_memb_size = 0;
- hid_t c_memb_plist = -1;
- /*
- * Call H5Pget_fapl_family function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_fapl_family(c_prp_id, &c_memb_size, &c_memb_plist);
- if (ret < 0) return ret_value;
- *memb_size = (hsize_t_f)c_memb_size;
- *memb_plist = (hid_t_f)c_memb_plist;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ hsize_t c_memb_size = 0;
+ hid_t c_memb_plist = -1;
+ /*
+ * Call H5Pget_fapl_family function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_fapl_family(c_prp_id, &c_memb_size, &c_memb_plist);
+ if (ret < 0)
+ return ret_value;
+ *memb_size = (hsize_t_f)c_memb_size;
+ *memb_plist = (hid_t_f)c_memb_plist;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_cache_c
@@ -1299,31 +1322,33 @@ h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist)
* Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00
* instead of double
* SOURCE
-*/
+ */
int_f
-h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0 )
+h5pset_cache_c(hid_t_f *prp_id, int_f *mdc_nelmts, size_t_f *rdcc_nelmts, size_t_f *rdcc_nbytes,
+ real_f *rdcc_w0)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- int c_mdc_nelmts;
- size_t c_rdcc_nelmts;
- size_t c_rdcc_nbytes;
- double c_rdcc_w0;
- c_rdcc_nbytes =(size_t) *rdcc_nbytes;
- c_rdcc_w0 = (double)*rdcc_w0;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ int c_mdc_nelmts;
+ size_t c_rdcc_nelmts;
+ size_t c_rdcc_nbytes;
+ double c_rdcc_w0;
+ c_rdcc_nbytes = (size_t)*rdcc_nbytes;
+ c_rdcc_w0 = (double)*rdcc_w0;
- /*
- * Call H5Pset_cache function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_mdc_nelmts = (int)*mdc_nelmts;
- c_rdcc_nelmts = (size_t)*rdcc_nelmts;
- ret = H5Pset_cache(c_prp_id, c_mdc_nelmts, c_rdcc_nelmts, c_rdcc_nbytes, c_rdcc_w0 );
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pset_cache function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_mdc_nelmts = (int)*mdc_nelmts;
+ c_rdcc_nelmts = (size_t)*rdcc_nelmts;
+ ret = H5Pset_cache(c_prp_id, c_mdc_nelmts, c_rdcc_nelmts, c_rdcc_nbytes, c_rdcc_w0);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_cache_c
@@ -1351,31 +1376,33 @@ h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_
* Changed type of the rdcc_nelmts parameter to be int_f.
* EIP October 10, 2003
* SOURCE
-*/
+ */
int_f
-h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0)
+h5pget_cache_c(hid_t_f *prp_id, int_f *mdc_nelmts, size_t_f *rdcc_nelmts, size_t_f *rdcc_nbytes,
+ real_f *rdcc_w0)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- int c_mdc_nelmts;
- size_t c_rdcc_nelmts;
- size_t c_rdcc_nbytes;
- double c_rdcc_w0;
- /*
- * Call H5Pget_cache function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_cache(c_prp_id, &c_mdc_nelmts, &c_rdcc_nelmts, &c_rdcc_nbytes, &c_rdcc_w0);
- if (ret < 0) return ret_value;
- *mdc_nelmts = (int_f)c_mdc_nelmts;
- *rdcc_nelmts = (size_t_f)c_rdcc_nelmts;
- *rdcc_nbytes = (size_t_f)c_rdcc_nbytes;
- *rdcc_w0 = (real_f)c_rdcc_w0;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ int c_mdc_nelmts;
+ size_t c_rdcc_nelmts;
+ size_t c_rdcc_nbytes;
+ double c_rdcc_w0;
+ /*
+ * Call H5Pget_cache function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_cache(c_prp_id, &c_mdc_nelmts, &c_rdcc_nelmts, &c_rdcc_nbytes, &c_rdcc_w0);
+ if (ret < 0)
+ return ret_value;
+ *mdc_nelmts = (int_f)c_mdc_nelmts;
+ *rdcc_nelmts = (size_t_f)c_rdcc_nelmts;
+ *rdcc_nbytes = (size_t_f)c_rdcc_nbytes;
+ *rdcc_w0 = (real_f)c_rdcc_w0;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_split_c
@@ -1400,44 +1427,47 @@ h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist)
+h5pset_fapl_split_c(hid_t_f *prp_id, int_f *meta_len, _fcd meta_ext, hid_t_f *meta_plist, int_f *raw_len,
+ _fcd raw_ext, hid_t_f *raw_plist)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- hid_t c_meta_plist;
- hid_t c_raw_plist;
- herr_t ret = -1;
- char* c_meta_ext;
- char* c_raw_ext;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hid_t c_meta_plist;
+ hid_t c_raw_plist;
+ herr_t ret = -1;
+ char * c_meta_ext;
+ char * c_raw_ext;
- c_meta_ext = (char *)HD5f2cstring(meta_ext, (size_t)*meta_len);
- if (c_meta_ext == NULL) return ret_value;
- c_raw_ext = (char *)HD5f2cstring(raw_ext, (size_t)*raw_len);
- if (c_raw_ext == NULL) { HDfree(c_meta_ext);
- return ret_value;
- }
+ c_meta_ext = (char *)HD5f2cstring(meta_ext, (size_t)*meta_len);
+ if (c_meta_ext == NULL)
+ return ret_value;
+ c_raw_ext = (char *)HD5f2cstring(raw_ext, (size_t)*raw_len);
+ if (c_raw_ext == NULL) {
+ HDfree(c_meta_ext);
+ return ret_value;
+ }
- /*
- * Call H5Pset_fapl_split function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_meta_plist = (hid_t)*meta_plist;
- c_raw_plist = (hid_t)*raw_plist;
- ret = H5Pset_fapl_split(c_prp_id, c_meta_ext, c_meta_plist, c_raw_ext, c_raw_plist );
+ /*
+ * Call H5Pset_fapl_split function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_meta_plist = (hid_t)*meta_plist;
+ c_raw_plist = (hid_t)*raw_plist;
+ ret = H5Pset_fapl_split(c_prp_id, c_meta_ext, c_meta_plist, c_raw_ext, c_raw_plist);
- if (ret < 0) goto DONE;
- ret_value = 0;
+ if (ret < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_meta_ext);
- HDfree(c_raw_ext);
- return ret_value;
+ HDfree(c_meta_ext);
+ HDfree(c_raw_ext);
+ return ret_value;
}
-
#ifdef NO_SUCH_F90_FUNCTION
/****if* H5Pf/h5pget_fapl_split_c
* NAME
@@ -1464,41 +1494,45 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist)
+h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f *meta_ext_size, _fcd meta_ext, hid_t_f *meta_plist,
+ size_t_f *raw_ext_size, _fcd raw_ext, hid_t_f *raw_plist)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret = -1;
- size_t c_meta_ext_size, c_raw_ext_size;
- hid_t c_meta_plist = -1;
- hid_t c_raw_plist = -1;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret = -1;
+ size_t c_meta_ext_size, c_raw_ext_size;
+ hid_t c_meta_plist = -1;
+ hid_t c_raw_plist = -1;
- char* c_meta_ext = NULL;
- char* c_raw_ext = NULL;
+ char *c_meta_ext = NULL;
+ char *c_raw_ext = NULL;
- c_meta_ext_size = (size_t) *meta_ext_size;
- c_raw_ext_size = (size_t) *raw_ext_size;
- c_meta_ext = (char *)HDmalloc(sizeof(char) * c_meta_ext_size);
- c_raw_ext = (char *)HDmalloc(sizeof(char) * c_raw_ext_size);
- if(c_meta_ext == NULL || c_raw_ext == NULL) return ret_value;
+ c_meta_ext_size = (size_t)*meta_ext_size;
+ c_raw_ext_size = (size_t)*raw_ext_size;
+ c_meta_ext = (char *)HDmalloc(sizeof(char) * c_meta_ext_size);
+ c_raw_ext = (char *)HDmalloc(sizeof(char) * c_raw_ext_size);
+ if (c_meta_ext == NULL || c_raw_ext == NULL)
+ return ret_value;
- /*
- * Call H5Pget_fapl_split function.
- */
- c_prp_id = *prp_id;
- ret = H5Pget_fapl_split(c_prp_id, c_meta_ext_size, c_meta_ext,&c_meta_plist, c_raw_ext_size, c_raw_ext, &c_raw_plist );
+ /*
+ * Call H5Pget_fapl_split function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pget_fapl_split(c_prp_id, c_meta_ext_size, c_meta_ext, &c_meta_plist, c_raw_ext_size, c_raw_ext,
+ &c_raw_plist);
- if (ret < 0) return ret_value;
- *meta_plist = c_meta_plist;
- *raw_plist = c_raw_plist;
- HD5packFstring(c_meta_ext, _fcdtocp(meta_ext), strlen(c_meta_ext));
- HD5packFstring(c_raw_ext, _fcdtocp(raw_ext), strlen(c_raw_ext));
+ if (ret < 0)
+ return ret_value;
+ *meta_plist = c_meta_plist;
+ *raw_plist = c_raw_plist;
+ HD5packFstring(c_meta_ext, _fcdtocp(meta_ext), strlen(c_meta_ext));
+ HD5packFstring(c_raw_ext, _fcdtocp(raw_ext), strlen(c_raw_ext));
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
#endif /*NO_SUCH_F90_FUNCTION*/
@@ -1520,26 +1554,27 @@ h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hi
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
+h5pset_gc_references_c(hid_t_f *prp_id, int_f *gc_references)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- unsigned c_gc_references;
- c_gc_references = (unsigned)*gc_references;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ unsigned c_gc_references;
+ c_gc_references = (unsigned)*gc_references;
- /*
- * Call H5Pset_gc_references function.
- */
- c_prp_id = *prp_id;
- ret = H5Pset_gc_references(c_prp_id, c_gc_references);
+ /*
+ * Call H5Pset_gc_references function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pset_gc_references(c_prp_id, c_gc_references);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_gc_references_c
@@ -1560,24 +1595,25 @@ h5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
+h5pget_gc_references_c(hid_t_f *prp_id, int_f *gc_references)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- unsigned c_gc_references;
- herr_t ret;
- /*
- * Call H5Pget_gc_references function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_gc_references(c_prp_id, &c_gc_references);
- if (ret < 0) return ret_value;
- *gc_references = (int_f)c_gc_references;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_gc_references;
+ herr_t ret;
+ /*
+ * Call H5Pget_gc_references function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_gc_references(c_prp_id, &c_gc_references);
+ if (ret < 0)
+ return ret_value;
+ *gc_references = (int_f)c_gc_references;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_layout_c
@@ -1597,25 +1633,26 @@ h5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_layout_c (hid_t_f *prp_id, int_f* layout)
+h5pset_layout_c(hid_t_f *prp_id, int_f *layout)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- H5D_layout_t c_layout;
- c_layout = (H5D_layout_t)*layout;
- /*
- * Call H5Pset_layout function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_layout(c_prp_id, c_layout);
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ H5D_layout_t c_layout;
+ c_layout = (H5D_layout_t)*layout;
+ /*
+ * Call H5Pset_layout function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_layout(c_prp_id, c_layout);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_layout_c
@@ -1636,23 +1673,24 @@ h5pset_layout_c (hid_t_f *prp_id, int_f* layout)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_layout_c (hid_t_f *prp_id, int_f* layout)
+h5pget_layout_c(hid_t_f *prp_id, int_f *layout)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_layout_t c_layout;
- /*
- * Call H5Pget_layout function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_layout = H5Pget_layout(c_prp_id);
- if (c_layout < 0) return ret_value;
- *layout = (int_f)c_layout;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_layout_t c_layout;
+ /*
+ * Call H5Pget_layout function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_layout = H5Pget_layout(c_prp_id);
+ if (c_layout < 0)
+ return ret_value;
+ *layout = (int_f)c_layout;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_filter_c
@@ -1675,36 +1713,38 @@ h5pget_layout_c (hid_t_f *prp_id, int_f* layout)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values )
+h5pset_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmts, int_f *cd_values)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id = (hid_t)*prp_id;
- herr_t ret;
- size_t c_cd_nelmts = (size_t)*cd_nelmts;
- unsigned int c_flags = (unsigned)*flags;
- H5Z_filter_t c_filter = (H5Z_filter_t)*filter;
- unsigned int * c_cd_values;
- unsigned i;
+ int ret_value = -1;
+ hid_t c_prp_id = (hid_t)*prp_id;
+ herr_t ret;
+ size_t c_cd_nelmts = (size_t)*cd_nelmts;
+ unsigned int c_flags = (unsigned)*flags;
+ H5Z_filter_t c_filter = (H5Z_filter_t)*filter;
+ unsigned int *c_cd_values;
+ unsigned i;
- c_cd_values = (unsigned int*)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
- if (!c_cd_values) return ret_value;
- for (i = 0; i < c_cd_nelmts; i++)
- c_cd_values[i] = (unsigned int)cd_values[i];
+ c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
+ if (!c_cd_values)
+ return ret_value;
+ for (i = 0; i < c_cd_nelmts; i++)
+ c_cd_values[i] = (unsigned int)cd_values[i];
- /*
- * Call H5Pset_filter function.
- */
- ret = H5Pset_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts,c_cd_values );
+ /*
+ * Call H5Pset_filter function.
+ */
+ ret = H5Pset_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts, c_cd_values);
- if (ret < 0) goto DONE;
- ret_value = 0;
+ if (ret < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_cd_values);
- return ret_value;
+ HDfree(c_cd_values);
+ return ret_value;
}
/****if* H5Pf/h5pget_nfilters_c
@@ -1723,25 +1763,26 @@ DONE:
* Xiangyang Su
* Friday, February 25, 2000
* SOURCE
-*/
+ */
int_f
-h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters)
+h5pget_nfilters_c(hid_t_f *prp_id, int_f *nfilters)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- int c_nfilters;
- /*
- * Call H5Pget_nfilters function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_nfilters = H5Pget_nfilters(c_prp_id);
- if (c_nfilters < 0) return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ int c_nfilters;
+ /*
+ * Call H5Pget_nfilters function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_nfilters = H5Pget_nfilters(c_prp_id);
+ if (c_nfilters < 0)
+ return ret_value;
- *nfilters = (int_f)c_nfilters;
- ret_value = 0;
+ *nfilters = (int_f)c_nfilters;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -1768,45 +1809,47 @@ h5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters)
* MSB January 27, 2009
*---------------------------------------------------------------------------*/
int_f
-h5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name, int_f* filter_id)
+h5pget_filter_c(hid_t_f *prp_id, int_f *filter_number, int_f *flags, size_t_f *cd_nelmts, int_f *cd_values,
+ size_t_f *namelen, _fcd name, int_f *filter_id)
/******/
{
unsigned int c_flags;
- size_t c_cd_nelmts = 0;
- H5Z_filter_t c_filter;
+ size_t c_cd_nelmts = 0;
+ H5Z_filter_t c_filter;
unsigned int *c_cd_values = NULL;
- char *c_name = NULL;
- unsigned i;
- int ret_value = -1;
+ char * c_name = NULL;
+ unsigned i;
+ int ret_value = -1;
c_cd_nelmts = (size_t)*cd_nelmts;
- if(NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
+ if (NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
goto DONE;
- if(NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts)))
+ if (NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts)))
goto DONE;
/*
* Call H5Pget_filter2 function.
*/
- if((c_filter = H5Pget_filter2((hid_t)*prp_id, (unsigned)*filter_number, &c_flags, &c_cd_nelmts, c_cd_values, (size_t)*namelen, c_name, NULL)) < 0)
+ if ((c_filter = H5Pget_filter2((hid_t)*prp_id, (unsigned)*filter_number, &c_flags, &c_cd_nelmts,
+ c_cd_values, (size_t)*namelen, c_name, NULL)) < 0)
goto DONE;
*filter_id = (int_f)c_filter;
*cd_nelmts = (size_t_f)c_cd_nelmts;
- *flags = (int_f)c_flags;
+ *flags = (int_f)c_flags;
HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
- for(i = 0; i < c_cd_nelmts; i++)
- cd_values[i] = (int_f)c_cd_values[i];
+ for (i = 0; i < c_cd_nelmts; i++)
+ cd_values[i] = (int_f)c_cd_values[i];
ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_cd_values)
+ if (c_cd_values)
HDfree(c_cd_values);
return ret_value;
}
@@ -1833,37 +1876,38 @@ DONE:
* Changed type of 'offset' from int_f to off_t_f -- MSB January 9, 2012
*
* SOURCE
-*/
+ */
int_f
-h5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes)
+h5pset_external_c(hid_t_f *prp_id, _fcd name, int_f *namelen, off_t_f *offset, hsize_t_f *bytes)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- hsize_t c_bytes;
- char* c_name;
- size_t c_namelen = (size_t)*namelen;
- off_t c_offset;
- c_bytes = (hsize_t) *bytes;
- c_offset = (off_t) *offset;
-
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ hsize_t c_bytes;
+ char * c_name;
+ size_t c_namelen = (size_t)*namelen;
+ off_t c_offset;
+ c_bytes = (hsize_t)*bytes;
+ c_offset = (off_t)*offset;
- c_name = (char *)HD5f2cstring(name, c_namelen);
- if (c_name == NULL) return ret_value;
+ c_name = (char *)HD5f2cstring(name, c_namelen);
+ if (c_name == NULL)
+ return ret_value;
- /*
- * Call H5Pset_external function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_external(c_prp_id, c_name, c_offset, c_bytes);
+ /*
+ * Call H5Pset_external function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_external(c_prp_id, c_name, c_offset, c_bytes);
- if (ret < 0) goto DONE;
- ret_value = 0;
+ if (ret < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_name);
- return ret_value;
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pget_external_count_c
@@ -1884,23 +1928,24 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_external_count_c (hid_t_f *prp_id, int_f* count)
+h5pget_external_count_c(hid_t_f *prp_id, int_f *count)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- int c_count;
- /*
- * Call H5Pget_external_count function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_count = H5Pget_external_count(c_prp_id);
- if (c_count < 0) return ret_value;
- *count = (int_f)c_count;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ int c_count;
+ /*
+ * Call H5Pget_external_count function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_count = H5Pget_external_count(c_prp_id);
+ if (c_count < 0)
+ return ret_value;
+ *count = (int_f)c_count;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_external_c
@@ -1926,93 +1971,90 @@ h5pget_external_count_c (hid_t_f *prp_id, int_f* count)
* Changed type of 'offset' from integer to off_t -- MSB January 9, 2012
*
* SOURCE
-*/
-int_f
-h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, off_t_f* offset, hsize_t_f*bytes)
-/******/
-{
- int ret_value = -1;
- hid_t c_prp_id;
- unsigned c_idx;
- herr_t status;
- size_t c_namelen;
- char* c_name = NULL;
- off_t c_offset;
- hsize_t size;
-
- c_namelen = (size_t)*name_size;
- /*
- * Allocate memory to store the name of the external file.
- */
- if(c_namelen) c_name = (char*)HDmalloc(c_namelen + 1);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Pget_external function.
- */
- c_prp_id = (hid_t)*prp_id;
- c_idx = (unsigned)*idx;
- status = H5Pget_external(c_prp_id, c_idx, c_namelen+1, c_name, &c_offset, &size );
-
- if (status < 0) goto DONE;
-
- *offset = (off_t_f)c_offset;
- *bytes = (hsize_t_f)size;
- /* Note: if the size of the fortran buffer is larger then the returned string
- * from the function then we need to give HD5packFstring the fortran buffer size so
- * that it fills the remaining unused characters with blanks. MSB
- */
- HD5packFstring(c_name, _fcdtocp(name), c_namelen);
- ret_value = 0;
+ */
+int_f
+h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name, off_t_f *offset,
+ hsize_t_f *bytes)
+/******/
+{
+ int ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_idx;
+ herr_t status;
+ size_t c_namelen;
+ char * c_name = NULL;
+ off_t c_offset;
+ hsize_t size;
+
+ c_namelen = (size_t)*name_size;
+ /*
+ * Allocate memory to store the name of the external file.
+ */
+ if (c_namelen)
+ c_name = (char *)HDmalloc(c_namelen + 1);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Pget_external function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ c_idx = (unsigned)*idx;
+ status = H5Pget_external(c_prp_id, c_idx, c_namelen + 1, c_name, &c_offset, &size);
+
+ if (status < 0)
+ goto DONE;
+
+ *offset = (off_t_f)c_offset;
+ *bytes = (hsize_t_f)size;
+ /* Note: if the size of the fortran buffer is larger then the returned string
+ * from the function then we need to give HD5packFstring the fortran buffer size so
+ * that it fills the remaining unused characters with blanks. MSB
+ */
+ HD5packFstring(c_name, _fcdtocp(name), c_namelen);
+ ret_value = 0;
DONE:
- HDfree(c_name);
- return ret_value;
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pset_btree_ratios_c
* NAME
* h5pset_btree_ratios_c
* PURPOSE
- * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a
- * dataset transfer property list.
- * INPUTS
- * prp_id - property list identifier
- * left - The B-tree split ratio for left-most nodes.
- * middle - The B-tree split ratio for all other nodes
- * right - The B-tree split ratio for right-most nodes
- * and lone nodes.
- * RETURNS
- * 0 on success, -1 on failure
- * AUTHOR
- * Xiangyang Su
+ * Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer
+ * property list. a dataset transfer property list. INPUTS prp_id - property list identifier left - The B-tree
+ * split ratio for left-most nodes. middle - The B-tree split ratio for all other nodes right - The B-tree
+ * split ratio for right-most nodes and lone nodes. RETURNS 0 on success, -1 on failure AUTHOR Xiangyang Su
* Friday, February 25, 2000
* HISTORY
* Changed the type of the last three parameters from double to real_f
* SOURCE
-*/
+ */
int_f
-h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right)
+h5pset_btree_ratios_c(hid_t_f *prp_id, real_f *left, real_f *middle, real_f *right)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- double c_left;
- double c_middle;
- double c_right;
- c_left = (double)*left;
- c_middle = (double)*middle;
- c_right = (double)*right;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ double c_left;
+ double c_middle;
+ double c_right;
+ c_left = (double)*left;
+ c_middle = (double)*middle;
+ c_right = (double)*right;
- /*
- * Call H5Pset_btree_ratios function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pset_btree_ratios(c_prp_id, c_left, c_middle, c_right);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pset_btree_ratios function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pset_btree_ratios(c_prp_id, c_left, c_middle, c_right);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_btree_ratios_c
@@ -2035,27 +2077,28 @@ h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig
* HISTORY
* Changed the type of the last three parameters from double to real_f
* SOURCE
-*/
+ */
int_f
-h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right)
+h5pget_btree_ratios_c(hid_t_f *prp_id, real_f *left, real_f *middle, real_f *right)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- double c_left, c_right, c_middle;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ double c_left, c_right, c_middle;
- /*
- * Call H5Pget_btree_ratios function.
- */
- c_prp_id = (hid_t)*prp_id;
- ret = H5Pget_btree_ratios(c_prp_id, &c_left, &c_middle, &c_right);
- *left = (real_f)c_left;
- *middle = (real_f)c_middle;
- *right = (real_f)c_right;
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pget_btree_ratios function.
+ */
+ c_prp_id = (hid_t)*prp_id;
+ ret = H5Pget_btree_ratios(c_prp_id, &c_left, &c_middle, &c_right);
+ *left = (real_f)c_left;
+ *middle = (real_f)c_middle;
+ *right = (real_f)c_right;
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fclose_degree_c
* NAME
@@ -2079,22 +2122,23 @@ h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* rig
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
+h5pget_fclose_degree_c(hid_t_f *fapl_id, int_f *degree)
/******/
{
- int ret_value = -1;
- hid_t c_fapl_id;
- H5F_close_degree_t c_degree;
+ int ret_value = -1;
+ hid_t c_fapl_id;
+ H5F_close_degree_t c_degree;
- c_fapl_id = (hid_t)*fapl_id;
- if( H5Pget_fclose_degree(c_fapl_id, &c_degree) < 0) return ret_value;
+ c_fapl_id = (hid_t)*fapl_id;
+ if (H5Pget_fclose_degree(c_fapl_id, &c_degree) < 0)
+ return ret_value;
- *degree = (int_f)c_degree;
- ret_value = 0;
- return ret_value;
+ *degree = (int_f)c_degree;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fclose_degree_c
@@ -2117,22 +2161,23 @@ h5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
+h5pset_fclose_degree_c(hid_t_f *fapl_id, int_f *degree)
/******/
{
- int ret_value = -1;
- hid_t c_fapl_id;
- H5F_close_degree_t c_degree;
+ int ret_value = -1;
+ hid_t c_fapl_id;
+ H5F_close_degree_t c_degree;
- c_fapl_id = (hid_t)*fapl_id;
- c_degree = (H5F_close_degree_t)*degree;
- if( H5Pset_fclose_degree(c_fapl_id, c_degree) < 0) return ret_value;
+ c_fapl_id = (hid_t)*fapl_id;
+ c_degree = (H5F_close_degree_t)*degree;
+ if (H5Pset_fclose_degree(c_fapl_id, c_degree) < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_buffer_c
@@ -2153,20 +2198,21 @@ h5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
+h5pset_buffer_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (size_t)*size;
- if ( H5Pset_buffer(c_prp_id, c_size, NULL, NULL) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (size_t)*size;
+ if (H5Pset_buffer(c_prp_id, c_size, NULL, NULL) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_buffer_c
@@ -2186,22 +2232,23 @@ h5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
+h5pget_buffer_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = H5Pget_buffer(c_prp_id, NULL, NULL);
- if ( c_size == 0 ) return ret_value;
- *size = (hsize_t_f)c_size;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = H5Pget_buffer(c_prp_id, NULL, NULL);
+ if (c_size == 0)
+ return ret_value;
+ *size = (hsize_t_f)c_size;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pfill_value_defined_c
* NAME
@@ -2220,21 +2267,22 @@ h5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag)
+h5pfill_value_defined_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_fill_value_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_fill_value_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pfill_value_defined(c_prp_id, &c_flag) < 0 ) return ret_value;
- *flag = (int_f)c_flag;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pfill_value_defined(c_prp_id, &c_flag) < 0)
+ return ret_value;
+ *flag = (int_f)c_flag;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_alloc_time_c
* NAME
@@ -2254,21 +2302,22 @@ h5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
+h5pget_alloc_time_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_alloc_time_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_alloc_time_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_alloc_time(c_prp_id, &c_flag) < 0 ) return ret_value;
- *flag = (int_f)c_flag;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_alloc_time(c_prp_id, &c_flag) < 0)
+ return ret_value;
+ *flag = (int_f)c_flag;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_alloc_time_c
* NAME
@@ -2287,21 +2336,22 @@ h5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
+h5pset_alloc_time_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_alloc_time_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_alloc_time_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- c_flag = (H5D_alloc_time_t)*flag;
- if ( H5Pset_alloc_time(c_prp_id, c_flag) < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = (H5D_alloc_time_t)*flag;
+ if (H5Pset_alloc_time(c_prp_id, c_flag) < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fill_time_c
* NAME
@@ -2321,21 +2371,22 @@ h5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag)
+h5pget_fill_time_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_fill_time_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_fill_time_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_fill_time(c_prp_id, &c_flag) < 0 ) return ret_value;
- *flag = (int_f)c_flag;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_fill_time(c_prp_id, &c_flag) < 0)
+ return ret_value;
+ *flag = (int_f)c_flag;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fill_time_c
* NAME
@@ -2354,21 +2405,22 @@ h5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag)
+h5pset_fill_time_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- H5D_fill_time_t c_flag;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ H5D_fill_time_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- c_flag = (H5D_fill_time_t)*flag;
- if ( H5Pset_fill_time(c_prp_id, c_flag) < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = (H5D_fill_time_t)*flag;
+ if (H5Pset_fill_time(c_prp_id, c_flag) < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_meta_block_size_c
* NAME
@@ -2388,20 +2440,21 @@ h5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
+h5pset_meta_block_size_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (hsize_t)*size;
- if ( H5Pset_meta_block_size(c_prp_id, c_size) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (hsize_t)*size;
+ if (H5Pset_meta_block_size(c_prp_id, c_size) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_meta_block_size_c
* NAME
@@ -2421,20 +2474,21 @@ h5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
+h5pget_meta_block_size_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_meta_block_size(c_prp_id, &c_size) < 0 ) ret_value = -1;
- *size = (hsize_t_f)c_size;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_meta_block_size(c_prp_id, &c_size) < 0)
+ ret_value = -1;
+ *size = (hsize_t_f)c_size;
+ return ret_value;
}
/****if* H5Pf/h5pset_sieve_buf_size_c
* NAME
@@ -2454,20 +2508,21 @@ h5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
+h5pset_sieve_buf_size_c(hid_t_f *prp_id, size_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (size_t)*size;
- if ( H5Pset_sieve_buf_size(c_prp_id, c_size) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (size_t)*size;
+ if (H5Pset_sieve_buf_size(c_prp_id, c_size) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_sieve_buf_size_c
* NAME
@@ -2487,20 +2542,21 @@ h5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
+h5pget_sieve_buf_size_c(hid_t_f *prp_id, size_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_sieve_buf_size(c_prp_id, &c_size) < 0 ) ret_value = -1;
- *size = (size_t_f)c_size;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_sieve_buf_size(c_prp_id, &c_size) < 0)
+ ret_value = -1;
+ *size = (size_t_f)c_size;
+ return ret_value;
}
/****if* H5Pf/h5pset_small_data_block_size_c
* NAME
@@ -2520,20 +2576,21 @@ h5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
+h5pset_small_data_block_size_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (hsize_t)*size;
- if ( H5Pset_small_data_block_size(c_prp_id, c_size) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (hsize_t)*size;
+ if (H5Pset_small_data_block_size(c_prp_id, c_size) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_small_data_block_size_c
* NAME
@@ -2553,20 +2610,21 @@ h5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
+h5pget_small_data_block_size_c(hid_t_f *prp_id, hsize_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_small_data_block_size(c_prp_id, &c_size) < 0 ) ret_value = -1;
- *size = (hsize_t_f)c_size;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_small_data_block_size(c_prp_id, &c_size) < 0)
+ ret_value = -1;
+ *size = (hsize_t_f)c_size;
+ return ret_value;
}
/****if* H5Pf/h5pset_hyper_vector_size_c
* NAME
@@ -2586,20 +2644,21 @@ h5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
+h5pset_hyper_vector_size_c(hid_t_f *prp_id, size_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- c_size = (size_t)*size;
- if ( H5Pset_hyper_vector_size(c_prp_id, c_size) < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (size_t)*size;
+ if (H5Pset_hyper_vector_size(c_prp_id, c_size) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_hyper_vector_size_c
* NAME
@@ -2619,20 +2678,21 @@ h5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
+h5pget_hyper_vector_size_c(hid_t_f *prp_id, size_t_f *size)
/******/
{
- int ret_value = 0;
- hid_t c_prp_id;
- size_t c_size;
+ int ret_value = 0;
+ hid_t c_prp_id;
+ size_t c_size;
- c_prp_id = (hid_t)*prp_id;
- if ( H5Pget_hyper_vector_size(c_prp_id, &c_size) < 0 ) ret_value = -1;
- *size = (size_t_f)c_size;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ if (H5Pget_hyper_vector_size(c_prp_id, &c_size) < 0)
+ ret_value = -1;
+ *size = (size_t_f)c_size;
+ return ret_value;
}
/****if* H5Pf/h5pcreate_class_c
@@ -2656,33 +2716,36 @@ h5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
* Added the callback parameters (FORTRAN 2003 compilers only)
* M. Scot Breitenfeld, July 3, 2008
* SOURCE
-*/
+ */
int_f
-h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls,
- H5P_cls_create_func_t create, void *create_data,
- H5P_cls_copy_func_t copy, void *copy_data,
- H5P_cls_close_func_t close, void *close_data)
+h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls, H5P_cls_create_func_t create,
+ void *create_data, H5P_cls_copy_func_t copy, void *copy_data, H5P_cls_close_func_t close,
+ void *close_data)
/******/
{
- int ret_value = -1;
- hid_t c_class;
- char* c_name;
+ int ret_value = -1;
+ hid_t c_class;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- /*
- * Call H5Pcreate_class function.
- */
- c_class = H5Pcreate_class((hid_t)*parent, c_name, create, create_data, copy, copy_data, close, close_data);
+ /*
+ * Call H5Pcreate_class function.
+ */
+ c_class =
+ H5Pcreate_class((hid_t)*parent, c_name, create, create_data, copy, copy_data, close, close_data);
- if (c_class < 0) goto DONE;
- *cls = (hid_t_f)c_class;
- ret_value = 0;
+ if (c_class < 0)
+ goto DONE;
+ *cls = (hid_t_f)c_class;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pregister_c
@@ -2704,28 +2767,28 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void H5_ATTR_UNUSED *value)
/******/
{
- char* c_name = NULL;
- int_f ret_value = -1;
+ char *c_name = NULL;
+ int_f ret_value = -1;
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
- goto DONE;
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
+ goto DONE;
- /*
- * Call H5Pregister2 function.
- */
- if(H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Pregister2 function.
+ */
+ if (H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL)
- HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pinsert_c
@@ -2747,28 +2810,28 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void H5_ATTR_UNUSED *value)
/******/
{
- char* c_name = NULL;
- int_f ret_value = -1;
+ char *c_name = NULL;
+ int_f ret_value = -1;
- if(NULL == ( c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
- goto DONE;
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
+ goto DONE;
- /*
- * Call H5Pinsert2 function.
- */
- if(H5Pinsert2((hid_t)*plist, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
- goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Pinsert2 function.
+ */
+ if (H5Pinsert2((hid_t)*plist, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pexist_c
@@ -2789,29 +2852,31 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
- hid_t c_class;
- char* c_name;
- htri_t status;
+ int_f ret_value = -1;
+ hid_t c_class;
+ char * c_name;
+ htri_t status;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_class = (hid_t)*cls;
- /*
- * Call H5Pexist function.
- */
- status = H5Pexist(c_class, c_name);
- ret_value = status;
+ c_class = (hid_t)*cls;
+ /*
+ * Call H5Pexist function.
+ */
+ status = H5Pexist(c_class, c_name);
+ ret_value = status;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pisa_class_c
* NAME
@@ -2830,25 +2895,25 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pisa_class_c(hid_t_f *plist, hid_t_f *cls)
/******/
{
- int_f ret_value = -1;
- hid_t c_class;
- hid_t c_plist;
- htri_t status;
+ int_f ret_value = -1;
+ hid_t c_class;
+ hid_t c_plist;
+ htri_t status;
- c_class = (hid_t)*cls;
- c_plist = (hid_t)*plist;
+ c_class = (hid_t)*cls;
+ c_plist = (hid_t)*plist;
- /*
- * Call H5Pisa_class function.
- */
- status = H5Pisa_class(c_plist, c_class);
- ret_value = status;
- return ret_value;
+ /*
+ * Call H5Pisa_class function.
+ */
+ status = H5Pisa_class(c_plist, c_class);
+ ret_value = status;
+ return ret_value;
}
/****if* H5Pf/h5pget_size_c
* NAME
@@ -2869,30 +2934,33 @@ h5pisa_class_c(hid_t_f *plist, hid_t_f *cls)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size)
/******/
{
- int_f ret_value = -1;
- hid_t c_plist;
- char* c_name;
- size_t c_size;
+ int_f ret_value = -1;
+ hid_t c_plist;
+ char * c_name;
+ size_t c_size;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_plist = (hid_t)*plist;
- /*
- * Call H5Pget_size function.
- */
- if( H5Pget_size(c_plist, c_name, &c_size) < 0) goto DONE;
- *size = (size_t_f)c_size;
- ret_value = 0;
+ c_plist = (hid_t)*plist;
+ /*
+ * Call H5Pget_size function.
+ */
+ if (H5Pget_size(c_plist, c_name, &c_size) < 0)
+ goto DONE;
+ *size = (size_t_f)c_size;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pget_nprops_c
* NAME
@@ -2911,25 +2979,26 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_nprops_c(hid_t_f *plist, size_t_f *nprops)
/******/
{
- int_f ret_value = -1;
- hid_t c_plist;
- size_t c_nprops;
+ int_f ret_value = -1;
+ hid_t c_plist;
+ size_t c_nprops;
- c_plist = (hid_t)*plist;
+ c_plist = (hid_t)*plist;
- /*
- * Call H5Pget_nprops function.
- */
- if( H5Pget_nprops(c_plist, &c_nprops) < 0) return ret_value;
+ /*
+ * Call H5Pget_nprops function.
+ */
+ if (H5Pget_nprops(c_plist, &c_nprops) < 0)
+ return ret_value;
- *nprops = (size_t_f)c_nprops;
- ret_value = 0;
- return ret_value;
+ *nprops = (size_t_f)c_nprops;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_class_parent_c
* NAME
@@ -2949,26 +3018,27 @@ h5pget_nprops_c(hid_t_f *plist, size_t_f *nprops)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- hid_t c_parent_id;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ hid_t c_parent_id;
- c_prp_id = (hid_t)*prp_id;
+ c_prp_id = (hid_t)*prp_id;
- /*
- * Call H5Pget_class_parent function.
- */
- c_parent_id = H5Pget_class_parent(c_prp_id);
- if( c_parent_id < 0) return ret_value;
+ /*
+ * Call H5Pget_class_parent function.
+ */
+ c_parent_id = H5Pget_class_parent(c_prp_id);
+ if (c_parent_id < 0)
+ return ret_value;
- *parent_id =(hid_t_f)c_parent_id;
- ret_value = 0;
- return ret_value;
+ *parent_id = (hid_t_f)c_parent_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pcopy_prop_c
* NAME
@@ -2989,29 +3059,32 @@ h5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
- hid_t c_dst_id, c_src_id;
- char* c_name;
+ int_f ret_value = -1;
+ hid_t c_dst_id, c_src_id;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_dst_id = (hid_t)*dst_id;
- c_src_id = (hid_t)*src_id;
- /*
- * Call H5Pcopy_prop function.
- */
- if( H5Pcopy_prop(c_dst_id, c_src_id, c_name) < 0) goto DONE;
- ret_value = 0;
+ c_dst_id = (hid_t)*dst_id;
+ c_src_id = (hid_t)*src_id;
+ /*
+ * Call H5Pcopy_prop function.
+ */
+ if (H5Pcopy_prop(c_dst_id, c_src_id, c_name) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5premove_c
* NAME
@@ -3030,28 +3103,31 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
- hid_t c_plid;
- char* c_name;
+ int_f ret_value = -1;
+ hid_t c_plid;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_plid = (hid_t)*plid;
- /*
- * Call H5Premove function.
- */
- if( H5Premove(c_plid, c_name) < 0) goto DONE;
- ret_value = 0;
+ c_plid = (hid_t)*plid;
+ /*
+ * Call H5Premove function.
+ */
+ if (H5Premove(c_plid, c_name) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5punregister_c
* NAME
@@ -3070,28 +3146,31 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
- hid_t c_class;
- char* c_name;
+ int_f ret_value = -1;
+ hid_t c_class;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- c_class = (hid_t)*cls;
- /*
- * Call H5Punregister function.
- */
- if( H5Punregister(c_class, c_name) < 0) goto DONE;
- ret_value = 0;
+ c_class = (hid_t)*cls;
+ /*
+ * Call H5Punregister function.
+ */
+ if (H5Punregister(c_class, c_name) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pclose_class_c
* NAME
@@ -3108,21 +3187,22 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pclose_class_c(hid_t_f *cls)
/******/
{
- int_f ret_value = -1;
- hid_t c_class;
+ int_f ret_value = -1;
+ hid_t c_class;
- c_class = (hid_t)*cls;
- /*
- * Call H5Pclose_class function.
- */
- if( H5Pclose_class(c_class) < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ c_class = (hid_t)*cls;
+ /*
+ * Call H5Pclose_class function.
+ */
+ if (H5Pclose_class(c_class) < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_class_name_c
@@ -3142,29 +3222,29 @@ h5pclose_class_c(hid_t_f *cls)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len)
/******/
{
- int_f ret_value = -1;
+ int_f ret_value = -1;
- /* Buffer to return name by C function */
- char *c_name;
+ /* Buffer to return name by C function */
+ char *c_name;
- /*
- * Call H5Pget_class_name function. c_name is allocated by the library,
- * has to be freed by application.
- */
- if(NULL == (c_name = H5Pget_class_name((hid_t)*cls)))
- goto DONE;
+ /*
+ * Call H5Pget_class_name function. c_name is allocated by the library,
+ * has to be freed by application.
+ */
+ if (NULL == (c_name = H5Pget_class_name((hid_t)*cls)))
+ goto DONE;
- HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len);
- ret_value = (int_f)HDstrlen(c_name);
- H5free_memory(c_name);
+ HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len);
+ ret_value = (int_f)HDstrlen(c_name);
+ H5free_memory(c_name);
DONE:
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_c
@@ -3185,26 +3265,29 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
/******/
{
- int_f ret_value = -1;
- char* c_name;
+ int_f ret_value = -1;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- /*
- * Call H5Pset function.
- */
- if( H5Pset((hid_t)*plist, c_name, value) <0) goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Pset function.
+ */
+ if (H5Pset((hid_t)*plist, c_name, value) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pget_c
@@ -3226,26 +3309,29 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
/******/
{
- int_f ret_value = -1;
- char* c_name;
+ int_f ret_value = -1;
+ char *c_name;
- c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
- if (c_name == NULL) goto DONE;
+ c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
+ if (c_name == NULL)
+ goto DONE;
- /*
- * Call H5Pset function.
- */
- if( H5Pget((hid_t)*plist, c_name, value) <0) goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Pset function.
+ */
+ if (H5Pget((hid_t)*plist, c_name, value) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- if(c_name != NULL) HDfree(c_name);
- return ret_value;
+ if (c_name != NULL)
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Pf/h5pset_shuffle_c
@@ -3264,20 +3350,21 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_shuffle_c ( hid_t_f *prp_id )
+h5pset_shuffle_c(hid_t_f *prp_id)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- herr_t status;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- status = H5Pset_shuffle(c_prp_id);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ status = H5Pset_shuffle(c_prp_id);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pset_fletcher32_c
* NAME
@@ -3294,20 +3381,21 @@ h5pset_shuffle_c ( hid_t_f *prp_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fletcher32_c ( hid_t_f *prp_id )
+h5pset_fletcher32_c(hid_t_f *prp_id)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- herr_t status;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- status = H5Pset_fletcher32(c_prp_id);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ status = H5Pset_fletcher32(c_prp_id);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pset_edc_check_c
@@ -3326,22 +3414,23 @@ h5pset_fletcher32_c ( hid_t_f *prp_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag )
+h5pset_edc_check_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- H5Z_EDC_t c_flag;
- herr_t status;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ H5Z_EDC_t c_flag;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- c_flag = (H5Z_EDC_t)*flag;
- status = H5Pset_edc_check(c_prp_id, c_flag);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = (H5Z_EDC_t)*flag;
+ status = H5Pset_edc_check(c_prp_id, c_flag);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pget_edc_check_c
@@ -3360,21 +3449,22 @@ h5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag )
+h5pget_edc_check_c(hid_t_f *prp_id, int_f *flag)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- H5Z_EDC_t c_flag;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ H5Z_EDC_t c_flag;
- c_prp_id = (hid_t)*prp_id;
- c_flag = H5Pget_edc_check(c_prp_id);
- if ( c_flag < 0 ) ret_value = -1;
- *flag = (int_f)c_flag;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_flag = H5Pget_edc_check(c_prp_id);
+ if (c_flag < 0)
+ ret_value = -1;
+ *flag = (int_f)c_flag;
+ return ret_value;
}
/****if* H5Pf/h5pset_family_offset_c
* NAME
@@ -3392,22 +3482,23 @@ h5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset)
+h5pset_family_offset_c(hid_t_f *prp_id, hsize_t_f *offset)
/******/
{
- int_f ret_value = 0;
- hid_t c_prp_id;
- hsize_t c_offset;
- herr_t status;
+ int_f ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_offset;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- c_offset = (hsize_t)*offset;
- status = H5Pset_family_offset(c_prp_id, c_offset);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_prp_id = (hid_t)*prp_id;
+ c_offset = (hsize_t)*offset;
+ status = H5Pset_family_offset(c_prp_id, c_offset);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_multi_c
@@ -3431,74 +3522,81 @@ h5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
/*
* h5pset_fapl_multi_c(hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name,
* int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag)
*/
-h5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag)
-/******/
-{
- int_f ret_value = -1;
- hid_t c_prp_id;
- H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
- hid_t c_memb_fapl[H5FD_MEM_NTYPES];
- char *c_memb_name[H5FD_MEM_NTYPES];
- haddr_t c_memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
- herr_t status;
- char *tmp, *tmp_p, *tmp_pp;
- int i;
- int c_lenmax;
- long double tmp_max_addr;
- c_lenmax = (int)*lenmax;
- relax = (hbool_t)*flag;
-/*
- * Check that we got correct values from Fortran for memb_addr array
- */
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- if(memb_addr[i] >= 1.0f) return ret_value;
- }
-/*
- * Take care of names array
- */
-
- tmp = (char *)HD5f2cstring(memb_name, (size_t)c_lenmax*(H5FD_MEM_NTYPES));
- if (tmp ==NULL) return ret_value;
- tmp_p = tmp;
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- c_memb_name[i] = (char *)HDmalloc((size_t)len[i] + 1);
- HDmemcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
- tmp_pp = c_memb_name[i];
- tmp_pp[len[i]] = '\0';
- tmp_p = tmp_p + c_lenmax;
- }
-/*
- * Take care of othe arguments
- */
- tmp_max_addr = (long double)(HADDR_MAX);
- c_prp_id = (hid_t)*prp_id;
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- c_memb_map[i] = (H5FD_mem_t)memb_map[i];
- c_memb_fapl[i] = (hid_t)memb_fapl[i];
- if(memb_addr[i] < 0) c_memb_addr[i] = HADDR_UNDEF;
- else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(tmp_max_addr));
- }
-/*
- * Call H5Pset_fapl_multi function
- */
+h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len,
+ int_f *lenmax, real_f *memb_addr, int_f *flag)
+/******/
+{
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
+ hid_t c_memb_fapl[H5FD_MEM_NTYPES];
+ char * c_memb_name[H5FD_MEM_NTYPES];
+ haddr_t c_memb_addr[H5FD_MEM_NTYPES];
+ hbool_t relax;
+ herr_t status;
+ char * tmp, *tmp_p, *tmp_pp;
+ int i;
+ int c_lenmax;
+ long double tmp_max_addr;
+ c_lenmax = (int)*lenmax;
+ relax = (hbool_t)*flag;
+ /*
+ * Check that we got correct values from Fortran for memb_addr array
+ */
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ if (memb_addr[i] >= 1.0f)
+ return ret_value;
+ }
+ /*
+ * Take care of names array
+ */
- status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char * const *)c_memb_name, c_memb_addr, relax);
- if ( status < 0 ) goto DONE;
- ret_value = 0;
+ tmp = (char *)HD5f2cstring(memb_name, (size_t)c_lenmax * (H5FD_MEM_NTYPES));
+ if (tmp == NULL)
+ return ret_value;
+ tmp_p = tmp;
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ c_memb_name[i] = (char *)HDmalloc((size_t)len[i] + 1);
+ HDmemcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
+ tmp_pp = c_memb_name[i];
+ tmp_pp[len[i]] = '\0';
+ tmp_p = tmp_p + c_lenmax;
+ }
+ /*
+ * Take care of othe arguments
+ */
+ tmp_max_addr = (long double)(HADDR_MAX);
+ c_prp_id = (hid_t)*prp_id;
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ c_memb_map[i] = (H5FD_mem_t)memb_map[i];
+ c_memb_fapl[i] = (hid_t)memb_fapl[i];
+ if (memb_addr[i] < 0)
+ c_memb_addr[i] = HADDR_UNDEF;
+ else
+ c_memb_addr[i] = (haddr_t)(((float)memb_addr[i]) * (tmp_max_addr));
+ }
+ /*
+ * Call H5Pset_fapl_multi function
+ */
+
+ status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char *const *)c_memb_name,
+ c_memb_addr, relax);
+ if (status < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(tmp);
- for (i=0; i < H5FD_MEM_NTYPES; i++)
- HDfree(c_memb_name[i]);
- return ret_value;
+ HDfree(tmp);
+ for (i = 0; i < H5FD_MEM_NTYPES; i++)
+ HDfree(c_memb_name[i]);
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_multi_sc
@@ -3516,27 +3614,28 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag)
+h5pset_fapl_multi_sc(hid_t_f *prp_id, int_f *flag)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- hbool_t relax;
- herr_t status;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ hbool_t relax;
+ herr_t status;
- relax = (hbool_t)*flag;
- c_prp_id = (hid_t)*prp_id;
-/*
- * Call H5Pset_fapl_multi function
- */
+ relax = (hbool_t)*flag;
+ c_prp_id = (hid_t)*prp_id;
+ /*
+ * Call H5Pset_fapl_multi function
+ */
- status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax);
- if ( status < 0 ) return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax);
+ if (status < 0)
+ return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_multi_c
* NAME
@@ -3560,66 +3659,70 @@ h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out)
+h5pget_fapl_multi_c(hid_t_f *prp_id, int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len,
+ int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
- hid_t c_memb_fapl[H5FD_MEM_NTYPES];
- char *c_memb_name[H5FD_MEM_NTYPES];
- haddr_t c_memb_addr[H5FD_MEM_NTYPES];
- hbool_t relax;
- herr_t status;
- char *tmp, *tmp_p;
- int i;
- size_t c_lenmax;
- size_t length = 0;
- c_lenmax = (size_t)*lenmax;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
+ hid_t c_memb_fapl[H5FD_MEM_NTYPES];
+ char * c_memb_name[H5FD_MEM_NTYPES];
+ haddr_t c_memb_addr[H5FD_MEM_NTYPES];
+ hbool_t relax;
+ herr_t status;
+ char * tmp, *tmp_p;
+ int i;
+ size_t c_lenmax;
+ size_t length = 0;
+ c_lenmax = (size_t)*lenmax;
- c_prp_id = (hid_t)*prp_id;
-/*
- * Call H5Pget_fapl_multi function
- */
+ c_prp_id = (hid_t)*prp_id;
+ /*
+ * Call H5Pget_fapl_multi function
+ */
- status = H5Pget_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, &relax);
- if ( status < 0 ) return ret_value;
+ status = H5Pget_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, &relax);
+ if (status < 0)
+ return ret_value;
-/*
- * Take care of names array
- */
- tmp = (char *)HDmalloc(c_lenmax*H5FD_MEM_NTYPES + 1);
- tmp_p = tmp;
- HDmemset(tmp,' ', c_lenmax*H5FD_MEM_NTYPES);
- tmp[c_lenmax*H5FD_MEM_NTYPES] = '\0';
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i]));
- len[i] = (int_f)strlen(c_memb_name[i]);
- length = H5_MAX(length, strlen(c_memb_name[i]));
- tmp_p = tmp_p + c_lenmax;
- }
-HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES));
+ /*
+ * Take care of names array
+ */
+ tmp = (char *)HDmalloc(c_lenmax * H5FD_MEM_NTYPES + 1);
+ tmp_p = tmp;
+ HDmemset(tmp, ' ', c_lenmax * H5FD_MEM_NTYPES);
+ tmp[c_lenmax * H5FD_MEM_NTYPES] = '\0';
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i]));
+ len[i] = (int_f)strlen(c_memb_name[i]);
+ length = H5_MAX(length, strlen(c_memb_name[i]));
+ tmp_p = tmp_p + c_lenmax;
+ }
+ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax * H5FD_MEM_NTYPES));
-/*
- * Take care of other arguments
- */
+ /*
+ * Take care of other arguments
+ */
- for (i=0; i < H5FD_MEM_NTYPES; i++) {
- memb_map[i] = (int_f)c_memb_map[i];
- memb_fapl[i] = (hid_t_f)c_memb_fapl[i];
- if(c_memb_addr[i] == HADDR_UNDEF) memb_addr[i] = -1;
- else memb_addr[i] = (real_f) (c_memb_addr[i]/HADDR_MAX);
- }
- *flag = (int_f)relax;
- *maxlen_out = (int_f)length;
- ret_value = 0;
- HDfree(tmp);
- for (i=0; i < H5FD_MEM_NTYPES; i++)
- HDfree(c_memb_name[i]);
- return ret_value;
+ for (i = 0; i < H5FD_MEM_NTYPES; i++) {
+ memb_map[i] = (int_f)c_memb_map[i];
+ memb_fapl[i] = (hid_t_f)c_memb_fapl[i];
+ if (c_memb_addr[i] == HADDR_UNDEF)
+ memb_addr[i] = -1;
+ else
+ memb_addr[i] = (real_f)(c_memb_addr[i] / HADDR_MAX);
+ }
+ *flag = (int_f)relax;
+ *maxlen_out = (int_f)length;
+ ret_value = 0;
+ HDfree(tmp);
+ for (i = 0; i < H5FD_MEM_NTYPES; i++)
+ HDfree(c_memb_name[i]);
+ return ret_value;
}
/****if* H5Pf/h5pset_szip_c
@@ -3639,29 +3742,30 @@ HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES));
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block)
+h5pset_szip_c(hid_t_f *prp_id, int_f *options_mask, int_f *pixels_per_block)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- unsigned c_options_mask;
- unsigned c_pixels_per_block;
- herr_t status;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ unsigned c_options_mask;
+ unsigned c_pixels_per_block;
+ herr_t status;
- c_prp_id = (hid_t)*prp_id;
- c_options_mask = (unsigned)*options_mask;
- c_pixels_per_block = (unsigned)*pixels_per_block;
-/*
- * Call H5Pset_szip function
- */
+ c_prp_id = (hid_t)*prp_id;
+ c_options_mask = (unsigned)*options_mask;
+ c_pixels_per_block = (unsigned)*pixels_per_block;
+ /*
+ * Call H5Pset_szip function
+ */
- status = H5Pset_szip(c_prp_id, c_options_mask, c_pixels_per_block);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ status = H5Pset_szip(c_prp_id, c_options_mask, c_pixels_per_block);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pall_filters_avail_c
* NAME
@@ -3680,28 +3784,29 @@ h5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status)
+h5pall_filters_avail_c(hid_t_f *prp_id, int_f *status)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- htri_t c_status;
-
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ htri_t c_status;
- c_prp_id = (hid_t)*prp_id;
-/*
- * Call H5Pall_filters_avail function
- */
+ c_prp_id = (hid_t)*prp_id;
+ /*
+ * Call H5Pall_filters_avail function
+ */
- c_status = H5Pall_filters_avail(c_prp_id);
- if ( c_status < 0 ) return ret_value;
- *status = 0;
- if (c_status == 1) *status = 1;
- ret_value = 0;
- return ret_value;
+ c_status = H5Pall_filters_avail(c_prp_id);
+ if (c_status < 0)
+ return ret_value;
+ *status = 0;
+ if (c_status == 1)
+ *status = 1;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_filter_by_id_c
@@ -3728,44 +3833,46 @@ h5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name)
+h5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f *cd_nelmts, int_f *cd_values,
+ size_t_f *namelen, _fcd name)
/******/
{
- unsigned int c_flags;
- size_t c_cd_nelmts = (size_t)*cd_nelmts;
- size_t c_cd_nelmts_in = (size_t)*cd_nelmts;
- unsigned int *c_cd_values = NULL;
- char *c_name = NULL;
- unsigned i;
- int_f ret_value = -1;
-
- if(NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
- goto DONE;
+ unsigned int c_flags;
+ size_t c_cd_nelmts = (size_t)*cd_nelmts;
+ size_t c_cd_nelmts_in = (size_t)*cd_nelmts;
+ unsigned int *c_cd_values = NULL;
+ char * c_name = NULL;
+ unsigned i;
+ int_f ret_value = -1;
+
+ if (NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
+ goto DONE;
- if(NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts_in)))
- goto DONE;
+ if (NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts_in)))
+ goto DONE;
- /*
- * Call H5Pget_filter_by_id2 function.
- */
- if(H5Pget_filter_by_id2((hid_t)*prp_id, (H5Z_filter_t)*filter_id, &c_flags, &c_cd_nelmts, c_cd_values, (size_t)*namelen, c_name, NULL) < 0)
- goto DONE;
+ /*
+ * Call H5Pget_filter_by_id2 function.
+ */
+ if (H5Pget_filter_by_id2((hid_t)*prp_id, (H5Z_filter_t)*filter_id, &c_flags, &c_cd_nelmts, c_cd_values,
+ (size_t)*namelen, c_name, NULL) < 0)
+ goto DONE;
- *cd_nelmts = (size_t_f)c_cd_nelmts;
- *flags = (int_f)c_flags;
- HD5packFstring(c_name, _fcdtocp(name), HDstrlen(c_name));
+ *cd_nelmts = (size_t_f)c_cd_nelmts;
+ *flags = (int_f)c_flags;
+ HD5packFstring(c_name, _fcdtocp(name), HDstrlen(c_name));
- for(i = 0; i < c_cd_nelmts_in; i++)
- cd_values[i] = (int_f)c_cd_values[i];
+ for (i = 0; i < c_cd_nelmts_in; i++)
+ cd_values[i] = (int_f)c_cd_values[i];
- ret_value = 0;
+ ret_value = 0;
DONE:
- if(c_name)
+ if (c_name)
HDfree(c_name);
- if(c_cd_values)
+ if (c_cd_values)
HDfree(c_cd_values);
return ret_value;
@@ -3791,36 +3898,38 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values )
+h5pmodify_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmts, int_f *cd_values)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id = (hid_t)*prp_id;
- herr_t ret;
- size_t c_cd_nelmts = (size_t)*cd_nelmts;
- unsigned int c_flags = (unsigned)*flags;
- H5Z_filter_t c_filter = (H5Z_filter_t)*filter;
- unsigned int * c_cd_values;
- unsigned i;
+ int_f ret_value = -1;
+ hid_t c_prp_id = (hid_t)*prp_id;
+ herr_t ret;
+ size_t c_cd_nelmts = (size_t)*cd_nelmts;
+ unsigned int c_flags = (unsigned)*flags;
+ H5Z_filter_t c_filter = (H5Z_filter_t)*filter;
+ unsigned int *c_cd_values;
+ unsigned i;
- c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
- if (!c_cd_values) return ret_value;
- for (i = 0; i < c_cd_nelmts; i++)
- c_cd_values[i] = (unsigned int)cd_values[i];
+ c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts);
+ if (!c_cd_values)
+ return ret_value;
+ for (i = 0; i < c_cd_nelmts; i++)
+ c_cd_values[i] = (unsigned int)cd_values[i];
- /*
- * Call H5Pmodify_filter function.
- */
- ret = H5Pmodify_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts,c_cd_values );
+ /*
+ * Call H5Pmodify_filter function.
+ */
+ ret = H5Pmodify_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts, c_cd_values);
- if (ret < 0) goto DONE;
- ret_value = 0;
+ if (ret < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- HDfree(c_cd_values);
- return ret_value;
+ HDfree(c_cd_values);
+ return ret_value;
}
/****if* H5Pf/h5premove_filter_c
@@ -3839,26 +3948,27 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5premove_filter_c (hid_t_f *prp_id, int_f* filter)
+h5premove_filter_c(hid_t_f *prp_id, int_f *filter)
/******/
{
- int_f ret_value = -1;
- hid_t c_prp_id;
- H5Z_filter_t c_filter;
+ int_f ret_value = -1;
+ hid_t c_prp_id;
+ H5Z_filter_t c_filter;
- c_filter = (H5Z_filter_t)*filter;
- c_prp_id = (hid_t)*prp_id;
+ c_filter = (H5Z_filter_t)*filter;
+ c_prp_id = (hid_t)*prp_id;
- /*
- * Call H5Premove_filter function.
- */
- if(H5Premove_filter(c_prp_id, c_filter) < 0) goto DONE;
- ret_value = 0;
+ /*
+ * Call H5Premove_filter function.
+ */
+ if (H5Premove_filter(c_prp_id, c_filter) < 0)
+ goto DONE;
+ ret_value = 0;
DONE:
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pget_attr_phase_change_c
@@ -3880,27 +3990,28 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense )
+h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense)
/******/
{
- int ret_value = -1;
- hid_t c_ocpl_id;
- unsigned c_max_compact;
- unsigned c_min_dense;
- herr_t ret;
- /*
- * Call H5Pget_attr_phase_change function.
- */
- c_ocpl_id = (hid_t)*ocpl_id;
- ret = H5Pget_attr_phase_change(c_ocpl_id, &c_max_compact,&c_min_dense);
- if (ret < 0) return ret_value;
-
- *max_compact = (int_f)c_max_compact;
- *min_dense = (int_f)c_min_dense;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_ocpl_id;
+ unsigned c_max_compact;
+ unsigned c_min_dense;
+ herr_t ret;
+ /*
+ * Call H5Pget_attr_phase_change function.
+ */
+ c_ocpl_id = (hid_t)*ocpl_id;
+ ret = H5Pget_attr_phase_change(c_ocpl_id, &c_max_compact, &c_min_dense);
+ if (ret < 0)
+ return ret_value;
+
+ *max_compact = (int_f)c_max_compact;
+ *min_dense = (int_f)c_min_dense;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_attr_creation_order_c
@@ -3921,24 +4032,25 @@ h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags )
+h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
/******/
{
- int ret_value = -1;
- unsigned c_crt_order_flags;
- herr_t ret;
- /*
- * Call h5pset_attr_creation_order function.
- */
- c_crt_order_flags = (unsigned)*crt_order_flags;
- ret = H5Pset_attr_creation_order((hid_t)*ocpl_id, c_crt_order_flags);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ unsigned c_crt_order_flags;
+ herr_t ret;
+ /*
+ * Call h5pset_attr_creation_order function.
+ */
+ c_crt_order_flags = (unsigned)*crt_order_flags;
+ ret = H5Pset_attr_creation_order((hid_t)*ocpl_id, c_crt_order_flags);
+ if (ret < 0)
+ return ret_value;
- *crt_order_flags = (int_f)c_crt_order_flags;
- ret_value = 0;
- return ret_value;
+ *crt_order_flags = (int_f)c_crt_order_flags;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_shared_mesg_nindexes_c
@@ -3963,25 +4075,26 @@ h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes )
+h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes)
/******/
{
- int ret_value = -1;
- hid_t c_plist_id;
- unsigned c_nindexes;
- herr_t ret;
- /*
- * Call h5pset_shared_mesg_nindexes function.
- */
- c_plist_id = (hid_t)*plist_id;
- c_nindexes = (unsigned)*nindexes;
- ret = H5Pset_shared_mesg_nindexes(c_plist_id, c_nindexes );
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ hid_t c_plist_id;
+ unsigned c_nindexes;
+ herr_t ret;
+ /*
+ * Call h5pset_shared_mesg_nindexes function.
+ */
+ c_plist_id = (hid_t)*plist_id;
+ c_nindexes = (unsigned)*nindexes;
+ ret = H5Pset_shared_mesg_nindexes(c_plist_id, c_nindexes);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_shared_mesg_index_c
@@ -4007,21 +4120,23 @@ h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call h5pset_shared_mesg_index function.
- */
- ret = H5Pset_shared_mesg_index((hid_t)*fcpl_id,(unsigned)*index_num, (unsigned)*mesg_type_flags, (unsigned)*min_mesg_size);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call h5pset_shared_mesg_index function.
+ */
+ ret = H5Pset_shared_mesg_index((hid_t)*fcpl_id, (unsigned)*index_num, (unsigned)*mesg_type_flags,
+ (unsigned)*min_mesg_size);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_attr_creation_order_c
@@ -4045,26 +4160,27 @@ h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- unsigned c_crt_order_flags;
- /*
- * Call h5pget_attr_creation_order function.
- */
+ unsigned c_crt_order_flags;
+ /*
+ * Call h5pget_attr_creation_order function.
+ */
- ret = H5Pget_attr_creation_order((hid_t)*ocpl_id, &c_crt_order_flags);
- if (ret < 0) return ret_value;
+ ret = H5Pget_attr_creation_order((hid_t)*ocpl_id, &c_crt_order_flags);
+ if (ret < 0)
+ return ret_value;
- *crt_order_flags = (int_f)c_crt_order_flags;
+ *crt_order_flags = (int_f)c_crt_order_flags;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_link_creation_order_c
* NAME
@@ -4085,21 +4201,22 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags )
+h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_link_creation_order function.
- */
- ret = H5Pset_link_creation_order((hid_t)*gcpl_id, (unsigned)*crt_order_flags);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_link_creation_order function.
+ */
+ ret = H5Pset_link_creation_order((hid_t)*gcpl_id, (unsigned)*crt_order_flags);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_link_phase_change_c
@@ -4121,26 +4238,27 @@ h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense )
+h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense)
/******/
{
- int ret_value = -1;
- unsigned c_max_compact;
- unsigned c_min_dense;
- herr_t ret;
+ int ret_value = -1;
+ unsigned c_max_compact;
+ unsigned c_min_dense;
+ herr_t ret;
- /*
- * Call H5Pget_link_phase_change function.
- */
- ret = H5Pget_link_phase_change((hid_t)*gcpl_id, &c_max_compact,&c_min_dense);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pget_link_phase_change function.
+ */
+ ret = H5Pget_link_phase_change((hid_t)*gcpl_id, &c_max_compact, &c_min_dense);
+ if (ret < 0)
+ return ret_value;
- *max_compact = (int_f)c_max_compact;
- *min_dense = (int_f)c_min_dense;
- ret_value = 0;
- return ret_value;
+ *max_compact = (int_f)c_max_compact;
+ *min_dense = (int_f)c_min_dense;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_obj_track_times_c
@@ -4162,27 +4280,29 @@ h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hbool_t c_track_times=0;
- herr_t ret;
+ int ret_value = -1;
+ hbool_t c_track_times = 0;
+ herr_t ret;
- /*
- * Call H5Pget_obj_track_times function.
- */
- ret = H5Pget_obj_track_times((hid_t)*plist_id, &c_track_times);
+ /*
+ * Call H5Pget_obj_track_times function.
+ */
+ ret = H5Pget_obj_track_times((hid_t)*plist_id, &c_track_times);
- if (ret < 0) return ret_value; /* error occurred */
+ if (ret < 0)
+ return ret_value; /* error occurred */
- *flag = 0;
- if(c_track_times > 0) *flag = 1;
- ret_value = 0;
- return ret_value;
+ *flag = 0;
+ if (c_track_times > 0)
+ *flag = 1;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_obj_track_times_c
@@ -4202,27 +4322,27 @@ h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
/******/
{
- int ret_value = -1;
- hbool_t c_track_times;
- herr_t ret;
-
+ int ret_value = -1;
+ hbool_t c_track_times;
+ herr_t ret;
- c_track_times = (hbool_t)*flag;
+ c_track_times = (hbool_t)*flag;
- /*
- * Call H5Pset_obj_track_times function.
- */
- ret = H5Pset_obj_track_times((hid_t)*plist_id, c_track_times);
+ /*
+ * Call H5Pset_obj_track_times function.
+ */
+ ret = H5Pset_obj_track_times((hid_t)*plist_id, c_track_times);
- if (ret < 0) return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_create_inter_group_c
@@ -4245,23 +4365,24 @@ h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- /*
- * Call H5Pset_create_intermediate_group function.
- */
- ret = H5Pset_create_intermediate_group((hid_t)*lcpl_id, (unsigned)*crt_intermed_group);
+ /*
+ * Call H5Pset_create_intermediate_group function.
+ */
+ ret = H5Pset_create_intermediate_group((hid_t)*lcpl_id, (unsigned)*crt_intermed_group);
- if (ret < 0) return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ if (ret < 0)
+ return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_link_creation_order_c
@@ -4285,26 +4406,27 @@ h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- unsigned c_crt_order_flags;
- /*
- * Call h5pget_link_creation_order function.
- */
+ unsigned c_crt_order_flags;
+ /*
+ * Call h5pget_link_creation_order function.
+ */
- ret = H5Pget_link_creation_order((hid_t)*gcpl_id, &c_crt_order_flags);
- if (ret < 0) return ret_value;
+ ret = H5Pget_link_creation_order((hid_t)*gcpl_id, &c_crt_order_flags);
+ if (ret < 0)
+ return ret_value;
- *crt_order_flags = (int_f)c_crt_order_flags;
+ *crt_order_flags = (int_f)c_crt_order_flags;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_char_encoding_c
@@ -4330,25 +4452,25 @@ h5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- /*
- * Call H5Pset_char_encoding function.
- */
- ret = H5Pset_char_encoding((hid_t)*plist_id, (H5T_cset_t)*encoding);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pset_char_encoding function.
+ */
+ ret = H5Pset_char_encoding((hid_t)*plist_id, (H5T_cset_t)*encoding);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Pf/h5pget_char_encoding_c
* NAME
* h5pget_char_encoding_c
@@ -4372,24 +4494,25 @@ h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
/******/
{
- int ret_value = -1;
- H5T_cset_t c_encoding;
- herr_t ret;
- /*
- * Call H5Pget_char_encoding function.
- */
- ret = H5Pget_char_encoding((hid_t)*plist_id, &c_encoding);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ H5T_cset_t c_encoding;
+ herr_t ret;
+ /*
+ * Call H5Pget_char_encoding function.
+ */
+ ret = H5Pget_char_encoding((hid_t)*plist_id, &c_encoding);
+ if (ret < 0)
+ return ret_value;
- *encoding = (int_f)c_encoding;
+ *encoding = (int_f)c_encoding;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_copy_object_c
@@ -4415,21 +4538,22 @@ h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_copy_object function.
- */
- ret = H5Pset_copy_object((hid_t)*ocp_plist_id, (unsigned)*copy_options);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_copy_object function.
+ */
+ ret = H5Pset_copy_object((hid_t)*ocp_plist_id, (unsigned)*copy_options);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_copy_object_c
@@ -4454,24 +4578,25 @@ h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
/******/
{
- int ret_value = -1;
- unsigned c_copy_options;
- herr_t ret;
- /*
- * Call H5Pget_copy_object function.
- */
- ret = H5Pget_copy_object((hid_t)*ocp_plist_id, &c_copy_options);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ unsigned c_copy_options;
+ herr_t ret;
+ /*
+ * Call H5Pget_copy_object function.
+ */
+ ret = H5Pget_copy_object((hid_t)*ocp_plist_id, &c_copy_options);
+ if (ret < 0)
+ return ret_value;
- *copy_options = (int_f)c_copy_options;
+ *copy_options = (int_f)c_copy_options;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_data_transform_c
@@ -4498,31 +4623,31 @@ h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size)
/******/
{
- char *c_expression = NULL; /* Buffer to hold C string */
- size_t c_expression_len = (size_t)*expression_len + 1;
+ char * c_expression = NULL; /* Buffer to hold C string */
+ size_t c_expression_len = (size_t)*expression_len + 1;
ssize_t ret;
- int_f ret_value = 0;
+ int_f ret_value = 0;
/*
* Allocate memory to store the expression.
*/
- if(c_expression_len) {
+ if (c_expression_len) {
c_expression = (char *)HDmalloc(c_expression_len);
- if(NULL == c_expression)
- HGOTO_DONE(FAIL)
+ if (NULL == c_expression)
+ HGOTO_DONE(FAIL)
} /* end if */
/*
* Call H5Pget_data_transform function.
*/
ret = H5Pget_data_transform((hid_t)*plist_id, c_expression, c_expression_len);
- if(ret < 0)
- HGOTO_DONE(FAIL)
+ if (ret < 0)
+ HGOTO_DONE(FAIL)
/* or strlen ? */
HD5packFstring(c_expression, _fcdtocp(expression), (size_t)*expression_len);
@@ -4530,7 +4655,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le
*size = (size_t_f)ret;
done:
- if(c_expression)
+ if (c_expression)
HDfree(c_expression);
return ret_value;
@@ -4560,31 +4685,31 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len)
/******/
{
- char* c_expression = NULL; /* Buffer to hold C string */
- int_f ret_value = 0; /* Return value */
+ char *c_expression = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len)))
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len)))
HGOTO_DONE(FAIL)
- /*
- * Call H5Pset_data_transform function.
- */
- if(H5Pset_data_transform((hid_t)*plist_id, c_expression) < 0)
+ /*
+ * Call H5Pset_data_transform function.
+ */
+ if (H5Pset_data_transform((hid_t)*plist_id, c_expression) < 0)
HGOTO_DONE(FAIL)
done:
- if(c_expression)
+ if (c_expression)
HDfree(c_expression);
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pget_local_heap_size_hint_c
@@ -4609,23 +4734,24 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
/******/
{
- int_f ret_value = -1; /* Return value */
- size_t c_size_hint;
- herr_t ret;
- /*
- * Call H5Pget_local_heap_size_hint function.
- */
- ret = H5Pget_local_heap_size_hint((hid_t)*gcpl_id, &c_size_hint);
- if(ret<0) return ret_value;
+ int_f ret_value = -1; /* Return value */
+ size_t c_size_hint;
+ herr_t ret;
+ /*
+ * Call H5Pget_local_heap_size_hint function.
+ */
+ ret = H5Pget_local_heap_size_hint((hid_t)*gcpl_id, &c_size_hint);
+ if (ret < 0)
+ return ret_value;
- *size_hint = (size_t_f)c_size_hint;
- ret_value = 0;
- return ret_value;
+ *size_hint = (size_t_f)c_size_hint;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_est_link_info_c
@@ -4651,26 +4777,27 @@ h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len)
/******/
{
- int_f ret_value = -1; /* Return value */
- unsigned c_est_num_entries;
- unsigned c_est_name_len;
- herr_t ret;
- /*
- * Call h5pget_est_link_info function.
- */
- ret = H5Pget_est_link_info((hid_t)*gcpl_id, &c_est_num_entries, &c_est_name_len);
- if(ret<0) return ret_value;
+ int_f ret_value = -1; /* Return value */
+ unsigned c_est_num_entries;
+ unsigned c_est_name_len;
+ herr_t ret;
+ /*
+ * Call h5pget_est_link_info function.
+ */
+ ret = H5Pget_est_link_info((hid_t)*gcpl_id, &c_est_num_entries, &c_est_name_len);
+ if (ret < 0)
+ return ret_value;
- *est_num_entries = (int_f)c_est_num_entries;
- *est_name_len = (int_f)c_est_name_len;
+ *est_num_entries = (int_f)c_est_num_entries;
+ *est_name_len = (int_f)c_est_name_len;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_local_heap_size_hint_c
@@ -4696,21 +4823,22 @@ h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t ret;
- /*
- * Call H5Pget_local_heap_size_hint function.
- */
- ret = H5Pset_local_heap_size_hint((hid_t)*gcpl_id, (size_t)*size_hint);
- if(ret<0) return ret_value;
+ int_f ret_value = -1; /* Return value */
+ herr_t ret;
+ /*
+ * Call H5Pget_local_heap_size_hint function.
+ */
+ ret = H5Pset_local_heap_size_hint((hid_t)*gcpl_id, (size_t)*size_hint);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_est_link_info_c
@@ -4736,21 +4864,22 @@ h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len)
/******/
{
- int_f ret_value = -1; /* Return value */
- herr_t ret;
- /*
- * Call h5pset_est_link_info function.
- */
- ret = H5Pset_est_link_info((hid_t)*gcpl_id, (unsigned)*est_num_entries, (unsigned)*est_name_len);
- if(ret<0) return ret_value;
+ int_f ret_value = -1; /* Return value */
+ herr_t ret;
+ /*
+ * Call h5pset_est_link_info function.
+ */
+ ret = H5Pset_est_link_info((hid_t)*gcpl_id, (unsigned)*est_num_entries, (unsigned)*est_name_len);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_link_phase_change_c
@@ -4772,22 +4901,23 @@ h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense )
+h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense)
/******/
{
- int ret_value = -1;
- herr_t ret;
+ int ret_value = -1;
+ herr_t ret;
- /*
- * Call H5Pset_link_phase_change function.
- */
- ret = H5Pset_link_phase_change((hid_t)*gcpl_id, (unsigned)*max_compact,(unsigned)*min_dense);
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pset_link_phase_change function.
+ */
+ ret = H5Pset_link_phase_change((hid_t)*gcpl_id, (unsigned)*max_compact, (unsigned)*min_dense);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_fapl_direct_c
@@ -4811,29 +4941,31 @@ h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dens
* HISTORY
*
* SOURCE
-*/
+ */
#ifndef H5_HAVE_DIRECT
/* Only gets gcc const attribute when the direct VFD is not built. */
H5_ATTR_CONST
#endif
int_f
-h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size)
+h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment,
+ size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
#ifdef H5_HAVE_DIRECT
- herr_t ret;
+ herr_t ret;
- /*
- * Call H5Pset_link_phase_change function.
- */
- ret = H5Pset_fapl_direct((hid_t)*fapl_id, (size_t)*alignment, (size_t)*block_size, (size_t)*cbuf_size );
- if (ret < 0) return ret_value;
+ /*
+ * Call H5Pset_link_phase_change function.
+ */
+ ret = H5Pset_fapl_direct((hid_t)*fapl_id, (size_t)*alignment, (size_t)*block_size, (size_t)*cbuf_size);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
+ ret_value = 0;
#endif
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_direct_c
@@ -4858,35 +4990,37 @@ h5pset_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a
* HISTORY
*
* SOURCE
-*/
+ */
#ifndef H5_HAVE_DIRECT
/* Only gets gcc const attribute when the direct VFD is not built. */
H5_ATTR_CONST
#endif
int_f
-h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment, size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size)
+h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *alignment,
+ size_t_f H5_ATTR_UNUSED *block_size, size_t_f H5_ATTR_UNUSED *cbuf_size)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
#ifdef H5_HAVE_DIRECT
- herr_t ret;
- size_t c_alignment;
- size_t c_block_size;
- size_t c_cbuf_size;
-
- /*
- * Call H5Pget_link_phase_change function.
- */
- ret = H5Pget_fapl_direct((hid_t)*fapl_id, &c_alignment, &c_block_size, &c_cbuf_size );
- if (ret < 0) return ret_value;
-
- *alignment = (size_t_f)c_alignment;
- *block_size = (size_t_f)c_block_size;
- *cbuf_size = (size_t_f)c_cbuf_size;
-
- ret_value = 0;
+ herr_t ret;
+ size_t c_alignment;
+ size_t c_block_size;
+ size_t c_cbuf_size;
+
+ /*
+ * Call H5Pget_link_phase_change function.
+ */
+ ret = H5Pget_fapl_direct((hid_t)*fapl_id, &c_alignment, &c_block_size, &c_cbuf_size);
+ if (ret < 0)
+ return ret_value;
+
+ *alignment = (size_t_f)c_alignment;
+ *block_size = (size_t_f)c_block_size;
+ *cbuf_size = (size_t_f)c_cbuf_size;
+
+ ret_value = 0;
#endif
- return ret_value;
+ return ret_value;
}
/****if* H5Pf/h5pset_attr_phase_change_c
@@ -4909,21 +5043,22 @@ h5pget_fapl_direct_c(hid_t_f H5_ATTR_UNUSED *fapl_id, size_t_f H5_ATTR_UNUSED *a
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense )
+h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_attr_phase_change function.
- */
- ret = H5Pset_attr_phase_change((hid_t)*ocpl_id, (unsigned)*max_compact,(unsigned)*min_dense);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_attr_phase_change function.
+ */
+ ret = H5Pset_attr_phase_change((hid_t)*ocpl_id, (unsigned)*max_compact, (unsigned)*min_dense);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_nbit_c
@@ -4944,21 +5079,22 @@ h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dens
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_nbit_c(hid_t_f *plist_id )
+h5pset_nbit_c(hid_t_f *plist_id)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_nbit_change function.
- */
- ret = H5Pset_nbit((hid_t)*plist_id);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_nbit_change function.
+ */
+ ret = H5Pset_nbit((hid_t)*plist_id);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_scaleoffset_c
* NAME
@@ -4977,24 +5113,25 @@ h5pset_nbit_c(hid_t_f *plist_id )
* M. Scot Breitenfeld
* March 21, 2008
* SOURCE
-*/
+ */
int_f
-h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor )
+h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor)
/******/
{
- int ret_value = -1;
- H5Z_SO_scale_type_t c_scale_type;
- herr_t ret;
- /*
- * Call H5Pset_scaleoffset_change function.
- */
- c_scale_type = (H5Z_SO_scale_type_t)*scale_type;
+ int ret_value = -1;
+ H5Z_SO_scale_type_t c_scale_type;
+ herr_t ret;
+ /*
+ * Call H5Pset_scaleoffset_change function.
+ */
+ c_scale_type = (H5Z_SO_scale_type_t)*scale_type;
- ret = H5Pset_scaleoffset((hid_t)*plist_id, c_scale_type, (int)*scale_factor);
- if (ret < 0) return ret_value;
+ ret = H5Pset_scaleoffset((hid_t)*plist_id, c_scale_type, (int)*scale_factor);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_nlinks
@@ -5012,21 +5149,22 @@ h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor )
* M. Scot Breitenfeld
* March 24, 2008
* SOURCE
-*/
+ */
int_f
h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
/******/
{
- int ret_value = -1;
- herr_t ret;
- /*
- * Call H5Pset_nlinks function.
- */
- ret = H5Pset_nlinks((hid_t)*lapl_id, (size_t)*nlinks);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_nlinks function.
+ */
+ ret = H5Pset_nlinks((hid_t)*lapl_id, (size_t)*nlinks);
+ if (ret < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_nlinks
@@ -5051,23 +5189,24 @@ h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
/******/
{
- int ret_value = -1;
- herr_t ret;
- size_t c_nlinks;
- /*
- * Call H5Pget_nlinks function.
- */
- ret = H5Pget_nlinks((hid_t)*lapl_id, &c_nlinks);
- if (ret < 0) return ret_value;
+ int ret_value = -1;
+ herr_t ret;
+ size_t c_nlinks;
+ /*
+ * Call H5Pget_nlinks function.
+ */
+ ret = H5Pget_nlinks((hid_t)*lapl_id, &c_nlinks);
+ if (ret < 0)
+ return ret_value;
- *nlinks = (size_t_f)c_nlinks;
- ret_value = 0;
- return ret_value;
+ *nlinks = (size_t_f)c_nlinks;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_create_inter_group_c
@@ -5089,25 +5228,26 @@ h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
/******/
{
- int ret_value = -1;
- herr_t ret;
- unsigned c_crt_intermed_group;
+ int ret_value = -1;
+ herr_t ret;
+ unsigned c_crt_intermed_group;
- /*
- * Call H5Pget_create_intermediate_group function.
- */
- ret = H5Pget_create_intermediate_group((hid_t)*lcpl_id, &c_crt_intermed_group);
+ /*
+ * Call H5Pget_create_intermediate_group function.
+ */
+ ret = H5Pget_create_intermediate_group((hid_t)*lcpl_id, &c_crt_intermed_group);
- if (ret < 0) return ret_value; /* error occurred */
+ if (ret < 0)
+ return ret_value; /* error occurred */
- *crt_intermed_group = (int_f)c_crt_intermed_group;
- ret_value = 0;
- return ret_value;
+ *crt_intermed_group = (int_f)c_crt_intermed_group;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -5129,16 +5269,17 @@ h5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
int_f
h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0)
{
- int ret_value = -1;
+ int ret_value = -1;
- /*
- * Call H5Pset_chunk_cache function.
- */
- if( (H5Pset_chunk_cache((hid_t)*dapl_id, (size_t)*rdcc_nslots, (size_t)*rdcc_nbytes, (double)*rdcc_w0)) <0 )
- return ret_value; /* error occurred */
+ /*
+ * Call H5Pset_chunk_cache function.
+ */
+ if ((H5Pset_chunk_cache((hid_t)*dapl_id, (size_t)*rdcc_nslots, (size_t)*rdcc_nbytes, (double)*rdcc_w0)) <
+ 0)
+ return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -5161,22 +5302,22 @@ h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby
int_f
h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0)
{
- int ret_value = -1;
- size_t c_rdcc_nslots;
- size_t c_rdcc_nbytes;
- double c_rdcc_w0;
- /*
- * Call H5Pget_chunk_cache function.
- */
- if( (H5Pget_chunk_cache((hid_t)*dapl_id, &c_rdcc_nslots, &c_rdcc_nbytes, &c_rdcc_w0)) <0 )
- return ret_value; /* error occurred */
+ int ret_value = -1;
+ size_t c_rdcc_nslots;
+ size_t c_rdcc_nbytes;
+ double c_rdcc_w0;
+ /*
+ * Call H5Pget_chunk_cache function.
+ */
+ if ((H5Pget_chunk_cache((hid_t)*dapl_id, &c_rdcc_nslots, &c_rdcc_nbytes, &c_rdcc_w0)) < 0)
+ return ret_value; /* error occurred */
- *rdcc_nslots=(size_t_f)c_rdcc_nslots;
- *rdcc_nbytes=(size_t_f)c_rdcc_nbytes;
- *rdcc_w0=(real_f)c_rdcc_w0;
+ *rdcc_nslots = (size_t_f)c_rdcc_nslots;
+ *rdcc_nbytes = (size_t_f)c_rdcc_nbytes;
+ *rdcc_w0 = (real_f)c_rdcc_w0;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -5197,15 +5338,15 @@ h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nby
int_f
h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len)
{
- int ret_value = -1;
- /*
- * Call H5Pset_file_image function.
- */
- if( (H5Pset_file_image((hid_t)*fapl_id, buf_ptr, (size_t)*buf_len)) <0 )
- return ret_value; /* error occurred */
+ int ret_value = -1;
+ /*
+ * Call H5Pset_file_image function.
+ */
+ if ((H5Pset_file_image((hid_t)*fapl_id, buf_ptr, (size_t)*buf_len)) < 0)
+ return ret_value; /* error occurred */
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/*----------------------------------------------------------------------------
@@ -5227,26 +5368,27 @@ h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len)
int_f
h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr)
{
- int ret_value = -1;
- size_t c_buf_len_ptr;
- void *c_buf_ptr = NULL;
+ int ret_value = -1;
+ size_t c_buf_len_ptr;
+ void * c_buf_ptr = NULL;
- c_buf_len_ptr = (size_t)*buf_len_ptr;
+ c_buf_len_ptr = (size_t)*buf_len_ptr;
- /*
- * Call H5Pget_file_image function.
- */
- if( (H5Pget_file_image((hid_t)*fapl_id, (void **)&c_buf_ptr, &c_buf_len_ptr)) <0 )
- return ret_value; /* error occurred */
+ /*
+ * Call H5Pget_file_image function.
+ */
+ if ((H5Pget_file_image((hid_t)*fapl_id, (void **)&c_buf_ptr, &c_buf_len_ptr)) < 0)
+ return ret_value; /* error occurred */
- HDmemcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr);
+ HDmemcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr);
- *buf_len_ptr=(size_t_f)c_buf_len_ptr;
+ *buf_len_ptr = (size_t_f)c_buf_len_ptr;
- ret_value = 0;
- if(c_buf_ptr) H5free_memory(c_buf_ptr);
+ ret_value = 0;
+ if (c_buf_ptr)
+ H5free_memory(c_buf_ptr);
- return ret_value;
+ return ret_value;
}
#ifdef H5_HAVE_PARALLEL
@@ -5268,27 +5410,28 @@ h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info)
+h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- MPI_Comm c_comm;
- MPI_Info c_info;
- c_comm = MPI_Comm_f2c(*comm);
- c_info = MPI_Info_f2c(*info);
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ MPI_Comm c_comm;
+ MPI_Info c_info;
+ c_comm = MPI_Comm_f2c(*comm);
+ c_info = MPI_Info_f2c(*info);
- /*
- * Call H5Pset_mpi function.
- */
- c_prp_id = *prp_id;
- ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pset_mpi function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pset_fapl_mpio(c_prp_id, c_comm, c_info);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_fapl_mpio_c
* NAME
@@ -5307,27 +5450,28 @@ h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info)
+h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- MPI_Comm c_comm;
- MPI_Info c_info;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ MPI_Comm c_comm;
+ MPI_Info c_info;
- /*
- * Call H5Pget_mpi function.
- */
- c_prp_id = *prp_id;
- ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info);
- if (ret < 0) return ret_value;
- *comm = (int_f) MPI_Comm_c2f(c_comm);
- *info = (int_f) MPI_Info_c2f(c_info);
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Pget_mpi function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pget_fapl_mpio(c_prp_id, &c_comm, &c_info);
+ if (ret < 0)
+ return ret_value;
+ *comm = (int_f)MPI_Comm_c2f(c_comm);
+ *info = (int_f)MPI_Info_c2f(c_info);
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pset_dxpl_mpio_c
* NAME
@@ -5346,38 +5490,39 @@ h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
+h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- H5FD_mpio_xfer_t c_data_xfer_mode;
-/*
- switch (*data_xfer_mode) {
-
- case H5FD_MPIO_INDEPENDENT_F:
- c_data_xfer_mode = H5FD_MPIO_INDEPENDENT;
- break;
-
- case H5FD_MPIO_COLLECTIVE_F:
- c_data_xfer_mode = H5FD_MPIO_COLLECTIVE;
- break;
- default:
- return ret_value;
- }
-*/
- c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode;
- /*
- * Call H5Pset_dxpl_mpio function.
- */
- c_prp_id = *prp_id;
- ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode);
- if (ret < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ H5FD_mpio_xfer_t c_data_xfer_mode;
+ /*
+ switch (*data_xfer_mode) {
+
+ case H5FD_MPIO_INDEPENDENT_F:
+ c_data_xfer_mode = H5FD_MPIO_INDEPENDENT;
+ break;
+
+ case H5FD_MPIO_COLLECTIVE_F:
+ c_data_xfer_mode = H5FD_MPIO_COLLECTIVE;
+ break;
+ default:
+ return ret_value;
+ }
+ */
+ c_data_xfer_mode = (H5FD_mpio_xfer_t)*data_xfer_mode;
+ /*
+ * Call H5Pset_dxpl_mpio function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pset_dxpl_mpio(c_prp_id, c_data_xfer_mode);
+ if (ret < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_dxpl_mpio_c
@@ -5397,40 +5542,41 @@ h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
+h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode)
/******/
{
- int ret_value = -1;
- hid_t c_prp_id;
- herr_t ret;
- H5FD_mpio_xfer_t c_data_xfer_mode;
+ int ret_value = -1;
+ hid_t c_prp_id;
+ herr_t ret;
+ H5FD_mpio_xfer_t c_data_xfer_mode;
- /*
- * Call H5Pget_xfer function.
- */
- c_prp_id = *prp_id;
- ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode);
- if (ret < 0) return ret_value;
- *data_xfer_mode = (int_f)c_data_xfer_mode;
-/*
- switch (c_data_xfer_mode) {
+ /*
+ * Call H5Pget_xfer function.
+ */
+ c_prp_id = *prp_id;
+ ret = H5Pget_dxpl_mpio(c_prp_id, &c_data_xfer_mode);
+ if (ret < 0)
+ return ret_value;
+ *data_xfer_mode = (int_f)c_data_xfer_mode;
+ /*
+ switch (c_data_xfer_mode) {
- case H5FD_MPIO_INDEPENDENT:
- *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F;
- break;
+ case H5FD_MPIO_INDEPENDENT:
+ *data_xfer_mode = H5FD_MPIO_INDEPENDENT_F;
+ break;
- case H5FD_MPIO_COLLECTIVE:
- *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F;
- break;
+ case H5FD_MPIO_COLLECTIVE:
+ *data_xfer_mode = H5FD_MPIO_COLLECTIVE_F;
+ break;
- default:
- return ret_value;
- }
-*/
- ret_value = 0;
- return ret_value;
+ default:
+ return ret_value;
+ }
+ */
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Pf/h5pget_mpio_actual_io_mode_c
@@ -5450,23 +5596,23 @@ h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode)
* M. Scot Breitenfeld
* July 27, 2012
* SOURCE
-*/
+ */
int_f
h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode)
/******/
{
- int ret_value = -1;
- H5D_mpio_actual_io_mode_t c_actual_io_mode;
+ int ret_value = -1;
+ H5D_mpio_actual_io_mode_t c_actual_io_mode;
- /*
- * Call H5Pget_mpio_actual_io_mode_f function.
- */
- if( (H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) <0 )
- return ret_value; /* error occurred */
+ /*
+ * Call H5Pget_mpio_actual_io_mode_f function.
+ */
+ if ((H5Pget_mpio_actual_io_mode((hid_t)*dxpl_id, &c_actual_io_mode)) < 0)
+ return ret_value; /* error occurred */
- *actual_io_mode =(int_f)c_actual_io_mode;
+ *actual_io_mode = (int_f)c_actual_io_mode;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
#endif /*H5_HAVE_PARALLEL*/
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c
index df2ded4..d712a8f 100644
--- a/fortran/src/H5Rf.c
+++ b/fortran/src/H5Rf.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -43,34 +43,34 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id)
/******/
{
- char *c_name = NULL;
- hdset_reg_ref_t ref_c;
- int_f ret_value = 0;
+ char * c_name = NULL;
+ hdset_reg_ref_t ref_c;
+ int_f ret_value = 0;
- /*
- * Convert FORTRAN name to C name
- */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ HGOTO_DONE(FAIL)
- /*
- * Call H5Rcreate function.
- */
- if(H5Rcreate(&ref_c, (hid_t)*loc_id, c_name, H5R_DATASET_REGION, (hid_t)*space_id) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rcreate function.
+ */
+ if (H5Rcreate(&ref_c, (hid_t)*loc_id, c_name, H5R_DATASET_REGION, (hid_t)*space_id) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the reference created */
- HDmemcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
+ /* Copy the reference created */
+ HDmemcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE);
done:
- if(c_name)
- HDfree(c_name);
- return ret_value;
+ if (c_name)
+ HDfree(c_name);
+ return ret_value;
} /* end h5rcreate_region_c() */
/****if* H5Rf/h5rcreate_ptr_c
@@ -92,28 +92,29 @@ done:
* June 20, 2008
*
* SOURCE
-*/
+ */
int_f
-h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id)
+h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id)
/******/
{
- int ret_value = -1;
- char *c_name;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Rcreate function.
- */
- if(H5Rcreate(ref, (hid_t)*loc_id, c_name, (H5R_type_t)*ref_type, (hid_t)*space_id) >= 0)
- ret_value = 0;
-
- HDfree(c_name);
- return ret_value;
+ int ret_value = -1;
+ char *c_name;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Rcreate function.
+ */
+ if (H5Rcreate(ref, (hid_t)*loc_id, c_name, (H5R_type_t)*ref_type, (hid_t)*space_id) >= 0)
+ ret_value = 0;
+
+ HDfree(c_name);
+ return ret_value;
}
/****if* H5Rf/h5rdereference_ptr_c
@@ -136,22 +137,23 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id)
+h5rdereference_ptr_c(hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id)
/******/
{
- int ret_value = -1;
- hid_t c_ref_obj_id;
-
- /*
- * Call H5Rdereference function.
- */
- c_ref_obj_id = H5Rdereference2((hid_t)*obj_id, H5P_DEFAULT, (H5R_type_t)*ref_type, ref);
- if(c_ref_obj_id < 0) return ret_value;
- *ref_obj_id = (hid_t_f)c_ref_obj_id;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_ref_obj_id;
+
+ /*
+ * Call H5Rdereference function.
+ */
+ c_ref_obj_id = H5Rdereference2((hid_t)*obj_id, H5P_DEFAULT, (H5R_type_t)*ref_type, ref);
+ if (c_ref_obj_id < 0)
+ return ret_value;
+ *ref_obj_id = (hid_t_f)c_ref_obj_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Rf/h5rget_region_region_object_c
@@ -172,29 +174,29 @@ h5rdereference_ptr_c (hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id)
/******/
{
- hid_t c_space_id;
- hdset_reg_ref_t ref_c;
- int_f ret_value = 0;
+ hid_t c_space_id;
+ hdset_reg_ref_t ref_c;
+ int_f ret_value = 0;
- /* Copy the reference to dereference */
- HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
+ /* Copy the reference to dereference */
+ HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE);
- /*
- * Call H5Rget_region function.
- */
- if((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rget_region function.
+ */
+ if ((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the dataspace ID */
- *space_id = (hid_t_f)c_space_id;
+ /* Copy the dataspace ID */
+ *space_id = (hid_t_f)c_space_id;
done:
- return ret_value;
+ return ret_value;
} /* end h5rget_region_region_c() */
/****if* H5Rf/h5rget_region_ptr_c
@@ -215,28 +217,27 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id)
/******/
{
- hid_t c_space_id;
- int_f ret_value = 0;
+ hid_t c_space_id;
+ int_f ret_value = 0;
- /*
- * Call H5Rget_region function.
- */
- if((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, ref)) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rget_region function.
+ */
+ if ((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, ref)) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the dataspace ID */
- *space_id = (hid_t_f)c_space_id;
+ /* Copy the dataspace ID */
+ *space_id = (hid_t_f)c_space_id;
done:
- return ret_value;
+ return ret_value;
} /* end h5rget_region_ptr_c() */
-
/****if* H5Rf/h5rget_object_type_obj_c
* NAME
* h5rget_object_type_obj_c
@@ -256,26 +257,26 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type)
/******/
{
- H5O_type_t c_obj_type;
- hobj_ref_t ref_c = (hobj_ref_t)*ref;
- int_f ret_value = 0;
+ H5O_type_t c_obj_type;
+ hobj_ref_t ref_c = (hobj_ref_t)*ref;
+ int_f ret_value = 0;
- /*
- * Call H5Rget_object_type function.
- */
- if(H5Rget_obj_type2((hid_t)*dset_id, H5R_OBJECT, &ref_c, &c_obj_type) < 0)
- HGOTO_DONE(FAIL)
+ /*
+ * Call H5Rget_object_type function.
+ */
+ if (H5Rget_obj_type2((hid_t)*dset_id, H5R_OBJECT, &ref_c, &c_obj_type) < 0)
+ HGOTO_DONE(FAIL)
- /* Copy the object type */
- *obj_type = (int_f)c_obj_type;
+ /* Copy the object type */
+ *obj_type = (int_f)c_obj_type;
done:
- return ret_value;
+ return ret_value;
} /* end h5rget_object_type_obj_c() */
/****if* H5Rf/h5rget_name_ptr_c
@@ -301,40 +302,43 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default)
+h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len,
+ size_t_f *size_default)
/******/
{
- int_f ret_value = -1;
- ssize_t c_size;
- size_t c_bufsize;
- char *c_buf= NULL; /* Buffer to hold C string */
-
- c_bufsize = (size_t)*name_len+1;
- /*
- * Allocate buffer to hold name of an attribute
- */
- if ((c_buf = (char *)HDmalloc(c_bufsize)) == NULL)
- return ret_value;
-
- /*
- * Call H5Rget_name function.
- */
- if((c_size=H5Rget_name((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, c_buf, c_bufsize)) < 0){
- if(c_buf) HDfree(c_buf);
- return ret_value;
- }
- /*
- * Convert C name to FORTRAN and place it in the given buffer
- */
- HD5packFstring(c_buf, _fcdtocp(name), c_bufsize-1);
-
- *size_default = (size_t_f)c_size;
- ret_value = 0;
- if(c_buf) HDfree(c_buf);
-
- return ret_value;
+ int_f ret_value = -1;
+ ssize_t c_size;
+ size_t c_bufsize;
+ char * c_buf = NULL; /* Buffer to hold C string */
+
+ c_bufsize = (size_t)*name_len + 1;
+ /*
+ * Allocate buffer to hold name of an attribute
+ */
+ if ((c_buf = (char *)HDmalloc(c_bufsize)) == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Rget_name function.
+ */
+ if ((c_size = H5Rget_name((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, c_buf, c_bufsize)) < 0) {
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
+ }
+ /*
+ * Convert C name to FORTRAN and place it in the given buffer
+ */
+ HD5packFstring(c_buf, _fcdtocp(name), c_bufsize - 1);
+
+ *size_default = (size_t_f)c_size;
+ ret_value = 0;
+ if (c_buf)
+ HDfree(c_buf);
+
+ return ret_value;
}
/****if* H5Rf/h5rget_obj_type_c
@@ -359,22 +363,22 @@ h5rget_name_ptr_c (hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_
* December 17, 2008
*
* SOURCE
-*/
+ */
int_f
-h5rget_obj_type_c (hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type)
+h5rget_obj_type_c(hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type)
/******/
{
- int_f ret_value = -1;
- H5O_type_t obj_type_c;
+ int_f ret_value = -1;
+ H5O_type_t obj_type_c;
- /*
- * Call H5Rget_obj_type function.
- */
- if((H5Rget_obj_type2((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, &obj_type_c)) < 0)
- return ret_value;
+ /*
+ * Call H5Rget_obj_type function.
+ */
+ if ((H5Rget_obj_type2((hid_t)*loc_id, (H5R_type_t)*ref_type, ref, &obj_type_c)) < 0)
+ return ret_value;
- *obj_type = (int_f)obj_type_c;
+ *obj_type = (int_f)obj_type_c;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index e3a5809..ebec0e6 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5Eprivate.h"
@@ -41,28 +41,28 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5screate_simple_c ( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id )
+h5screate_simple_c(int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id)
/******/
{
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;
+ 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];
+ 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)
+ if (c_space_id < 0)
HGOTO_DONE(FAIL)
*space_id = (hid_t_f)c_space_id;
@@ -86,18 +86,19 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sclose_c ( hid_t_f *space_id )
+h5sclose_c(hid_t_f *space_id)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
+ int ret_value = 0;
+ hid_t c_space_id;
- c_space_id = (hid_t)*space_id;
- if ( H5Sclose(c_space_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_space_id = (hid_t)*space_id;
+ if (H5Sclose(c_space_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5screate_c
@@ -117,21 +118,22 @@ h5sclose_c ( hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5screate_c ( int_f *classtype, hid_t_f *space_id )
+h5screate_c(int_f *classtype, hid_t_f *space_id)
/******/
{
- H5S_class_t c_classtype;
- int ret_value = 0;
- hid_t c_space_id;
- c_classtype = (H5S_class_t) *classtype;
- c_space_id = H5Screate(c_classtype);
-
- if ( c_space_id < 0 ) ret_value = -1;
- *space_id = (hid_t_f) c_space_id;
- return ret_value;
+ H5S_class_t c_classtype;
+ int ret_value = 0;
+ hid_t c_space_id;
+ c_classtype = (H5S_class_t)*classtype;
+ c_space_id = H5Screate(c_classtype);
+
+ if (c_space_id < 0)
+ ret_value = -1;
+ *space_id = (hid_t_f)c_space_id;
+ return ret_value;
}
/****if* H5Sf/h5scopy_c
@@ -151,22 +153,23 @@ h5screate_c ( int_f *classtype, hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id)
+h5scopy_c(hid_t_f *space_id, hid_t_f *new_space_id)
/******/
{
- int ret_value = 0;
- hid_t c_new_space_id;
- hid_t c_space_id;
+ int ret_value = 0;
+ hid_t c_new_space_id;
+ hid_t c_space_id;
- c_space_id = (hid_t)*space_id;
- c_new_space_id = H5Scopy(c_space_id);
- if ( c_new_space_id < 0 ) ret_value = -1;
+ c_space_id = (hid_t)*space_id;
+ c_new_space_id = H5Scopy(c_space_id);
+ if (c_new_space_id < 0)
+ ret_value = -1;
- *new_space_id = (hid_t_f)c_new_space_id;
- return ret_value;
+ *new_space_id = (hid_t_f)c_new_space_id;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_hyper_nblocks_c
@@ -189,22 +192,23 @@ h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks)
+h5sget_select_hyper_nblocks_c(hid_t_f *space_id, hssize_t_f *num_blocks)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- hssize_t c_num_blocks;
+ int ret_value = 0;
+ hid_t c_space_id;
+ hssize_t c_num_blocks;
- c_space_id = (hid_t)*space_id;
- c_num_blocks = H5Sget_select_hyper_nblocks(c_space_id);
- if ( c_num_blocks < 0 ) ret_value = -1;
+ c_space_id = (hid_t)*space_id;
+ c_num_blocks = H5Sget_select_hyper_nblocks(c_space_id);
+ if (c_num_blocks < 0)
+ ret_value = -1;
- *num_blocks = (hssize_t_f)c_num_blocks;
- return ret_value;
+ *num_blocks = (hssize_t_f)c_num_blocks;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_elem_npoints_c
@@ -227,22 +231,23 @@ h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points)
+h5sget_select_elem_npoints_c(hid_t_f *space_id, hssize_t_f *num_points)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- hssize_t c_num_points;
+ int ret_value = 0;
+ hid_t c_space_id;
+ hssize_t c_num_points;
- c_space_id = (hid_t)*space_id;
- c_num_points = H5Sget_select_elem_npoints(c_space_id);
- if ( c_num_points < 0 ) ret_value = -1;
+ c_space_id = (hid_t)*space_id;
+ c_num_points = H5Sget_select_elem_npoints(c_space_id);
+ if (c_num_points < 0)
+ ret_value = -1;
- *num_points = (hssize_t_f)c_num_points;
- return ret_value;
+ *num_points = (hssize_t_f)c_num_points;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_hyper_blocklist_c
@@ -273,54 +278,56 @@ h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points)
* Transpose dimension arrays because of C-FORTRAN storage order
* M. Scot Breitenfeld
* SOURCE
-*/
+ */
int_f
-h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock,
- hsize_t_f *num_blocks, hsize_t_f *buf)
+h5sget_select_hyper_blocklist_c(hid_t_f *space_id, hsize_t_f *startblock, hsize_t_f *num_blocks,
+ hsize_t_f *buf)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- hsize_t c_num_blocks;
-
- hsize_t i;
- int j,k,m,n;
- int rank;
- hsize_t c_startblock, *c_buf;
-
- c_space_id = (hid_t)*space_id;
- c_num_blocks = (hsize_t)*num_blocks;
-
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if (rank < 0 ) return ret_value;
- c_startblock = (hsize_t)*startblock;
-
- c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_blocks*2*(hsize_t)rank));
- if (!c_buf) return ret_value;
-
- ret_value = H5Sget_select_hyper_blocklist(c_space_id, c_startblock,
- c_num_blocks, c_buf);
-
- /*
- * Transpose dimension arrays because of C-FORTRAN storage order and add 1
- */
- n = 0;
- m = 0;
- for (i=0; i < c_num_blocks; i++) {
- for (j=0; j < rank; j++) {
- for (k=0; k < rank; k++) {
- int t= (m + rank - k - 1);
- buf[n] = (hsize_t_f)c_buf[t]+1;
- n = n + 1;
- }
- m = m + rank;
+ int ret_value = -1;
+ hid_t c_space_id;
+ hsize_t c_num_blocks;
+
+ hsize_t i;
+ int j, k, m, n;
+ int rank;
+ hsize_t c_startblock, *c_buf;
+
+ c_space_id = (hid_t)*space_id;
+ c_num_blocks = (hsize_t)*num_blocks;
+
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if (rank < 0)
+ return ret_value;
+ c_startblock = (hsize_t)*startblock;
+
+ c_buf = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)(c_num_blocks * 2 * (hsize_t)rank));
+ if (!c_buf)
+ return ret_value;
+
+ ret_value = H5Sget_select_hyper_blocklist(c_space_id, c_startblock, c_num_blocks, c_buf);
+
+ /*
+ * Transpose dimension arrays because of C-FORTRAN storage order and add 1
+ */
+ n = 0;
+ m = 0;
+ for (i = 0; i < c_num_blocks; i++) {
+ for (j = 0; j < rank; j++) {
+ for (k = 0; k < rank; k++) {
+ int t = (m + rank - k - 1);
+ buf[n] = (hsize_t_f)c_buf[t] + 1;
+ n = n + 1;
+ }
+ m = m + rank;
+ }
}
- }
- HDfree(c_buf);
- if (ret_value >= 0 ) ret_value = 0;
- return ret_value;
+ HDfree(c_buf);
+ if (ret_value >= 0)
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_bounds_c
@@ -346,29 +353,29 @@ h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f *startblock,
* matrix notation.
* M. Scot Breitenfeld
* SOURCE
-*/
+ */
int_f
-h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end)
+h5sget_select_bounds_c(hid_t_f *space_id, hsize_t_f *start, hsize_t_f *end)
/******/
{
- hid_t c_space_id;
+ 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;
+ int i, rank;
+ int_f ret_value = 0;
c_space_id = (hid_t)*space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if(rank < 0 )
+ 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)
+ if (H5Sget_select_bounds(c_space_id, c_start, c_end) < 0)
HGOTO_DONE(FAIL)
- for(i = 0; i < rank; i++) {
+ 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[i] = (hsize_t_f)(c_end[rank - i - 1] + 1);
} /* end for */
done:
@@ -401,50 +408,51 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
- hsize_t_f * numpoints, hsize_t_f * buf)
+h5sget_select_elem_pointlist_c(hid_t_f *space_id, hsize_t_f *startpoint, hsize_t_f *numpoints, hsize_t_f *buf)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- hsize_t c_num_points;
- hsize_t c_startpoint,* c_buf;
- hsize_t i, i1;
- int rank;
- int j,i2;
-
- c_space_id = (hid_t)*space_id;
- c_num_points = (hsize_t)* numpoints;
-
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if (rank < 0 ) return ret_value;
-
- c_startpoint = (hsize_t)*startpoint;
- c_buf = (hsize_t*)HDmalloc(sizeof(hsize_t)*(size_t)(c_num_points*(hsize_t)rank));
- if (!c_buf) return ret_value;
- ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint,
- c_num_points, c_buf);
-
- /* re-arrange the return buffer to account for Fortran ordering of 2D arrays */
- /* and add 1 to account for array's starting at one in Fortran */
- i2 = 0;
- for( i = 0; i < c_num_points; i++) {
- i1 = (hsize_t)rank*(i+1);
- for(j = 0; j < rank; j++) {
- buf[i2] = (hsize_t_f)(c_buf[i1-1]+1);
- i2 = i2 + 1;
- i1 = i1 - 1;
+ int ret_value = -1;
+ hid_t c_space_id;
+ hsize_t c_num_points;
+ hsize_t c_startpoint, *c_buf;
+ hsize_t i, i1;
+ int rank;
+ int j, i2;
+
+ c_space_id = (hid_t)*space_id;
+ c_num_points = (hsize_t)*numpoints;
+
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+ if (rank < 0)
+ return ret_value;
+
+ c_startpoint = (hsize_t)*startpoint;
+ c_buf = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)(c_num_points * (hsize_t)rank));
+ if (!c_buf)
+ return ret_value;
+ ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint, c_num_points, c_buf);
+
+ /* re-arrange the return buffer to account for Fortran ordering of 2D arrays */
+ /* and add 1 to account for array's starting at one in Fortran */
+ i2 = 0;
+ for (i = 0; i < c_num_points; i++) {
+ i1 = (hsize_t)rank * (i + 1);
+ for (j = 0; j < rank; j++) {
+ buf[i2] = (hsize_t_f)(c_buf[i1 - 1] + 1);
+ i2 = i2 + 1;
+ i1 = i1 - 1;
+ }
}
- }
- if (ret_value >= 0 ) ret_value = 0;
+ if (ret_value >= 0)
+ ret_value = 0;
- HDfree(c_buf);
+ HDfree(c_buf);
- return ret_value;
+ return ret_value;
}
/****if* H5Sf/h5sselect_all_c
@@ -462,18 +470,19 @@ h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sselect_all_c ( hid_t_f *space_id )
+h5sselect_all_c(hid_t_f *space_id)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
+ int ret_value = 0;
+ hid_t c_space_id;
- c_space_id = (hid_t)*space_id;
- if ( H5Sselect_all(c_space_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_space_id = (hid_t)*space_id;
+ if (H5Sselect_all(c_space_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sselect_none_c
@@ -491,18 +500,19 @@ h5sselect_all_c ( hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sselect_none_c ( hid_t_f *space_id )
+h5sselect_none_c(hid_t_f *space_id)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
+ int ret_value = 0;
+ hid_t c_space_id;
- c_space_id = (hid_t)*space_id;
- if ( H5Sselect_none(c_space_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_space_id = (hid_t)*space_id;
+ if (H5Sselect_none(c_space_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sselect_valid_c
@@ -524,21 +534,22 @@ h5sselect_none_c ( hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sselect_valid_c ( hid_t_f *space_id , int_f *flag )
+h5sselect_valid_c(hid_t_f *space_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- htri_t status;
-
- c_space_id = (hid_t)*space_id;
- status = H5Sselect_valid(c_space_id);
- *flag = (int_f)status;
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ htri_t status;
+
+ c_space_id = (hid_t)*space_id;
+ status = H5Sselect_valid(c_space_id);
+ *flag = (int_f)status;
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sget_simple_extent_npoints_c
@@ -559,21 +570,22 @@ h5sselect_valid_c ( hid_t_f *space_id , int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints )
+h5sget_simple_extent_npoints_c(hid_t_f *space_id, hsize_t_f *npoints)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- hssize_t c_npoints;
-
- c_space_id = (hid_t)*space_id;
- c_npoints = H5Sget_simple_extent_npoints(c_space_id);
- if ( c_npoints == 0 ) ret_value = -1;
- *npoints = (hsize_t_f)c_npoints;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ hssize_t c_npoints;
+
+ c_space_id = (hid_t)*space_id;
+ c_npoints = H5Sget_simple_extent_npoints(c_space_id);
+ if (c_npoints == 0)
+ ret_value = -1;
+ *npoints = (hsize_t_f)c_npoints;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_npoints_c
@@ -594,21 +606,22 @@ h5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints )
+h5sget_select_npoints_c(hid_t_f *space_id, hssize_t_f *npoints)
/******/
{
- int ret_value = 0;
- hssize_t c_npoints;
- hid_t c_space_id;
-
- c_space_id = (hid_t)*space_id;
- c_npoints = H5Sget_select_npoints(c_space_id);
- if ( c_npoints < 0 ) ret_value = -1;
- *npoints = (hssize_t_f)c_npoints;
- return ret_value;
+ int ret_value = 0;
+ hssize_t c_npoints;
+ hid_t c_space_id;
+
+ c_space_id = (hid_t)*space_id;
+ c_npoints = H5Sget_select_npoints(c_space_id);
+ if (c_npoints < 0)
+ ret_value = -1;
+ *npoints = (hssize_t_f)c_npoints;
+ return ret_value;
}
/****if* H5Sf/h5sget_simple_extent_ndims_c
@@ -629,21 +642,22 @@ h5sget_select_npoints_c ( hid_t_f *space_id , hssize_t_f *npoints )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims )
+h5sget_simple_extent_ndims_c(hid_t_f *space_id, int_f *ndims)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- int c_ndims;
-
- c_space_id = (hid_t)*space_id;
- c_ndims = H5Sget_simple_extent_ndims(c_space_id);
- if ( c_ndims < 0 ) ret_value = -1;
- *ndims = (int_f)c_ndims;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ int c_ndims;
+
+ c_space_id = (hid_t)*space_id;
+ c_ndims = H5Sget_simple_extent_ndims(c_space_id);
+ if (c_ndims < 0)
+ ret_value = -1;
+ *ndims = (int_f)c_ndims;
+ return ret_value;
}
/****if* H5Sf/h5sget_simple_extent_type_c
@@ -665,26 +679,27 @@ h5sget_simple_extent_ndims_c ( hid_t_f *space_id , int_f *ndims )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype)
+h5sget_simple_extent_type_c(hid_t_f *space_id, int_f *classtype)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- H5S_class_t c_classtype;
-
- c_space_id = (hid_t)*space_id;
- c_classtype = H5Sget_simple_extent_type(c_space_id);
- if ( c_classtype < 0 ) ret_value = -1;
- *classtype = c_classtype;
-/*
- if (c_classtype == H5S_SCALAR) *classtype = H5S_SCALAR_F;
- if (c_classtype == H5S_SIMPLE) *classtype = H5S_SIMPLE_F;
- if (c_classtype == H5S_NULL) *classtype = H5S_NULL_F;
-*/
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ H5S_class_t c_classtype;
+
+ c_space_id = (hid_t)*space_id;
+ c_classtype = H5Sget_simple_extent_type(c_space_id);
+ if (c_classtype < 0)
+ ret_value = -1;
+ *classtype = c_classtype;
+ /*
+ if (c_classtype == H5S_SCALAR) *classtype = H5S_SCALAR_F;
+ if (c_classtype == H5S_SIMPLE) *classtype = H5S_SIMPLE_F;
+ if (c_classtype == H5S_NULL) *classtype = H5S_NULL_F;
+ */
+ return ret_value;
}
/****if* H5Sf/h5soffset_simple_c
@@ -704,30 +719,30 @@ h5sget_simple_extent_type_c ( hid_t_f *space_id , int_f *classtype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5soffset_simple_c ( hid_t_f *space_id , hssize_t_f *offset)
+h5soffset_simple_c(hid_t_f *space_id, hssize_t_f *offset)
/******/
{
- hid_t c_space_id;
- int rank;
+ hid_t c_space_id;
+ int rank;
hssize_t c_offset[H5S_MAX_RANK];
- int i;
- int_f ret_value = 0;
+ int i;
+ int_f ret_value = 0;
c_space_id = (hid_t)*space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if(rank < 0)
+ 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++)
+ for (i = 0; i < rank; i++)
c_offset[i] = offset[rank - i - 1];
- if(H5Soffset_simple(c_space_id, c_offset) < 0)
+ if (H5Soffset_simple(c_space_id, c_offset) < 0)
HGOTO_DONE(FAIL)
done:
@@ -753,33 +768,32 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sset_extent_simple_c ( hid_t_f *space_id , int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size)
+h5sset_extent_simple_c(hid_t_f *space_id, int_f *rank, hsize_t_f *current_size, hsize_t_f *maximum_size)
/******/
{
hsize_t c_current_size[H5S_MAX_RANK];
hsize_t c_maximum_size[H5S_MAX_RANK];
- int i;
- int_f ret_value = 0;
+ int i;
+ int_f ret_value = 0;
/*
* Reverse dimensions due to C-FORTRAN storage order.
*/
- for(i = 0; i < *rank; i++) {
+ 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)
+ if (H5Sset_extent_simple((hid_t)*space_id, (int)*rank, c_current_size, c_maximum_size) < 0)
HGOTO_DONE(FAIL)
done:
return ret_value;
}
-
/****if* H5Sf/h5sget_simple_extent_dims_c
* NAME
* h5sget_simple_extent_dims_c
@@ -799,32 +813,32 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_simple_extent_dims_c ( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims)
+h5sget_simple_extent_dims_c(hid_t_f *space_id, hsize_t_f *dims, hsize_t_f *maxdims)
/******/
{
- hid_t c_space_id;
+ 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;
+ int rank;
+ int i;
+ int_f ret_value;
c_space_id = (hid_t)*space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
- if(rank < 0)
+ 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)
+ 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];
+ 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 */
@@ -853,23 +867,23 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sis_simple_c ( hid_t_f *space_id , int_f *flag )
+h5sis_simple_c(hid_t_f *space_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- htri_t status;
-
- c_space_id = (hid_t)*space_id;
- status = H5Sis_simple(c_space_id);
- *flag = (int_f)status;
- if ( status < 0 ) ret_value = -1;
- return ret_value;
-}
+ int ret_value = 0;
+ hid_t c_space_id;
+ htri_t status;
+ c_space_id = (hid_t)*space_id;
+ status = H5Sis_simple(c_space_id);
+ *flag = (int_f)status;
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
+}
/****if* H5Sf/h5sextent_copy_c
* NAME
@@ -887,21 +901,22 @@ h5sis_simple_c ( hid_t_f *space_id , int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id)
+h5sextent_copy_c(hid_t_f *dest_space_id, hid_t_f *source_space_id)
/******/
{
- int ret_value = 0;
- hid_t c_dest_space_id, c_source_space_id;
- herr_t status;
-
- c_dest_space_id = (hid_t)*dest_space_id;
- c_source_space_id = (hid_t)*source_space_id;
- status = H5Sextent_copy(c_dest_space_id, c_source_space_id);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_dest_space_id, c_source_space_id;
+ herr_t status;
+
+ c_dest_space_id = (hid_t)*dest_space_id;
+ c_source_space_id = (hid_t)*source_space_id;
+ status = H5Sextent_copy(c_dest_space_id, c_source_space_id);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sset_extent_none_c
@@ -919,20 +934,21 @@ h5sextent_copy_c ( hid_t_f *dest_space_id , hid_t_f *source_space_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sset_extent_none_c ( hid_t_f *space_id )
+h5sset_extent_none_c(hid_t_f *space_id)
/******/
{
- int ret_value = 0;
- hid_t c_space_id;
- herr_t status;
-
- c_space_id = (hid_t)*space_id;
- status = H5Sset_extent_none(c_space_id);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_space_id;
+ herr_t status;
+
+ c_space_id = (hid_t)*space_id;
+ status = H5Sset_extent_none(c_space_id);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Sf/h5sselect_hyperslab_c
@@ -957,37 +973,38 @@ h5sset_extent_none_c ( hid_t_f *space_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sselect_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)
+h5sselect_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)
/******/
{
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;
+ int rank;
+ int i;
+ int_f ret_value = 0;
rank = H5Sget_simple_extent_ndims((hid_t)*space_id);
- if(rank < 0 )
+ if (rank < 0)
HGOTO_DONE(FAIL)
/*
* Reverse dimensions due to C-FORTRAN storage order.
*/
- for(i = 0; i < rank; i++) {
+ 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_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_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)
+ if (H5Sselect_hyperslab((hid_t)*space_id, (H5S_seloper_t)*op, c_start, c_stride, c_count, c_block) < 0)
HGOTO_DONE(FAIL)
done:
@@ -1016,64 +1033,74 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5scombine_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, hid_t_f *hyper_id)
+h5scombine_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, hid_t_f *hyper_id)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- hid_t c_hyper_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;
- 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)*(unsigned)rank);
- if (c_start == NULL) goto DONE;
-
- c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
- if (c_count == NULL) goto DONE;
-
- c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
- if (c_stride == NULL) goto DONE;
-
- c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)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;
-
- c_space_id = (hid_t)*space_id;
- c_hyper_id = H5Scombine_hyperslab(c_space_id, c_op, c_start, c_stride, c_count, c_block);
- if ( c_hyper_id < 0 ) goto DONE;
- *hyper_id = (hid_t_f)c_hyper_id;
- ret_value = 0;
+ int ret_value = -1;
+ hid_t c_space_id;
+ hid_t c_hyper_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;
+ 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) * (unsigned)rank);
+ if (c_start == NULL)
+ goto DONE;
+
+ c_count = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank);
+ if (c_count == NULL)
+ goto DONE;
+
+ c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)rank);
+ if (c_stride == NULL)
+ goto DONE;
+
+ c_block = (hsize_t *)HDmalloc(sizeof(hsize_t) * (unsigned)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;
+
+ c_space_id = (hid_t)*space_id;
+ c_hyper_id = H5Scombine_hyperslab(c_space_id, c_op, c_start, c_stride, c_count, c_block);
+ if (c_hyper_id < 0)
+ goto DONE;
+ *hyper_id = (hid_t_f)c_hyper_id;
+ 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;
+ 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;
}
/****if* H5Sf/h5scombine_select_c
* NAME
@@ -1094,27 +1121,28 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id)
+h5scombine_select_c(hid_t_f *space1_id, int_f *op, hid_t_f *space2_id, hid_t_f *ds_id)
/******/
{
- int ret_value = -1;
- hid_t c_space1_id;
- hid_t c_space2_id;
- hid_t c_ds_id;
- H5S_seloper_t c_op;
-
- c_op = (H5S_seloper_t)*op;
-
- c_space1_id = (hid_t)*space1_id;
- c_space2_id = (hid_t)*space2_id;
- c_ds_id = H5Scombine_select(c_space1_id, c_op, c_space2_id);
- if ( c_ds_id < 0 ) return ret_value;
- *ds_id = (hid_t_f)c_ds_id;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_space1_id;
+ hid_t c_space2_id;
+ hid_t c_ds_id;
+ H5S_seloper_t c_op;
+
+ c_op = (H5S_seloper_t)*op;
+
+ c_space1_id = (hid_t)*space1_id;
+ c_space2_id = (hid_t)*space2_id;
+ c_ds_id = H5Scombine_select(c_space1_id, c_op, c_space2_id);
+ if (c_ds_id < 0)
+ return ret_value;
+ *ds_id = (hid_t_f)c_ds_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Sf/h5smodify_select_c
* NAME
@@ -1133,24 +1161,25 @@ h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5smodify_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id)
+h5smodify_select_c(hid_t_f *space1_id, int_f *op, hid_t_f *space2_id)
/******/
{
- int ret_value = -1;
- hid_t c_space1_id;
- hid_t c_space2_id;
- H5S_seloper_t c_op;
-
- c_op = (H5S_seloper_t)*op;
-
- c_space1_id = (hid_t)*space1_id;
- c_space2_id = (hid_t)*space2_id;
- if( H5Smodify_select(c_space1_id, c_op, c_space2_id)< 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_space1_id;
+ hid_t c_space2_id;
+ H5S_seloper_t c_op;
+
+ c_op = (H5S_seloper_t)*op;
+
+ c_space1_id = (hid_t)*space1_id;
+ c_space2_id = (hid_t)*space2_id;
+ if (H5Smodify_select(c_space1_id, c_op, c_space2_id) < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Sf/h5sget_select_type_c
@@ -1170,23 +1199,23 @@ h5smodify_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sget_select_type_c ( hid_t_f *space_id , int_f *type)
+h5sget_select_type_c(hid_t_f *space_id, int_f *type)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- H5S_sel_type c_type;
-
- c_space_id = (hid_t)*space_id;
- c_type = H5Sget_select_type(c_space_id);
- if(c_type < 0) return ret_value;
- *type = (int_f)c_type;
- ret_value = 0;
- return ret_value;
-}
+ int ret_value = -1;
+ hid_t c_space_id;
+ H5S_sel_type c_type;
+ c_space_id = (hid_t)*space_id;
+ c_type = H5Sget_select_type(c_space_id);
+ if (c_type < 0)
+ return ret_value;
+ *type = (int_f)c_type;
+ ret_value = 0;
+ return ret_value;
+}
/****if* H5Sf/h5sselect_elements_c
* NAME
@@ -1208,40 +1237,42 @@ h5sget_select_type_c ( hid_t_f *space_id , int_f *type)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord)
+h5sselect_elements_c(hid_t_f *space_id, int_f *op, size_t_f *nelements, hsize_t_f *coord)
/******/
{
- int ret_value = -1;
- hid_t c_space_id;
- H5S_seloper_t c_op;
- herr_t status;
- int rank;
- size_t i;
- int j;
- hsize_t *c_coord;
- size_t c_nelements;
-
- c_op = (H5S_seloper_t)*op;
-
- c_space_id = *space_id;
- rank = H5Sget_simple_extent_ndims(c_space_id);
-
- c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t)*(size_t)rank*((size_t)*nelements));
- if(!c_coord) return ret_value;
- for (i=0; i< (size_t)*nelements; i++) {
- for (j = 0; j < rank; j++) {
- c_coord[(size_t)j+i*(size_t)rank] = (hsize_t)coord[(size_t)j + i*(size_t)rank];
- }
- }
-
- c_nelements = *nelements;
- status = H5Sselect_elements(c_space_id, c_op, c_nelements, c_coord);
- if ( status >= 0 ) ret_value = 0;
- HDfree(c_coord);
- return ret_value;
+ int ret_value = -1;
+ hid_t c_space_id;
+ H5S_seloper_t c_op;
+ herr_t status;
+ int rank;
+ size_t i;
+ int j;
+ hsize_t * c_coord;
+ size_t c_nelements;
+
+ c_op = (H5S_seloper_t)*op;
+
+ c_space_id = *space_id;
+ rank = H5Sget_simple_extent_ndims(c_space_id);
+
+ c_coord = (hsize_t *)HDmalloc(sizeof(hsize_t) * (size_t)rank * ((size_t)*nelements));
+ if (!c_coord)
+ return ret_value;
+ for (i = 0; i < (size_t)*nelements; i++) {
+ for (j = 0; j < rank; j++) {
+ c_coord[(size_t)j + i * (size_t)rank] = (hsize_t)coord[(size_t)j + i * (size_t)rank];
+ }
+ }
+
+ c_nelements = *nelements;
+ status = H5Sselect_elements(c_space_id, c_op, c_nelements, c_coord);
+ if (status >= 0)
+ ret_value = 0;
+ HDfree(c_coord);
+ return ret_value;
}
/****if* H5Sf/h5sdecode_c
@@ -1261,30 +1292,30 @@ h5sselect_elements_c ( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsiz
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sdecode_c ( _fcd buf, hid_t_f *obj_id )
+h5sdecode_c(_fcd buf, hid_t_f *obj_id)
/******/
{
- int ret_value = -1;
- unsigned char *c_buf = NULL; /* Buffer to hold C string */
- hid_t c_obj_id;
+ int ret_value = -1;
+ unsigned char *c_buf = NULL; /* Buffer to hold C string */
+ hid_t c_obj_id;
- /*
- * Call H5Sdecode function.
- */
+ /*
+ * Call H5Sdecode function.
+ */
- c_buf = (unsigned char*)buf;
+ c_buf = (unsigned char *)buf;
- c_obj_id = H5Sdecode(c_buf);
- if(c_obj_id < 0)
- return ret_value;
+ c_obj_id = H5Sdecode(c_buf);
+ if (c_obj_id < 0)
+ return ret_value;
- *obj_id = (hid_t_f)c_obj_id;
- ret_value = 0;
+ *obj_id = (hid_t_f)c_obj_id;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Sf/h5sencode_c
@@ -1304,55 +1335,56 @@ h5sdecode_c ( _fcd buf, hid_t_f *obj_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id )
+h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id)
/******/
{
- int ret_value = -1;
- unsigned char *c_buf = NULL; /* Buffer to hold C string */
- size_t c_size;
+ int ret_value = -1;
+ unsigned char *c_buf = NULL; /* Buffer to hold C string */
+ size_t c_size;
- /* return just the size of the allocated buffer;
- * equivalent to C routine for which 'name' is set equal to NULL
- */
+ /* return just the size of the allocated buffer;
+ * equivalent to C routine for which 'name' is set equal to NULL
+ */
- if (*nalloc == 0) {
+ if (*nalloc == 0) {
- if(H5Sencode2((hid_t)*obj_id, c_buf, &c_size, (hid_t)*fapl_id) < 0)
- return ret_value;
+ if (H5Sencode2((hid_t)*obj_id, c_buf, &c_size, (hid_t)*fapl_id) < 0)
+ return ret_value;
- *nalloc = (size_t_f)c_size;
+ *nalloc = (size_t_f)c_size;
- ret_value = 0;
- return ret_value;
- }
+ ret_value = 0;
+ return ret_value;
+ }
- c_size = (size_t)*nalloc;
- /*
- * Allocate buffer
- */
- if(NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
- return ret_value;
- /*
- * Call H5Sencode function.
- */
- if(H5Sencode2((hid_t)*obj_id, c_buf, &c_size, (hid_t)*fapl_id) < 0){
- return ret_value;
- }
+ c_size = (size_t)*nalloc;
+ /*
+ * Allocate buffer
+ */
+ if (NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
+ return ret_value;
+ /*
+ * Call H5Sencode function.
+ */
+ if (H5Sencode2((hid_t)*obj_id, c_buf, &c_size, (hid_t)*fapl_id) < 0) {
+ return ret_value;
+ }
- /* copy the C buffer to the FORTRAN buffer.
- * Can not use HD5packFstring because we don't want to
- * eliminate the NUL terminator or pad remaining space
- * with blanks.
- */
+ /* copy the C buffer to the FORTRAN buffer.
+ * Can not use HD5packFstring because we don't want to
+ * eliminate the NUL terminator or pad remaining space
+ * with blanks.
+ */
- HDmemcpy(_fcdtocp(buf),(char *)c_buf,c_size);
+ HDmemcpy(_fcdtocp(buf), (char *)c_buf, c_size);
- ret_value = 0;
- if(c_buf) HDfree(c_buf);
- return ret_value;
+ ret_value = 0;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Sf/h5sextent_equal_c
@@ -1373,18 +1405,17 @@ h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5sextent_equal_c ( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal)
+h5sextent_equal_c(hid_t_f *space1_id, hid_t_f *space2_id, hid_t_f *c_equal)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- if( (*c_equal = (hid_t_f)H5Sextent_equal((hid_t)*space1_id, (hid_t)*space2_id)) < 0)
- return ret_value;
+ if ((*c_equal = (hid_t_f)H5Sextent_equal((hid_t)*space1_id, (hid_t)*space2_id)) < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index c40abae..1b9cbd1 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
@@ -41,32 +41,32 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5topen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id)
+h5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id)
/******/
{
char *c_name = NULL;
hid_t c_type_id;
- int ret_value = -1;
+ int ret_value = -1;
/*
* Convert FORTRAN name to C name
*/
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto done;
/*
* Call H5Topen2 function.
*/
- if((c_type_id = H5Topen2((hid_t)*loc_id, c_name, (hid_t)*tapl_id)) < 0)
+ if ((c_type_id = H5Topen2((hid_t)*loc_id, c_name, (hid_t)*tapl_id)) < 0)
goto done;
*type_id = (hid_t_f)c_type_id;
ret_value = 0;
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
@@ -95,27 +95,28 @@ done:
* - Added passing optional parameters for version 1.8
* M. Scot Breitenfeld
* SOURCE
-*/
+ */
int_f
-h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id,
- hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id)
+h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id,
+ hid_t_f *tapl_id)
/******/
{
- char *c_name = NULL;
- int ret_value = -1;
+ char *c_name = NULL;
+ int ret_value = -1;
/* Convert FORTRAN name to C name */
- if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
+ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
goto done;
/* Call H5Tcommit2 function */
- if(H5Tcommit2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*lcpl_id, (hid_t)*tcpl_id, (hid_t)*tapl_id) < 0)
+ if (H5Tcommit2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*lcpl_id, (hid_t)*tcpl_id,
+ (hid_t)*tapl_id) < 0)
goto done;
ret_value = 0;
done:
- if(c_name)
+ if (c_name)
HDfree(c_name);
return ret_value;
}
@@ -135,18 +136,19 @@ done:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tclose_c ( hid_t_f *type_id )
+h5tclose_c(hid_t_f *type_id)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
+ int ret_value = 0;
+ hid_t c_type_id;
- c_type_id = *type_id;
- if ( H5Tclose(c_type_id) < 0 ) ret_value = -1;
- return ret_value;
+ c_type_id = *type_id;
+ if (H5Tclose(c_type_id) < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Tf/h5tcopy_c
@@ -166,21 +168,22 @@ h5tclose_c ( hid_t_f *type_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id)
+h5tcopy_c(hid_t_f *type_id, hid_t_f *new_type_id)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- hid_t c_new_type_id;
-
- c_type_id = *type_id;
- c_new_type_id = H5Tcopy(c_type_id);
- if ( c_new_type_id < 0 ) ret_value = -1;
- *new_type_id = (hid_t_f)c_new_type_id;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ hid_t c_new_type_id;
+
+ c_type_id = *type_id;
+ c_new_type_id = H5Tcopy(c_type_id);
+ if (c_new_type_id < 0)
+ ret_value = -1;
+ *new_type_id = (hid_t_f)c_new_type_id;
+ return ret_value;
}
/****if* H5Tf/h5tequal_c
@@ -201,23 +204,24 @@ h5tcopy_c ( hid_t_f *type_id , hid_t_f *new_type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag)
+h5tequal_c(hid_t_f *type1_id, hid_t_f *type2_id, int_f *c_flag)
/******/
{
- int ret_value = -1;
- hid_t c_type1_id, c_type2_id;
- htri_t status;
-
- c_type1_id = *type1_id;
- c_type2_id = *type2_id;
- status = H5Tequal(c_type1_id, c_type2_id);
- if ( status < 0 ) return ret_value;
- *c_flag = (int_f)status;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type1_id, c_type2_id;
+ htri_t status;
+
+ c_type1_id = *type1_id;
+ c_type2_id = *type2_id;
+ status = H5Tequal(c_type1_id, c_type2_id);
+ if (status < 0)
+ return ret_value;
+ *c_flag = (int_f)status;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_class_c
@@ -249,37 +253,37 @@ h5tequal_c ( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_class_c ( hid_t_f *type_id , int_f *classtype)
+h5tget_class_c(hid_t_f *type_id, int_f *classtype)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- H5T_class_t c_classtype;
-
- c_type_id = *type_id;
- c_classtype = H5Tget_class(c_type_id);
- if (c_classtype == H5T_NO_CLASS ) {
- /* *classtype = H5T_NO_CLASS_F; */
- *classtype = (int_f)H5T_NO_CLASS;
- ret_value = -1;
- return ret_value;
- }
- *classtype = c_classtype;
-/*
- if (c_classtype == H5T_INTEGER) *classtype = H5T_INTEGER_F;
- if (c_classtype == H5T_FLOAT) *classtype = H5T_FLOAT_F;
- if (c_classtype == H5T_TIME) *classtype = H5T_TIME_F;
- if (c_classtype == H5T_STRING) *classtype = H5T_STRING_F;
- if (c_classtype == H5T_BITFIELD) *classtype = H5T_BITFIELD_F;
- if (c_classtype == H5T_OPAQUE) *classtype = H5T_OPAQUE_F;
- if (c_classtype == H5T_COMPOUND) *classtype = H5T_COMPOUND_F;
- if (c_classtype == H5T_REFERENCE) *classtype = H5T_REFERENCE_F;
- if (c_classtype == H5T_ENUM) *classtype = H5T_ENUM_F;
-*/
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ H5T_class_t c_classtype;
+
+ c_type_id = *type_id;
+ c_classtype = H5Tget_class(c_type_id);
+ if (c_classtype == H5T_NO_CLASS) {
+ /* *classtype = H5T_NO_CLASS_F; */
+ *classtype = (int_f)H5T_NO_CLASS;
+ ret_value = -1;
+ return ret_value;
+ }
+ *classtype = c_classtype;
+ /*
+ if (c_classtype == H5T_INTEGER) *classtype = H5T_INTEGER_F;
+ if (c_classtype == H5T_FLOAT) *classtype = H5T_FLOAT_F;
+ if (c_classtype == H5T_TIME) *classtype = H5T_TIME_F;
+ if (c_classtype == H5T_STRING) *classtype = H5T_STRING_F;
+ if (c_classtype == H5T_BITFIELD) *classtype = H5T_BITFIELD_F;
+ if (c_classtype == H5T_OPAQUE) *classtype = H5T_OPAQUE_F;
+ if (c_classtype == H5T_COMPOUND) *classtype = H5T_COMPOUND_F;
+ if (c_classtype == H5T_REFERENCE) *classtype = H5T_REFERENCE_F;
+ if (c_classtype == H5T_ENUM) *classtype = H5T_ENUM_F;
+ */
+ return ret_value;
}
/****if* H5Tf/h5tget_order_c
@@ -302,29 +306,29 @@ h5tget_class_c ( hid_t_f *type_id , int_f *classtype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_order_c ( hid_t_f *type_id , int_f *order)
+h5tget_order_c(hid_t_f *type_id, int_f *order)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_order_t c_order;
-
- c_type_id = *type_id;
- c_order = H5Tget_order(c_type_id);
- if ( c_order < 0 ) return ret_value;
- *order = (int_f)c_order;
- ret_value = 0;
-/*
- if ( c_order == H5T_ORDER_LE) *order = H5T_ORDER_LE_F;
- if ( c_order == H5T_ORDER_BE) *order = H5T_ORDER_BE_F;
- if ( c_order == H5T_ORDER_VAX) *order = H5T_ORDER_VAX_F;
-*/
- return ret_value;
-}
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_order_t c_order;
+ c_type_id = *type_id;
+ c_order = H5Tget_order(c_type_id);
+ if (c_order < 0)
+ return ret_value;
+ *order = (int_f)c_order;
+ ret_value = 0;
+ /*
+ if ( c_order == H5T_ORDER_LE) *order = H5T_ORDER_LE_F;
+ if ( c_order == H5T_ORDER_BE) *order = H5T_ORDER_BE_F;
+ if ( c_order == H5T_ORDER_VAX) *order = H5T_ORDER_VAX_F;
+ */
+ return ret_value;
+}
/****if* H5Tf/h5tset_order_c
* NAME
@@ -345,26 +349,27 @@ h5tget_order_c ( hid_t_f *type_id , int_f *order)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_order_c ( hid_t_f *type_id , int_f *order)
+h5tset_order_c(hid_t_f *type_id, int_f *order)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- H5T_order_t c_order;
- herr_t status;
- c_order = (H5T_order_t)*order;
-/*
- if ( *order == H5T_ORDER_LE_F) c_order = H5T_ORDER_LE;
- if ( *order == H5T_ORDER_BE_F) c_order = H5T_ORDER_BE;
- if ( *order == H5T_ORDER_VAX_F) c_order = H5T_ORDER_VAX;
-*/
- c_type_id = *type_id;
- status = H5Tset_order(c_type_id, c_order);
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ H5T_order_t c_order;
+ herr_t status;
+ c_order = (H5T_order_t)*order;
+ /*
+ if ( *order == H5T_ORDER_LE_F) c_order = H5T_ORDER_LE;
+ if ( *order == H5T_ORDER_BE_F) c_order = H5T_ORDER_BE;
+ if ( *order == H5T_ORDER_VAX_F) c_order = H5T_ORDER_VAX;
+ */
+ c_type_id = *type_id;
+ status = H5Tset_order(c_type_id, c_order);
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Tf/h5tget_size_c
@@ -384,22 +389,23 @@ h5tset_order_c ( hid_t_f *type_id , int_f *order)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_size_c ( hid_t_f *type_id , size_t_f *size)
+h5tget_size_c(hid_t_f *type_id, size_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_size;
-
- c_type_id = *type_id;
- c_size = H5Tget_size(c_type_id);
- if ( c_size == 0 ) return ret_value;
- *size = (size_t_f)c_size ;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_size;
+
+ c_type_id = *type_id;
+ c_size = H5Tget_size(c_type_id);
+ if (c_size == 0)
+ return ret_value;
+ *size = (size_t_f)c_size;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_size_c
@@ -419,23 +425,24 @@ h5tget_size_c ( hid_t_f *type_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_size_c ( hid_t_f *type_id , size_t_f *size)
+h5tset_size_c(hid_t_f *type_id, size_t_f *size)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_size;
- herr_t status;
-
- c_size = (size_t)*size;
- c_type_id = *type_id;
- status = H5Tset_size(c_type_id, c_size);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_size;
+ herr_t status;
+
+ c_size = (size_t)*size;
+ c_type_id = *type_id;
+ status = H5Tset_size(c_type_id, c_size);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_precision_c
@@ -455,22 +462,23 @@ h5tset_size_c ( hid_t_f *type_id , size_t_f *size)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision)
+h5tget_precision_c(hid_t_f *type_id, size_t_f *precision)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_precision;
-
- c_type_id = *type_id;
- c_precision = H5Tget_precision(c_type_id);
- if ( c_precision == 0 ) return ret_value;
- *precision = (size_t_f)c_precision ;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_precision;
+
+ c_type_id = *type_id;
+ c_precision = H5Tget_precision(c_type_id);
+ if (c_precision == 0)
+ return ret_value;
+ *precision = (size_t_f)c_precision;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_precision_c
@@ -489,23 +497,24 @@ h5tget_precision_c ( hid_t_f *type_id , size_t_f *precision)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision)
+h5tset_precision_c(hid_t_f *type_id, size_t_f *precision)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_precision;
- herr_t status;
-
- c_type_id = *type_id;
- c_precision = (size_t)*precision;
- status = H5Tset_precision(c_type_id, c_precision);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_precision;
+ herr_t status;
+
+ c_type_id = *type_id;
+ c_precision = (size_t)*precision;
+ status = H5Tset_precision(c_type_id, c_precision);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_offset_c
@@ -526,23 +535,24 @@ h5tset_precision_c ( hid_t_f *type_id , size_t_f *precision)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset)
+h5tget_offset_c(hid_t_f *type_id, size_t_f *offset)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- int c_offset;
+ int ret_value = -1;
+ hid_t c_type_id;
+ int c_offset;
- c_type_id = *type_id;
- c_offset = H5Tget_offset(c_type_id);
- if ( c_offset < 0 ) return ret_value;
+ c_type_id = *type_id;
+ c_offset = H5Tget_offset(c_type_id);
+ if (c_offset < 0)
+ return ret_value;
- *offset = (size_t_f)c_offset ;
- ret_value = 0;
- return ret_value;
+ *offset = (size_t_f)c_offset;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_offset_c
@@ -562,23 +572,24 @@ h5tget_offset_c ( hid_t_f *type_id , size_t_f *offset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset)
+h5tset_offset_c(hid_t_f *type_id, size_t_f *offset)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_offset;
- herr_t status;
-
- c_offset = (size_t)*offset;
- c_type_id = *type_id;
- status = H5Tset_offset(c_type_id, c_offset);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_offset;
+ herr_t status;
+
+ c_offset = (size_t)*offset;
+ c_type_id = *type_id;
+ status = H5Tset_offset(c_type_id, c_offset);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_pad_c
@@ -601,25 +612,26 @@ h5tset_offset_c ( hid_t_f *type_id , size_t_f *offset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad)
+h5tget_pad_c(hid_t_f *type_id, int_f *lsbpad, int_f *msbpad)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_pad_t c_lsb, c_msb;
-
- c_type_id = *type_id;
- status = H5Tget_pad(c_type_id, &c_lsb, &c_msb);
- if ( status < 0 ) return ret_value;
-
- *lsbpad = (int_f) c_lsb;
- *msbpad = (int_f) c_msb;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_pad_t c_lsb, c_msb;
+
+ c_type_id = *type_id;
+ status = H5Tget_pad(c_type_id, &c_lsb, &c_msb);
+ if (status < 0)
+ return ret_value;
+
+ *lsbpad = (int_f)c_lsb;
+ *msbpad = (int_f)c_msb;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_pad_c
@@ -643,24 +655,25 @@ h5tget_pad_c ( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad )
+h5tset_pad_c(hid_t_f *type_id, int_f *lsbpad, int_f *msbpad)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_pad_t c_lsb, c_msb;
-
- c_type_id = *type_id;
- c_lsb = (H5T_pad_t)*lsbpad;
- c_msb = (H5T_pad_t)*msbpad;
- status = H5Tset_pad(c_type_id, c_lsb, c_msb);
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_pad_t c_lsb, c_msb;
+
+ c_type_id = *type_id;
+ c_lsb = (H5T_pad_t)*lsbpad;
+ c_msb = (H5T_pad_t)*msbpad;
+ status = H5Tset_pad(c_type_id, c_lsb, c_msb);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_sign_c
@@ -680,22 +693,23 @@ h5tset_pad_c ( hid_t_f *type_id, int_f * lsbpad, int_f* msbpad )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_sign_c ( hid_t_f *type_id , int_f *sign)
+h5tget_sign_c(hid_t_f *type_id, int_f *sign)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_sign_t c_sign;
-
- c_type_id = *type_id;
- c_sign = H5Tget_sign(c_type_id);
- if ( c_sign == -1 ) return ret_value;
- *sign = (int_f)c_sign ;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_sign_t c_sign;
+
+ c_type_id = *type_id;
+ c_sign = H5Tget_sign(c_type_id);
+ if (c_sign == -1)
+ return ret_value;
+ *sign = (int_f)c_sign;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_sign_c
@@ -714,24 +728,25 @@ h5tget_sign_c ( hid_t_f *type_id , int_f *sign)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_sign_c ( hid_t_f *type_id , int_f* sign)
+h5tset_sign_c(hid_t_f *type_id, int_f *sign)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_sign_t c_sign;
- herr_t status;
-
- c_type_id = *type_id;
- c_sign = (H5T_sign_t)*sign;
- status = H5Tset_sign(c_type_id, c_sign);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_sign_t c_sign;
+ herr_t status;
+
+ c_type_id = *type_id;
+ c_sign = (H5T_sign_t)*sign;
+ status = H5Tset_sign(c_type_id, c_sign);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_fields_c
@@ -755,27 +770,29 @@ h5tset_sign_c ( hid_t_f *type_id , int_f* sign)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize)
+h5tget_fields_c(hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f *esize, size_t_f *mpos,
+ size_t_f *msize)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- size_t c_spos, c_epos, c_esize, c_mpos, c_msize;
-
- c_type_id = *type_id;
- status = H5Tget_fields(c_type_id, &c_spos, &c_epos, &c_esize, &c_mpos, &c_msize);
- if ( status < 0 ) return ret_value;
- *spos = (size_t_f) c_spos;
- *epos = (size_t_f) c_epos;
- *esize = (size_t_f) c_esize;
- *mpos = (size_t_f) c_mpos;
- *msize = (size_t_f) c_msize;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ size_t c_spos, c_epos, c_esize, c_mpos, c_msize;
+
+ c_type_id = *type_id;
+ status = H5Tget_fields(c_type_id, &c_spos, &c_epos, &c_esize, &c_mpos, &c_msize);
+ if (status < 0)
+ return ret_value;
+ *spos = (size_t_f)c_spos;
+ *epos = (size_t_f)c_epos;
+ *esize = (size_t_f)c_esize;
+ *mpos = (size_t_f)c_mpos;
+ *msize = (size_t_f)c_msize;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_fields_c
@@ -798,28 +815,30 @@ h5tget_fields_c ( hid_t_f *type_id , size_t_f *spos, size_t_f *epos, size_t_f* e
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize)
+h5tset_fields_c(hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f *esize, size_t_f *mpos,
+ size_t_f *msize)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- size_t c_spos, c_epos, c_esize, c_mpos, c_msize;
-
- c_spos = (size_t)*spos;
- c_epos = (size_t)*epos;
- c_esize = (size_t)*esize;
- c_mpos = (size_t)*mpos;
- c_msize = (size_t)*msize;
- c_type_id = *type_id;
- status = H5Tset_fields(c_type_id, c_spos, c_epos, c_esize, c_mpos, c_msize);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ size_t c_spos, c_epos, c_esize, c_mpos, c_msize;
+
+ c_spos = (size_t)*spos;
+ c_epos = (size_t)*epos;
+ c_esize = (size_t)*esize;
+ c_mpos = (size_t)*mpos;
+ c_msize = (size_t)*msize;
+ c_type_id = *type_id;
+ status = H5Tset_fields(c_type_id, c_spos, c_epos, c_esize, c_mpos, c_msize);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_ebias_c
@@ -840,23 +859,24 @@ h5tset_fields_c ( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* es
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
+h5tget_ebias_c(hid_t_f *type_id, size_t_f *ebias)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_ebias;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_ebias;
- c_type_id = *type_id;
- c_ebias = H5Tget_ebias(c_type_id);
- if ( c_ebias == 0 ) return ret_value;
+ c_type_id = *type_id;
+ c_ebias = H5Tget_ebias(c_type_id);
+ if (c_ebias == 0)
+ return ret_value;
- *ebias = (size_t_f)c_ebias;
- ret_value = 0;
- return ret_value;
+ *ebias = (size_t_f)c_ebias;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_ebias_c
@@ -876,24 +896,25 @@ h5tget_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
+h5tset_ebias_c(hid_t_f *type_id, size_t_f *ebias)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- size_t c_ebias;
- herr_t status;
-
- c_type_id = *type_id;
- c_ebias = (size_t)*ebias;
- status = H5Tset_ebias(c_type_id, c_ebias);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ size_t c_ebias;
+ herr_t status;
+
+ c_type_id = *type_id;
+ c_ebias = (size_t)*ebias;
+ status = H5Tset_ebias(c_type_id, c_ebias);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_norm_c
@@ -914,23 +935,24 @@ h5tset_ebias_c ( hid_t_f *type_id , size_t_f *ebias)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_norm_c ( hid_t_f *type_id , int_f *norm)
+h5tget_norm_c(hid_t_f *type_id, int_f *norm)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_norm_t c_norm;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_norm_t c_norm;
- c_type_id = *type_id;
- c_norm = H5Tget_norm(c_type_id);
- if ( c_norm == H5T_NORM_ERROR ) return ret_value;
+ c_type_id = *type_id;
+ c_norm = H5Tget_norm(c_type_id);
+ if (c_norm == H5T_NORM_ERROR)
+ return ret_value;
- *norm = (int_f)c_norm;
- ret_value = 0;
- return ret_value;
+ *norm = (int_f)c_norm;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_norm_c
@@ -950,24 +972,25 @@ h5tget_norm_c ( hid_t_f *type_id , int_f *norm)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_norm_c ( hid_t_f *type_id , int_f *norm)
+h5tset_norm_c(hid_t_f *type_id, int_f *norm)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_norm_t c_norm;
- herr_t status;
-
- c_type_id = *type_id;
- c_norm = (H5T_norm_t)*norm;
- status = H5Tset_norm(c_type_id, c_norm);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_norm_t c_norm;
+ herr_t status;
+
+ c_type_id = *type_id;
+ c_norm = (H5T_norm_t)*norm;
+ status = H5Tset_norm(c_type_id, c_norm);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_inpad_c
@@ -990,23 +1013,24 @@ h5tset_norm_c ( hid_t_f *type_id , int_f *norm)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_inpad_c ( hid_t_f *type_id , int_f * padtype)
+h5tget_inpad_c(hid_t_f *type_id, int_f *padtype)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_pad_t c_padtype;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_pad_t c_padtype;
- c_type_id = *type_id;
- c_padtype = H5Tget_inpad(c_type_id);
- if ( c_padtype == H5T_PAD_ERROR ) return ret_value;
+ c_type_id = *type_id;
+ c_padtype = H5Tget_inpad(c_type_id);
+ if (c_padtype == H5T_PAD_ERROR)
+ return ret_value;
- *padtype = (int_f) c_padtype;
- ret_value = 0;
- return ret_value;
+ *padtype = (int_f)c_padtype;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_inpad_c
@@ -1030,24 +1054,25 @@ h5tget_inpad_c ( hid_t_f *type_id , int_f * padtype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype)
+h5tset_inpad_c(hid_t_f *type_id, int_f *padtype)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_pad_t c_padtype;
-
- c_type_id = *type_id;
- c_padtype = (H5T_pad_t)*padtype;
- status = H5Tset_inpad(c_type_id, c_padtype);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_pad_t c_padtype;
+
+ c_type_id = *type_id;
+ c_padtype = (H5T_pad_t)*padtype;
+ status = H5Tset_inpad(c_type_id, c_padtype);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_cset_c
@@ -1069,23 +1094,24 @@ h5tset_inpad_c ( hid_t_f *type_id, int_f * padtype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_cset_c ( hid_t_f *type_id , int_f * cset)
+h5tget_cset_c(hid_t_f *type_id, int_f *cset)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_cset_t c_cset;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_cset_t c_cset;
- c_type_id = *type_id;
- c_cset = H5Tget_cset(c_type_id);
- if ( c_cset == H5T_CSET_ERROR ) return ret_value;
+ c_type_id = *type_id;
+ c_cset = H5Tget_cset(c_type_id);
+ if (c_cset == H5T_CSET_ERROR)
+ return ret_value;
- *cset = (int_f) c_cset;
- ret_value = 0;
- return ret_value;
+ *cset = (int_f)c_cset;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_cset_c
@@ -1108,24 +1134,25 @@ h5tget_cset_c ( hid_t_f *type_id , int_f * cset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_cset_c ( hid_t_f *type_id, int_f * cset)
+h5tset_cset_c(hid_t_f *type_id, int_f *cset)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_cset_t c_cset;
-
- c_type_id = *type_id;
- c_cset = (H5T_cset_t)*cset;
- status = H5Tset_cset(c_type_id, c_cset);
-
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_cset_t c_cset;
+
+ c_type_id = *type_id;
+ c_cset = (H5T_cset_t)*cset;
+ status = H5Tset_cset(c_type_id, c_cset);
+
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_strpad_c
@@ -1146,22 +1173,23 @@ h5tset_cset_c ( hid_t_f *type_id, int_f * cset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_strpad_c ( hid_t_f *type_id , int_f * strpad)
+h5tget_strpad_c(hid_t_f *type_id, int_f *strpad)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- H5T_str_t c_strpad;
+ int ret_value = -1;
+ hid_t c_type_id;
+ H5T_str_t c_strpad;
- c_type_id = *type_id;
- c_strpad = H5Tget_strpad(c_type_id);
- if ( c_strpad == H5T_STR_ERROR ) return ret_value;
+ c_type_id = *type_id;
+ c_strpad = H5Tget_strpad(c_type_id);
+ if (c_strpad == H5T_STR_ERROR)
+ return ret_value;
- *strpad = (int_f) c_strpad;
- ret_value = 0;
- return ret_value;
+ *strpad = (int_f)c_strpad;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_strpad_c
@@ -1184,24 +1212,25 @@ h5tget_strpad_c ( hid_t_f *type_id , int_f * strpad)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad)
+h5tset_strpad_c(hid_t_f *type_id, int_f *strpad)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
- H5T_str_t c_strpad;
-
- c_type_id = *type_id;
- c_strpad = (H5T_str_t)*strpad;
- status = H5Tset_strpad(c_type_id, c_strpad);
- if ( status < 0 ) return ret_value;
-
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
+ H5T_str_t c_strpad;
+
+ c_type_id = *type_id;
+ c_strpad = (H5T_str_t)*strpad;
+ status = H5Tset_strpad(c_type_id, c_strpad);
+ if (status < 0)
+ return ret_value;
+
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_nmembers_c
@@ -1222,21 +1251,22 @@ h5tset_strpad_c ( hid_t_f *type_id, int_f * strpad)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members)
+h5tget_nmembers_c(hid_t_f *type_id, int_f *num_members)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
+ int ret_value = -1;
+ hid_t c_type_id;
- c_type_id = *type_id;
- *num_members = (int_f)H5Tget_nmembers(c_type_id);
- if (*num_members < 0 ) return ret_value;
+ c_type_id = *type_id;
+ *num_members = (int_f)H5Tget_nmembers(c_type_id);
+ if (*num_members < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_member_name_c
@@ -1258,27 +1288,28 @@ h5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members)
* Elena Pourmal
* Added namelen parameter to return length of the name to Fortran user
* SOURCE
-*/
+ */
int_f
-h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen)
+h5tget_member_name_c(hid_t_f *type_id, int_f *idx, _fcd member_name, int_f *namelen)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- unsigned c_index;
- char *c_name;
-
- c_type_id = *type_id;
- c_index = (unsigned)*idx;
- c_name = H5Tget_member_name(c_type_id, c_index);
- if (c_name == NULL ) return ret_value;
-
- HD5packFstring(c_name, _fcdtocp(member_name), strlen(c_name));
- *namelen = (int_f)strlen(c_name);
- H5free_memory(c_name);
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ unsigned c_index;
+ char * c_name;
+
+ c_type_id = *type_id;
+ c_index = (unsigned)*idx;
+ c_name = H5Tget_member_name(c_type_id, c_index);
+ if (c_name == NULL)
+ return ret_value;
+
+ HD5packFstring(c_name, _fcdtocp(member_name), strlen(c_name));
+ *namelen = (int_f)strlen(c_name);
+ H5free_memory(c_name);
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_member_index_c
* NAME
@@ -1300,37 +1331,38 @@ h5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *na
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx)
+h5tget_member_index_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx)
/******/
{
- int ret_value = -1;
- char *c_name;
- hid_t c_type_id;
- int c_index;
-
- /*
- * Convert FORTRAN name to C name
- */
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
-
- /*
- * Call H5Tget_member_index function.
- */
- c_type_id = (hid_t)*type_id;
- c_index = H5Tget_member_index(c_type_id, c_name);
-
- if (c_index < 0) goto DONE;
- *idx = (int_f)c_index;
+ int ret_value = -1;
+ char *c_name;
+ hid_t c_type_id;
+ int c_index;
+
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ /*
+ * Call H5Tget_member_index function.
+ */
+ c_type_id = (hid_t)*type_id;
+ c_index = H5Tget_member_index(c_type_id, c_name);
+
+ if (c_index < 0)
+ goto DONE;
+ *idx = (int_f)c_index;
DONE:
- HDfree(c_name);
- ret_value = 0;
- return ret_value;
+ HDfree(c_name);
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tget_member_offset_c
* NAME
* h5tget_member_offset_c
@@ -1352,19 +1384,19 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset)
+h5tget_member_offset_c(hid_t_f *type_id, int_f *member_no, size_t_f *offset)
/******/
{
- int ret_value = -1;
- size_t c_offset;
+ int ret_value = -1;
+ size_t c_offset;
- c_offset = H5Tget_member_offset((hid_t)*type_id, (unsigned)*member_no);
- *offset = (size_t_f)c_offset;
- ret_value = 0;
- return ret_value;
+ c_offset = H5Tget_member_offset((hid_t)*type_id, (unsigned)*member_no);
+ *offset = (size_t_f)c_offset;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_array_dims_c
@@ -1385,23 +1417,23 @@ h5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_array_dims_c ( hid_t_f *type_id , hsize_t_f * dims)
+h5tget_array_dims_c(hid_t_f *type_id, hsize_t_f *dims)
/******/
{
hsize_t c_dims[H5S_MAX_RANK];
- int rank, i;
- int ret_value = -1;
+ int rank, i;
+ int ret_value = -1;
- if((rank = H5Tget_array_ndims((hid_t)*type_id)) < 0)
+ if ((rank = H5Tget_array_ndims((hid_t)*type_id)) < 0)
goto DONE;
- if(H5Tget_array_dims2((hid_t)*type_id, c_dims) < 0)
+ if (H5Tget_array_dims2((hid_t)*type_id, c_dims) < 0)
goto DONE;
- for(i = 0; i < rank; i++)
+ for (i = 0; i < rank; i++)
dims[(rank - i) - 1] = (hsize_t_f)c_dims[i];
ret_value = 0;
@@ -1428,23 +1460,24 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims)
+h5tget_array_ndims_c(hid_t_f *type_id, int_f *ndims)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- int c_ndims;
+ int ret_value = -1;
+ hid_t c_type_id;
+ int c_ndims;
- c_type_id = (hid_t)*type_id;
- c_ndims = H5Tget_array_ndims(c_type_id);
- if (c_ndims < 0) return ret_value;
+ c_type_id = (hid_t)*type_id;
+ c_ndims = H5Tget_array_ndims(c_type_id);
+ if (c_ndims < 0)
+ return ret_value;
- *ndims = (int_f)c_ndims;
- ret_value = 0;
- return ret_value;
+ *ndims = (int_f)c_ndims;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_super_c
@@ -1465,26 +1498,26 @@ h5tget_array_ndims_c ( hid_t_f *type_id , int_f * ndims)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id)
+h5tget_super_c(hid_t_f *type_id, hid_t_f *base_type_id)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- hid_t c_base_type_id;
+ int ret_value = -1;
+ hid_t c_type_id;
+ hid_t c_base_type_id;
- c_type_id = (hid_t)*type_id;
- c_base_type_id = H5Tget_super(c_type_id);
- if (c_base_type_id < 0) return ret_value;
+ c_type_id = (hid_t)*type_id;
+ c_base_type_id = H5Tget_super(c_type_id);
+ if (c_base_type_id < 0)
+ return ret_value;
- *base_type_id = (hid_t_f)c_base_type_id;
- ret_value = 0;
- return ret_value;
+ *base_type_id = (hid_t_f)c_base_type_id;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tget_member_type_c
* NAME
* h5tget_member_type_c
@@ -1504,22 +1537,22 @@ h5tget_super_c ( hid_t_f *type_id , hid_t_f *base_type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
+h5tget_member_type_c(hid_t_f *type_id, int_f *field_idx, hid_t_f *datatype)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- *datatype = (hid_t_f)H5Tget_member_type((hid_t)*type_id, (unsigned)*field_idx);
- if(*datatype < 0) return ret_value;
+ *datatype = (hid_t_f)H5Tget_member_type((hid_t)*type_id, (unsigned)*field_idx);
+ if (*datatype < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tcreate_c
* NAME
* h5tcreate_c
@@ -1536,24 +1569,25 @@ h5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id)
/******/
{
- int ret_value = -1;
- H5T_class_t c_class;
- size_t c_size;
+ int ret_value = -1;
+ H5T_class_t c_class;
+ size_t c_size;
- c_size =(size_t) *size;
- c_class = (H5T_class_t) *cls;
+ c_size = (size_t)*size;
+ c_class = (H5T_class_t)*cls;
- *type_id = (hid_t_f)H5Tcreate(c_class, c_size);
- if(*type_id < 0) return ret_value;
+ *type_id = (hid_t_f)H5Tcreate(c_class, c_size);
+ if (*type_id < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tinsert_c
@@ -1575,28 +1609,29 @@ h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id)
+h5tinsert_c(hid_t_f *type_id, _fcd name, int_f *namelen, size_t_f *offset, hid_t_f *field_id)
/******/
{
- int ret_value = -1;
- char* c_name;
- herr_t error;
+ int ret_value = -1;
+ char * c_name;
+ herr_t error;
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
- error = H5Tinsert((hid_t)*type_id, c_name, (size_t)*offset, (hid_t)*field_id);
+ error = H5Tinsert((hid_t)*type_id, c_name, (size_t)*offset, (hid_t)*field_id);
- HDfree(c_name);
- if(error < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ HDfree(c_name);
+ if (error < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tpack_c
* NAME
* h5tpack_c
@@ -1614,22 +1649,23 @@ h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tpack_c(hid_t_f * type_id)
+h5tpack_c(hid_t_f *type_id)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- herr_t status;
+ int ret_value = -1;
+ hid_t c_type_id;
+ herr_t status;
- c_type_id = *type_id;
- status = H5Tpack(c_type_id);
- if (status < 0) return ret_value;
+ c_type_id = *type_id;
+ status = H5Tpack(c_type_id);
+ if (status < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tarray_create_c
@@ -1650,34 +1686,32 @@ h5tpack_c(hid_t_f * type_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id)
+h5tarray_create_c(hid_t_f *base_id, int_f *rank, hsize_t_f *dims, hid_t_f *type_id)
/******/
{
- hsize_t c_dims[H5S_MAX_RANK];
- hid_t c_type_id;
- unsigned u; /* Local index variable */
- int ret_value = -1;
-
+ hsize_t c_dims[H5S_MAX_RANK];
+ hid_t c_type_id;
+ unsigned u; /* Local index variable */
+ int ret_value = -1;
/*
* Transpose dimension arrays because of C-FORTRAN storage order
*/
- for(u = 0; u < (unsigned)*rank ; u++)
- c_dims[u] = (hsize_t)dims[((unsigned)*rank - u) - 1];
+ for (u = 0; u < (unsigned)*rank; u++)
+ c_dims[u] = (hsize_t)dims[((unsigned)*rank - u) - 1];
- if((c_type_id = H5Tarray_create2((hid_t)*base_id, (unsigned)*rank, c_dims)) < 0)
+ if ((c_type_id = H5Tarray_create2((hid_t)*base_id, (unsigned)*rank, c_dims)) < 0)
goto DONE;
- *type_id = (hid_t_f)c_type_id;
+ *type_id = (hid_t_f)c_type_id;
ret_value = 0;
DONE:
return ret_value;
}
-
/****if* H5Tf/h5tenum_create_c
* NAME
* h5tenum_create_c
@@ -1696,20 +1730,21 @@ DONE:
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id)
+h5tenum_create_c(hid_t_f *parent_id, hid_t_f *new_type_id)
/******/
{
- int ret_value = 0;
- hid_t c_new_type_id;
+ int ret_value = 0;
+ hid_t c_new_type_id;
- c_new_type_id = H5Tenum_create((hid_t)*parent_id);
- if ( c_new_type_id < 0 ) ret_value = -1;
+ c_new_type_id = H5Tenum_create((hid_t)*parent_id);
+ if (c_new_type_id < 0)
+ ret_value = -1;
- *new_type_id = (hid_t_f)c_new_type_id;
- return ret_value;
+ *new_type_id = (hid_t_f)c_new_type_id;
+ return ret_value;
}
/****if* H5Tf/h5tenum_insert_c
@@ -1732,31 +1767,32 @@ h5tenum_create_c ( hid_t_f *parent_id , hid_t_f *new_type_id)
* it should not be cast to an int (which might be 4 bytes). Instead the value
* is written as the size of an int_f.
* SOURCE
-*/
+ */
int_f
-h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
+h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value)
/******/
{
- int ret_value = -1;
- char* c_name;
- herr_t error;
- int_f c_value;
+ int ret_value = -1;
+ char * c_name;
+ herr_t error;
+ int_f c_value;
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
- c_value = *value;
- error = H5Tenum_insert((hid_t)*type_id, c_name, &c_value);
+ c_value = *value;
+ error = H5Tenum_insert((hid_t)*type_id, c_name, &c_value);
- HDfree(c_name);
- if(error < 0) return ret_value;
+ HDfree(c_name);
+ if (error < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
/****if* H5Tf/h5tenum_nameof_c
* NAME
* h5tenum_nameof_c
@@ -1776,29 +1812,30 @@ h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen)
+h5tenum_nameof_c(hid_t_f *type_id, int_f *value, _fcd name, size_t_f *namelen)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- char* c_name;
- size_t c_namelen;
- herr_t error;
- int_f c_value;
- c_value = *value;
- c_namelen = ((size_t)*namelen) +1;
- c_name = (char *)HDmalloc(sizeof(char)*c_namelen);
- c_type_id = (hid_t)*type_id;
- error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen);
- HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
- HDfree(c_name);
-
- if(error < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ char * c_name;
+ size_t c_namelen;
+ herr_t error;
+ int_f c_value;
+ c_value = *value;
+ c_namelen = ((size_t)*namelen) + 1;
+ c_name = (char *)HDmalloc(sizeof(char) * c_namelen);
+ c_type_id = (hid_t)*type_id;
+ error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen);
+ HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
+ HDfree(c_name);
+
+ if (error < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tenum_valueof_c
@@ -1820,26 +1857,27 @@ h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
+h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value)
/******/
{
- int ret_value = -1;
- char* c_name;
- herr_t error;
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
-
- error = H5Tenum_valueof((hid_t)*type_id, c_name, value);
- HDfree(c_name);
-
- if(error < 0) return ret_value;
- ret_value = 0;
- return ret_value;
-}
+ int ret_value = -1;
+ char * c_name;
+ herr_t error;
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
+
+ error = H5Tenum_valueof((hid_t)*type_id, c_name, value);
+ HDfree(c_name);
+ if (error < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
+}
/****if* H5Tf/h5tget_member_value_c
* NAME
@@ -1859,22 +1897,23 @@ h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value)
+h5tget_member_value_c(hid_t_f *type_id, int_f *member_no, int_f *value)
/******/
{
- int ret_value = -1;
- int c_value;
- herr_t error;
+ int ret_value = -1;
+ int c_value;
+ herr_t error;
- error = H5Tget_member_value((hid_t)*type_id, (unsigned)*member_no, &c_value);
- if(error < 0) return ret_value;
+ error = H5Tget_member_value((hid_t)*type_id, (unsigned)*member_no, &c_value);
+ if (error < 0)
+ return ret_value;
- *value = (int_f)c_value;
- ret_value = 0;
- return ret_value;
+ *value = (int_f)c_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tset_tag_c
@@ -1897,23 +1936,24 @@ h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen)
+h5tset_tag_c(hid_t_f *type_id, _fcd tag, int_f *namelen)
/******/
{
- int ret_value = -1;
- herr_t status;
- char* c_tag;
+ int ret_value = -1;
+ herr_t status;
+ char * c_tag;
- c_tag = (char *)HD5f2cstring(tag, (size_t)*namelen);
+ c_tag = (char *)HD5f2cstring(tag, (size_t)*namelen);
- status = H5Tset_tag((hid_t)*type_id, c_tag);
- HDfree(c_tag);
- if ( status < 0 ) return ret_value;
+ status = H5Tset_tag((hid_t)*type_id, c_tag);
+ HDfree(c_tag);
+ if (status < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_tag_c
@@ -1935,24 +1975,25 @@ h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen)
+h5tget_tag_c(hid_t_f *type_id, _fcd tag, size_t_f *tag_size, int_f *taglen)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- char *c_tag;
-
- c_type_id = *type_id;
- c_tag = H5Tget_tag(c_type_id);
- if (c_tag == NULL ) return ret_value;
-
- HD5packFstring(c_tag, _fcdtocp(tag), (size_t)*tag_size);
- *taglen = (int_f)HDstrlen(c_tag);
- H5free_memory(c_tag);
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ char *c_tag;
+
+ c_type_id = *type_id;
+ c_tag = H5Tget_tag(c_type_id);
+ if (c_tag == NULL)
+ return ret_value;
+
+ HD5packFstring(c_tag, _fcdtocp(tag), (size_t)*tag_size);
+ *taglen = (int_f)HDstrlen(c_tag);
+ H5free_memory(c_tag);
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tvlen_create_c
* NAME
@@ -1971,21 +2012,22 @@ h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* taglen)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id)
+h5tvlen_create_c(hid_t_f *type_id, hid_t_f *vltype_id)
/******/
{
- int ret_value = -1;
- hid_t c_type_id;
- hid_t c_vltype_id;
-
- c_type_id = (hid_t)*type_id;
- c_vltype_id = H5Tvlen_create(c_type_id);
- if (c_vltype_id < 0 ) return ret_value;
- *vltype_id = (hid_t_f)c_vltype_id;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t c_type_id;
+ hid_t c_vltype_id;
+
+ c_type_id = (hid_t)*type_id;
+ c_vltype_id = H5Tvlen_create(c_type_id);
+ if (c_vltype_id < 0)
+ return ret_value;
+ *vltype_id = (hid_t_f)c_vltype_id;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tis_variable_str_c
* NAME
@@ -2006,21 +2048,22 @@ h5tvlen_create_c(hid_t_f* type_id, hid_t_f *vltype_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag )
+h5tis_variable_str_c(hid_t_f *type_id, int_f *flag)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- htri_t status;
-
- c_type_id = (hid_t)*type_id;
- status = H5Tis_variable_str(c_type_id);
- *flag = (int_f)status;
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ htri_t status;
+
+ c_type_id = (hid_t)*type_id;
+ status = H5Tis_variable_str(c_type_id);
+ *flag = (int_f)status;
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Tf/h5tget_member_class_c
* NAME
@@ -2042,24 +2085,25 @@ h5tis_variable_str_c ( hid_t_f *type_id , int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls )
+h5tget_member_class_c(hid_t_f *type_id, int_f *member_no, int_f *cls)
/******/
{
- int ret_value = 0;
- hid_t c_type_id;
- unsigned c_member_no;
- H5T_class_t c_class;
-
- c_type_id = (hid_t)*type_id;
- c_member_no = (unsigned)*member_no;
- c_class = H5Tget_member_class(c_type_id, c_member_no);
-
- if ( c_class == H5T_NO_CLASS ) ret_value = -1;
- *cls = (int_f)c_class;
- return ret_value;
+ int ret_value = 0;
+ hid_t c_type_id;
+ unsigned c_member_no;
+ H5T_class_t c_class;
+
+ c_type_id = (hid_t)*type_id;
+ c_member_no = (unsigned)*member_no;
+ c_class = H5Tget_member_class(c_type_id, c_member_no);
+
+ if (c_class == H5T_NO_CLASS)
+ ret_value = -1;
+ *cls = (int_f)c_class;
+ return ret_value;
}
/****if* H5Tf/h5tcommit_anon_c
@@ -2080,22 +2124,21 @@ h5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id,
- hid_t_f *tcpl_id, hid_t_f *tapl_id)
+h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
- /* Call H5Tcommit_anon function */
- if(H5Tcommit_anon((hid_t)*loc_id, (hid_t)*dtype_id, (hid_t)*tcpl_id, (hid_t)*tapl_id) < 0)
- goto done;
+ /* Call H5Tcommit_anon function */
+ if (H5Tcommit_anon((hid_t)*loc_id, (hid_t)*dtype_id, (hid_t)*tcpl_id, (hid_t)*tapl_id) < 0)
+ goto done;
- ret_value = 0;
+ ret_value = 0;
- done:
- return ret_value;
+done:
+ return ret_value;
}
/****if* H5Tf/h5tcommitted_c
@@ -2114,19 +2157,18 @@ h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id,
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5tcommitted_c(hid_t_f *dtype_id)
/******/
{
- int_f ret_value;
+ int_f ret_value;
- /* Call H5Tcommitted function */
+ /* Call H5Tcommitted function */
- ret_value=(int_f)H5Tcommitted((hid_t)*dtype_id);
-
- return ret_value;
+ ret_value = (int_f)H5Tcommitted((hid_t)*dtype_id);
+ return ret_value;
}
/****if* H5Tf/h5tdecode_c
@@ -2149,30 +2191,30 @@ h5tcommitted_c(hid_t_f *dtype_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tdecode_c ( _fcd buf, hid_t_f *obj_id )
+h5tdecode_c(_fcd buf, hid_t_f *obj_id)
/******/
{
- int ret_value = -1;
- unsigned char *c_buf = NULL; /* Buffer to hold C string */
- hid_t c_obj_id;
+ int ret_value = -1;
+ unsigned char *c_buf = NULL; /* Buffer to hold C string */
+ hid_t c_obj_id;
- /*
- * Call H5Tdecode function.
- */
+ /*
+ * Call H5Tdecode function.
+ */
- c_buf = (unsigned char*)buf;
+ c_buf = (unsigned char *)buf;
- c_obj_id = H5Tdecode(c_buf);
- if(c_obj_id < 0)
- return ret_value;
+ c_obj_id = H5Tdecode(c_buf);
+ if (c_obj_id < 0)
+ return ret_value;
- *obj_id = (hid_t_f)c_obj_id;
- ret_value = 0;
+ *obj_id = (hid_t_f)c_obj_id;
+ ret_value = 0;
- return ret_value;
+ return ret_value;
}
/****if* H5Tf/h5tencode_c
@@ -2193,56 +2235,56 @@ h5tdecode_c ( _fcd buf, hid_t_f *obj_id )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
+h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc)
/******/
{
- int ret_value = -1;
- unsigned char *c_buf = NULL; /* Buffer to hold C string */
- size_t c_size;
+ int ret_value = -1;
+ unsigned char *c_buf = NULL; /* Buffer to hold C string */
+ size_t c_size;
- /* return just the size of the allocated buffer;
- * equivalent to C routine for which 'name' is set equal to NULL
- */
+ /* return just the size of the allocated buffer;
+ * equivalent to C routine for which 'name' is set equal to NULL
+ */
- if (*nalloc == 0) {
+ if (*nalloc == 0) {
- if(H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
- return ret_value;
+ if (H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
+ return ret_value;
- *nalloc = (size_t_f)c_size;
+ *nalloc = (size_t_f)c_size;
- ret_value = 0;
- return ret_value;
- }
+ ret_value = 0;
+ return ret_value;
+ }
- /*
- * Allocate buffer
- */
- c_size = (size_t)*nalloc;
- if(NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
- return ret_value;
+ /*
+ * Allocate buffer
+ */
+ c_size = (size_t)*nalloc;
+ if (NULL == (c_buf = (unsigned char *)HDmalloc(c_size)))
+ return ret_value;
- /*
- * Call H5Tencode function.
- */
- if(H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
- return ret_value;
+ /*
+ * Call H5Tencode function.
+ */
+ if (H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0)
+ return ret_value;
- /* copy the C buffer to the FORTRAN buffer.
- * Can not use HD5packFstring because we don't want to
- * eliminate the NUL terminator or pad remaining space
- * with blanks.
- */
+ /* copy the C buffer to the FORTRAN buffer.
+ * Can not use HD5packFstring because we don't want to
+ * eliminate the NUL terminator or pad remaining space
+ * with blanks.
+ */
- HDmemcpy(_fcdtocp(buf),(char *)c_buf,c_size);
+ HDmemcpy(_fcdtocp(buf), (char *)c_buf, c_size);
- ret_value = 0;
- if(c_buf)
- HDfree(c_buf);
- return ret_value;
+ ret_value = 0;
+ if (c_buf)
+ HDfree(c_buf);
+ return ret_value;
}
/****if* H5Tf/h5tget_create_plist_c
@@ -2262,13 +2304,13 @@ h5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
* HISTORY
* N/A
* SOURCE
-*/
+ */
int_f
-h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id)
+h5tget_create_plist_c(hid_t_f *dtype_id, hid_t_f *dtpl_id)
/******/
{
- int_f ret_value=-1; /* Return value */
+ int_f ret_value = -1; /* Return value */
if ((*dtpl_id = (hid_t_f)H5Tget_create_plist((hid_t)*dtype_id)) < 0)
return ret_value;
@@ -2296,20 +2338,21 @@ h5tget_create_plist_c ( hid_t_f *dtype_id, hid_t_f *dtpl_id)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag)
+h5tcompiler_conv_c(hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag)
/******/
{
- int ret_value = -1;
- htri_t status;
-
- status = H5Tcompiler_conv( (hid_t)*src_id , (hid_t)*dst_id);
- if ( status < 0 ) return ret_value;
- *c_flag = (int_f)status;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ htri_t status;
+
+ status = H5Tcompiler_conv((hid_t)*src_id, (hid_t)*dst_id);
+ if (status < 0)
+ return ret_value;
+ *c_flag = (int_f)status;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tget_native_type_c
* NAME
@@ -2330,20 +2373,21 @@ h5tcompiler_conv_c ( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id)
/******/
{
- int ret_value = -1;
- hid_t status;
-
- status = H5Tget_native_type( (hid_t)*dtype_id, (H5T_direction_t)*direction);
- if ( status < 0 ) return ret_value;
- *native_dtype_id = (hid_t_f)status;
- ret_value = 0;
- return ret_value;
+ int ret_value = -1;
+ hid_t status;
+
+ status = H5Tget_native_type((hid_t)*dtype_id, (H5T_direction_t)*direction);
+ if (status < 0)
+ return ret_value;
+ *native_dtype_id = (hid_t_f)status;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tconvert_c
@@ -2370,18 +2414,20 @@ h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_
* December 8, 2008
*
* SOURCE
-*/
+ */
int_f
-h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background, hid_t_f *plist_id)
+h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background,
+ hid_t_f *plist_id)
/******/
{
- int ret_value = -1;
- hid_t status;
+ int ret_value = -1;
+ hid_t status;
- status = H5Tconvert( (hid_t)*src_id, (hid_t)*dst_id, (size_t)*nelmts, buf, background, (hid_t)*plist_id );
- if ( status < 0 ) return ret_value;
- ret_value = 0;
- return ret_value;
+ status = H5Tconvert((hid_t)*src_id, (hid_t)*dst_id, (size_t)*nelmts, buf, background, (hid_t)*plist_id);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Tf/h5tenum_insert_ptr_c
@@ -2403,28 +2449,28 @@ h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void
* February 6, 2015
*
* SOURCE
-*/
+ */
int_f
-h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value)
+h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f *namelen, void *value)
/******/
{
- int ret_value = -1;
- hid_t status;
- char *c_name;
+ int ret_value = -1;
+ hid_t status;
+ char *c_name;
- /*
- * Convert FORTRAN name to C name
- */
- c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
- if (c_name == NULL) return ret_value;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ c_name = (char *)HD5f2cstring(name, (size_t)*namelen);
+ if (c_name == NULL)
+ return ret_value;
- status = H5Tenum_insert( (hid_t)*type_id, c_name, value);
+ status = H5Tenum_insert((hid_t)*type_id, c_name, value);
- HDfree(c_name);
- if ( status < 0 ) return ret_value;
+ HDfree(c_name);
+ if (status < 0)
+ return ret_value;
- ret_value = 0;
- return ret_value;
+ ret_value = 0;
+ return ret_value;
}
-
-
diff --git a/fortran/src/H5Zf.c b/fortran/src/H5Zf.c
index 7afafd5..ca9e7eb 100644
--- a/fortran/src/H5Zf.c
+++ b/fortran/src/H5Zf.c
@@ -17,7 +17,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
@@ -36,23 +36,24 @@
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5zunregister_c (int_f *filter)
+h5zunregister_c(int_f *filter)
/******/
{
- int ret_value = -1;
- herr_t status;
- H5Z_filter_t c_filter;
+ int ret_value = -1;
+ herr_t status;
+ H5Z_filter_t c_filter;
- /*
- * Call H5Zunregister function.
- */
- c_filter = (H5Z_filter_t)*filter;
- status = H5Zunregister(c_filter);
- if (status < 0) return ret_value;
- ret_value = 0;
- return ret_value;
+ /*
+ * Call H5Zunregister function.
+ */
+ c_filter = (H5Z_filter_t)*filter;
+ status = H5Zunregister(c_filter);
+ if (status < 0)
+ return ret_value;
+ ret_value = 0;
+ return ret_value;
}
/****if* H5Zf/h5zfiletr_avail_c
* NAME
@@ -71,21 +72,22 @@ h5zunregister_c (int_f *filter)
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5zfilter_avail_c ( int_f *filter , int_f *flag )
+h5zfilter_avail_c(int_f *filter, int_f *flag)
/******/
{
- int ret_value = 0;
- H5Z_filter_t c_filter;
- htri_t status;
+ int ret_value = 0;
+ H5Z_filter_t c_filter;
+ htri_t status;
- c_filter = (H5Z_filter_t)*filter;
- status = H5Zfilter_avail(c_filter);
- *flag = (int_f)status;
- if ( status < 0 ) ret_value = -1;
- return ret_value;
+ c_filter = (H5Z_filter_t)*filter;
+ status = H5Zfilter_avail(c_filter);
+ *flag = (int_f)status;
+ if (status < 0)
+ ret_value = -1;
+ return ret_value;
}
/****if* H5Zf/h5zget_filter_info_c
@@ -106,19 +108,19 @@ h5zfilter_avail_c ( int_f *filter , int_f *flag )
* HISTORY
*
* SOURCE
-*/
+ */
int_f
-h5zget_filter_info_c ( int_f *filter , int_f *flag )
+h5zget_filter_info_c(int_f *filter, int_f *flag)
/******/
{
- int ret_value = 0;
- H5Z_filter_t c_filter;
- unsigned int c_flag;
+ int ret_value = 0;
+ H5Z_filter_t c_filter;
+ unsigned int c_flag;
- c_filter = (H5Z_filter_t)*filter;
- ret_value = H5Zget_filter_info(c_filter, &c_flag);
- *flag = (int_f)c_flag;
+ c_filter = (H5Z_filter_t)*filter;
+ ret_value = H5Zget_filter_info(c_filter, &c_flag);
+ *flag = (int_f)c_flag;
- return ret_value;
+ return ret_value;
}
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 8044b78..9c71c57 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -17,14 +17,13 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include "H5f90.h"
#include "H5fort_type_defines.h"
int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF;
-
/****if* H5_f/h5init_types_c
* NAME
* h5init_types_c
@@ -49,14 +48,14 @@ int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF;
* Elena Pourmal
* Tuesday, August 3, 1999
* SOURCE
-*/
+ */
int_f
-h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes )
+h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
hid_t c_type_id;
- int i;
+ int i;
/* Fortran INTEGER may not be the same as C; do all checking to find
an appropriate size
@@ -67,186 +66,258 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
*/
/* Initialized INTEGER KIND types to default to native integer */
- for(i=0;i<5;i++) {
- if ((types[i] = (hid_t_f)H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value;
+ for (i = 0; i < 5; i++) {
+ if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
}
- for(i=0;i<H5_FORTRAN_NUM_INTEGER_KINDS;i++) {
- if ( IntKinds_SizeOf[i] == sizeof(char)) {
- if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0) return ret_value;
- } /*end if */
- else if ( IntKinds_SizeOf[i] == sizeof(short)) {
- if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0) return ret_value;
- } /*end if */
- else if ( IntKinds_SizeOf[i] == sizeof(int)) {
- if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
- } /*end if */
- else if ( IntKinds_SizeOf[i] == sizeof(long long)) {
- if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
- } /*end if */
- else {
- if ((types[i] = (hid_t_f)H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value;
- if ( H5Tset_precision (types[i], 128) < 0) return ret_value;
- } /*end else */
-
+ for (i = 0; i < H5_FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (IntKinds_SizeOf[i] == sizeof(char)) {
+ if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_CHAR)) < 0)
+ return ret_value;
+ } /*end if */
+ else if (IntKinds_SizeOf[i] == sizeof(short)) {
+ if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_SHORT)) < 0)
+ return ret_value;
+ } /*end if */
+ else if (IntKinds_SizeOf[i] == sizeof(int)) {
+ if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
+ } /*end if */
+ else if (IntKinds_SizeOf[i] == sizeof(long long)) {
+ if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0)
+ return ret_value;
+ } /*end if */
+ else {
+ if ((types[i] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
+ if (H5Tset_precision(types[i], 128) < 0)
+ return ret_value;
+ } /*end else */
}
if (sizeof(int_f) == sizeof(int)) {
- if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0) return ret_value;
+ if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_INT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(int_f) == sizeof(long)) {
- if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_LONG)) < 0) return ret_value;
+ if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_LONG)) < 0)
+ return ret_value;
} /*end if */
- else
- if (sizeof(int_f) == sizeof(long long)) {
- if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0) return ret_value;
+ else if (sizeof(int_f) == sizeof(long long)) {
+ if ((types[5] = (hid_t_f)H5Tcopy(H5T_NATIVE_LLONG)) < 0)
+ return ret_value;
} /*end else */
/* Find appropriate size to store Fortran REAL */
- if(sizeof(real_f)==sizeof(float)) {
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if (sizeof(real_f) == sizeof(float)) {
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
} /* end if */
- else if(sizeof(real_f)==sizeof(double)){
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ else if (sizeof(real_f) == sizeof(double)) {
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
} /* end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
+#if H5_SIZEOF_LONG_DOUBLE != 0
else if (sizeof(real_f) == sizeof(long double)) {
- if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ if ((types[6] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
} /* end else */
#endif
/* Find appropriate size to store Fortran DOUBLE */
- if(sizeof(double_f)==sizeof(double)) {
- if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
- }/*end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
- else if(sizeof(double_f)==sizeof(long double)) {
- if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
- }/*end else */
+ if (sizeof(double_f) == sizeof(double)) {
+ if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
+ } /*end if */
+#if H5_SIZEOF_LONG_DOUBLE != 0
+ else if (sizeof(double_f) == sizeof(long double)) {
+ if ((types[7] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
+ } /*end else */
#endif
#ifdef H5_HAVE_FLOAT128
- else if(sizeof(double_f)==sizeof(__float128)) {
- if ((types[7] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
- if ( H5Tset_precision (types[7], 128) < 0) return ret_value;
- }/*end else */
+ else if (sizeof(double_f) == sizeof(__float128)) {
+ if ((types[7] = H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
+ if (H5Tset_precision(types[7], 128) < 0)
+ return ret_value;
+ } /*end else */
#endif
- if ((c_type_id = H5Tcopy(H5T_FORTRAN_S1)) < 0) return ret_value;
- if(H5Tset_size(c_type_id, 1) < 0) return ret_value;
- if(H5Tset_strpad(c_type_id, H5T_STR_SPACEPAD) < 0) return ret_value;
+ if ((c_type_id = H5Tcopy(H5T_FORTRAN_S1)) < 0)
+ return ret_value;
+ if (H5Tset_size(c_type_id, 1) < 0)
+ return ret_value;
+ if (H5Tset_strpad(c_type_id, H5T_STR_SPACEPAD) < 0)
+ return ret_value;
types[8] = (hid_t_f)c_type_id;
- if ((types[9] = (hid_t_f)H5Tcopy(H5T_STD_REF_OBJ)) < 0) return ret_value;
- if ((types[10] = (hid_t_f)H5Tcopy(H5T_STD_REF_DSETREG)) < 0) return ret_value;
+ if ((types[9] = (hid_t_f)H5Tcopy(H5T_STD_REF_OBJ)) < 0)
+ return ret_value;
+ if ((types[10] = (hid_t_f)H5Tcopy(H5T_STD_REF_DSETREG)) < 0)
+ return ret_value;
/*
* FIND H5T_NATIVE_REAL_C_FLOAT
*/
if (sizeof(real_C_FLOAT_f) == sizeof(float)) {
- if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(real_C_FLOAT_f) == sizeof(double)) {
- if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
} /*end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
+#if H5_SIZEOF_LONG_DOUBLE != 0
else if (sizeof(real_C_FLOAT_f) == sizeof(long double)) {
- if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ if ((types[11] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
} /*end else */
#endif
/*
* FIND H5T_NATIVE_REAL_C_DOUBLE
*/
if (sizeof(real_C_DOUBLE_f) == sizeof(float)) {
- if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(real_C_DOUBLE_f) == sizeof(double)) {
- if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
} /*end if */
-#if H5_SIZEOF_LONG_DOUBLE!=0
+#if H5_SIZEOF_LONG_DOUBLE != 0
else if (sizeof(real_C_DOUBLE_f) == sizeof(long double)) {
- if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
+ if ((types[12] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
} /*end else */
#endif
/*
* FIND H5T_NATIVE_REAL_C_LONG_DOUBLE
*/
-#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE!=0
+#if H5_FORTRAN_C_LONG_DOUBLE_IS_UNIQUE != 0
if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(float)) {
- if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0) return ret_value;
+ if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
} /*end if */
else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(double)) {
- if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
} /*end if */
-# if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
+#if H5_FORTRAN_HAVE_C_LONG_DOUBLE != 0
else if (sizeof(real_C_LONG_DOUBLE_f) == sizeof(long double)) {
- if ( H5_PAC_C_MAX_REAL_PRECISION >= H5_PAC_FC_MAX_REAL_PRECISION) {
- if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0) return ret_value;
- }
- else {
- if ((types[13] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
- if ( H5Tset_precision (types[13], 128) < 0) return ret_value;
- }
+ if (H5_PAC_C_MAX_REAL_PRECISION >= H5_PAC_FC_MAX_REAL_PRECISION) {
+ if ((types[13] = (hid_t_f)H5Tcopy(H5T_NATIVE_LDOUBLE)) < 0)
+ return ret_value;
+ }
+ else {
+ if ((types[13] = H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
+ if (H5Tset_precision(types[13], 128) < 0)
+ return ret_value;
+ }
}
-# else
- if ((types[13] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
- if ( H5Tset_precision (types[13], 64) < 0) return ret_value;
-# endif
#else
- if ((types[13] = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0) return ret_value;
+ if ((types[13] = H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
+ if (H5Tset_precision(types[13], 64) < 0)
+ return ret_value;
+#endif
+#else
+ if ((types[13] = H5Tcopy(H5T_NATIVE_DOUBLE)) < 0)
+ return ret_value;
#endif
/*
* FIND H5T_NATIVE_B_8
*/
- if ((types[14] = (hid_t_f)H5Tcopy(H5T_NATIVE_B8)) < 0) return ret_value;
- if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B16)) < 0) return ret_value;
- if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0) return ret_value;
- if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value;
+ if ((types[14] = (hid_t_f)H5Tcopy(H5T_NATIVE_B8)) < 0)
+ return ret_value;
+ if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B16)) < 0)
+ return ret_value;
+ if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0)
+ return ret_value;
+ if ((types[17] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0)
+ return ret_value;
/*
* FIND H5T_NATIVE_FLOAT_128
*/
- if ((types[18] = H5Tcopy (H5T_NATIVE_FLOAT)) < 0) return ret_value;
- if ( H5Tset_precision (types[18], 128) < 0) return ret_value;
+ if ((types[18] = H5Tcopy(H5T_NATIVE_FLOAT)) < 0)
+ return ret_value;
+ if (H5Tset_precision(types[18], 128) < 0)
+ return ret_value;
/*--------------------------------------------------------------------------------------*/
- if ((floatingtypes[0] = (hid_t_f)H5Tcopy(H5T_IEEE_F32BE)) < 0) return ret_value;
- if ((floatingtypes[1] = (hid_t_f)H5Tcopy(H5T_IEEE_F32LE)) < 0) return ret_value;
- if ((floatingtypes[2] = (hid_t_f)H5Tcopy(H5T_IEEE_F64BE)) < 0) return ret_value;
- if ((floatingtypes[3] = (hid_t_f)H5Tcopy(H5T_IEEE_F64LE)) < 0) return ret_value;
-
- if ((integertypes[0] = (hid_t_f)H5Tcopy(H5T_STD_I8BE)) < 0) return ret_value;
- if ((integertypes[1] = (hid_t_f)H5Tcopy(H5T_STD_I8LE)) < 0) return ret_value;
- if ((integertypes[2] = (hid_t_f)H5Tcopy(H5T_STD_I16BE)) < 0) return ret_value;
- if ((integertypes[3] = (hid_t_f)H5Tcopy(H5T_STD_I16LE)) < 0) return ret_value;
- if ((integertypes[4] = (hid_t_f)H5Tcopy(H5T_STD_I32BE)) < 0) return ret_value;
- if ((integertypes[5] = (hid_t_f)H5Tcopy(H5T_STD_I32LE)) < 0) return ret_value;
- if ((integertypes[6] = (hid_t_f)H5Tcopy(H5T_STD_I64BE)) < 0) return ret_value;
- if ((integertypes[7] = (hid_t_f)H5Tcopy(H5T_STD_I64LE)) < 0) return ret_value;
- if ((integertypes[8] = (hid_t_f)H5Tcopy(H5T_STD_U8BE)) < 0) return ret_value;
- if ((integertypes[9] = (hid_t_f)H5Tcopy(H5T_STD_U8LE)) < 0) return ret_value;
- if ((integertypes[10] = (hid_t_f)H5Tcopy(H5T_STD_U16BE)) < 0) return ret_value;
- if ((integertypes[11] = (hid_t_f)H5Tcopy(H5T_STD_U16LE)) < 0) return ret_value;
- if ((integertypes[12] = (hid_t_f)H5Tcopy(H5T_STD_U32BE)) < 0) return ret_value;
- if ((integertypes[13] = (hid_t_f)H5Tcopy(H5T_STD_U32LE)) < 0) return ret_value;
- if ((integertypes[14] = (hid_t_f)H5Tcopy(H5T_STD_U64BE)) < 0) return ret_value;
- if ((integertypes[15] = (hid_t_f)H5Tcopy(H5T_STD_U64LE)) < 0) return ret_value;
- if ((integertypes[17] = (hid_t_f)H5Tcopy(H5T_STD_B8BE)) < 0) return ret_value;
- if ((integertypes[18] = (hid_t_f)H5Tcopy(H5T_STD_B8LE)) < 0) return ret_value;
- if ((integertypes[19] = (hid_t_f)H5Tcopy(H5T_STD_B16BE)) < 0) return ret_value;
- if ((integertypes[20] = (hid_t_f)H5Tcopy(H5T_STD_B16LE)) < 0) return ret_value;
- if ((integertypes[21] = (hid_t_f)H5Tcopy(H5T_STD_B32BE)) < 0) return ret_value;
- if ((integertypes[22] = (hid_t_f)H5Tcopy(H5T_STD_B32LE)) < 0) return ret_value;
- if ((integertypes[23] = (hid_t_f)H5Tcopy(H5T_STD_B64BE)) < 0) return ret_value;
- if ((integertypes[24] = (hid_t_f)H5Tcopy(H5T_STD_B64LE)) < 0) return ret_value;
- if ((integertypes[25] = (hid_t_f)H5Tcopy(H5T_FORTRAN_S1)) < 0) return ret_value;
- if ((integertypes[26] = (hid_t_f)H5Tcopy(H5T_C_S1)) < 0) return ret_value;
-
-/*
- * Define Fortran H5T_STRING type to store non-fixed size strings
- */
- if ((c_type_id = H5Tcopy(H5T_C_S1)) < 0) return ret_value;
- if(H5Tset_size(c_type_id, H5T_VARIABLE) < 0) return ret_value;
+ if ((floatingtypes[0] = (hid_t_f)H5Tcopy(H5T_IEEE_F32BE)) < 0)
+ return ret_value;
+ if ((floatingtypes[1] = (hid_t_f)H5Tcopy(H5T_IEEE_F32LE)) < 0)
+ return ret_value;
+ if ((floatingtypes[2] = (hid_t_f)H5Tcopy(H5T_IEEE_F64BE)) < 0)
+ return ret_value;
+ if ((floatingtypes[3] = (hid_t_f)H5Tcopy(H5T_IEEE_F64LE)) < 0)
+ return ret_value;
+
+ if ((integertypes[0] = (hid_t_f)H5Tcopy(H5T_STD_I8BE)) < 0)
+ return ret_value;
+ if ((integertypes[1] = (hid_t_f)H5Tcopy(H5T_STD_I8LE)) < 0)
+ return ret_value;
+ if ((integertypes[2] = (hid_t_f)H5Tcopy(H5T_STD_I16BE)) < 0)
+ return ret_value;
+ if ((integertypes[3] = (hid_t_f)H5Tcopy(H5T_STD_I16LE)) < 0)
+ return ret_value;
+ if ((integertypes[4] = (hid_t_f)H5Tcopy(H5T_STD_I32BE)) < 0)
+ return ret_value;
+ if ((integertypes[5] = (hid_t_f)H5Tcopy(H5T_STD_I32LE)) < 0)
+ return ret_value;
+ if ((integertypes[6] = (hid_t_f)H5Tcopy(H5T_STD_I64BE)) < 0)
+ return ret_value;
+ if ((integertypes[7] = (hid_t_f)H5Tcopy(H5T_STD_I64LE)) < 0)
+ return ret_value;
+ if ((integertypes[8] = (hid_t_f)H5Tcopy(H5T_STD_U8BE)) < 0)
+ return ret_value;
+ if ((integertypes[9] = (hid_t_f)H5Tcopy(H5T_STD_U8LE)) < 0)
+ return ret_value;
+ if ((integertypes[10] = (hid_t_f)H5Tcopy(H5T_STD_U16BE)) < 0)
+ return ret_value;
+ if ((integertypes[11] = (hid_t_f)H5Tcopy(H5T_STD_U16LE)) < 0)
+ return ret_value;
+ if ((integertypes[12] = (hid_t_f)H5Tcopy(H5T_STD_U32BE)) < 0)
+ return ret_value;
+ if ((integertypes[13] = (hid_t_f)H5Tcopy(H5T_STD_U32LE)) < 0)
+ return ret_value;
+ if ((integertypes[14] = (hid_t_f)H5Tcopy(H5T_STD_U64BE)) < 0)
+ return ret_value;
+ if ((integertypes[15] = (hid_t_f)H5Tcopy(H5T_STD_U64LE)) < 0)
+ return ret_value;
+ if ((integertypes[17] = (hid_t_f)H5Tcopy(H5T_STD_B8BE)) < 0)
+ return ret_value;
+ if ((integertypes[18] = (hid_t_f)H5Tcopy(H5T_STD_B8LE)) < 0)
+ return ret_value;
+ if ((integertypes[19] = (hid_t_f)H5Tcopy(H5T_STD_B16BE)) < 0)
+ return ret_value;
+ if ((integertypes[20] = (hid_t_f)H5Tcopy(H5T_STD_B16LE)) < 0)
+ return ret_value;
+ if ((integertypes[21] = (hid_t_f)H5Tcopy(H5T_STD_B32BE)) < 0)
+ return ret_value;
+ if ((integertypes[22] = (hid_t_f)H5Tcopy(H5T_STD_B32LE)) < 0)
+ return ret_value;
+ if ((integertypes[23] = (hid_t_f)H5Tcopy(H5T_STD_B64BE)) < 0)
+ return ret_value;
+ if ((integertypes[24] = (hid_t_f)H5Tcopy(H5T_STD_B64LE)) < 0)
+ return ret_value;
+ if ((integertypes[25] = (hid_t_f)H5Tcopy(H5T_FORTRAN_S1)) < 0)
+ return ret_value;
+ if ((integertypes[26] = (hid_t_f)H5Tcopy(H5T_C_S1)) < 0)
+ return ret_value;
+
+ /*
+ * Define Fortran H5T_STRING type to store non-fixed size strings
+ */
+ if ((c_type_id = H5Tcopy(H5T_C_S1)) < 0)
+ return ret_value;
+ if (H5Tset_size(c_type_id, H5T_VARIABLE) < 0)
+ return ret_value;
integertypes[16] = c_type_id;
ret_value = 0;
@@ -287,26 +358,28 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes
* SOURCE
*/
int_f
-h5close_types_c( hid_t_f * types, int_f *lentypes,
- hid_t_f * floatingtypes, int_f* floatinglen,
- hid_t_f * integertypes, int_f * integerlen )
+h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen,
+ hid_t_f *integertypes, int_f *integerlen)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
hid_t c_type_id;
- int i;
+ int i;
for (i = 0; i < *lentypes; i++) {
- c_type_id = types[i];
- if ( H5Tclose(c_type_id) < 0) return ret_value;
+ c_type_id = types[i];
+ if (H5Tclose(c_type_id) < 0)
+ return ret_value;
}
for (i = 0; i < *floatinglen; i++) {
- c_type_id = floatingtypes[i];
- if ( H5Tclose(c_type_id) < 0) return ret_value;
+ c_type_id = floatingtypes[i];
+ if (H5Tclose(c_type_id) < 0)
+ return ret_value;
}
for (i = 0; i < *integerlen; i++) {
- c_type_id = integertypes[i];
- if ( H5Tclose(c_type_id) < 0) return ret_value;
+ c_type_id = integertypes[i];
+ if (H5Tclose(c_type_id) < 0)
+ return ret_value;
}
ret_value = 0;
return ret_value;
@@ -359,32 +432,29 @@ h5close_types_c( hid_t_f * types, int_f *lentypes,
* SOURCE
*/
int_f
-h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
- int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
- int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
- int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
- hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags,
- int_f *h5s_flags, hid_t_f *h5s_hid_flags, hsize_t_f *h5s_hsize_flags,
- int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags,
- haddr_t_f *h5_haddr_generic_flags)
+h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags,
+ int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags,
+ int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, hid_t_f *h5p_flags, int_f *h5p_flags_int,
+ int_f *h5r_flags, int_f *h5s_flags, hid_t_f *h5s_hid_flags, hsize_t_f *h5s_hsize_flags,
+ int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags, haddr_t_f *h5_haddr_generic_flags)
/******/
{
-/*
- * H5D flags
- */
+ /*
+ * H5D flags
+ */
h5d_size_flags[0] = (size_t_f)H5D_CHUNK_CACHE_NSLOTS_DEFAULT;
h5d_size_flags[1] = (size_t_f)H5D_CHUNK_CACHE_NBYTES_DEFAULT;
- h5d_flags[0] = (int_f)H5D_COMPACT;
- h5d_flags[1] = (int_f)H5D_CONTIGUOUS;
- h5d_flags[2] = (int_f)H5D_CHUNKED;
- h5d_flags[3] = (int_f)H5D_ALLOC_TIME_ERROR;
- h5d_flags[4] = (int_f)H5D_ALLOC_TIME_DEFAULT;
- h5d_flags[5] = (int_f)H5D_ALLOC_TIME_EARLY;
- h5d_flags[6] = (int_f)H5D_ALLOC_TIME_LATE;
- h5d_flags[7] = (int_f)H5D_ALLOC_TIME_INCR;
- h5d_flags[8] = (int_f)H5D_SPACE_STATUS_ERROR;
- h5d_flags[9] = (int_f)H5D_SPACE_STATUS_NOT_ALLOCATED;
+ h5d_flags[0] = (int_f)H5D_COMPACT;
+ h5d_flags[1] = (int_f)H5D_CONTIGUOUS;
+ h5d_flags[2] = (int_f)H5D_CHUNKED;
+ h5d_flags[3] = (int_f)H5D_ALLOC_TIME_ERROR;
+ h5d_flags[4] = (int_f)H5D_ALLOC_TIME_DEFAULT;
+ h5d_flags[5] = (int_f)H5D_ALLOC_TIME_EARLY;
+ h5d_flags[6] = (int_f)H5D_ALLOC_TIME_LATE;
+ h5d_flags[7] = (int_f)H5D_ALLOC_TIME_INCR;
+ h5d_flags[8] = (int_f)H5D_SPACE_STATUS_ERROR;
+ h5d_flags[9] = (int_f)H5D_SPACE_STATUS_NOT_ALLOCATED;
h5d_flags[10] = (int_f)H5D_SPACE_STATUS_PART_ALLOCATED;
h5d_flags[11] = (int_f)H5D_SPACE_STATUS_ALLOCATED;
h5d_flags[12] = (int_f)H5D_FILL_TIME_ERROR;
@@ -405,9 +475,9 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5d_flags[27] = (int_f)H5D_VDS_LAST_AVAILABLE;
h5d_flags[28] = (int_f)H5D_VIRTUAL;
-/*
- * H5E flags
- */
+ /*
+ * H5E flags
+ */
h5e_hid_flags[0] = (hid_t_f)H5E_DEFAULT;
h5e_flags[0] = (int_f)H5E_MAJOR;
@@ -415,12 +485,12 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5e_flags[2] = (int_f)H5E_WALK_UPWARD;
h5e_flags[3] = (int_f)H5E_WALK_DOWNWARD;
-/*
- * H5F flags
- *
- * Note that H5F_ACC_DEBUG is deprecated (nonfunctional) but retained
- * for backward compatibility since it's in the public API.
- */
+ /*
+ * H5F flags
+ *
+ * Note that H5F_ACC_DEBUG is deprecated (nonfunctional) but retained
+ * for backward compatibility since it's in the public API.
+ */
h5f_flags[0] = (int_f)H5F_ACC_RDWR;
h5f_flags[1] = (int_f)H5F_ACC_RDONLY;
h5f_flags[2] = (int_f)H5F_ACC_TRUNC;
@@ -428,11 +498,11 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
#ifndef H5_NO_DEPRECATED_SYMBOLS
h5f_flags[4] = (int_f)H5F_ACC_DEBUG;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
- h5f_flags[5] = (int_f)H5F_SCOPE_LOCAL;
- h5f_flags[6] = (int_f)H5F_SCOPE_GLOBAL;
- h5f_flags[7] = (int_f)H5F_CLOSE_DEFAULT;
- h5f_flags[8] = (int_f)H5F_CLOSE_WEAK;
- h5f_flags[9] = (int_f)H5F_CLOSE_SEMI;
+ h5f_flags[5] = (int_f)H5F_SCOPE_LOCAL;
+ h5f_flags[6] = (int_f)H5F_SCOPE_GLOBAL;
+ h5f_flags[7] = (int_f)H5F_CLOSE_DEFAULT;
+ h5f_flags[8] = (int_f)H5F_CLOSE_WEAK;
+ h5f_flags[9] = (int_f)H5F_CLOSE_SEMI;
h5f_flags[10] = (int_f)H5F_CLOSE_STRONG;
h5f_flags[11] = (int_f)H5F_OBJ_FILE;
h5f_flags[12] = (int_f)H5F_OBJ_DATASET;
@@ -449,24 +519,24 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5f_flags[23] = (int_f)H5F_LIBVER_V112;
h5f_flags[24] = (int_f)H5F_LIBVER_V114;
-/*
- * H5FD flags
- */
- h5fd_flags[0] = (int_f)H5FD_MPIO_INDEPENDENT;
- h5fd_flags[1] = (int_f)H5FD_MPIO_COLLECTIVE;
- h5fd_flags[2] = (int_f)H5FD_MEM_NOLIST;
- h5fd_flags[3] = (int_f)H5FD_MEM_DEFAULT;
- h5fd_flags[4] = (int_f)H5FD_MEM_SUPER;
- h5fd_flags[5] = (int_f)H5FD_MEM_BTREE;
- h5fd_flags[6] = (int_f)H5FD_MEM_DRAW;
- h5fd_flags[7] = (int_f)H5FD_MEM_GHEAP;
- h5fd_flags[8] = (int_f)H5FD_MEM_LHEAP;
- h5fd_flags[9] = (int_f)H5FD_MEM_OHDR;
+ /*
+ * H5FD flags
+ */
+ h5fd_flags[0] = (int_f)H5FD_MPIO_INDEPENDENT;
+ h5fd_flags[1] = (int_f)H5FD_MPIO_COLLECTIVE;
+ h5fd_flags[2] = (int_f)H5FD_MEM_NOLIST;
+ h5fd_flags[3] = (int_f)H5FD_MEM_DEFAULT;
+ h5fd_flags[4] = (int_f)H5FD_MEM_SUPER;
+ h5fd_flags[5] = (int_f)H5FD_MEM_BTREE;
+ h5fd_flags[6] = (int_f)H5FD_MEM_DRAW;
+ h5fd_flags[7] = (int_f)H5FD_MEM_GHEAP;
+ h5fd_flags[8] = (int_f)H5FD_MEM_LHEAP;
+ h5fd_flags[9] = (int_f)H5FD_MEM_OHDR;
h5fd_flags[10] = (int_f)H5FD_MEM_NTYPES;
-/*
- * H5FD flags of type hid_t
- */
+ /*
+ * H5FD flags of type hid_t
+ */
h5fd_hid_flags[0] = (hid_t_f)H5FD_CORE;
h5fd_hid_flags[1] = (hid_t_f)H5FD_FAMILY;
h5fd_hid_flags[2] = (hid_t_f)H5FD_LOG;
@@ -475,36 +545,36 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5fd_hid_flags[5] = (hid_t_f)H5FD_SEC2;
h5fd_hid_flags[6] = (hid_t_f)H5FD_STDIO;
-/*
- * H5G flags
- */
- h5g_flags[0] = (int_f)H5O_TYPE_UNKNOWN; /* H5G_UNKNOWN is deprecated */
- h5g_flags[1] = (int_f)H5O_TYPE_GROUP; /* H5G_GROUP is deprecated */
- h5g_flags[2] = (int_f)H5O_TYPE_DATASET; /* H5G_DATASET is deprecated */
+ /*
+ * H5G flags
+ */
+ h5g_flags[0] = (int_f)H5O_TYPE_UNKNOWN; /* H5G_UNKNOWN is deprecated */
+ h5g_flags[1] = (int_f)H5O_TYPE_GROUP; /* H5G_GROUP is deprecated */
+ h5g_flags[2] = (int_f)H5O_TYPE_DATASET; /* H5G_DATASET is deprecated */
h5g_flags[3] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* H5G_TYPE is deprecated */
h5g_flags[4] = (int_f)H5L_SAME_LOC;
h5g_flags[5] = (int_f)H5L_TYPE_ERROR;
h5g_flags[6] = (int_f)H5L_TYPE_HARD;
h5g_flags[7] = (int_f)H5L_TYPE_SOFT;
- h5g_flags[8] = (int_f)H5G_STORAGE_TYPE_UNKNOWN;
- h5g_flags[9] = (int_f)H5G_STORAGE_TYPE_SYMBOL_TABLE;
+ h5g_flags[8] = (int_f)H5G_STORAGE_TYPE_UNKNOWN;
+ h5g_flags[9] = (int_f)H5G_STORAGE_TYPE_SYMBOL_TABLE;
h5g_flags[10] = (int_f)H5G_STORAGE_TYPE_COMPACT;
h5g_flags[11] = (int_f)H5G_STORAGE_TYPE_DENSE;
-/*
- * H5I flags
- */
- h5i_flags[0] = (int_f)H5I_FILE;
- h5i_flags[1] = (int_f)H5I_GROUP;
- h5i_flags[2] = (int_f)H5I_DATATYPE;
- h5i_flags[3] = (int_f)H5I_DATASPACE;
- h5i_flags[4] = (int_f)H5I_DATASET;
- h5i_flags[5] = (int_f)H5I_ATTR;
- h5i_flags[6] = (int_f)H5I_BADID;
- h5i_flags[7] = (int_f)H5I_UNINIT;
- h5i_flags[8] = (int_f)H5I_VFL;
- h5i_flags[9] = (int_f)H5I_VOL;
+ /*
+ * H5I flags
+ */
+ h5i_flags[0] = (int_f)H5I_FILE;
+ h5i_flags[1] = (int_f)H5I_GROUP;
+ h5i_flags[2] = (int_f)H5I_DATATYPE;
+ h5i_flags[3] = (int_f)H5I_DATASPACE;
+ h5i_flags[4] = (int_f)H5I_DATASET;
+ h5i_flags[5] = (int_f)H5I_ATTR;
+ h5i_flags[6] = (int_f)H5I_BADID;
+ h5i_flags[7] = (int_f)H5I_UNINIT;
+ h5i_flags[8] = (int_f)H5I_VFL;
+ h5i_flags[9] = (int_f)H5I_VOL;
h5i_flags[10] = (int_f)H5I_GENPROP_CLS;
h5i_flags[11] = (int_f)H5I_GENPROP_LST;
h5i_flags[12] = (int_f)H5I_ERROR_CLASS;
@@ -512,94 +582,97 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5i_flags[14] = (int_f)H5I_ERROR_STACK;
h5i_flags[15] = (int_f)H5I_NTYPES;
h5i_flags[16] = (int_f)H5I_INVALID_HID;
-/*
- * H5L flags
- */
+ /*
+ * H5L flags
+ */
h5l_flags[0] = (int_f)H5L_TYPE_ERROR;
h5l_flags[1] = (int_f)H5L_TYPE_HARD;
h5l_flags[2] = (int_f)H5L_TYPE_SOFT;
h5l_flags[3] = (int_f)H5L_TYPE_EXTERNAL;
- h5l_flags[4] = (int_f)H5L_SAME_LOC; /* Macro to indicate operation occurs on same location */
+ h5l_flags[4] = (int_f)H5L_SAME_LOC; /* Macro to indicate operation occurs on same location */
h5l_flags[5] = (int_f)H5L_LINK_CLASS_T_VERS; /* Current version of the H5L_class_t struct */
-/*
- * H5O flags
- */
+ /*
+ * H5O flags
+ */
-/* Flags for object copy (H5Ocopy) */
+ /* Flags for object copy (H5Ocopy) */
h5o_flags[0] = (int_f)H5O_COPY_SHALLOW_HIERARCHY_FLAG; /* Copy only immediate members */
- h5o_flags[1] = (int_f)H5O_COPY_EXPAND_SOFT_LINK_FLAG; /* Expand soft links into new objects */
- h5o_flags[2] = (int_f)H5O_COPY_EXPAND_EXT_LINK_FLAG; /* Expand external links into new objects */
- h5o_flags[3] = (int_f)H5O_COPY_EXPAND_REFERENCE_FLAG; /* Copy objects that are pointed by references */
- h5o_flags[4] = (int_f)H5O_COPY_WITHOUT_ATTR_FLAG; /* Copy object without copying attributes */
- h5o_flags[5] = (int_f)H5O_COPY_PRESERVE_NULL_FLAG; /* Copy NULL messages (empty space) */
+ h5o_flags[1] = (int_f)H5O_COPY_EXPAND_SOFT_LINK_FLAG; /* Expand soft links into new objects */
+ h5o_flags[2] = (int_f)H5O_COPY_EXPAND_EXT_LINK_FLAG; /* Expand external links into new objects */
+ h5o_flags[3] = (int_f)H5O_COPY_EXPAND_REFERENCE_FLAG; /* Copy objects that are pointed by references */
+ h5o_flags[4] = (int_f)H5O_COPY_WITHOUT_ATTR_FLAG; /* Copy object without copying attributes */
+ h5o_flags[5] = (int_f)H5O_COPY_PRESERVE_NULL_FLAG; /* Copy NULL messages (empty space) */
h5o_flags[6] = (int_f)H5O_COPY_ALL; /* All object copying flags (for internal checking) */
-/* Flags for shared message indexes.
- * Pass these flags in using the mesg_type_flags parameter in
- * H5P_set_shared_mesg_index.
- * (Developers: These flags correspond to object header message type IDs,
- * but we need to assign each kind of message to a different bit so that
- * one index can hold multiple types.)
- */
- h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */
- h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */
- h5o_flags[9] = (int_f)H5O_SHMESG_DTYPE_FLAG; /* Datatype Message. */
- h5o_flags[10] = (int_f)H5O_SHMESG_FILL_FLAG; /* Fill Value Message. */
- h5o_flags[11] = (int_f)H5O_SHMESG_PLINE_FLAG; /* Filter pipeline message. */
- h5o_flags[12] = (int_f)H5O_SHMESG_ATTR_FLAG; /* Attribute Message. */
+ /* Flags for shared message indexes.
+ * Pass these flags in using the mesg_type_flags parameter in
+ * H5P_set_shared_mesg_index.
+ * (Developers: These flags correspond to object header message type IDs,
+ * but we need to assign each kind of message to a different bit so that
+ * one index can hold multiple types.)
+ */
+ h5o_flags[7] = (int_f)H5O_SHMESG_NONE_FLAG; /* No shared messages */
+ h5o_flags[8] = (int_f)H5O_SHMESG_SDSPACE_FLAG; /* Simple Dataspace Message. */
+ h5o_flags[9] = (int_f)H5O_SHMESG_DTYPE_FLAG; /* Datatype Message. */
+ h5o_flags[10] = (int_f)H5O_SHMESG_FILL_FLAG; /* Fill Value Message. */
+ h5o_flags[11] = (int_f)H5O_SHMESG_PLINE_FLAG; /* Filter pipeline message. */
+ h5o_flags[12] = (int_f)H5O_SHMESG_ATTR_FLAG; /* Attribute Message. */
h5o_flags[13] = (int_f)H5O_SHMESG_ALL_FLAG;
-/* Object header status flag definitions */
- h5o_flags[14] = (int_f)H5O_HDR_CHUNK0_SIZE; /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
+ /* Object header status flag definitions */
+ h5o_flags[14] = (int_f)
+ H5O_HDR_CHUNK0_SIZE; /* 2-bit field indicating # of bytes to store the size of chunk 0's data */
h5o_flags[15] = (int_f)H5O_HDR_ATTR_CRT_ORDER_TRACKED; /* Attribute creation order is tracked */
h5o_flags[16] = (int_f)H5O_HDR_ATTR_CRT_ORDER_INDEXED; /* Attribute creation order has index */
- h5o_flags[17] = (int_f)H5O_HDR_ATTR_STORE_PHASE_CHANGE; /* Non-default attribute storage phase change values stored */
- h5o_flags[18] = (int_f)H5O_HDR_STORE_TIMES; /* Store access, modification, change & birth times for object */
+ h5o_flags[17] =
+ (int_f)H5O_HDR_ATTR_STORE_PHASE_CHANGE; /* Non-default attribute storage phase change values stored */
+ h5o_flags[18] =
+ (int_f)H5O_HDR_STORE_TIMES; /* Store access, modification, change & birth times for object */
h5o_flags[19] = (int_f)H5O_HDR_ALL_FLAGS;
-/* Maximum shared message values. Number of indexes is 8 to allow room to add
- * new types of messages.
- */
+ /* Maximum shared message values. Number of indexes is 8 to allow room to add
+ * new types of messages.
+ */
h5o_flags[20] = (int_f)H5O_SHMESG_MAX_NINDEXES;
h5o_flags[21] = (int_f)H5O_SHMESG_MAX_LIST_SIZE;
-/* Types of objects in file */
- h5o_flags[22] = (int_f)H5O_TYPE_UNKNOWN; /* Unknown object type */
+ /* Types of objects in file */
+ h5o_flags[22] = (int_f)H5O_TYPE_UNKNOWN; /* Unknown object type */
h5o_flags[23] = (int_f)H5O_TYPE_GROUP; /* Object is a group */
h5o_flags[24] = (int_f)H5O_TYPE_DATASET; /* Object is a dataset */
h5o_flags[25] = (int_f)H5O_TYPE_NAMED_DATATYPE; /* Object is a named data type */
h5o_flags[26] = (int_f)H5O_TYPE_NTYPES; /* Number of different object types */
-/* Flags for H5Oget_info.
- * These flags determine which fields will be filled in in the H5O_info_t
- * struct.
- */
- h5o_flags[27] = (int_f)H5O_INFO_ALL; /* (H5O_INFO_BASIC|H5O_INFO_TIME|H5O_INFO_NUM_ATTRS) */
- h5o_flags[28] = (int_f)H5O_INFO_BASIC; /* Fill in the fileno, addr, type, and rc fields */
- h5o_flags[29] = (int_f)H5O_INFO_TIME; /* Fill in the atime, mtime, ctime, and btime fields */
+ /* Flags for H5Oget_info.
+ * These flags determine which fields will be filled in in the H5O_info_t
+ * struct.
+ */
+ h5o_flags[27] = (int_f)H5O_INFO_ALL; /* (H5O_INFO_BASIC|H5O_INFO_TIME|H5O_INFO_NUM_ATTRS) */
+ h5o_flags[28] = (int_f)H5O_INFO_BASIC; /* Fill in the fileno, addr, type, and rc fields */
+ h5o_flags[29] = (int_f)H5O_INFO_TIME; /* Fill in the atime, mtime, ctime, and btime fields */
h5o_flags[30] = (int_f)H5O_INFO_NUM_ATTRS; /* Fill in the num_attrs field */
-/* Flags for H5Oget_native_info.
- * These flags determine which fields will be filled in in the H5O_native_info_t
- * struct.
- */
+ /* Flags for H5Oget_native_info.
+ * These flags determine which fields will be filled in in the H5O_native_info_t
+ * struct.
+ */
h5o_flags[31] = (int_f)H5O_NATIVE_INFO_ALL; /* (H5O_NATIVE_INFO_HDR|H5O_NATIVE_INFO_META_SIZE) */
h5o_flags[32] = (int_f)H5O_NATIVE_INFO_HDR; /* Fill in the hdr field */
h5o_flags[33] = (int_f)H5O_NATIVE_INFO_META_SIZE; /* Fill in the meta_size field */
-/*
- * H5P flags
- */
- h5p_flags[0] = (hid_t_f)H5P_FILE_CREATE;
- h5p_flags[1] = (hid_t_f)H5P_FILE_ACCESS;
- h5p_flags[2] = (hid_t_f)H5P_DATASET_CREATE;
- h5p_flags[3] = (hid_t_f)H5P_DATASET_XFER;
- h5p_flags[4] = (hid_t_f)H5P_FILE_MOUNT;
- h5p_flags[5] = (hid_t_f)H5P_DEFAULT;
- h5p_flags[6] = (hid_t_f)H5P_ROOT;
- h5p_flags[7] = (hid_t_f)H5P_OBJECT_CREATE;
- h5p_flags[8] = (hid_t_f)H5P_DATASET_ACCESS;
- h5p_flags[9] = (hid_t_f)H5P_GROUP_CREATE;
+ /*
+ * H5P flags
+ */
+ h5p_flags[0] = (hid_t_f)H5P_FILE_CREATE;
+ h5p_flags[1] = (hid_t_f)H5P_FILE_ACCESS;
+ h5p_flags[2] = (hid_t_f)H5P_DATASET_CREATE;
+ h5p_flags[3] = (hid_t_f)H5P_DATASET_XFER;
+ h5p_flags[4] = (hid_t_f)H5P_FILE_MOUNT;
+ h5p_flags[5] = (hid_t_f)H5P_DEFAULT;
+ h5p_flags[6] = (hid_t_f)H5P_ROOT;
+ h5p_flags[7] = (hid_t_f)H5P_OBJECT_CREATE;
+ h5p_flags[8] = (hid_t_f)H5P_DATASET_ACCESS;
+ h5p_flags[9] = (hid_t_f)H5P_GROUP_CREATE;
h5p_flags[10] = (hid_t_f)H5P_GROUP_ACCESS;
h5p_flags[11] = (hid_t_f)H5P_DATATYPE_CREATE;
h5p_flags[12] = (hid_t_f)H5P_DATATYPE_ACCESS;
@@ -609,22 +682,21 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5p_flags[16] = (hid_t_f)H5P_LINK_CREATE;
h5p_flags[17] = (hid_t_f)H5P_LINK_ACCESS;
-
-/*
- * H5P integer flags
- */
+ /*
+ * H5P integer flags
+ */
h5p_flags_int[0] = (int_f)H5P_CRT_ORDER_INDEXED;
h5p_flags_int[1] = (int_f)H5P_CRT_ORDER_TRACKED;
-/*
- * H5R flags
- */
+ /*
+ * H5R flags
+ */
h5r_flags[0] = (int_f)H5R_OBJECT;
h5r_flags[1] = (int_f)H5R_DATASET_REGION;
-/*
- * H5S flags
- */
+ /*
+ * H5S flags
+ */
h5s_hid_flags[0] = (hid_t_f)H5S_ALL;
h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED;
@@ -651,19 +723,19 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5s_flags[16] = (int_f)H5S_SEL_HYPERSLABS;
h5s_flags[17] = (int_f)H5S_SEL_ALL;
-/*
- * H5T flags
- */
- h5t_flags[0] = (int_f)H5T_NO_CLASS;
- h5t_flags[1] = (int_f)H5T_INTEGER;
- h5t_flags[2] = (int_f)H5T_FLOAT;
- h5t_flags[3] = (int_f)H5T_TIME;
- h5t_flags[4] = (int_f)H5T_STRING;
- h5t_flags[5] = (int_f)H5T_BITFIELD;
- h5t_flags[6] = (int_f)H5T_OPAQUE;
- h5t_flags[7] = (int_f)H5T_COMPOUND;
- h5t_flags[8] = (int_f)H5T_REFERENCE;
- h5t_flags[9] = (int_f)H5T_ENUM;
+ /*
+ * H5T flags
+ */
+ h5t_flags[0] = (int_f)H5T_NO_CLASS;
+ h5t_flags[1] = (int_f)H5T_INTEGER;
+ h5t_flags[2] = (int_f)H5T_FLOAT;
+ h5t_flags[3] = (int_f)H5T_TIME;
+ h5t_flags[4] = (int_f)H5T_STRING;
+ h5t_flags[5] = (int_f)H5T_BITFIELD;
+ h5t_flags[6] = (int_f)H5T_OPAQUE;
+ h5t_flags[7] = (int_f)H5T_COMPOUND;
+ h5t_flags[8] = (int_f)H5T_REFERENCE;
+ h5t_flags[9] = (int_f)H5T_ENUM;
h5t_flags[10] = (int_f)H5T_ORDER_LE;
h5t_flags[11] = (int_f)H5T_ORDER_BE;
h5t_flags[12] = (int_f)H5T_ORDER_MIXED;
@@ -690,19 +762,19 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5t_flags[33] = (int_f)H5T_DIR_ASCEND;
h5t_flags[34] = (int_f)H5T_DIR_DESCEND;
-/*
- * H5Z flags
- */
- h5z_flags[0] = (int_f)H5Z_FILTER_ERROR;
- h5z_flags[1] = (int_f)H5Z_FILTER_NONE;
- h5z_flags[2] = (int_f)H5Z_FILTER_DEFLATE;
- h5z_flags[3] = (int_f)H5Z_FILTER_SHUFFLE;
- h5z_flags[4] = (int_f)H5Z_FILTER_FLETCHER32;
- h5z_flags[5] = (int_f)H5Z_ERROR_EDC;
- h5z_flags[6] = (int_f)H5Z_DISABLE_EDC;
- h5z_flags[7] = (int_f)H5Z_ENABLE_EDC;
- h5z_flags[8] = (int_f)H5Z_NO_EDC;
- h5z_flags[9] = (int_f)H5Z_FILTER_SZIP;
+ /*
+ * H5Z flags
+ */
+ h5z_flags[0] = (int_f)H5Z_FILTER_ERROR;
+ h5z_flags[1] = (int_f)H5Z_FILTER_NONE;
+ h5z_flags[2] = (int_f)H5Z_FILTER_DEFLATE;
+ h5z_flags[3] = (int_f)H5Z_FILTER_SHUFFLE;
+ h5z_flags[4] = (int_f)H5Z_FILTER_FLETCHER32;
+ h5z_flags[5] = (int_f)H5Z_ERROR_EDC;
+ h5z_flags[6] = (int_f)H5Z_DISABLE_EDC;
+ h5z_flags[7] = (int_f)H5Z_ENABLE_EDC;
+ h5z_flags[8] = (int_f)H5Z_NO_EDC;
+ h5z_flags[9] = (int_f)H5Z_FILTER_SZIP;
h5z_flags[10] = (int_f)H5Z_FLAG_OPTIONAL;
h5z_flags[11] = (int_f)H5Z_FILTER_CONFIG_ENCODE_ENABLED;
h5z_flags[12] = (int_f)H5Z_FILTER_CONFIG_DECODE_ENABLED;
@@ -714,9 +786,9 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5z_flags[18] = (int_f)H5Z_SO_INT;
h5z_flags[19] = (int_f)H5Z_SO_INT_MINBITS_DEFAULT;
-/*
- * H5 Generic flags introduced in version 1.8
- */
+ /*
+ * H5 Generic flags introduced in version 1.8
+ */
/* H5_index_t enum struct */
@@ -725,14 +797,13 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5_generic_flags[2] = (int_f)H5_INDEX_CRT_ORDER; /* Index on creation order */
h5_generic_flags[3] = (int_f)H5_INDEX_N; /* Index on creation order */
-
/* H5_iter_order_t enum struct */
- h5_generic_flags[4] = (int_f)H5_ITER_UNKNOWN; /* Unknown order */
- h5_generic_flags[5] = (int_f)H5_ITER_INC; /* Increasing order */
- h5_generic_flags[6] = (int_f)H5_ITER_DEC; /* Decreasing order */
- h5_generic_flags[7] = (int_f)H5_ITER_NATIVE; /* No particular order, whatever is fastest */
- h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
+ h5_generic_flags[4] = (int_f)H5_ITER_UNKNOWN; /* Unknown order */
+ h5_generic_flags[5] = (int_f)H5_ITER_INC; /* Increasing order */
+ h5_generic_flags[6] = (int_f)H5_ITER_DEC; /* Decreasing order */
+ h5_generic_flags[7] = (int_f)H5_ITER_NATIVE; /* No particular order, whatever is fastest */
+ h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
h5_haddr_generic_flags[0] = (haddr_t_f)HADDR_UNDEF; /* undefined address */
@@ -743,12 +814,12 @@ int_f
h5init1_flags_c(int_f *h5lib_flags)
/******/
{
- int ret_value = -1;
- unsigned prm_1 = H5_SZIP_EC_OPTION_MASK;
- unsigned prm_2 = H5_SZIP_NN_OPTION_MASK;
- h5lib_flags[0] = (int_f)prm_1;
- h5lib_flags[1] = (int_f)prm_2;
- ret_value = 0;
+ int ret_value = -1;
+ unsigned prm_1 = H5_SZIP_EC_OPTION_MASK;
+ unsigned prm_2 = H5_SZIP_NN_OPTION_MASK;
+ h5lib_flags[0] = (int_f)prm_1;
+ h5lib_flags[1] = (int_f)prm_2;
+ ret_value = 0;
return ret_value;
}
@@ -771,7 +842,8 @@ h5open_c(void)
{
int ret_value = -1;
- if (H5open() < 0) return ret_value;
+ if (H5open() < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
@@ -792,7 +864,8 @@ h5close_c(void)
{
int ret_value = -1;
- if (H5close() < 0) return ret_value;
+ if (H5close() < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
@@ -824,14 +897,15 @@ h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
unsigned c_majnum, c_minnum, c_relnum;
- if (H5get_libversion(&c_majnum, &c_minnum, &c_relnum) < 0) return ret_value;
+ if (H5get_libversion(&c_majnum, &c_minnum, &c_relnum) < 0)
+ return ret_value;
- *majnum = (int_f)c_majnum;
- *minnum = (int_f)c_minnum;
- *relnum = (int_f)c_relnum;
+ *majnum = (int_f)c_majnum;
+ *minnum = (int_f)c_minnum;
+ *relnum = (int_f)c_relnum;
ret_value = 0;
return ret_value;
}
@@ -861,12 +935,12 @@ int_f
h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum)
/******/
{
- int ret_value = -1;
+ int ret_value = -1;
unsigned c_majnum, c_minnum, c_relnum;
- c_majnum = (unsigned) *majnum;
- c_minnum = (unsigned) *minnum;
- c_relnum = (unsigned) *relnum;
+ c_majnum = (unsigned)*majnum;
+ c_minnum = (unsigned)*minnum;
+ c_relnum = (unsigned)*relnum;
H5check_version(c_majnum, c_minnum, c_relnum);
@@ -892,7 +966,8 @@ h5garbage_collect_c(void)
{
int ret_value = -1;
- if (H5garbage_collect() < 0) return ret_value;
+ if (H5garbage_collect() < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
@@ -915,8 +990,8 @@ h5dont_atexit_c(void)
{
int ret_value = -1;
- if (H5dont_atexit() < 0) return ret_value;
+ if (H5dont_atexit() < 0)
+ return ret_value;
ret_value = 0;
return ret_value;
}
-
diff --git a/fortran/src/H5f90.h b/fortran/src/H5f90.h
index 655cb9b..373f3d9 100644
--- a/fortran/src/H5f90.h
+++ b/fortran/src/H5f90.h
@@ -11,7 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#ifndef _H5f90_H
#define _H5f90_H
@@ -21,12 +20,11 @@
#include "H5f90proto.h"
/* Constants used in H5Rff.F90 and H5Rf.c files */
-#define REF_REG_BUF_LEN_F 3
+#define REF_REG_BUF_LEN_F 3
/* Constants used in H5Gf.c files */
#define OBJECT_NAMELEN_DEFAULT_F -1
-#define H5_MAX(a,b) (((a)>(b)) ? (a) : (b))
+#define H5_MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif /* _H5f90_H */
-
diff --git a/fortran/src/H5f90i.h b/fortran/src/H5f90i.h
index 057edc5..71ce77f 100644
--- a/fortran/src/H5f90i.h
+++ b/fortran/src/H5f90i.h
@@ -11,7 +11,6 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#ifndef _H5f90i_H
#define _H5f90i_H
@@ -25,7 +24,7 @@
*/
#define _fcdtocp(desc) (desc)
-#if (defined (UNICOS) || defined (_UNICOS)) && !defined(__crayx1)
+#if (defined(UNICOS) || defined(_UNICOS)) && !defined(__crayx1)
#include <fortran.h>
@@ -33,7 +32,7 @@
#else
-typedef char *_fcd;
+typedef char *_fcd;
#endif
diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c
index 6e8c793..458bcd1 100644
--- a/fortran/src/H5f90kit.c
+++ b/fortran/src/H5f90kit.c
@@ -20,7 +20,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include <ctype.h>
#include <stddef.h>
@@ -45,17 +45,17 @@ char *
HD5f2cstring(_fcd fdesc, size_t len)
/******/
{
- char *cstr; /* C string to return */
- char *str; /* Pointer to FORTRAN string */
- int i; /* Local index variable */
+ char *cstr; /* C string to return */
+ char *str; /* Pointer to FORTRAN string */
+ int i; /* Local index variable */
/* Search for the end of the string */
str = _fcdtocp(fdesc);
- for(i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--)
+ for (i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--)
/*EMPTY*/;
/* Allocate C string */
- if(NULL == (cstr = (char *)HDmalloc((size_t)(i + 2))))
+ if (NULL == (cstr = (char *)HDmalloc((size_t)(i + 2))))
return NULL;
/* Copy text from FORTRAN to C string */
@@ -65,7 +65,7 @@ HD5f2cstring(_fcd fdesc, size_t len)
cstr[i + 1] = '\0';
return cstr;
-} /* HD5f2cstring */
+} /* HD5f2cstring */
/****if* H5f90kit/HD5packFstring
* NAME
@@ -91,15 +91,14 @@ void
HD5packFstring(char *src, char *dest, size_t dst_len)
/******/
{
- size_t src_len=HDstrlen(src);
+ size_t src_len = HDstrlen(src);
/* Copy over the string information, up to the length of the src */
/* (Don't copy the NUL terminator from the C string to the FORTRAN string */
- HDmemcpy(dest,src,MIN(src_len,dst_len));
+ HDmemcpy(dest, src, MIN(src_len, dst_len));
/* Pad out any remaining space in the FORTRAN string with ' 's */
- if(src_len<dst_len)
- HDmemset(&dest[src_len],' ',dst_len-src_len);
-
-} /* HD5packFstring */
+ if (src_len < dst_len)
+ HDmemset(&dest[src_len], ' ', dst_len - src_len);
+} /* HD5packFstring */
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 695efcd..74eb54e 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -11,76 +11,75 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
#ifndef _H5f90proto_H
#define _H5f90proto_H
#include "H5public.h"
#include "H5f90.h"
-H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len);
-H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
-
+H5_FCDLL char *HD5f2cstring(_fcd fdesc, size_t len);
+H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
/*
* Storage info struct used by H5O_info_t and H5F_info_t
* interoperable with Fortran.
*/
typedef struct H5_ih_info_t_f {
- hsize_t index_size; /* btree and/or list */
- hsize_t heap_size;
+ hsize_t index_size; /* btree and/or list */
+ hsize_t heap_size;
} H5_ih_info_t_f;
/* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
* interoperable with Fortran.
*/
typedef struct H5O_hdr_info_t_f {
- int_f version; /* Version number of header format in file */
- int_f nmesgs; /* Number of object header messages */
- int_f nchunks; /* Number of object header chunks */
- int_f flags; /* Object header status flags */
+ int_f version; /* Version number of header format in file */
+ int_f nmesgs; /* Number of object header messages */
+ int_f nchunks; /* Number of object header chunks */
+ int_f flags; /* Object header status flags */
struct {
- hsize_t total; /* Total space for storing object header in file */
- hsize_t meta; /* Space within header for object header metadata information */
- hsize_t mesg; /* Space within header for actual message information */
- hsize_t free; /* Free space within object header */
+ hsize_t total; /* Total space for storing object header in file */
+ hsize_t meta; /* Space within header for object header metadata information */
+ hsize_t mesg; /* Space within header for actual message information */
+ hsize_t free; /* Free space within object header */
} space;
struct {
- uint64_t present; /* Flags to indicate presence of message type in header */
- uint64_t shared; /* Flags to indicate message type is shared in header */
+ uint64_t present; /* Flags to indicate presence of message type in header */
+ uint64_t shared; /* Flags to indicate message type is shared in header */
} mesg;
} H5O_hdr_info_t_f;
/* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx)
*/
typedef struct H5O_info_t_f {
- unsigned long fileno; /* File number that object is located in */
- H5O_token_t token; /* Token of object in file */
- int type; /* Basic object type (group, dataset, etc.) */
- int_f rc; /* Reference count of object */
- int_f atime[8]; /* Access time */
- int_f mtime[8]; /* Modification time */
- int_f ctime[8]; /* Change time */
- int_f btime[8]; /* Birth time */
- hsize_t num_attrs; /* # of attributes attached to object */
+ unsigned long fileno; /* File number that object is located in */
+ H5O_token_t token; /* Token of object in file */
+ int type; /* Basic object type (group, dataset, etc.) */
+ int_f rc; /* Reference count of object */
+ int_f atime[8]; /* Access time */
+ int_f mtime[8]; /* Modification time */
+ int_f ctime[8]; /* Change time */
+ int_f btime[8]; /* Birth time */
+ hsize_t num_attrs; /* # of attributes attached to object */
} H5O_info_t_f;
-/* Information struct for native object (for H5Oget_native_info/H5Oget_native_info_by_name/H5Oget_native_info_by_idx)
+/* Information struct for native object (for
+ * H5Oget_native_info/H5Oget_native_info_by_name/H5Oget_native_info_by_idx)
*/
typedef struct H5O_native_info_t_f {
- H5O_hdr_info_t_f hdr; /* Object header information */
+ H5O_hdr_info_t_f hdr; /* Object header information */
/* Extra metadata storage for obj & attributes */
struct {
- H5_ih_info_t_f obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
- H5_ih_info_t_f attr; /* v2 B-tree & heap for attributes */
+ H5_ih_info_t_f obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */
+ H5_ih_info_t_f attr; /* v2 B-tree & heap for attributes */
} meta_size;
} H5O_native_info_t_f;
-
/*
* Functions from H5Ff.c
*/
-H5_FCDLL int_f h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp, hid_t_f *file_id);
+H5_FCDLL int_f h5fcreate_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *crt_prp, hid_t_f *acc_prp,
+ hid_t_f *file_id);
H5_FCDLL int_f h5fopen_c(_fcd name, int_f *namelen, int_f *access_flags, hid_t_f *acc_prp, hid_t_f *file_id);
H5_FCDLL int_f h5fclose_c(hid_t_f *file_id);
H5_FCDLL int_f h5fmount_c(hid_t_f *loc_id, _fcd dsetname, int_f *namelen, hid_t_f *file_id, hid_t_f *acc_prp);
@@ -89,7 +88,8 @@ H5_FCDLL int_f h5freopen_c(hid_t_f *file_id1, hid_t_f *file_id2);
H5_FCDLL int_f h5fget_create_plist_c(hid_t_f *file_id, hid_t_f *prop_id);
H5_FCDLL int_f h5fget_access_plist_c(hid_t_f *file_id, hid_t_f *access_id);
H5_FCDLL int_f h5fget_obj_count_c(hid_t_f *file_id, int_f *obj_type, size_t_f *obj_count);
-H5_FCDLL int_f h5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids, size_t_f *num_objs);
+H5_FCDLL int_f h5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids,
+ size_t_f *num_objs);
H5_FCDLL int_f h5fget_freespace_c(hid_t_f *file_id, hssize_t_f *free_space);
H5_FCDLL int_f h5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *buf_len, size_t_f *buf_req);
H5_FCDLL int_f h5fflush_c(hid_t_f *obj_id, int_f *scope);
@@ -100,97 +100,124 @@ H5_FCDLL int_f h5fget_fileno_c(hid_t_f *file_id, int_f *fileno);
/*
* Functions from H5Sf.c
*/
-H5_FCDLL int_f h5screate_simple_c( int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id );
-H5_FCDLL int_f h5sclose_c( hid_t_f *space_id );
-H5_FCDLL int_f h5screate_c( int_f *classtype, hid_t_f *space_id );
-H5_FCDLL int_f h5scopy_c( hid_t_f *space_id , hid_t_f *new_space_id);
-H5_FCDLL int_f h5sget_select_hyper_nblocks_c( hid_t_f *space_id , hssize_t_f * num_blocks);
-H5_FCDLL int_f h5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock, hsize_t_f * num_blocks, hsize_t_f * buf);
-H5_FCDLL int_f h5sget_select_bounds_c( hid_t_f *space_id , hsize_t_f * start, hsize_t_f * end);
-H5_FCDLL int_f h5sget_select_elem_npoints_c( hid_t_f *space_id , hssize_t_f * num_points);
-H5_FCDLL int_f h5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint, hsize_t_f * numpoints, hsize_t_f * buf);
-H5_FCDLL int_f h5sselect_all_c( hid_t_f *space_id );
-H5_FCDLL int_f h5sselect_none_c( hid_t_f *space_id );
-H5_FCDLL int_f h5sselect_valid_c( hid_t_f *space_id , int_f *flag );
-H5_FCDLL int_f h5sget_simple_extent_npoints_c( hid_t_f *space_id , hsize_t_f *npoints );
-H5_FCDLL int_f h5sget_select_npoints_c( hid_t_f *space_id , hssize_t_f *npoints );
-H5_FCDLL int_f h5sget_simple_extent_ndims_c( hid_t_f *space_id , int_f *ndims );
-H5_FCDLL int_f h5sget_simple_extent_type_c( hid_t_f *space_id , int_f *classtype);
-H5_FCDLL int_f h5soffset_simple_c( hid_t_f *space_id , hssize_t_f *offset);
-H5_FCDLL int_f h5sset_extent_simple_c( hid_t_f *space_id , int_f *rank, hsize_t_f * current_size, hsize_t_f *maximum_size);
-H5_FCDLL int_f h5sis_simple_c( hid_t_f *space_id , int_f *flag );
-H5_FCDLL int_f h5sget_simple_extent_dims_c( hid_t_f *space_id , hsize_t_f *dims, hsize_t_f *maxdims);
-H5_FCDLL int_f h5sextent_copy_c( hid_t_f *dest_space_id , hid_t_f *source_space_id);
-H5_FCDLL int_f h5sset_extent_none_c( hid_t_f *space_id );
-H5_FCDLL int_f h5sselect_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);
-H5_FCDLL int_f h5sget_select_type_c( hid_t_f *space_id , int_f *op);
-H5_FCDLL int_f h5sselect_elements_c( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord);
-H5_FCDLL int_f h5scombine_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, hid_t_f *hyper_id);
-H5_FCDLL int_f h5scombine_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id);
-H5_FCDLL int_f h5smodify_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id);
-H5_FCDLL int_f h5sdecode_c( _fcd buf, hid_t_f *obj_id );
-H5_FCDLL int_f h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id );
-H5_FCDLL int_f h5sextent_equal_c( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal);
+H5_FCDLL int_f h5screate_simple_c(int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *space_id);
+H5_FCDLL int_f h5sclose_c(hid_t_f *space_id);
+H5_FCDLL int_f h5screate_c(int_f *classtype, hid_t_f *space_id);
+H5_FCDLL int_f h5scopy_c(hid_t_f *space_id, hid_t_f *new_space_id);
+H5_FCDLL int_f h5sget_select_hyper_nblocks_c(hid_t_f *space_id, hssize_t_f *num_blocks);
+H5_FCDLL int_f h5sget_select_hyper_blocklist_c(hid_t_f *space_id, hsize_t_f *startblock,
+ hsize_t_f *num_blocks, hsize_t_f *buf);
+H5_FCDLL int_f h5sget_select_bounds_c(hid_t_f *space_id, hsize_t_f *start, hsize_t_f *end);
+H5_FCDLL int_f h5sget_select_elem_npoints_c(hid_t_f *space_id, hssize_t_f *num_points);
+H5_FCDLL int_f h5sget_select_elem_pointlist_c(hid_t_f *space_id, hsize_t_f *startpoint, hsize_t_f *numpoints,
+ hsize_t_f *buf);
+H5_FCDLL int_f h5sselect_all_c(hid_t_f *space_id);
+H5_FCDLL int_f h5sselect_none_c(hid_t_f *space_id);
+H5_FCDLL int_f h5sselect_valid_c(hid_t_f *space_id, int_f *flag);
+H5_FCDLL int_f h5sget_simple_extent_npoints_c(hid_t_f *space_id, hsize_t_f *npoints);
+H5_FCDLL int_f h5sget_select_npoints_c(hid_t_f *space_id, hssize_t_f *npoints);
+H5_FCDLL int_f h5sget_simple_extent_ndims_c(hid_t_f *space_id, int_f *ndims);
+H5_FCDLL int_f h5sget_simple_extent_type_c(hid_t_f *space_id, int_f *classtype);
+H5_FCDLL int_f h5soffset_simple_c(hid_t_f *space_id, hssize_t_f *offset);
+H5_FCDLL int_f h5sset_extent_simple_c(hid_t_f *space_id, int_f *rank, hsize_t_f *current_size,
+ hsize_t_f *maximum_size);
+H5_FCDLL int_f h5sis_simple_c(hid_t_f *space_id, int_f *flag);
+H5_FCDLL int_f h5sget_simple_extent_dims_c(hid_t_f *space_id, hsize_t_f *dims, hsize_t_f *maxdims);
+H5_FCDLL int_f h5sextent_copy_c(hid_t_f *dest_space_id, hid_t_f *source_space_id);
+H5_FCDLL int_f h5sset_extent_none_c(hid_t_f *space_id);
+H5_FCDLL int_f h5sselect_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);
+H5_FCDLL int_f h5sget_select_type_c(hid_t_f *space_id, int_f *op);
+H5_FCDLL int_f h5sselect_elements_c(hid_t_f *space_id, int_f *op, size_t_f *nelements, hsize_t_f *coord);
+H5_FCDLL int_f h5scombine_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, hid_t_f *hyper_id);
+H5_FCDLL int_f h5scombine_select_c(hid_t_f *space1_id, int_f *op, hid_t_f *space2_id, hid_t_f *ds_id);
+H5_FCDLL int_f h5smodify_select_c(hid_t_f *space1_id, int_f *op, hid_t_f *space2_id);
+H5_FCDLL int_f h5sdecode_c(_fcd buf, hid_t_f *obj_id);
+H5_FCDLL int_f h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id);
+H5_FCDLL int_f h5sextent_equal_c(hid_t_f *space1_id, hid_t_f *space2_id, hid_t_f *c_equal);
/*
* Functions from H5Df.c
*/
H5_FCDLL int_f h5dcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
- hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id);
+ hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id);
H5_FCDLL int_f h5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id);
-H5_FCDLL int_f h5dclose_c( hid_t_f *dset_id );
+H5_FCDLL int_f h5dclose_c(hid_t_f *dset_id);
-H5_FCDLL int_f h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims);
-H5_FCDLL int_f h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims, size_t_f *len);
-H5_FCDLL int_f h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id, hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f * buf, hsize_t_f *dims);
+H5_FCDLL int_f h5dwrite_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f h5dwrite_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f h5dwrite_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f h5dwrite_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims);
+H5_FCDLL int_f h5dread_vl_integer_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f h5dread_vl_real_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, real_f *buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f h5dread_vl_string_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, _fcd buf, hsize_t_f *dims,
+ size_t_f *len);
+H5_FCDLL int_f h5dread_ref_reg_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, int_f *buf, hsize_t_f *dims);
H5_FCDLL int_f h5dget_access_plist_c(hid_t_f *dset_id, hid_t_f *plist_id);
-H5_FCDLL int_f h5dget_space_c( hid_t_f *dset_id , hid_t_f *space_id);
-H5_FCDLL int_f h5dget_type_c( hid_t_f *dset_id , hid_t_f *type_id);
-H5_FCDLL int_f h5dget_create_plist_c( hid_t_f *dset_id , hid_t_f *plist_id);
-H5_FCDLL int_f h5dset_extent_c( hid_t_f *dset_id , hsize_t_f *dims);
+H5_FCDLL int_f h5dget_space_c(hid_t_f *dset_id, hid_t_f *space_id);
+H5_FCDLL int_f h5dget_type_c(hid_t_f *dset_id, hid_t_f *type_id);
+H5_FCDLL int_f h5dget_create_plist_c(hid_t_f *dset_id, hid_t_f *plist_id);
+H5_FCDLL int_f h5dset_extent_c(hid_t_f *dset_id, hsize_t_f *dims);
H5_FCDLL int_f h5dvlen_get_max_len_c(hid_t_f *dataset_id, hid_t_f *type_id, hid_t_f *space_id, size_t_f *len);
H5_FCDLL int_f h5dget_storage_size_c(hid_t_f *dataset_id, hsize_t_f *size);
-H5_FCDLL int_f h5dfill_c(void * fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void * buf, hid_t_f *mem_type_id);
-H5_FCDLL int_f h5dget_space_status_c( hid_t_f *dset_id, int_f *flag);
-H5_FCDLL int_f h5dcreate_anon_c(hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id,
- hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id);
+H5_FCDLL int_f h5dfill_c(void *fill_value, hid_t_f *fill_type_id, hid_t_f *space_id, void *buf,
+ hid_t_f *mem_type_id);
+H5_FCDLL int_f h5dget_space_status_c(hid_t_f *dset_id, int_f *flag);
+H5_FCDLL int_f h5dcreate_anon_c(hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *dcpl_id,
+ hid_t_f *dapl_id, hid_t_f *dset_id);
H5_FCDLL int_f h5dwrite_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
- hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf);
-H5_FCDLL int_f h5dread_f_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_space_id,
- hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf);
-H5_FCDLL int_f h5dvlen_reclaim_c(hid_t_f *type_id , hid_t_f *space_id, hid_t_f *plist_id, void *buf);
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf);
+H5_FCDLL int_f h5dread_f_c(hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space_id,
+ hid_t_f *file_space_id, hid_t_f *xfer_prp, void *buf);
+H5_FCDLL int_f h5dvlen_reclaim_c(hid_t_f *type_id, hid_t_f *space_id, hid_t_f *plist_id, void *buf);
/*
* Functions from H5Gf.c
*/
-H5_FCDLL int_f h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id,
- hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id);
+H5_FCDLL int_f h5gcreate_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, hid_t_f *grp_id,
+ hid_t_f *lcpl_id, hid_t_f *gcpl_id, hid_t_f *gapl_id);
H5_FCDLL int_f h5gopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *gapl_id, hid_t_f *grp_id);
-H5_FCDLL int_f h5gclose_c( hid_t_f *grp_id );
-H5_FCDLL int_f h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name, int_f *obj_namelen, int_f *obj_type);
+H5_FCDLL int_f h5gclose_c(hid_t_f *grp_id);
+H5_FCDLL int_f h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx, _fcd obj_name,
+ int_f *obj_namelen, int_f *obj_type);
H5_FCDLL int_f h5gn_members_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers);
-H5_FCDLL int_f h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen, _fcd new_name, int_f *new_namelen);
-H5_FCDLL int_f h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type, hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen);
+H5_FCDLL int_f h5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_namelen,
+ _fcd new_name, int_f *new_namelen);
+H5_FCDLL int_f h5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen, int_f *link_type,
+ hid_t_f *new_loc_id, _fcd new_name, int_f *new_namelen);
H5_FCDLL int_f h5gunlink_c(hid_t_f *loc_id, _fcd name, int_f *namelen);
-H5_FCDLL int_f h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, int_f *dst_namelen);
-H5_FCDLL int_f h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,_fcd dst_name, int_f *dst_namelen);
-H5_FCDLL int_f h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value );
+H5_FCDLL int_f h5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name,
+ int_f *dst_namelen);
+H5_FCDLL int_f h5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst_loc_id,
+ _fcd dst_name, int_f *dst_namelen);
+H5_FCDLL int_f h5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _fcd value);
H5_FCDLL int_f h5gset_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, _fcd comment, int_f *commentlen);
H5_FCDLL int_f h5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, _fcd comment);
H5_FCDLL int_f h5gcreate_anon_c(hid_t_f *loc_id, hid_t_f *gcpl_id, hid_t_f *gapl_id, hid_t_f *grp_id);
-H5_FCDLL int_f h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id );
-H5_FCDLL int_f h5gget_info_c(hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted);
+H5_FCDLL int_f h5gget_create_plist_c(hid_t_f *grp_id, hid_t_f *gcpl_id);
+H5_FCDLL int_f h5gget_info_c(hid_t_f *group_id, int_f *storage_type, int_f *nlinks, int_f *max_corder,
+ int_f *mounted);
H5_FCDLL int_f h5gget_info_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 *lapl_id,
- int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted);
-H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, hid_t_f *lapl_id,
- int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted);
+ int_f *index_type, int_f *order, hsize_t_f *n, hid_t_f *lapl_id,
+ int_f *storage_type, int_f *nlinks, int_f *max_corder, int_f *mounted);
+H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
+ hid_t_f *lapl_id, int_f *storage_type, int_f *nlinks, int_f *max_corder,
+ int_f *mounted);
/*
* Functions from H5Af.c
@@ -198,212 +225,228 @@ H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f
H5_FCDLL int_f h5awrite_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf);
H5_FCDLL int_f h5aread_f_c(hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf);
-H5_FCDLL int_f h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id,
- hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id);
+H5_FCDLL int_f h5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *crt_prp, hid_t_f *aapl, hid_t_f *attr_id);
H5_FCDLL int_f h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen);
H5_FCDLL int_f h5aget_num_attrs_c(hid_t_f *obj_id, int_f *attr_num);
H5_FCDLL int_f h5aget_name_c(hid_t_f *attr_id, size_t_f *size, _fcd buf);
-H5_FCDLL int_f h5arename_by_name_c( hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd old_attr_name, size_t_f *old_attr_namelen,
- _fcd new_attr_name, size_t_f *new_attr_namelen,
- hid_t_f *lapl_id );
-H5_FCDLL int_f h5aopen_c( hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *aapl_id, hid_t_f *attr_id);
-H5_FCDLL int_f h5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id);
-H5_FCDLL int_f h5adelete_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);
-H5_FCDLL int_f h5aget_name_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, _fcd name,
- size_t_f *size, hid_t_f *lapl_id);
-H5_FCDLL int_f h5aopen_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);
-H5_FCDLL int_f h5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size );
-H5_FCDLL int_f h5aget_info_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,
- int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size );
-H5_FCDLL int_f h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *lapl_id,
- int_f *corder_valid, int_f *corder,
- int_f *cset, hsize_t_f *data_size );
-H5_FCDLL int_f h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
- _fcd attr_name, size_t_f *attr_namelen, hid_t_f *type_id,
- hid_t_f *space_id, hid_t_f *acpl_id, hid_t_f *aapl_id,
- hid_t_f *lapl_id, hid_t_f *attr_id );
+H5_FCDLL int_f h5arename_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd old_attr_name,
+ size_t_f *old_attr_namelen, _fcd new_attr_name, size_t_f *new_attr_namelen,
+ hid_t_f *lapl_id);
+H5_FCDLL int_f h5aopen_c(hid_t_f *obj_id, _fcd attr_name, size_t_f *attr_namelen, hid_t_f *aapl_id,
+ hid_t_f *attr_id);
+H5_FCDLL int_f h5adelete_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id);
+H5_FCDLL int_f h5adelete_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);
+H5_FCDLL int_f h5aget_name_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, _fcd name, size_t_f *size, hid_t_f *lapl_id);
+H5_FCDLL int_f h5aopen_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);
+H5_FCDLL int_f h5aget_info_c(hid_t_f *loc_id, int_f *corder_valid, int_f *corder, int_f *cset,
+ hsize_t_f *data_size);
+H5_FCDLL int_f h5aget_info_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, int_f *corder_valid,
+ int_f *corder, int_f *cset, hsize_t_f *data_size);
+H5_FCDLL int_f h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *corder_valid,
+ int_f *corder, int_f *cset, hsize_t_f *data_size);
+H5_FCDLL int_f h5acreate_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *acpl_id, hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id);
H5_FCDLL int_f h5aexists_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *attr_exists);
-H5_FCDLL int_f h5aexists_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *lapl_id, int_f *attr_exists);
-H5_FCDLL int_f h5aopen_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name, size_t_f *attr_namelen,
- hid_t_f *aapl_id, hid_t_f *lapl_id, hid_t_f *attr_id);
-H5_FCDLL int_f h5arename_c( hid_t_f *loc_id,
- _fcd old_attr_name, size_t_f *old_attr_namelen,
- _fcd new_attr_name, size_t_f *new_attr_namelen);
+H5_FCDLL int_f h5aexists_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *lapl_id, int_f *attr_exists);
+H5_FCDLL int_f h5aopen_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fcd attr_name,
+ size_t_f *attr_namelen, hid_t_f *aapl_id, hid_t_f *lapl_id,
+ hid_t_f *attr_id);
+H5_FCDLL int_f h5arename_c(hid_t_f *loc_id, _fcd old_attr_name, size_t_f *old_attr_namelen,
+ _fcd new_attr_name, size_t_f *new_attr_namelen);
/*
* Functions form H5Tf.c file
*/
H5_FCDLL int_f h5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id);
-H5_FCDLL int_f h5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id );
-H5_FCDLL int_f h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id, hid_t_f *tcpl_id, hid_t_f *tapl_id);
-H5_FCDLL int_f h5tclose_c( hid_t_f *type_id );
-H5_FCDLL int_f h5tequal_c( hid_t_f *type1_id , hid_t_f *type2_id, int_f *c_flag);
-H5_FCDLL int_f h5tcopy_c( hid_t_f *type_id , hid_t_f *new_type_id);
-H5_FCDLL int_f h5tget_class_c( hid_t_f *type_id , int_f *classtype);
-H5_FCDLL int_f h5tget_order_c( hid_t_f *type_id , int_f *order);
-H5_FCDLL int_f h5tset_order_c( hid_t_f *type_id , int_f *order);
-H5_FCDLL int_f h5tget_size_c( hid_t_f *type_id , size_t_f *size);
-H5_FCDLL int_f h5tset_size_c( hid_t_f *type_id , size_t_f *size);
+H5_FCDLL int_f h5topen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *tapl_id);
+H5_FCDLL int_f h5tcommit_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *lcpl_id,
+ hid_t_f *tcpl_id, hid_t_f *tapl_id);
+H5_FCDLL int_f h5tclose_c(hid_t_f *type_id);
+H5_FCDLL int_f h5tequal_c(hid_t_f *type1_id, hid_t_f *type2_id, int_f *c_flag);
+H5_FCDLL int_f h5tcopy_c(hid_t_f *type_id, hid_t_f *new_type_id);
+H5_FCDLL int_f h5tget_class_c(hid_t_f *type_id, int_f *classtype);
+H5_FCDLL int_f h5tget_order_c(hid_t_f *type_id, int_f *order);
+H5_FCDLL int_f h5tset_order_c(hid_t_f *type_id, int_f *order);
+H5_FCDLL int_f h5tget_size_c(hid_t_f *type_id, size_t_f *size);
+H5_FCDLL int_f h5tset_size_c(hid_t_f *type_id, size_t_f *size);
H5_FCDLL int_f h5tcommitted_c(hid_t_f *dtype_id);
-H5_FCDLL int_f h5tget_precision_c( hid_t_f *type_id , size_t_f *precision);
-H5_FCDLL int_f h5tset_precision_c( hid_t_f *type_id , size_t_f *precision);
-H5_FCDLL int_f h5tget_offset_c( hid_t_f *type_id , size_t_f *offset);
-H5_FCDLL int_f h5tset_offset_c( hid_t_f *type_id , size_t_f *offset);
-H5_FCDLL int_f h5tget_pad_c( hid_t_f *type_id , int_f * lsbpad, int_f * msbpad);
-H5_FCDLL int_f h5tset_pad_c( hid_t_f *type_id, int_f * lsbpad, int_f * msbpad );
-H5_FCDLL int_f h5tget_sign_c( hid_t_f *type_id , int_f* sign);
-H5_FCDLL int_f h5tset_sign_c( hid_t_f *type_id , int_f *sign);
-H5_FCDLL int_f h5tget_fields_c( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize);
-H5_FCDLL int_f h5tset_fields_c( hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f* esize, size_t_f* mpos, size_t_f* msize);
-H5_FCDLL int_f h5tget_ebias_c( hid_t_f *type_id , size_t_f *ebias);
-H5_FCDLL int_f h5tset_ebias_c( hid_t_f *type_id , size_t_f *ebias);
-H5_FCDLL int_f h5tget_norm_c( hid_t_f *type_id , int_f *norm);
-H5_FCDLL int_f h5tset_norm_c( hid_t_f *type_id , int_f *norm);
-H5_FCDLL int_f h5tget_inpad_c( hid_t_f *type_id, int_f * padtype);
-H5_FCDLL int_f h5tset_inpad_c( hid_t_f *type_id, int_f * padtype);
-H5_FCDLL int_f h5tget_cset_c( hid_t_f *type_id, int_f * cset);
-H5_FCDLL int_f h5tset_cset_c( hid_t_f *type_id, int_f * cset);
-H5_FCDLL int_f h5tget_strpad_c( hid_t_f *type_id, int_f * strpad);
-H5_FCDLL int_f h5tset_strpad_c( hid_t_f *type_id, int_f * strpad);
-H5_FCDLL int_f h5tget_nmembers_c( hid_t_f *type_id , int_f * num_members);
-H5_FCDLL int_f h5tget_member_name_c( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen);
-H5_FCDLL int_f h5tget_member_dims_c( hid_t_f *type_id ,int_f* field_idx, int_f * dims, size_t_f * field_dims, int_f * perm );
-H5_FCDLL int_f h5tget_member_offset_c( hid_t_f *type_id ,int_f* member_no, size_t_f* offset);
-H5_FCDLL int_f h5tget_member_type_c( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype);
-H5_FCDLL int_f h5tget_member_index_c( hid_t_f *type_id ,_fcd name, int_f* namelen, int_f *idx);
-H5_FCDLL int_f h5tinsert_c(hid_t_f *type_id, _fcd name, int_f* namelen, size_t_f *offset, hid_t_f * field_id);
-H5_FCDLL int_f h5tpack_c(hid_t_f * type_id);
-H5_FCDLL int_f h5tinsert_array_c(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id, int_f* perm );
-H5_FCDLL int_f h5tinsert_array_c2(hid_t_f * parent_id, _fcd name, int_f* namelen, size_t_f* offset, int_f* ndims, size_t_f* dims, hid_t_f* member_id);
-H5_FCDLL int_f h5tenum_create_c( hid_t_f *parent_id , hid_t_f *new_type_id);
-H5_FCDLL int_f h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value);
-H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f* namelen, void *value);
-H5_FCDLL int_f h5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen);
-H5_FCDLL int_f h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f* namelen, int_f* value);
-H5_FCDLL int_f h5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value);
-H5_FCDLL int_f h5tset_tag_c(hid_t_f* type_id, _fcd tag, int_f* namelen);
-H5_FCDLL int_f h5tget_tag_c(hid_t_f* type_id, _fcd tag, size_t_f* tag_size, int_f* namelen);
-H5_FCDLL int_f h5tarray_create_c(hid_t_f * base_id, int_f *rank, hsize_t_f* dims, hid_t_f* type_id);
-H5_FCDLL int_f h5tget_array_dims_c( hid_t_f *type_id , hsize_t_f * dims);
-H5_FCDLL int_f h5tget_array_ndims_c( hid_t_f *type_id , int_f * ndims);
-H5_FCDLL int_f h5tget_super_c( hid_t_f *type_id , hid_t_f *base_type_id);
-H5_FCDLL int_f h5tvlen_create_c( hid_t_f *type_id , hid_t_f *vltype_id);
-H5_FCDLL int_f h5tis_variable_str_c( hid_t_f *type_id , int_f *flag );
-H5_FCDLL int_f h5tget_member_class_c( hid_t_f *type_id , int_f *member_no, int_f *cls );
+H5_FCDLL int_f h5tget_precision_c(hid_t_f *type_id, size_t_f *precision);
+H5_FCDLL int_f h5tset_precision_c(hid_t_f *type_id, size_t_f *precision);
+H5_FCDLL int_f h5tget_offset_c(hid_t_f *type_id, size_t_f *offset);
+H5_FCDLL int_f h5tset_offset_c(hid_t_f *type_id, size_t_f *offset);
+H5_FCDLL int_f h5tget_pad_c(hid_t_f *type_id, int_f *lsbpad, int_f *msbpad);
+H5_FCDLL int_f h5tset_pad_c(hid_t_f *type_id, int_f *lsbpad, int_f *msbpad);
+H5_FCDLL int_f h5tget_sign_c(hid_t_f *type_id, int_f *sign);
+H5_FCDLL int_f h5tset_sign_c(hid_t_f *type_id, int_f *sign);
+H5_FCDLL int_f h5tget_fields_c(hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f *esize,
+ size_t_f *mpos, size_t_f *msize);
+H5_FCDLL int_f h5tset_fields_c(hid_t_f *type_id, size_t_f *spos, size_t_f *epos, size_t_f *esize,
+ size_t_f *mpos, size_t_f *msize);
+H5_FCDLL int_f h5tget_ebias_c(hid_t_f *type_id, size_t_f *ebias);
+H5_FCDLL int_f h5tset_ebias_c(hid_t_f *type_id, size_t_f *ebias);
+H5_FCDLL int_f h5tget_norm_c(hid_t_f *type_id, int_f *norm);
+H5_FCDLL int_f h5tset_norm_c(hid_t_f *type_id, int_f *norm);
+H5_FCDLL int_f h5tget_inpad_c(hid_t_f *type_id, int_f *padtype);
+H5_FCDLL int_f h5tset_inpad_c(hid_t_f *type_id, int_f *padtype);
+H5_FCDLL int_f h5tget_cset_c(hid_t_f *type_id, int_f *cset);
+H5_FCDLL int_f h5tset_cset_c(hid_t_f *type_id, int_f *cset);
+H5_FCDLL int_f h5tget_strpad_c(hid_t_f *type_id, int_f *strpad);
+H5_FCDLL int_f h5tset_strpad_c(hid_t_f *type_id, int_f *strpad);
+H5_FCDLL int_f h5tget_nmembers_c(hid_t_f *type_id, int_f *num_members);
+H5_FCDLL int_f h5tget_member_name_c(hid_t_f *type_id, int_f *idx, _fcd member_name, int_f *namelen);
+H5_FCDLL int_f h5tget_member_dims_c(hid_t_f *type_id, int_f *field_idx, int_f *dims, size_t_f *field_dims,
+ int_f *perm);
+H5_FCDLL int_f h5tget_member_offset_c(hid_t_f *type_id, int_f *member_no, size_t_f *offset);
+H5_FCDLL int_f h5tget_member_type_c(hid_t_f *type_id, int_f *field_idx, hid_t_f *datatype);
+H5_FCDLL int_f h5tget_member_index_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx);
+H5_FCDLL int_f h5tinsert_c(hid_t_f *type_id, _fcd name, int_f *namelen, size_t_f *offset, hid_t_f *field_id);
+H5_FCDLL int_f h5tpack_c(hid_t_f *type_id);
+H5_FCDLL int_f h5tinsert_array_c(hid_t_f *parent_id, _fcd name, int_f *namelen, size_t_f *offset,
+ int_f *ndims, size_t_f *dims, hid_t_f *member_id, int_f *perm);
+H5_FCDLL int_f h5tinsert_array_c2(hid_t_f *parent_id, _fcd name, int_f *namelen, size_t_f *offset,
+ int_f *ndims, size_t_f *dims, hid_t_f *member_id);
+H5_FCDLL int_f h5tenum_create_c(hid_t_f *parent_id, hid_t_f *new_type_id);
+H5_FCDLL int_f h5tenum_insert_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value);
+H5_FCDLL int_f h5tenum_insert_ptr_c(hid_t_f *type_id, _fcd name, int_f *namelen, void *value);
+H5_FCDLL int_f h5tenum_nameof_c(hid_t_f *type_id, int_f *value, _fcd name, size_t_f *namelen);
+H5_FCDLL int_f h5tenum_valueof_c(hid_t_f *type_id, _fcd name, int_f *namelen, int_f *value);
+H5_FCDLL int_f h5tget_member_value_c(hid_t_f *type_id, int_f *member_no, int_f *value);
+H5_FCDLL int_f h5tset_tag_c(hid_t_f *type_id, _fcd tag, int_f *namelen);
+H5_FCDLL int_f h5tget_tag_c(hid_t_f *type_id, _fcd tag, size_t_f *tag_size, int_f *namelen);
+H5_FCDLL int_f h5tarray_create_c(hid_t_f *base_id, int_f *rank, hsize_t_f *dims, hid_t_f *type_id);
+H5_FCDLL int_f h5tget_array_dims_c(hid_t_f *type_id, hsize_t_f *dims);
+H5_FCDLL int_f h5tget_array_ndims_c(hid_t_f *type_id, int_f *ndims);
+H5_FCDLL int_f h5tget_super_c(hid_t_f *type_id, hid_t_f *base_type_id);
+H5_FCDLL int_f h5tvlen_create_c(hid_t_f *type_id, hid_t_f *vltype_id);
+H5_FCDLL int_f h5tis_variable_str_c(hid_t_f *type_id, int_f *flag);
+H5_FCDLL int_f h5tget_member_class_c(hid_t_f *type_id, int_f *member_no, int_f *cls);
H5_FCDLL int_f h5tcommit_anon_c(hid_t_f *loc_id, hid_t_f *dtype_id, hid_t_f *tcpl_id, hid_t_f *tapl_id);
-H5_FCDLL int_f h5tdecode_c( _fcd buf, hid_t_f *obj_id );
-H5_FCDLL int_f h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc );
-H5_FCDLL int_f h5tget_create_plist_c( hid_t_f *dtype_id, hid_t_f *dtpl_id);
-H5_FCDLL int_f h5tcompiler_conv_c( hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag);
+H5_FCDLL int_f h5tdecode_c(_fcd buf, hid_t_f *obj_id);
+H5_FCDLL int_f h5tencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc);
+H5_FCDLL int_f h5tget_create_plist_c(hid_t_f *dtype_id, hid_t_f *dtpl_id);
+H5_FCDLL int_f h5tcompiler_conv_c(hid_t_f *src_id, hid_t_f *dst_id, int_f *c_flag);
H5_FCDLL int_f h5tget_native_type_c(hid_t_f *dtype_id, int_f *direction, hid_t_f *native_dtype_id);
-H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background, hid_t_f *plist_id);
+H5_FCDLL int_f h5tconvert_c(hid_t_f *src_id, hid_t_f *dst_id, size_t_f *nelmts, void *buf, void *background,
+ hid_t_f *plist_id);
/*
* Functions from H5Of.c
*/
H5_FCDLL 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);
-H5_FCDLL int_f h5oclose_c(hid_t_f *object_id );
+H5_FCDLL int_f h5oclose_c(hid_t_f *object_id);
H5_FCDLL int_f h5oopen_by_token_c(hid_t_f *loc_id, H5O_token_t *token, hid_t_f *obj_id);
H5_FCDLL 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);
-H5_FCDLL 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);
-H5_FCDLL 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 );
+ hid_t_f *lcpl_id, hid_t_f *lapl_id);
+H5_FCDLL 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);
+H5_FCDLL 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);
H5_FCDLL int_f h5oget_info_c(hid_t_f *object_id, H5O_info_t_f *object_info, int_f *fields);
-H5_FCDLL 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);
+H5_FCDLL 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);
H5_FCDLL 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);
-H5_FCDLL 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 );
+ H5O_info_t_f *object_info, int_f *fields);
+H5_FCDLL 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);
H5_FCDLL int_f h5odecr_refcount_c(hid_t_f *object_id);
H5_FCDLL int_f h5oincr_refcount_c(hid_t_f *object_id);
H5_FCDLL int_f h5oexists_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id);
H5_FCDLL int_f h5oset_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentlen);
-H5_FCDLL 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);
-H5_FCDLL 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);
+H5_FCDLL 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);
+H5_FCDLL 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);
H5_FCDLL int_f h5oget_comment_c(hid_t_f *object_id, _fcd comment, size_t_f *commentsize, hssize_t_f *bufsize);
-H5_FCDLL 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);
-H5_FCDLL int_f h5otoken_cmp_c(hid_t_f *loc_id, H5O_token_t *token1,
- H5O_token_t *token2, int_f *cmp_value);
+H5_FCDLL 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);
+H5_FCDLL int_f h5otoken_cmp_c(hid_t_f *loc_id, H5O_token_t *token1, H5O_token_t *token2, int_f *cmp_value);
/*
* Functions from H5Pf.c
*/
-H5_FCDLL int_f h5pcreate_c( hid_t_f *cls, hid_t_f *prp_id );
-H5_FCDLL int_f h5pclose_c( hid_t_f *prp_id );
-H5_FCDLL int_f h5pcopy_c( hid_t_f *prp_id , hid_t_f *new_prp_id);
-H5_FCDLL int_f h5pequal_c( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f *c_flag);
-H5_FCDLL int_f h5pget_class_c( hid_t_f *prp_id , hid_t_f *classtype);
-H5_FCDLL int_f h5pset_deflate_c( hid_t_f *prp_id , int_f *level);
-H5_FCDLL int_f h5pset_chunk_c( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims );
-H5_FCDLL int_f h5pget_chunk_c( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims );
+H5_FCDLL int_f h5pcreate_c(hid_t_f *cls, hid_t_f *prp_id);
+H5_FCDLL int_f h5pclose_c(hid_t_f *prp_id);
+H5_FCDLL int_f h5pcopy_c(hid_t_f *prp_id, hid_t_f *new_prp_id);
+H5_FCDLL int_f h5pequal_c(hid_t_f *plist1_id, hid_t_f *plist2_id, int_f *c_flag);
+H5_FCDLL int_f h5pget_class_c(hid_t_f *prp_id, hid_t_f *classtype);
+H5_FCDLL int_f h5pset_deflate_c(hid_t_f *prp_id, int_f *level);
+H5_FCDLL int_f h5pset_chunk_c(hid_t_f *prp_id, int_f *rank, hsize_t_f *dims);
+H5_FCDLL int_f h5pget_chunk_c(hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims);
H5_FCDLL int_f h5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len);
H5_FCDLL int_f h5pset_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
H5_FCDLL int_f h5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len);
H5_FCDLL int_f h5pget_fill_value_c(hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue);
-H5_FCDLL int_f h5pset_preserve_c( hid_t_f *prp_id , int_f *flag);
-H5_FCDLL int_f h5pget_preserve_c( hid_t_f *prp_id , int_f *flag);
-H5_FCDLL int_f h5pget_version_c(hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr);
-H5_FCDLL int_f h5pset_userblock_c(hid_t_f *prp_id, hsize_t_f * size);
-H5_FCDLL int_f h5pget_userblock_c(hid_t_f *prp_id, hsize_t_f * size);
-H5_FCDLL int_f h5pget_sizes_c(hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size);
-H5_FCDLL int_f h5pset_sizes_c(hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size);
-H5_FCDLL int_f h5pset_sym_k_c(hid_t_f *prp_id, int_f* ik, int_f* lk);
-H5_FCDLL int_f h5pget_sym_k_c(hid_t_f *prp_id, int_f* ik, int_f* lk);
-H5_FCDLL int_f h5pset_istore_k_c(hid_t_f *prp_id, int_f* ik);
-H5_FCDLL int_f h5pget_istore_k_c(hid_t_f *prp_id, int_f* ik);
-H5_FCDLL int_f h5pget_driver_c(hid_t_f *prp_id, hid_t_f*driver);
+H5_FCDLL int_f h5pset_preserve_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f h5pget_preserve_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f h5pget_version_c(hid_t_f *prp_id, int_f *boot, int_f *freelist, int_f *stab, int_f *shhdr);
+H5_FCDLL int_f h5pset_userblock_c(hid_t_f *prp_id, hsize_t_f *size);
+H5_FCDLL int_f h5pget_userblock_c(hid_t_f *prp_id, hsize_t_f *size);
+H5_FCDLL int_f h5pget_sizes_c(hid_t_f *prp_id, size_t_f *sizeof_addr, size_t_f *sizeof_size);
+H5_FCDLL int_f h5pset_sizes_c(hid_t_f *prp_id, size_t_f *sizeof_addr, size_t_f *sizeof_size);
+H5_FCDLL int_f h5pset_sym_k_c(hid_t_f *prp_id, int_f *ik, int_f *lk);
+H5_FCDLL int_f h5pget_sym_k_c(hid_t_f *prp_id, int_f *ik, int_f *lk);
+H5_FCDLL int_f h5pset_istore_k_c(hid_t_f *prp_id, int_f *ik);
+H5_FCDLL int_f h5pget_istore_k_c(hid_t_f *prp_id, int_f *ik);
+H5_FCDLL int_f h5pget_driver_c(hid_t_f *prp_id, hid_t_f *driver);
H5_FCDLL int_f h5pset_fapl_stdio_c(hid_t_f *prp_id);
#ifdef NO_SUCH_F90_FUNCTION
-H5_FCDLL int_f h5pget_fapl_stdio_c(hid_t_f *prp_id, int_f* io);
+H5_FCDLL int_f h5pget_fapl_stdio_c(hid_t_f *prp_id, int_f *io);
#endif
H5_FCDLL int_f h5pset_fapl_sec2_c(hid_t_f *prp_id);
#ifdef NO_SUCH_F90_FUNCTION
-H5_FCDLL int_f h5pget_fapl_sec2_c(hid_t_f *prp_id, int_f* sec2);
+H5_FCDLL int_f h5pget_fapl_sec2_c(hid_t_f *prp_id, int_f *sec2);
#endif
-H5_FCDLL int_f h5pset_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment);
-H5_FCDLL int_f h5pget_alignment_c(hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment);
-H5_FCDLL int_f h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag);
-H5_FCDLL int_f h5pset_fapl_core_c(hid_t_f *prp_id, size_t_f* increment, int_f *flag);
-H5_FCDLL int_f h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist );
-H5_FCDLL int_f h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist );
-H5_FCDLL int_f h5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0);
-H5_FCDLL int_f h5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes, real_f* rdcc_w0);
+H5_FCDLL int_f h5pset_alignment_c(hid_t_f *prp_id, hsize_t_f *threshold, hsize_t_f *alignment);
+H5_FCDLL int_f h5pget_alignment_c(hid_t_f *prp_id, hsize_t_f *threshold, hsize_t_f *alignment);
+H5_FCDLL int_f h5pget_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag);
+H5_FCDLL int_f h5pset_fapl_core_c(hid_t_f *prp_id, size_t_f *increment, int_f *flag);
+H5_FCDLL int_f h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f *memb_size, hid_t_f *memb_plist);
+H5_FCDLL int_f h5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f *memb_size, hid_t_f *memb_plist);
+H5_FCDLL int_f h5pset_cache_c(hid_t_f *prp_id, int_f *mdc_nelmts, size_t_f *rdcc_nelmts,
+ size_t_f *rdcc_nbytes, real_f *rdcc_w0);
+H5_FCDLL int_f h5pget_cache_c(hid_t_f *prp_id, int_f *mdc_nelmts, size_t_f *rdcc_nelmts,
+ size_t_f *rdcc_nbytes, real_f *rdcc_w0);
#ifdef NO_SUCH_F90_FUNCTION
-H5_FCDLL int_f h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist);
+H5_FCDLL int_f h5pget_fapl_split_c(hid_t_f *prp_id, size_t_f *meta_ext_size, _fcd meta_ext,
+ hid_t_f *meta_plist, size_t_f *raw_ext_size, _fcd raw_ext,
+ hid_t_f *raw_plist);
#endif
-H5_FCDLL int_f h5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist);
-H5_FCDLL int_f h5pset_gc_references_c(hid_t_f *prp_id, int_f* gc_references);
-H5_FCDLL int_f h5pget_gc_references_c(hid_t_f *prp_id, int_f* gc_references);
-H5_FCDLL int_f h5pset_layout_c(hid_t_f *prp_id, int_f* layout);
-H5_FCDLL int_f h5pget_layout_c(hid_t_f *prp_id, int_f* layout);
-H5_FCDLL int_f h5pset_filter_c(hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values );
-H5_FCDLL int_f h5premove_filter_c(hid_t_f *prp_id, int_f* filter);
-H5_FCDLL int_f h5pmodify_filter_c(hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values );
-H5_FCDLL int_f h5pget_nfilters_c(hid_t_f *prp_id, int_f* nfilters);
-H5_FCDLL int_f h5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name, int_f* filter_id);
-H5_FCDLL int_f h5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name);
-H5_FCDLL int_f h5pset_external_c(hid_t_f *prp_id, _fcd name, int_f* namelen, off_t_f* offset, hsize_t_f*bytes);
-H5_FCDLL int_f h5pget_external_count_c(hid_t_f *prp_id, int_f* count);
-H5_FCDLL int_f h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, off_t_f* offset, hsize_t_f*bytes);
-H5_FCDLL int_f h5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right);
-H5_FCDLL int_f h5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right);
+H5_FCDLL int_f h5pset_fapl_split_c(hid_t_f *prp_id, int_f *meta_len, _fcd meta_ext, hid_t_f *meta_plist,
+ int_f *raw_len, _fcd raw_ext, hid_t_f *raw_plist);
+H5_FCDLL int_f h5pset_gc_references_c(hid_t_f *prp_id, int_f *gc_references);
+H5_FCDLL int_f h5pget_gc_references_c(hid_t_f *prp_id, int_f *gc_references);
+H5_FCDLL int_f h5pset_layout_c(hid_t_f *prp_id, int_f *layout);
+H5_FCDLL int_f h5pget_layout_c(hid_t_f *prp_id, int_f *layout);
+H5_FCDLL int_f h5pset_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmts,
+ int_f *cd_values);
+H5_FCDLL int_f h5premove_filter_c(hid_t_f *prp_id, int_f *filter);
+H5_FCDLL int_f h5pmodify_filter_c(hid_t_f *prp_id, int_f *filter, int_f *flags, size_t_f *cd_nelmts,
+ int_f *cd_values);
+H5_FCDLL int_f h5pget_nfilters_c(hid_t_f *prp_id, int_f *nfilters);
+H5_FCDLL int_f h5pget_filter_c(hid_t_f *prp_id, int_f *filter_number, int_f *flags, size_t_f *cd_nelmts,
+ int_f *cd_values, size_t_f *namelen, _fcd name, int_f *filter_id);
+H5_FCDLL int_f h5pget_filter_by_id_c(hid_t_f *prp_id, int_f *filter_id, int_f *flags, size_t_f *cd_nelmts,
+ int_f *cd_values, size_t_f *namelen, _fcd name);
+H5_FCDLL int_f h5pset_external_c(hid_t_f *prp_id, _fcd name, int_f *namelen, off_t_f *offset,
+ hsize_t_f *bytes);
+H5_FCDLL int_f h5pget_external_count_c(hid_t_f *prp_id, int_f *count);
+H5_FCDLL int_f h5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f *name_size, _fcd name, off_t_f *offset,
+ hsize_t_f *bytes);
+H5_FCDLL int_f h5pget_btree_ratios_c(hid_t_f *prp_id, real_f *left, real_f *middle, real_f *right);
+H5_FCDLL int_f h5pset_btree_ratios_c(hid_t_f *prp_id, real_f *left, real_f *middle, real_f *right);
H5_FCDLL int_f h5pset_fclose_degree_c(hid_t_f *fapl, int_f *degree);
H5_FCDLL int_f h5pget_fclose_degree_c(hid_t_f *fapl, int_f *degree);
H5_FCDLL int_f h5pget_buffer_c(hid_t_f *plist, hsize_t_f *size);
@@ -421,11 +464,10 @@ H5_FCDLL int_f h5pget_small_data_block_size_c(hid_t_f *plist, hsize_t_f *size);
H5_FCDLL int_f h5pset_hyper_vector_size_c(hid_t_f *plist, size_t_f *size);
H5_FCDLL int_f h5pget_hyper_vector_size_c(hid_t_f *plist, size_t_f *size);
H5_FCDLL int_f h5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls,
- H5P_cls_create_func_t create, void *create_data,
- H5P_cls_copy_func_t copy, void *copy_data,
- H5P_cls_close_func_t close, void *close_data);
-H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f * name_len, size_t_f *size, void *value);
-H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
+ H5P_cls_create_func_t create, void *create_data, H5P_cls_copy_func_t copy,
+ void *copy_data, H5P_cls_close_func_t close, void *close_data);
+H5_FCDLL int_f h5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value);
+H5_FCDLL int_f h5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value);
H5_FCDLL int_f h5pset_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value);
H5_FCDLL int_f h5pget_c(hid_t_f *prp_id, _fcd name, int_f *name_len, void *value);
H5_FCDLL int_f h5pexist_c(hid_t_f *prp_id, _fcd name, int_f *name_len);
@@ -436,26 +478,30 @@ H5_FCDLL int_f h5pisa_class_c(hid_t_f *plist, hid_t_f *pclass);
H5_FCDLL int_f h5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len);
H5_FCDLL int_f h5premove_c(hid_t_f *plid, _fcd name, int_f *name_len);
H5_FCDLL int_f h5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len);
-H5_FCDLL int_f h5pclose_class_c(hid_t_f * cls);
+H5_FCDLL int_f h5pclose_class_c(hid_t_f *cls);
H5_FCDLL int_f h5pget_class_name_c(hid_t_f *prp_id, _fcd name, int_f *name_len);
-H5_FCDLL int_f h5pset_shuffle_c( hid_t_f *prp_id);
-H5_FCDLL int_f h5pset_fletcher32_c( hid_t_f *prp_id );
-H5_FCDLL int_f h5pset_edc_check_c( hid_t_f *prp_id, int_f *flag );
-H5_FCDLL int_f h5pget_edc_check_c( hid_t_f *prp_id, int_f *flag );
-H5_FCDLL int_f h5pset_family_offset_c( hid_t_f *prp_id , hsize_t_f *offset);
-H5_FCDLL int_f h5pget_fapl_multi_c( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out);
-H5_FCDLL int_f h5pset_fapl_multi_c( hid_t_f *prp_id , int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag);
-H5_FCDLL int_f h5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag);
-H5_FCDLL int_f h5pset_szip_c( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block);
-H5_FCDLL int_f h5pall_filters_avail_c( hid_t_f *prp_id , int_f *status);
-H5_FCDLL int_f h5pfill_value_defined_c( hid_t_f *prp_id , int_f *flag);
-H5_FCDLL int_f h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense );
-H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags );
-H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes );
-H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size);
+H5_FCDLL int_f h5pset_shuffle_c(hid_t_f *prp_id);
+H5_FCDLL int_f h5pset_fletcher32_c(hid_t_f *prp_id);
+H5_FCDLL int_f h5pset_edc_check_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f h5pget_edc_check_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f h5pset_family_offset_c(hid_t_f *prp_id, hsize_t_f *offset);
+H5_FCDLL int_f h5pget_fapl_multi_c(hid_t_f *prp_id, int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name,
+ int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag,
+ int_f *maxlen_out);
+H5_FCDLL int_f h5pset_fapl_multi_c(hid_t_f *prp_id, int_f *mem_map, hid_t_f *memb_fapl, _fcd memb_name,
+ int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag);
+H5_FCDLL int_f h5pset_fapl_multi_sc(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f h5pset_szip_c(hid_t_f *prp_id, int_f *options_mask, int_f *pixels_per_block);
+H5_FCDLL int_f h5pall_filters_avail_c(hid_t_f *prp_id, int_f *status);
+H5_FCDLL int_f h5pfill_value_defined_c(hid_t_f *prp_id, int_f *flag);
+H5_FCDLL int_f h5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense);
+H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags);
+H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes);
+H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags,
+ int_f *min_mesg_size);
H5_FCDLL int_f h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags);
H5_FCDLL int_f h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags);
-H5_FCDLL int_f h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense );
+H5_FCDLL int_f h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense);
H5_FCDLL int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag);
H5_FCDLL int_f h5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag);
H5_FCDLL int_f h5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group);
@@ -465,39 +511,46 @@ H5_FCDLL int_f h5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding);
H5_FCDLL int_f h5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding);
H5_FCDLL int_f h5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options);
H5_FCDLL int_f h5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options);
-H5_FCDLL int_f h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size);
+H5_FCDLL int_f h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len,
+ size_t_f *size);
H5_FCDLL int_f h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len);
H5_FCDLL int_f h5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint);
H5_FCDLL int_f h5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len);
H5_FCDLL int_f h5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint);
H5_FCDLL int_f h5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len);
-H5_FCDLL int_f h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense );
-H5_FCDLL int_f h5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size );
-H5_FCDLL int_f h5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size );
-H5_FCDLL int_f h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense );
-H5_FCDLL int_f h5pset_nbit_c(hid_t_f *plist_id );
-H5_FCDLL int_f h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor );
+H5_FCDLL int_f h5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense);
+H5_FCDLL int_f h5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size,
+ size_t_f *cbuf_size);
+H5_FCDLL int_f h5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size,
+ size_t_f *cbuf_size);
+H5_FCDLL int_f h5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense);
+H5_FCDLL int_f h5pset_nbit_c(hid_t_f *plist_id);
+H5_FCDLL int_f h5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor);
H5_FCDLL int_f h5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks);
H5_FCDLL int_f h5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks);
-H5_FCDLL int_f h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0);
-H5_FCDLL int_f h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0);
+H5_FCDLL int_f h5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes,
+ real_f *rdcc_w0);
+H5_FCDLL int_f h5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes,
+ real_f *rdcc_w0);
#ifdef H5_HAVE_PARALLEL
H5_FCDLL int_f h5pget_mpio_actual_io_mode_c(hid_t_f *dxpl_id, int_f *actual_io_mode);
-H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info);
-H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f* comm, int_f* info);
-H5_FCDLL int_f h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode);
-H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f* data_xfer_mode);
+H5_FCDLL int_f h5pget_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info);
+H5_FCDLL int_f h5pset_fapl_mpio_c(hid_t_f *prp_id, int_f *comm, int_f *info);
+H5_FCDLL int_f h5pget_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode);
+H5_FCDLL int_f h5pset_dxpl_mpio_c(hid_t_f *prp_id, int_f *data_xfer_mode);
#endif
/*
* Functions frome H5Rf.c
*/
H5_FCDLL int_f h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *space_id);
-H5_FCDLL int_f h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type, hid_t_f *space_id);
+H5_FCDLL int_f h5rcreate_ptr_c(void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *ref_type,
+ hid_t_f *space_id);
H5_FCDLL int_f h5rdereference_ptr_c(hid_t_f *obj_id, int_f *ref_type, void *ref, hid_t_f *ref_obj_id);
H5_FCDLL int_f h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id);
H5_FCDLL int_f h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id);
H5_FCDLL int_f h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type);
-H5_FCDLL int_f h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len, size_t_f *size_default);
+H5_FCDLL int_f h5rget_name_ptr_c(hid_t_f *loc_id, int_f *ref_type, void *ref, _fcd name, size_t_f *name_len,
+ size_t_f *size_default);
H5_FCDLL int_f h5rget_obj_type_c(hid_t_f *loc_id, int_f *ref_type, void *ref, int_f *obj_type);
/*
* Functions from H5If.c
@@ -515,11 +568,11 @@ H5_FCDLL int_f h5iis_valid_c(hid_t_f *obj_id, int_f *c_valid);
*/
H5_FCDLL int_f h5eclear_c(hid_t_f *estack_id);
-H5_FCDLL int_f h5eprint_c1(_fcd name, int_f* namelen);
+H5_FCDLL int_f h5eprint_c1(_fcd name, int_f *namelen);
H5_FCDLL int_f h5eprint_c2(void);
-H5_FCDLL int_f h5eget_major_c(int_f* error_no, _fcd name, size_t_f* namelen);
-H5_FCDLL int_f h5eget_minor_c(int_f* error_no, _fcd name, size_t_f* namelen);
-H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data);
+H5_FCDLL int_f h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen);
+H5_FCDLL int_f h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen);
+H5_FCDLL int_f h5eset_auto2_c(int_f *printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data);
/*
* Functions from H5f.c
@@ -527,15 +580,15 @@ H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t
H5_FCDLL int_f h5open_c(void);
H5_FCDLL int_f h5close_c(void);
H5_FCDLL int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes);
-H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen);
-H5_FCDLL int_f h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
- int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
- int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
- int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
- hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags,
- int_f *h5s_flags, hid_t_f *h5s_hid_flags, hsize_t_f *h5s_hsize_flags,
- int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags,
- haddr_t_f *h5_haddr_generic_flags);
+H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen,
+ hid_t_f *integertypes, int_f *integerlen);
+H5_FCDLL int_f h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags,
+ hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags,
+ hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags,
+ int_f *h5o_flags, hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags,
+ int_f *h5s_flags, hid_t_f *h5s_hid_flags, hsize_t_f *h5s_hsize_flags,
+ int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags,
+ haddr_t_f *h5_haddr_generic_flags);
H5_FCDLL int_f h5init1_flags_c(int_f *h5lib_flags);
H5_FCDLL int_f h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum);
H5_FCDLL int_f h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum);
@@ -554,41 +607,40 @@ H5_FCDLL int_f h5zget_filter_info_c(int_f *filter, int_f *flag);
*/
H5_FCDLL int_f h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
- _fcd dest_name, size_t_f *dest_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id);
-H5_FCDLL int_f h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name, size_t_f *obj_namelen,
- hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id);
+ _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
+H5_FCDLL int_f h5lcreate_external_c(_fcd file_name, size_t_f *file_namelen, _fcd obj_name,
+ size_t_f *obj_namelen, hid_t_f *link_loc_id, _fcd link_name,
+ size_t_f *link_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
H5_FCDLL int_f h5lcreate_hard_c(hid_t_f *obj_loc_id, _fcd obj_name, size_t_f *obj_namelen,
- hid_t_f *link_loc_id,
- _fcd link_name, size_t_f *link_namelen,
- hid_t_f *lcpl_id, hid_t_f *lapl_id );
-H5_FCDLL int_f h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len,
- hid_t_f *link_loc_id,
- _fcd link_name, size_t_f *link_name_len,
- hid_t_f *lcpl_id, hid_t_f *lapl_id );
-H5_FCDLL int_f h5ldelete_c( hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id );
+ hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
+ hid_t_f *lcpl_id, hid_t_f *lapl_id);
+H5_FCDLL int_f h5lcreate_soft_c(_fcd target_path, size_t_f *target_path_len, hid_t_f *link_loc_id,
+ _fcd link_name, size_t_f *link_name_len, hid_t_f *lcpl_id, hid_t_f *lapl_id);
+H5_FCDLL int_f h5ldelete_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id);
H5_FCDLL int_f h5ldelete_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id);
-H5_FCDLL int_f h5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id, int_f *link_exists);
-H5_FCDLL int_f h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen,
- int_f *cset, int_f *corder, int_f *corder_valid, int_f *link_type,
- H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id);
+ int_f *index_field, int_f *order, hsize_t_f *n, hid_t_f *lapl_id);
+H5_FCDLL int_f h5lexists_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *lapl_id,
+ int_f *link_exists);
+H5_FCDLL int_f h5lget_info_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, int_f *cset,
+ int_f *corder, int_f *corder_valid, int_f *link_type, H5O_token_t *token,
+ size_t_f *val_size, hid_t_f *lapl_id);
H5_FCDLL int_f h5lget_info_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n,
- int_f *link_type, int_f *corder_valid, int_f *corder,
- int_f *cset, H5O_token_t *token, size_t_f *val_size, hid_t_f *lapl_id);
+ int_f *index_field, int_f *order, hsize_t_f *n, int_f *link_type,
+ int_f *corder_valid, int_f *corder, int_f *cset, H5O_token_t *token,
+ size_t_f *val_size, hid_t_f *lapl_id);
H5_FCDLL int_f h5lis_registered_c(int_f *link_cls_id);
H5_FCDLL int_f h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *dest_loc_id,
- _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
+ _fcd dest_name, size_t_f *dest_namelen, hid_t_f *lcpl_id, hid_t_f *lapl_id);
H5_FCDLL int_f h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen,
- int_f *index_field, int_f *order, hsize_t_f *n,
- size_t_f *size, _fcd name, hid_t_f *lapl_id);
+ int_f *index_field, int_f *order, hsize_t_f *n, size_t_f *size, _fcd name,
+ hid_t_f *lapl_id);
H5_FCDLL int_f h5lget_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) ;
-
-H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data );
-H5_FCDLL int_f h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type, int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data, hid_t_f *lapl_id);
+ void *linkval_buff, hid_t_f *lapl_id);
+H5_FCDLL int_f h5literate_c(hid_t_f *group_id, int_f *index_type, int_f *order, hsize_t_f *idx,
+ H5L_iterate2_t op, void *op_data);
+H5_FCDLL int_f h5literate_by_name_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, int_f *index_type,
+ int_f *order, hsize_t_f *idx, H5L_iterate2_t op, void *op_data,
+ hid_t_f *lapl_id);
#endif /* _H5f90proto_H */
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 231b90d..85b86d1 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -26,7 +26,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include <stdio.h>
#include <string.h>
@@ -40,24 +40,24 @@
#include "H5fort_type_defines.h"
/* File pointers for files */
-FILE * c_header;
-FILE * fort_header;
+FILE *c_header;
+FILE *fort_header;
#define CFILE "H5f90i_gen.h"
#define FFILE "H5fortran_types.F90"
/* Prototypes for the write routines */
-void writeTypedef(const char* c_typedef, const char* c_type, int size);
-void writeTypedefDefault(const char* c_typedef, int size);
-void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int kind);
-void writeToCFileOnly(const char* c_typedef, const char* fortran_type, const char* c_type, int size);
-void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, const char* kind);
+void writeTypedef(const char *c_typedef, const char *c_type, int size);
+void writeTypedefDefault(const char *c_typedef, int size);
+void writeToFiles(const char *c_typedef, const char *fortran_type, const char *c_type, int kind);
+void writeToCFileOnly(const char *c_typedef, const char *fortran_type, const char *c_type, int size);
+void writeToFilesChr(const char *c_typedef, const char *fortran_type, const char *c_type, int size,
+ const char *kind);
static void
initCfile(void)
{
- fprintf(c_header,
- "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\
+ fprintf(c_header, "/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\
* Copyright by The HDF Group. *\n\
* Copyright by the Board of Trustees of the University of Illinois. *\n\
* All rights reserved. *\n\
@@ -81,8 +81,7 @@ initCfile(void)
static void
initFfile(void)
{
- fprintf(fort_header,
- "! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n\
+ fprintf(fort_header, "! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \n\
! Copyright by The HDF Group. *\n\
! Copyright by the Board of Trustees of the University of Illinois. *\n\
! All rights reserved. *\n\
@@ -101,340 +100,359 @@ initFfile(void)
!\n\
! HDF5 integers\n\
!\n");
-
}
static void
endCfile(void)
{
- fprintf(c_header, "\n#endif /* _H5f90i_gen_H */\n");
+ fprintf(c_header, "\n#endif /* _H5f90i_gen_H */\n");
}
static void
endFfile(void)
{
- fprintf(fort_header, "\n INTEGER(SIZE_T), PARAMETER :: OBJECT_NAMELEN_DEFAULT_F = -1\n\n");
- fprintf(fort_header, " END MODULE H5FORTRAN_TYPES\n");
+ fprintf(fort_header, "\n INTEGER(SIZE_T), PARAMETER :: OBJECT_NAMELEN_DEFAULT_F = -1\n\n");
+ fprintf(fort_header, " END MODULE H5FORTRAN_TYPES\n");
}
/* Define a c_int_x type in the C header */
-void writeTypedef(const char* c_typedef, const char* c_type, int size)
+void
+writeTypedef(const char *c_typedef, const char *c_type, int size)
{
- fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type);
+ fprintf(c_header, "#define c_%s_%u %s\n", c_typedef, size, c_type);
}
/* Call this function if there is no matching C type for sizes > 1 */
-void writeTypedefDefault(const char* c_typedef, int size)
+void
+writeTypedefDefault(const char *c_typedef, int size)
{
- assert(size %2 == 0);
- fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u;\n", c_typedef, size / 2, c_typedef, size / 2, c_typedef, size);
+ assert(size % 2 == 0);
+ fprintf(c_header, "typedef struct {c_%s_%u a; c_%s_%u b;} c_%s_%u;\n", c_typedef, size / 2, c_typedef,
+ size / 2, c_typedef, size);
}
/* Create matching Fortran and C types by writing to both files */
-void writeToFiles(const char* c_typedef, const char* fortran_type, const char* c_type, int kind)
+void
+writeToFiles(const char *c_typedef, const char *fortran_type, const char *c_type, int kind)
{
- fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind);
- fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, kind, c_type);
+ fprintf(fort_header, " INTEGER, PARAMETER :: %s = %u\n", fortran_type, kind);
+ fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, kind, c_type);
}
-void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char* c_type, int size, const char* kind)
+void
+writeToFilesChr(const char *c_typedef, const char *fortran_type, const char *c_type, int size,
+ const char *kind)
{
- fprintf(fort_header, " INTEGER, PARAMETER :: %s = %s\n", fortran_type, kind);
- fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type);
+ fprintf(fort_header, " INTEGER, PARAMETER :: %s = %s\n", fortran_type, kind);
+ fprintf(c_header, "typedef c_%s_%d %s;\n", c_typedef, size, c_type);
}
-int main(void)
+int
+main(void)
{
- int i;
- char chrA[64],chrB[64];
-
- int IntKinds[] = H5_FORTRAN_INTEGER_KINDS;
- int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF;
- int RealKinds[] = H5_FORTRAN_REAL_KINDS;
- int RealKinds_SizeOf[] = H5_FORTRAN_REAL_KINDS_SIZEOF;
- char Real_C_TYPES[10][32];
-
- int FORTRAN_NUM_INTEGER_KINDS=H5_FORTRAN_NUM_INTEGER_KINDS;
- int H5_FORTRAN_NUM_REAL_KINDS;
-#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
- int found_long_double = 0;
+ int i;
+ char chrA[64], chrB[64];
+
+ int IntKinds[] = H5_FORTRAN_INTEGER_KINDS;
+ int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF;
+ int RealKinds[] = H5_FORTRAN_REAL_KINDS;
+ int RealKinds_SizeOf[] = H5_FORTRAN_REAL_KINDS_SIZEOF;
+ char Real_C_TYPES[10][32];
+
+ int FORTRAN_NUM_INTEGER_KINDS = H5_FORTRAN_NUM_INTEGER_KINDS;
+ int H5_FORTRAN_NUM_REAL_KINDS;
+#if H5_FORTRAN_HAVE_C_LONG_DOUBLE != 0
+ int found_long_double = 0;
#endif
- /* Open target files */
- c_header = fopen(CFILE, "w");
- fort_header = fopen(FFILE, "w");
-
- /* Write copyright, boilerplate to both files */
- initCfile();
- initFfile();
-
- /* (a) define c_int_x */
-
- FORTRAN_NUM_INTEGER_KINDS = (int)(sizeof(IntKinds)/sizeof(IntKinds[0]));
- H5_FORTRAN_NUM_REAL_KINDS = (int)(sizeof(RealKinds)/sizeof(RealKinds[0]));
-
- fprintf(fort_header," INTEGER, PARAMETER :: H5_FORTRAN_NUM_INTEGER_KINDS = %d\n", FORTRAN_NUM_INTEGER_KINDS);
-
-
- for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
- if(sizeof(long long) == IntKinds_SizeOf[i])
- writeTypedef("int", "long long", IntKinds[i]);
- else if(sizeof(long) == IntKinds[i])
- writeTypedef("int", "long", IntKinds[i]);
- else if(sizeof(int) == IntKinds_SizeOf[i])
- writeTypedef("int", "int", IntKinds[i]);
- else if(sizeof(short) == IntKinds_SizeOf[i])
- writeTypedef("int", "short", IntKinds[i]);
- else
- if(IntKinds_SizeOf[i] == 1) {
- writeTypedef("int", "char", IntKinds[i]);
- /* Actually, char is not necessarily one byte.
- * But if char isn't, then nothing is, so this
- * is as close as we can get. */
- } else {
- writeTypedefDefault("int",IntKinds[i]);
- }
- if(sizeof(size_t) == IntKinds_SizeOf[i])
- writeTypedef("size_t", "size_t", IntKinds[i]);
- if(sizeof(time_t) == IntKinds_SizeOf[i])
- writeTypedef("time_t", "time_t", IntKinds[i]);
- if(sizeof(hsize_t) == IntKinds_SizeOf[i])
- writeTypedef("hsize_t", "hsize_t", IntKinds[i]);
- }
-
- /* (b) Define c_float_x */
-
- for(i=0;i< H5_FORTRAN_NUM_REAL_KINDS;i++) {
- if (sizeof(float) == RealKinds_SizeOf[i]) {
- writeTypedef("float", "float", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_FLOAT");
- }
- else if(sizeof(double) == RealKinds_SizeOf[i]) {
- writeTypedef("float", "double", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_DOUBLE");
+ /* Open target files */
+ c_header = fopen(CFILE, "w");
+ fort_header = fopen(FFILE, "w");
+
+ /* Write copyright, boilerplate to both files */
+ initCfile();
+ initFfile();
+
+ /* (a) define c_int_x */
+
+ FORTRAN_NUM_INTEGER_KINDS = (int)(sizeof(IntKinds) / sizeof(IntKinds[0]));
+ H5_FORTRAN_NUM_REAL_KINDS = (int)(sizeof(RealKinds) / sizeof(RealKinds[0]));
+
+ fprintf(fort_header, " INTEGER, PARAMETER :: H5_FORTRAN_NUM_INTEGER_KINDS = %d\n",
+ FORTRAN_NUM_INTEGER_KINDS);
+
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (sizeof(long long) == IntKinds_SizeOf[i])
+ writeTypedef("int", "long long", IntKinds[i]);
+ else if (sizeof(long) == IntKinds[i])
+ writeTypedef("int", "long", IntKinds[i]);
+ else if (sizeof(int) == IntKinds_SizeOf[i])
+ writeTypedef("int", "int", IntKinds[i]);
+ else if (sizeof(short) == IntKinds_SizeOf[i])
+ writeTypedef("int", "short", IntKinds[i]);
+ else if (IntKinds_SizeOf[i] == 1) {
+ writeTypedef("int", "char", IntKinds[i]);
+ /* Actually, char is not necessarily one byte.
+ * But if char isn't, then nothing is, so this
+ * is as close as we can get. */
+ }
+ else {
+ writeTypedefDefault("int", IntKinds[i]);
+ }
+ if (sizeof(size_t) == IntKinds_SizeOf[i])
+ writeTypedef("size_t", "size_t", IntKinds[i]);
+ if (sizeof(time_t) == IntKinds_SizeOf[i])
+ writeTypedef("time_t", "time_t", IntKinds[i]);
+ if (sizeof(hsize_t) == IntKinds_SizeOf[i])
+ writeTypedef("hsize_t", "hsize_t", IntKinds[i]);
}
-#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
- else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) {
- writeTypedef("float", "long double", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE");
- found_long_double = 1;
- }
-# ifdef H5_HAVE_FLOAT128
- /* Don't select a higher precision than Fortran can support */
- else if(sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
- writeTypedef("float", "__float128", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_FLOAT128");
- }
-# else
- else if(sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 1 && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
- writeTypedef("float", "long double", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_FLOAT128");
- }
-# endif
+
+ /* (b) Define c_float_x */
+
+ for (i = 0; i < H5_FORTRAN_NUM_REAL_KINDS; i++) {
+ if (sizeof(float) == RealKinds_SizeOf[i]) {
+ writeTypedef("float", "float", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_FLOAT");
+ }
+ else if (sizeof(double) == RealKinds_SizeOf[i]) {
+ writeTypedef("float", "double", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_DOUBLE");
+ }
+#if H5_FORTRAN_HAVE_C_LONG_DOUBLE != 0
+ else if (sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 0) {
+ writeTypedef("float", "long double", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_LONG_DOUBLE");
+ found_long_double = 1;
+ }
+#ifdef H5_HAVE_FLOAT128
+ /* Don't select a higher precision than Fortran can support */
+ else if (sizeof(__float128) == RealKinds_SizeOf[i] && found_long_double == 1 &&
+ H5_PAC_FC_MAX_REAL_PRECISION > 28) {
+ writeTypedef("float", "__float128", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_FLOAT128");
+ }
+#else
+ else if (sizeof(long double) == RealKinds_SizeOf[i] && found_long_double == 1 &&
+ H5_PAC_FC_MAX_REAL_PRECISION > 28) {
+ writeTypedef("float", "long double", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_FLOAT128");
+ }
+#endif
#else /* There is no C_LONG_DOUBLE intrinsic */
-# ifdef H5_HAVE_FLOAT128
- /* Don't select a higher precision than Fortran can support */
- else if(sizeof(__float128) == RealKinds_SizeOf[i] ) {
- writeTypedef("float", "__float128", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_FLOAT128");
- }
-# else
- else if(sizeof(long double) == RealKinds_SizeOf[i] ) {
- writeTypedef("float", "long double", RealKinds[i]);
- strcpy(Real_C_TYPES[i], "C_FLOAT128");
- }
-# endif
+#ifdef H5_HAVE_FLOAT128
+ /* Don't select a higher precision than Fortran can support */
+ else if (sizeof(__float128) == RealKinds_SizeOf[i]) {
+ writeTypedef("float", "__float128", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_FLOAT128");
+ }
+#else
+ else if (sizeof(long double) == RealKinds_SizeOf[i]) {
+ writeTypedef("float", "long double", RealKinds[i]);
+ strcpy(Real_C_TYPES[i], "C_FLOAT128");
+ }
#endif
- else {
- printf("\n **** HDF5 WARNING ****\n");
- printf("Fortran REAL(KIND=%d) is %d Bytes, but no corresponding C float type exists of that size\n",RealKinds[i],RealKinds_SizeOf[i]);
- printf(" !!! Fortran interfaces will not be generated for REAL(KIND=%d) !!!\n\n",RealKinds[i]);
-
- RealKinds_SizeOf[i] = -1;
- RealKinds[i] = -1;
+#endif
+ else {
+ printf("\n **** HDF5 WARNING ****\n");
+ printf(
+ "Fortran REAL(KIND=%d) is %d Bytes, but no corresponding C float type exists of that size\n",
+ RealKinds[i], RealKinds_SizeOf[i]);
+ printf(" !!! Fortran interfaces will not be generated for REAL(KIND=%d) !!!\n\n",
+ RealKinds[i]);
+
+ RealKinds_SizeOf[i] = -1;
+ RealKinds[i] = -1;
+ }
}
- }
-
- /* Now begin defining fortran types. */
- fprintf(c_header, "\n");
- /* haddr_t */
- for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
- if(IntKinds_SizeOf[i] == H5_SIZEOF_HADDR_T) {
- writeToFiles("int","HADDR_T", "haddr_t_f", IntKinds[i]);
- break;
+ /* Now begin defining fortran types. */
+ fprintf(c_header, "\n");
+
+ /* haddr_t */
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (IntKinds_SizeOf[i] == H5_SIZEOF_HADDR_T) {
+ writeToFiles("int", "HADDR_T", "haddr_t_f", IntKinds[i]);
+ break;
+ }
+ if (i == (FORTRAN_NUM_INTEGER_KINDS - 1))
+ /* Error: couldn't find a size for haddr_t */
+ return -1;
}
- if(i == (FORTRAN_NUM_INTEGER_KINDS-1) )
- /* Error: couldn't find a size for haddr_t */
- return -1;
- }
-
- /* hsize_t */
- for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
- if(IntKinds_SizeOf[i] == H5_SIZEOF_HSIZE_T) {
- writeToFiles("hsize_t","HSIZE_T", "hsize_t_f", IntKinds[i]);
- break;
+
+ /* hsize_t */
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (IntKinds_SizeOf[i] == H5_SIZEOF_HSIZE_T) {
+ writeToFiles("hsize_t", "HSIZE_T", "hsize_t_f", IntKinds[i]);
+ break;
+ }
+ if (i == (FORTRAN_NUM_INTEGER_KINDS - 1))
+ /* Error: couldn't find a size for hsize_t */
+ return -1;
}
- if(i == (FORTRAN_NUM_INTEGER_KINDS-1) )
- /* Error: couldn't find a size for hsize_t */
- return -1;
- }
-
- /* hssize_t */
- for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
- if(IntKinds_SizeOf[i] == H5_SIZEOF_HSSIZE_T) {
- writeToFiles("int","HSSIZE_T", "hssize_t_f", IntKinds[i]);
- break;
+
+ /* hssize_t */
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (IntKinds_SizeOf[i] == H5_SIZEOF_HSSIZE_T) {
+ writeToFiles("int", "HSSIZE_T", "hssize_t_f", IntKinds[i]);
+ break;
+ }
+ if (i == (FORTRAN_NUM_INTEGER_KINDS - 1))
+ /* Error: couldn't find a size for hssize_t */
+ return -1;
}
- if(i == (FORTRAN_NUM_INTEGER_KINDS-1) )
- /* Error: couldn't find a size for hssize_t */
- return -1;
- }
-
- /* off_t */
- for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
- if(IntKinds_SizeOf[i] == H5_SIZEOF_OFF_T) {
- writeToFiles("int","OFF_T", "off_t_f", IntKinds[i]);
- break;
+
+ /* off_t */
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (IntKinds_SizeOf[i] == H5_SIZEOF_OFF_T) {
+ writeToFiles("int", "OFF_T", "off_t_f", IntKinds[i]);
+ break;
+ }
+ if (i == (FORTRAN_NUM_INTEGER_KINDS - 1))
+ /* Error: couldn't find a size for off_t */
+ return -1;
}
- if(i == (FORTRAN_NUM_INTEGER_KINDS-1) )
- /* Error: couldn't find a size for off_t */
- return -1;
- }
-
- /* size_t */
- for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
- if(IntKinds_SizeOf[i] == H5_SIZEOF_SIZE_T) {
- writeToFiles("size_t","SIZE_T", "size_t_f", IntKinds[i]);
- break;
+
+ /* size_t */
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (IntKinds_SizeOf[i] == H5_SIZEOF_SIZE_T) {
+ writeToFiles("size_t", "SIZE_T", "size_t_f", IntKinds[i]);
+ break;
+ }
+ if (i == (FORTRAN_NUM_INTEGER_KINDS - 1))
+ /* Error: couldn't find a size for size_t */
+ return -1;
}
- if(i == (FORTRAN_NUM_INTEGER_KINDS-1) )
- /* Error: couldn't find a size for size_t */
- return -1;
- }
-
- /* time_t */
- for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
- if(IntKinds_SizeOf[i] == H5_SIZEOF_TIME_T) {
- writeToFiles("time_t","TIME_T", "time_t_f", IntKinds[i]);
- break;
+
+ /* time_t */
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (IntKinds_SizeOf[i] == H5_SIZEOF_TIME_T) {
+ writeToFiles("time_t", "TIME_T", "time_t_f", IntKinds[i]);
+ break;
+ }
+ if (i == (FORTRAN_NUM_INTEGER_KINDS - 1))
+ /* Error: couldn't find a size for time_t */
+ return -1;
}
- if(i == (FORTRAN_NUM_INTEGER_KINDS-1) )
- /* Error: couldn't find a size for time_t */
- return -1;
- }
- /* int */
- writeToFiles("int","Fortran_INTEGER", "int_f", H5_FORTRAN_NATIVE_INTEGER_KIND);
+ /* int */
+ writeToFiles("int", "Fortran_INTEGER", "int_f", H5_FORTRAN_NATIVE_INTEGER_KIND);
- /* int_1, int_2, int_4, int_8 */
+ /* int_1, int_2, int_4, int_8 */
-/* Defined different KINDs of integers */
+ /* Defined different KINDs of integers */
- fprintf(fort_header," INTEGER, DIMENSION(1:%d), PARAMETER :: Fortran_INTEGER_AVAIL_KINDS = (/", FORTRAN_NUM_INTEGER_KINDS);
+ fprintf(fort_header, " INTEGER, DIMENSION(1:%d), PARAMETER :: Fortran_INTEGER_AVAIL_KINDS = (/",
+ FORTRAN_NUM_INTEGER_KINDS);
- for(i=0;i<FORTRAN_NUM_INTEGER_KINDS;i++) {
- fprintf(fort_header,"%d",(int)IntKinds[i]);
- if(i==FORTRAN_NUM_INTEGER_KINDS-1) {
- fprintf(fort_header,"/)\n");
- } else {
- fprintf(fort_header,",");
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ fprintf(fort_header, "%d", (int)IntKinds[i]);
+ if (i == FORTRAN_NUM_INTEGER_KINDS - 1) {
+ fprintf(fort_header, "/)\n");
+ }
+ else {
+ fprintf(fort_header, ",");
+ }
}
- }
+ /* real_4, real_8, real_16 */
- /* real_4, real_8, real_16 */
+ /* Defined different KINDs of reals: */
+ /* if the REAL kind is not available then we assign */
+ /* it a value of the next larger one, but if the next */
+ /* higher one is not available we assigned it the next lowest */
-/* Defined different KINDs of reals: */
-/* if the REAL kind is not available then we assign */
-/* it a value of the next larger one, but if the next */
-/* higher one is not available we assigned it the next lowest */
-
- for(i=0;i<H5_FORTRAN_NUM_REAL_KINDS;i++) {
- if (RealKinds[i] > 0) {
- snprintf(chrA, sizeof(chrA), "Fortran_REAL_%s", Real_C_TYPES[i]);
- snprintf(chrB, sizeof(chrB), "real_%s_f", Real_C_TYPES[i]);
- writeToFiles("float",chrA, chrB, RealKinds[i]);
+ for (i = 0; i < H5_FORTRAN_NUM_REAL_KINDS; i++) {
+ if (RealKinds[i] > 0) {
+ snprintf(chrA, sizeof(chrA), "Fortran_REAL_%s", Real_C_TYPES[i]);
+ snprintf(chrB, sizeof(chrB), "real_%s_f", Real_C_TYPES[i]);
+ writeToFiles("float", chrA, chrB, RealKinds[i]);
+ }
}
- }
- /* hid_t */
- for(i=0;i< FORTRAN_NUM_INTEGER_KINDS;i++) {
- if(IntKinds_SizeOf[i] == H5_SIZEOF_HID_T) {
- writeToFiles("int","HID_T", "hid_t_f", IntKinds[i]);
- break;
+ /* hid_t */
+ for (i = 0; i < FORTRAN_NUM_INTEGER_KINDS; i++) {
+ if (IntKinds_SizeOf[i] == H5_SIZEOF_HID_T) {
+ writeToFiles("int", "HID_T", "hid_t_f", IntKinds[i]);
+ break;
+ }
+ if (i == (FORTRAN_NUM_INTEGER_KINDS - 1))
+ /* Error: couldn't find a size for hid_t */
+ return -1;
+ }
+ /* real_f */
+#if H5_FORTRAN_HAVE_C_LONG_DOUBLE != 0
+ if (H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(long double)) {
+ writeToFilesChr("float", "Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE");
}
- if(i == (FORTRAN_NUM_INTEGER_KINDS-1) )
- /* Error: couldn't find a size for hid_t */
- return -1;
- }
- /* real_f */
-#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
- if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(long double)) {
- writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE");
- } else
+ else
#endif
- if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(double)) {
- writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE");
- } else if(H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(float))
- writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT");
- else {
- /* No exact match, choose the next highest */
- if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(long double))
- writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE");
- else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(double))
- writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE");
- else if(H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(float))
- writeToFilesChr("float","Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT");
+ if (H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(double)) {
+ writeToFilesChr("float", "Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE");
+ }
+ else if (H5_FORTRAN_NATIVE_REAL_SIZEOF == sizeof(float))
+ writeToFilesChr("float", "Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT");
else {
- /* Error: couldn't find a size for real_f */
- printf("Error: couldn't find a size for real_f \n");
- return -1;
+ /* No exact match, choose the next highest */
+ if (H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(long double))
+ writeToFilesChr("float", "Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_LONG_DOUBLE");
+ else if (H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(double))
+ writeToFilesChr("float", "Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_DOUBLE");
+ else if (H5_FORTRAN_NATIVE_REAL_SIZEOF > sizeof(float))
+ writeToFilesChr("float", "Fortran_REAL", "real_f", H5_FORTRAN_NATIVE_REAL_KIND, "C_FLOAT");
+ else {
+ /* Error: couldn't find a size for real_f */
+ printf("Error: couldn't find a size for real_f \n");
+ return -1;
+ }
}
- }
- /* double_f */
-#if H5_FORTRAN_HAVE_C_LONG_DOUBLE!=0
- if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(long double)){
- writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_LONG_DOUBLE");
- } else
+ /* double_f */
+#if H5_FORTRAN_HAVE_C_LONG_DOUBLE != 0
+ if (H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(long double)) {
+ writeToFilesChr("float", "Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND,
+ "C_LONG_DOUBLE");
+ }
+ else
#endif
- if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(double)) {
- writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_DOUBLE");
- } else if(H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(float))
- writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT");
+ if (H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(double)) {
+ writeToFilesChr("float", "Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_DOUBLE");
+ }
+ else if (H5_FORTRAN_NATIVE_DOUBLE_SIZEOF == sizeof(float))
+ writeToFilesChr("float", "Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "C_FLOAT");
#ifdef H5_HAVE_FLOAT128
/* Don't select a higher precision than Fortran can support */
- else if(sizeof(__float128) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
- writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "Fortran_REAL_C_FLOAT128");
+ else if (sizeof(__float128) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
+ writeToFilesChr("float", "Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND,
+ "Fortran_REAL_C_FLOAT128");
}
#else
- else if(sizeof(long double) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
- writeToFilesChr("float","Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND, "Fortran_REAL_C_FLOAT128");
+ else if (sizeof(long double) == H5_FORTRAN_NATIVE_DOUBLE_SIZEOF && H5_PAC_FC_MAX_REAL_PRECISION > 28) {
+ writeToFilesChr("float", "Fortran_DOUBLE", "double_f", H5_FORTRAN_NATIVE_DOUBLE_KIND,
+ "Fortran_REAL_C_FLOAT128");
}
#endif
- else {
- /* Error: couldn't find a size for double_f */
- printf("Error: couldn't find a size for double_f \n");
- return -1;
- }
+ else {
+ /* Error: couldn't find a size for double_f */
+ printf("Error: couldn't find a size for double_f \n");
+ return -1;
+ }
- /* Need the buffer size for the fortran derived type 'hdset_reg_ref_t_f03'
- * in order to be interoperable with C's structure, the C buffer size
- * H5R_DSET_REG_REF_BUF_SIZE is (sizeof(haddr_t)+4)
- */
+ /* Need the buffer size for the fortran derived type 'hdset_reg_ref_t_f03'
+ * in order to be interoperable with C's structure, the C buffer size
+ * H5R_DSET_REG_REF_BUF_SIZE is (sizeof(haddr_t)+4)
+ */
- fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n", H5_SIZEOF_HADDR_T + 4 );
+ fprintf(fort_header, " INTEGER, PARAMETER :: H5R_DSET_REG_REF_BUF_SIZE_F = %u\n",
+ H5_SIZEOF_HADDR_T + 4);
- /* Need the buffer size for the fortran derived type 'h5o_token_t'
- * in order to be interoperable with C's structure.
- */
+ /* Need the buffer size for the fortran derived type 'h5o_token_t'
+ * in order to be interoperable with C's structure.
+ */
fprintf(fort_header, " INTEGER, PARAMETER :: H5O_MAX_TOKEN_SIZE_F = %u\n", H5O_MAX_TOKEN_SIZE);
- /* Close files */
- endCfile();
- endFfile();
- fclose(c_header);
- fclose(fort_header);
+ /* Close files */
+ endCfile();
+ endFfile();
+ fclose(c_header);
+ fclose(fort_header);
- return 0;
+ return 0;
}
-
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);