summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Ff.c
diff options
context:
space:
mode:
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;
+}