summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5If.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-12-11 18:29:25 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-12-11 18:29:25 (GMT)
commite865f21190c01363f03f4753fce66cac26f0409b (patch)
tree2c6ccc8a4d6d1487d9b602c16582ad5163cd8d29 /fortran/src/H5If.c
parentc44fd88805c4b342f80167e9237e5ecf7f71a158 (diff)
downloadhdf5-e865f21190c01363f03f4753fce66cac26f0409b.zip
hdf5-e865f21190c01363f03f4753fce66cac26f0409b.tar.gz
hdf5-e865f21190c01363f03f4753fce66cac26f0409b.tar.bz2
[svn-r7934] Purpose:
Add new feature Description: Add FORTRAN wrappers for new H5I routines. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
Diffstat (limited to 'fortran/src/H5If.c')
-rw-r--r--fortran/src/H5If.c88
1 files changed, 88 insertions, 0 deletions
diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c
index 1de90d6..3807778 100644
--- a/fortran/src/H5If.c
+++ b/fortran/src/H5If.c
@@ -15,6 +15,7 @@
/* This files contains C stubs for H5I Fortran APIs */
#include "H5f90.h"
+#include "H5Eprivate.h"
/*----------------------------------------------------------------------------
* Name: h5iget_type_c
@@ -88,3 +89,90 @@ DONE:
HDfree(c_buf);
return ret_value;
}
+
+/*----------------------------------------------------------------------------
+ * Name: h5iinc_ref_c
+ * Purpose: Call H5Iinc_ref to increment object's reference count
+ * Inputs: obj_id - object identifier
+ * Outputs: ref_count - Reference count of ID
+ * Returns: current reference count on success, -1 on failure
+ * Programmer: Quincey Koziol
+ * Tuesday, December 9, 2003
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5iinc_ref_c(hid_t_f *obj_id, int_f *ref_count)
+{
+ int ret_value;
+
+ /*
+ * Call H5Iinc_ref function
+ */
+ if ((ret_value = H5Iinc_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Set output & return values */
+ *ref_count=ret_value;
+ ret_value=0;
+
+done:
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5idec_ref_c
+ * Purpose: Call H5Idec_ref to decrement object's reference count
+ * Inputs: obj_id - object identifier
+ * Outputs: ref_count - Reference count of ID
+ * Returns: current reference count on success, -1 on failure
+ * Programmer: Quincey Koziol
+ * Tuesday, December 9, 2003
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5idec_ref_c(hid_t_f *obj_id, int_f *ref_count)
+{
+ int ret_value;
+
+ /*
+ * Call H5Idec_ref function
+ */
+ if ((ret_value = H5Idec_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Set output & return values */
+ *ref_count=ret_value;
+ ret_value=0;
+
+done:
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5iget_ref_c
+ * Purpose: Call H5Iget_ref to retrieve object's reference count
+ * Inputs: obj_id - object identifier
+ * Outputs: ref_count - Reference count of ID
+ * Returns: current reference count on success, -1 on failure
+ * Programmer: Quincey Koziol
+ * Tuesday, December 9, 2003
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5iget_ref_c(hid_t_f *obj_id, int_f *ref_count)
+{
+ int ret_value;
+
+ /*
+ * Call H5Iget_ref function
+ */
+ if ((ret_value = H5Iget_ref(*obj_id)) < 0)
+ HGOTO_DONE(FAIL);
+
+ /* Set output & return values */
+ *ref_count=ret_value;
+ ret_value=0;
+
+done:
+ return ret_value;
+}