diff options
Diffstat (limited to 'fortran/src/H5Rf.c')
-rw-r--r-- | fortran/src/H5Rf.c | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index 299f6bd..4430e1a 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -239,102 +239,3 @@ nh5rget_object_type_obj_c (hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) return ret_value; } -/*---------------------------------------------------------------------------- - * 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 - * Programmer: M.S. Breitenfeld - * March 31, 2008 - * Modifications: - *---------------------------------------------------------------------------*/ -int_f -nh5rget_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; - int_f ret_value = -1; - ssize_t c_size; - size_t c_bufsize; - char *c_buf= NULL; /* Buffer to hold C string */ - - ref_c = *ref; - - c_bufsize = (size_t)*name_len+1; - /* - * Allocate buffer to hold name of an attribute - */ - if ((c_buf = HDmalloc(c_bufsize)) == NULL) - return ret_value; - - /* - * Call H5Rget_name function. - */ - if((c_size=H5Rget_name((hid_t)*loc_id, H5R_OBJECT, &ref_c, c_buf, c_bufsize)) < 0) - 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; -} - -/*---------------------------------------------------------------------------- - * 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 - * Programmer: M.S. Breitenfeld - * March 31, 2008 - * Modifications: - *---------------------------------------------------------------------------*/ -int_f -nh5rget_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; - int_f ret_value = -1; - ssize_t c_size; - size_t c_bufsize; - char *c_buf= NULL; /* Buffer to hold C string */ - - HDmemcpy (&ref_c, ref, H5R_DSET_REG_REF_BUF_SIZE); - - c_bufsize = (size_t)*name_len+1; - /* - * Allocate buffer to hold name of an attribute - */ - if ((c_buf = HDmalloc(c_bufsize)) == NULL) - return ret_value; - - /* - * Call H5Rget_name function. - */ - if((c_size=H5Rget_name((hid_t)*loc_id, H5R_DATASET_REGION, &ref_c, c_buf, c_bufsize)) < 0) - 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; -} |