diff options
Diffstat (limited to 'fortran/src/H5Gf.c')
-rw-r--r-- | fortran/src/H5Gf.c | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c index 42f5658..fdce19f 100644 --- a/fortran/src/H5Gf.c +++ b/fortran/src/H5Gf.c @@ -18,9 +18,9 @@ /*---------------------------------------------------------------------------- * Name: h5gcreate_c - * Purpose: Call H5Gcreate to create a group - * Inputs: loc_id - file or group identifier - * name - name of the group + * Purpose: Call H5Gcreate to create a group + * Inputs: loc_id - file or group identifier + * name - name of the group * namelen - name length * size_hint - length of names in the group * Outputs: grp_id - group identifier @@ -43,16 +43,16 @@ nh5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, * Convert FORTRAN name to C name */ c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, c_namelen); if (c_name == NULL) return ret_value; /* * Call H5Gcreate function. */ c_loc_id = *loc_id; - if ( *size_hint == OBJECT_NAMELEN_DEFAULT_F ) + if ( *size_hint == OBJECT_NAMELEN_DEFAULT_F ) c_grp_id = H5Gcreate(c_loc_id, c_name, 0); else { - c_size_hint = (size_t)*size_hint; + c_size_hint = (size_t)*size_hint; c_grp_id = H5Gcreate(c_loc_id, c_name, c_size_hint); } if (c_grp_id < 0) goto DONE; @@ -62,13 +62,13 @@ nh5gcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size_hint, DONE: HDfree(c_name); return ret_value; -} +} /*---------------------------------------------------------------------------- * Name: h5gopen_c - * Purpose: Call H5Gopen to open a dataset - * Inputs: loc_id - file or group identifier - * name - name of the group + * Purpose: Call H5Gopen to open a dataset + * Inputs: loc_id - file or group identifier + * name - name of the group * namelen - name length * Outputs: grp_id - group identifier * Returns: 0 on success, -1 on failure @@ -89,7 +89,7 @@ nh5gopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *grp_id) * Convert FORTRAN name to C name */ c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, c_namelen); if (c_name == NULL) return ret_value; /* @@ -105,27 +105,27 @@ nh5gopen_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *grp_id) DONE: HDfree(c_name); return ret_value; -} +} /*---------------------------------------------------------------------------- * Name: h5gget_obj_info_idx_c * Purpose: Call H5Gget_obj_info to return name and the type of group - * member - * Inputs: loc_id - file or group identifier - * name - name of the group + * member + * Inputs: loc_id - file or group identifier + * name - name of the group * namelen - name length * idx - index of the group member * Outputs: obj_name - buffer to store member's name * obj_namelen - length of the buffer - * obj_type - type of the object + * obj_type - type of the object * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal * Wednesday, August 5, 1999 * Modifications: *---------------------------------------------------------------------------*/ int_f -nh5gget_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) +nh5gget_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) { int ret_value = -1; hid_t c_loc_id = (hid_t)*loc_id; @@ -142,13 +142,13 @@ nh5gget_obj_info_idx_c */ c_namelen = *namelen; c_obj_namelen = *obj_namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, c_namelen); if (c_name == NULL) return ret_value; /* * Allocate buffer to hold name of the object */ - if (c_obj_namelen) c_obj_name = (char *)HDmalloc(c_obj_namelen + 1); + if (c_obj_namelen) c_obj_name = (char *)HDmalloc(c_obj_namelen + 1); if (c_obj_name == NULL) { HDfree(c_name); return ret_value; } @@ -175,15 +175,15 @@ DONE: HDfree(c_obj_name); HDfree(c_name); return ret_value; -} +} /*---------------------------------------------------------------------------- * Name: h5gn_members_c - * Purpose: Call H5Gn_members to find number of objects in the group - * Inputs: loc_id - file or group identifier - * name - name of the group + * Purpose: Call H5Gn_members to find number of objects in the group + * Inputs: loc_id - file or group identifier + * name - name of the group * namelen - name length - * Outputs: nmemebers - number of members + * Outputs: nmemebers - number of members * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal * Wednesday, August 5, 1999 @@ -196,14 +196,14 @@ nh5gn_members_c (hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *nmembers) hid_t c_loc_id=(hid_t)*loc_id; char *c_name; int c_namelen; - hsize_t c_nmembers; + hsize_t c_nmembers; hid_t gid = (-1); /* * Convert FORTRAN name to C name */ c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); + c_name = (char *)HD5f2cstring(name, c_namelen); if (c_name == NULL) return ret_value; /* Get a temporary group ID for the group to query */ @@ -221,10 +221,10 @@ DONE: HDfree(c_name); return ret_value; -} +} /*---------------------------------------------------------------------------- * Name: h5gclose_c - * Purpose: Call H5Gclose to close the group + * Purpose: Call H5Gclose to close the group * Inputs: grp_id - identifier of the group to be closed * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal @@ -232,12 +232,12 @@ DONE: * Modifications: *---------------------------------------------------------------------------*/ -int_f +int_f nh5gclose_c ( hid_t_f *grp_id ) { int ret_value = 0; hid_t c_grp_id; - + c_grp_id = (hid_t)*grp_id; if ( H5Gclose(c_grp_id) < 0 ) ret_value = -1; return ret_value; @@ -246,8 +246,8 @@ nh5gclose_c ( hid_t_f *grp_id ) /*---------------------------------------------------------------------------- * Name: h5glink_c - * Purpose: Call H5Glink to link the specified type - * Inputs: loc_id - identifier of file or group + * Purpose: Call H5Glink to link the specified type + * Inputs: loc_id - identifier of file or group * link_type - link type * current_name - name of the existing object for hard link, * anything for the soft link @@ -278,7 +278,7 @@ nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name, int_f *current_ if (c_current_name == NULL) return ret_value; c_new_name = (char *)HD5f2cstring(new_name, c_new_namelen); - if(c_new_name == NULL) { HDfree(c_current_name); + if(c_new_name == NULL) { HDfree(c_current_name); return ret_value; } /* @@ -299,8 +299,8 @@ DONE: /*---------------------------------------------------------------------------- * Name: h5glink2_c - * Purpose: Call H5Glink2 to link the specified type - * Inputs: cur_loc_id - identifier of file or group + * Purpose: Call H5Glink2 to link the specified type + * Inputs: cur_loc_id - identifier of file or group * cur_name - name of the existing object for hard link releative * to cur_loc_id location, * anything for the soft link @@ -313,7 +313,7 @@ DONE: * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal * Wednesday, September 25, 2002 - * Modifications: + * Modifications: *---------------------------------------------------------------------------*/ int_f @@ -357,8 +357,8 @@ DONE: /*---------------------------------------------------------------------------- * Name: h5gunlink_c - * Purpose: Call H5Gunlink to remove the specified name - * Inputs: loc_id - identifier of file or group + * Purpose: Call H5Gunlink to remove the specified name + * Inputs: loc_id - identifier of file or group * name - name of the object to unlink * Returns: 0 on success, -1 on failure * Programmer: Mingshi Chen @@ -396,8 +396,8 @@ DONE: /*---------------------------------------------------------------------------- * Name: h5gmove_c * Purpose: Call H5Gmove to rename an object within an HDF5 file - * Inputs: loc_id - identifier of file or group - * src_name - name of the original object + * Inputs: loc_id - identifier of file or group + * src_name - name of the original object * src_namelen - original name lenghth * dst_name - new name for the object * dst_namelen - new name lenghth @@ -424,7 +424,7 @@ nh5gmove_c(hid_t_f *loc_id, _fcd src_name, int_f *src_namelen, _fcd dst_name, in if(c_src_name == NULL) return ret_value; c_dst_name = (char *)HD5f2cstring(dst_name, c_dst_namelen); - if(c_dst_name == NULL) { HDfree(c_src_name); + if(c_dst_name == NULL) { HDfree(c_src_name); return ret_value; } /* @@ -445,7 +445,7 @@ DONE: /*---------------------------------------------------------------------------- * Name: h5gmove2_c * Purpose: Call H5Gmove2 to rename an object within an HDF5 file - * Inputs: src_loc_id - identifier of file or group + * Inputs: src_loc_id - identifier of file or group * src_name - name of the original object relative to src_loc_id * src_namelen - original name lenghth * dst_loc_id - new location identifier @@ -454,7 +454,7 @@ DONE: * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal * Wednesday, September 25, 2002 - * Modifications: + * Modifications: *---------------------------------------------------------------------------*/ int_f @@ -475,7 +475,7 @@ nh5gmove2_c(hid_t_f *src_loc_id, _fcd src_name, int_f *src_namelen, hid_t_f *dst if(c_src_name == NULL) return ret_value; c_dst_name = (char *)HD5f2cstring(dst_name, c_dst_namelen); - if(c_dst_name == NULL) { HDfree(c_src_name); + if(c_dst_name == NULL) { HDfree(c_src_name); return ret_value; } /* @@ -497,8 +497,8 @@ DONE: /*---------------------------------------------------------------------------- * Name: h5gget_linkval_c * Purpose: Call H5Gget_linkval to return the name of object - * Inputs: loc_id - identifier of file or group - * name - name of the object that symbolic link points to + * Inputs: loc_id - identifier of file or group + * name - name of the object that symbolic link points to * namelen - the name lenghth * size - lenghth of retrurned value * Outputs: value - name to be returned @@ -530,10 +530,10 @@ nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _f */ if(*size) c_value = (char *)HDmalloc((size_t)*size); if(c_value == NULL) { - HDfree(c_name); + HDfree(c_name); return ret_value; } - + /* * Call H5Gget_linkval function */ @@ -542,7 +542,7 @@ nh5gget_linkval_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *size, _f c_loc_id = (hid_t)*loc_id; c_ret_value = H5Gget_linkval(c_loc_id, c_name, c_size, c_value); if(c_ret_value < 0) goto DONE; - + /* * Convert C name to FORTRAN and place it in the given buffer @@ -559,8 +559,8 @@ DONE: /*---------------------------------------------------------------------------- * Name: h5gset_comment_c * Purpose: Call H5Gset_comment to set comments for the specified object - * Inputs: loc_id - identifier of file or group - * name - name of object whose comment is to be set or reset + * Inputs: loc_id - identifier of file or group + * name - name of object whose comment is to be set or reset * namelen - the name lenghth * comment - the new comment * commentlen - new comment lenghth @@ -608,8 +608,8 @@ DONE: /*---------------------------------------------------------------------------- * Name: h5gget_comment_c * Purpose: Call H5Gget_comment to retrieve comments for the specified object - * Inputs: loc_id - identifier of file or group - * name - name of object whose comment is to be set or reset + * Inputs: loc_id - identifier of file or group + * name - name of object whose comment is to be set or reset * namelen - the name lenghth * bufsize - at most bufsize characters * comment - the new comment @@ -629,7 +629,7 @@ nh5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, char *c_comment = NULL; size_t c_bufsize; herr_t c_ret_value; - + /* * Convert Fortran name to C name */ @@ -646,7 +646,7 @@ nh5gget_comment_c(hid_t_f *loc_id, _fcd name, int_f *namelen, size_t_f *bufsize, HDfree(c_name); return ret_value; } - + /* * Call H5Gget_comment function */ |