diff options
-rw-r--r-- | fortran/src/H5Af.c | 168 | ||||
-rw-r--r-- | fortran/src/H5Ef.c | 41 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 13 | ||||
-rw-r--r-- | hl/fortran/src/H5LTf90proto.h | 30 | ||||
-rw-r--r-- | hl/fortran/src/H5LTfc.c | 213 |
5 files changed, 8 insertions, 457 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 0fa84a3..8f012cf 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -117,111 +117,6 @@ done: return ret_value; } - -/****if* H5Af/h5aopen_idx_c - * NAME - * h5aopen_idx_c - * PURPOSE - * Call H5Aopen_by_idx to open an attribute - * INPUTS - * obj_id - object identifier - * idx - attribute index ( zero based) - * OUTPUTS - * attr_id - attribute identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5aopen_idx_c (hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id) -/******/ -{ - int_f ret_value = 0; /* Return value */ - - /* - * Call H5Aopen_by_idx function. - */ - if((*attr_id = (hid_t_f)H5Aopen_by_idx((hid_t)*obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, (hsize_t)*idx, H5P_DEFAULT, H5P_DEFAULT)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - - -/****if* H5Af/h5aget_space_c - * NAME - * h5aget_space_c - * PURPOSE - * Call H5Aget_space to get attribute's dataspace - * INPUTS - * attr_id - attribute identifier - * OUTPUTS - * space_id - dataspace identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5aget_space_c (hid_t_f *attr_id, hid_t_f *space_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Aget_space function. - */ - if ((*space_id = (hid_t_f)H5Aget_space((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - -/****if* H5Af/h5aget_type_c - * NAME - * h5aget_type_c - * PURPOSE - * Call H5Aget_space to get attribute's datatype - * INPUTS - * attr_id - attribute identifier - * OUTPUTS - * type_id - datatype identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Thursday, August 12, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5aget_type_c (hid_t_f *attr_id, hid_t_f *type_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - - /* - * Call H5Aget_type function. - */ - if ((*type_id = (hid_t_f)H5Aget_type((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - /****if* H5Af/h5aget_num_attrs_c * NAME * h5aget_num_attrs_c @@ -311,69 +206,6 @@ done: return ret_value; } -/****if* H5Af/h5aget_storage_size_c - * NAME - * h5aget_storage_size_c - * PURPOSE - * Call H5Aget_storage_size - * INPUTS - * attr_id - identifier of an attribute - * OUTPUTS - * size - attributes storage requirements - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * January, 2008 - * HISTORY - * N/A - * SOURCE -*/ - -int_f -h5aget_storage_size_c ( hid_t_f *attr_id, hsize_t_f *size) -/******/ -{ - int_f ret_value=0; /* Return value */ - - if ((*size = (hsize_t_f)H5Aget_storage_size((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} - -/****if* H5Af/h5aget_create_plist_c - * NAME - * h5aget_create_plist_c - * PURPOSE - * Call H5Aget_create_plist - * INPUTS - * attr_id - identifier of an attribute - * OUTPUTS - * creation_prop_id - Identifier for the attribute’s creation property - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * January, 2008 - * HISTORY - * N/A - * SOURCE -*/ - -int_f -h5aget_create_plist_c ( hid_t_f *attr_id, hid_t_f *creation_prop_id) -/******/ -{ - int_f ret_value=0; /* Return value */ - - if ((*creation_prop_id = (hid_t_f)H5Aget_create_plist((hid_t)*attr_id)) < 0) - HGOTO_DONE(FAIL); - -done: - return ret_value; -} /****if* H5Af/h5arename_by_name_c * NAME diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index bba0157..4b1d4c9 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -235,51 +235,14 @@ done: return ret_value; } -/****if* H5Ef/h5eset_auto_c - * NAME - * h5eset_auto_c - * PURPOSE - * Call H5Eset_auto to turn automatic error printing on or off. - * INPUTS - * printflag - flag to turn automatic error printing on or off. - * OUTPUTS - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Friday, November 17, 2000 - * HISTORY - * Major bug fix: Function never disabled printing. - * SOURCE -*/ -int_f -h5eset_auto_c(int_f* printflag) -/******/ -{ - herr_t status = -1; - int_f ret_value = 0; - - if(*printflag == 1) - status = H5Eset_auto2(H5E_DEFAULT, (H5E_auto2_t)H5Eprint2, stderr); - else if(*printflag == 0) - status = H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - if(status < 0) - HGOTO_DONE(FAIL) - -done: - return ret_value; -} - - /****if* H5Ef/h5eset_auto2_c * NAME * h5eset_auto2_c * PURPOSE * Calls H5Eset_auto2 * INPUTS - * estack_id - Error stack identifier. - * func - Function to be called upon an error condition. + * estack_id - Error stack identifier. + * func - Function to be called upon an error condition. * client_data - Data passed to the error function. * * RETURNS diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index 10acc22..b26e985 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -197,16 +197,11 @@ H5_FCDLL int_f h5gget_info_by_name_c(hid_t_f *loc_id, _fcd group_name, size_t_f * Functions from H5Af.c */ -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 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 h5adelete_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen); -H5_FCDLL int_f h5aopen_idx_c(hid_t_f *obj_id, int_f *idx, hid_t_f *attr_id); -H5_FCDLL int_f h5aget_space_c(hid_t_f *attr_id, hid_t_f *space_id); -H5_FCDLL int_f h5aget_type_c(hid_t_f *attr_id, hid_t_f *type_id); 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 h5aget_storage_size_c( hid_t_f *attr_id, hsize_t_f *size ); 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, @@ -220,7 +215,6 @@ H5_FCDLL int_f h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_ 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 h5aget_create_plist_c( hid_t_f *attr_id, hid_t_f *creation_prop_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, @@ -373,9 +367,13 @@ 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); +#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); +#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); @@ -384,7 +382,9 @@ H5_FCDLL int_f h5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t 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); +#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); @@ -517,7 +517,6 @@ 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_auto_c(int_f* printflag); H5_FCDLL int_f h5eset_auto2_c(int_f* printflag, hid_t_f *estack_id, H5E_auto2_t func, void *client_data); /* diff --git a/hl/fortran/src/H5LTf90proto.h b/hl/fortran/src/H5LTf90proto.h index 9de97e0..20d043e 100644 --- a/hl/fortran/src/H5LTf90proto.h +++ b/hl/fortran/src/H5LTf90proto.h @@ -120,36 +120,6 @@ h5ltget_attribute_string_c(hid_t_f *loc_id, HDF5_HL_F90CSTUBDLL int_f -h5ltset_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltset_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f -h5ltset_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *buflen, - void *buf); - -HDF5_HL_F90CSTUBDLL -int_f h5ltget_dataset_ndims_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, diff --git a/hl/fortran/src/H5LTfc.c b/hl/fortran/src/H5LTfc.c index 3122b60..c955590 100644 --- a/hl/fortran/src/H5LTfc.c +++ b/hl/fortran/src/H5LTfc.c @@ -367,219 +367,6 @@ done: } /*------------------------------------------------------------------------- -* Function: H5LTset_attribute_float_c -* -* Purpose: Call H5LTset_attribute_float -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltset_attribute_float_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - size_t c_size; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - - /* - * Call H5LTset_attribute_float function. - */ - c_loc_id = (hid_t)*loc_id; - c_size = (size_t)*size; - - ret = H5LTset_attribute_float(c_loc_id,c_name,c_attrname,(float *)buf,c_size); - - if (ret < 0) - goto done; - - ret_value = 0; - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - - return ret_value; -} - - -/*------------------------------------------------------------------------- -* Function: H5LTset_attribute_double_c -* -* Purpose: Call H5LTset_attribute_double -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltset_attribute_double_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *size, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - size_t c_size; - - /* - * Convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - - /* - * Call H5LTset_attribute_double function. - */ - c_loc_id = (hid_t)*loc_id; - c_size = (size_t)*size; - - ret = H5LTset_attribute_double(c_loc_id,c_name,c_attrname,(double *)buf,c_size); - - if (ret < 0) - goto done; - - ret_value = 0; - - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - - return ret_value; -} - -/*------------------------------------------------------------------------- -* Function: H5LTset_attribute_string_c -* -* Purpose: Call H5LTset_attribute_string -* -* Return: Success: 0, Failure: -1 -* -* Programmer: pvn@ncsa.uiuc.edu -* -* Date: October 05, 2004 -* -* Comments: -* -* Modifications: -* -* -*------------------------------------------------------------------------- -*/ - -int_f -h5ltset_attribute_string_c(hid_t_f *loc_id, - size_t_f *namelen, - _fcd dsetname, - size_t_f *attrnamelen, - _fcd attrname, - size_t_f *buflen, - void *buf) -{ - int ret_value = -1; - herr_t ret; - hid_t c_loc_id; - char *c_name = NULL; - char *c_attrname = NULL; - char *c_buf = NULL; - - /* - * convert FORTRAN name to C name - */ - c_name = (char *)HD5f2cstring(dsetname, (size_t)*namelen); - if (c_name == NULL) - goto done; - - c_attrname = (char *)HD5f2cstring(attrname, (size_t)*attrnamelen); - if (c_attrname == NULL) - goto done; - - c_buf = (char *)HD5f2cstring((_fcd)buf, (size_t)*buflen); - if (c_buf == NULL) - goto done; - - - /* - * call H5LTset_attribute_string function. - */ - c_loc_id = (hid_t)*loc_id; - - ret = H5LTset_attribute_string(c_loc_id,c_name,c_attrname,c_buf); - - if (ret < 0) - goto done; - - ret_value = 0; - - -done: - if(c_name!=NULL) - HDfree(c_name); - if(c_attrname!=NULL) - HDfree(c_attrname); - if(c_buf!=NULL) - HDfree(c_buf); - - return ret_value; -} - -/*------------------------------------------------------------------------- * Function: H5LTget_attribute_c * * Purpose: Call H5LTget_attribute_int |