summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Ff.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2002-10-01 18:55:47 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2002-10-01 18:55:47 (GMT)
commit01a577a4e90c6fcd66888e69705292cd57232da8 (patch)
treeb5e5eeb79887d20a98b397f3a13d05dfa5573202 /fortran/src/H5Ff.c
parent09325c1da67ed0b747b70951f1e373ddd42f9478 (diff)
downloadhdf5-01a577a4e90c6fcd66888e69705292cd57232da8.zip
hdf5-01a577a4e90c6fcd66888e69705292cd57232da8.tar.gz
hdf5-01a577a4e90c6fcd66888e69705292cd57232da8.tar.bz2
[svn-r5956]
Purpose: Added new F90 APIs Description: I added new F90 APIs, tests, and documentation for the following functions: h5fget_obj_count_f h5pequal_f h5tget_member_index_f h5fget_obj_ids_f h5pget_fclose_degree_f h5pset_fclose_degree_f Documentation for exisiting functions was missing: h5freopen_f, h5fflush_f, h5fmount_f, h5unmount_f, h5fget_create_plist_f, h5fget_access_plist_f. Platforms tested: Solaris 2.7, Linux 2.2 and IRIX64-6.5
Diffstat (limited to 'fortran/src/H5Ff.c')
-rw-r--r--fortran/src/H5Ff.c61
1 files changed, 56 insertions, 5 deletions
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index df773c4..6de752d 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -360,7 +360,7 @@ nh5freopen_c (hid_t_f *file_id1, hid_t_f *file_id2)
* Inputs: file_id - file identifier
* Outputs: prop_id - creation property list identifier
* Returns: 0 on success, -1 on failure
- * Programmer: Xiangyang Su
+ * Programmer: Elena Pourmal, Xiangyang Su
* Wednesday, November 3, 1999
* Modifications:
*---------------------------------------------------------------------------*/
@@ -370,7 +370,7 @@ nh5fget_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;
- c_file_id = *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;
@@ -386,8 +386,8 @@ nh5fget_create_plist_c (hid_t_f *file_id, hid_t_f *prop_id)
* Inputs: file_id - file identifier
* Outputs: access_id - access property list identifier
* Returns: 0 on success, -1 on failure
- * Programmer: Xiangyang Su
- * Friday, November 5, 1999
+ * Programmer: Elena Pourmal
+ * Monday, September 30, 2002
* Modifications:
*---------------------------------------------------------------------------*/
int_f
@@ -396,7 +396,7 @@ nh5fget_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;
- c_file_id = *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;
@@ -463,3 +463,54 @@ nh5fclose_c ( hid_t_f *file_id )
if ( H5Fclose(c_file_id) < 0 ) ret_value = -1;
return ret_value;
}
+/*----------------------------------------------------------------------------
+ * Name: h5fget_obj_count_c
+ * Purpose: Call H5Fget_obj_count to get number of open objects within a file
+ * Inputs: file_id - identifier of the file to be closed
+ * obj_type - type of the object
+ * Returns: obj_count - number of objects
+ * 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Monday, September 30, 2002
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, int_f * obj_count)
+{
+ int ret_value = 0;
+ hid_t c_file_id;
+ unsigned c_obj_type;
+ unsigned c_obj_count;
+
+
+ c_file_id = (hid_t)*file_id;
+ c_obj_type = (unsigned) *obj_type;
+ if ( H5Fget_obj_count(c_file_id, c_obj_type, &c_obj_count) < 0 ) ret_value = -1;
+ *obj_count = (int_f)c_obj_count;
+ return ret_value;
+}
+/*----------------------------------------------------------------------------
+ * Name: h5fget_obj_ids_c
+ * Purpose: Call H5Fget_obj_count to get number of open objects within a file
+ * Inputs: file_id - identifier of the file to be closed
+ * obj_type - type of the object
+ * Returns: obj_ids - iarray of open objects identifiers
+ * 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Monday, September 30, 2002
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, hid_t_f *obj_ids)
+{
+ int ret_value = 0;
+ hid_t c_file_id;
+ unsigned c_obj_type;
+
+ c_file_id = (hid_t)*file_id;
+ c_obj_type = (unsigned) *obj_type;
+ if ( H5Fget_obj_ids(c_file_id, c_obj_type, (hid_t *)obj_ids) < 0 ) ret_value = -1;
+ return ret_value;
+}