diff options
Diffstat (limited to 'fortran/src/H5Rf.c')
-rw-r--r-- | fortran/src/H5Rf.c | 248 |
1 files changed, 0 insertions, 248 deletions
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 271bfee..b196c71 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -24,53 +24,6 @@ #include "H5f90.h" #include "H5Eprivate.h" -/****if* H5Rf/h5rcreate_object_c - * NAME - * h5rcreate_object_c - * PURPOSE - * Call H5Rcreate to create a reference to an object - * INPUTS - * loc_id - file or group identifier - * name - name of the dataset - * namelen - name length - * OUTPUTS - * ref - reference to the object - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * SOURCE -*/ -int_f -h5rcreate_object_c(haddr_t_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen) -/******/ -{ - char *c_name = NULL; - hobj_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) - - /* - * Call H5Rcreate function. - */ - if(H5Rcreate(&ref_c, *loc_id, c_name, H5R_OBJECT, (hid_t)-1) < 0) - HGOTO_DONE(FAIL) - - /* Copy the reference created */ - *ref = (haddr_t_f)ref_c; - -done: - if(c_name) - HDfree(c_name); - return ret_value; -} /* h5rcreate_object_c() */ - /****if* H5Rf/h5rcreate_region_c * NAME * h5rcreate_region_c @@ -165,89 +118,6 @@ h5rcreate_ptr_c (void *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *r return ret_value; } -/****if* H5Rf/h5rdereference_region_c - * NAME - * h5rdereference_region_c - * PURPOSE - * Call H5Rdereference to dereference to dataset region - * INPUTS - * dset_id - dataset identifier - * ref - reference to the dataset region - * OUTPUTS - * obj_id - dereferenced dataset identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5rdereference_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *obj_id) -/******/ -{ - hdset_reg_ref_t ref_c; - hid_t c_obj_id; - int_f ret_value = 0; - - /* Copy the reference to dereference */ - HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); - - /* - * Call H5Rdereference function. - */ - if((c_obj_id = H5Rdereference2((hid_t)*dset_id, H5P_DEFAULT, H5R_DATASET_REGION, &ref_c)) < 0) - HGOTO_DONE(FAIL) - - /* Copy the object's ID */ - *obj_id = (hid_t_f)c_obj_id; - -done: - return ret_value; -} /* end h5rdereference_region_c() */ - -/****if* H5Rf/h5rdereference_object_c - * NAME - * h5rdereference_object_c - * PURPOSE - * Call H5Rdereference to dereference an object - * INPUTS - * dset_id - dataset identifier - * ref - reference to an object - * OUTPUTS - * obj_id - dereferenced object identifier - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * Elena Pourmal - * Wednesday, December 1, 1999 - * HISTORY - * - * SOURCE -*/ -int_f -h5rdereference_object_c(hid_t_f *dset_id, haddr_t_f *ref, hid_t_f *obj_id) -/******/ -{ - hid_t c_obj_id; - hobj_ref_t ref_c = (hobj_ref_t)*ref; - int_f ret_value = 0; - - /* - * Call H5Rdereference function. - */ - if((c_obj_id = H5Rdereference2((hid_t)*dset_id, H5P_DEFAULT, H5R_OBJECT, &ref_c)) < 0) - HGOTO_DONE(FAIL) - - /* Copy the object's ID */ - *obj_id = (hid_t_f)c_obj_id; - -done: - return ret_value; -} /* end h5rdereference_object_c() */ - /****if* H5Rf/h5rdereference_ptr_c * NAME * h5rdereference_ptr_c @@ -410,124 +280,6 @@ done: return ret_value; } /* end h5rget_object_type_obj_c() */ -/****if* H5Rf/h5rget_name_object_c - * NAME - * h5rget_name_object_c - * PURPOSE - * Call H5Rget_name for an object - * INPUTS - * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref - An object or dataset region reference. - * - * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * March 31, 2008 - * HISTORY - * - * SOURCE -*/ -int_f -h5rget_name_object_c(hid_t_f *loc_id, haddr_t_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) -/******/ -{ - hobj_ref_t ref_c = (hobj_ref_t)*ref; - ssize_t c_size; - size_t c_bufsize = (size_t)*name_len + 1; - char *c_buf = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; - - - /* - * Allocate buffer to hold name of an attribute - */ - if(NULL == (c_buf = (char *)HDmalloc(c_bufsize))) - HGOTO_DONE(FAIL) - - /* - * Call H5Rget_name function. - */ - if((c_size = H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0) - HGOTO_DONE(FAIL) - - /* - * 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; - -done: - if(c_buf) - HDfree(c_buf); - return ret_value; -} /* end h5rget_name_object_c() */ - -/****if* H5Rf/h5rget_name_region_c - * NAME - * h5rget_name_region_c - * PURPOSE - * Call H5Rget_name for a dataset region - * INPUTS - * - * loc_id - Identifier for the dataset containing the reference or for the group that dataset is in. - * ref - An object or dataset region reference. - * - * OUTPUTS - * name - A name associated with the referenced object or dataset region. - * size - The size of the name buffer. - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * March 31, 2008 - * HISTORY - * - * SOURCE -*/ -int_f -h5rget_name_region_c(hid_t_f *loc_id, int_f *ref, _fcd name, size_t_f *name_len, size_t_f *size_default) -/******/ -{ - hdset_reg_ref_t ref_c; - ssize_t c_size; - size_t c_bufsize = (size_t)*name_len + 1; - char *c_buf = NULL; /* Buffer to hold C string */ - int_f ret_value = 0; - - /* Copy the reference to query */ - HDmemcpy(&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); - - /* - * Allocate buffer to hold name of an attribute - */ - if(NULL == (c_buf = (char *)HDmalloc(c_bufsize))) - HGOTO_DONE(FAIL) - - /* - * Call H5Rget_name function. - */ - if((c_size = H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0) - HGOTO_DONE(FAIL) - - /* - * 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; - -done: - if(c_buf) - HDfree(c_buf); - return ret_value; -} - /****if* H5Rf/h5rget_name_ptr_c * NAME * h5rget_name_ptr_c |