summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Pf.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2002-10-02 19:15:43 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2002-10-02 19:15:43 (GMT)
commitacb356d30928d02170dd275073d19344e2f0cb9b (patch)
tree5a9e0a7c45954580f5e7eea33378807e4f99ea35 /fortran/src/H5Pf.c
parent26cd535ff23e4f6f440a4aa28e409f474ef92f66 (diff)
downloadhdf5-acb356d30928d02170dd275073d19344e2f0cb9b.zip
hdf5-acb356d30928d02170dd275073d19344e2f0cb9b.tar.gz
hdf5-acb356d30928d02170dd275073d19344e2f0cb9b.tar.bz2
[svn-r5958]
Purpose: Added missing fortran functions h5set(get)_buffer_f. Also added docs and tests for them. Solution: Currently functions do not accept conversion and background buffers. This corresponds to H5set(get)_buffer call with buffer pointers set to NULL. If there is a demand, I can overload the functions to have new parameters and go through all trouble creating functions for all supported datatypes. Platforms tested: Solaris 2.7, Linux 2.2., IRIX64-6.5
Diffstat (limited to 'fortran/src/H5Pf.c')
-rw-r--r--fortran/src/H5Pf.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 438b07d..0e08e28 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -1886,3 +1886,54 @@ nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
ret_value = 0;
return ret_value;
}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_buffer_c
+ * Purpose: Call H5Pset_buffer to set size of conversion buffer
+ * Inputs: prp_id - t`dataset trasfer property list identifier
+ * size - size of the buffer
+ * Outputs: NONE
+ * Returns: 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Wednesday, October 2, 2002
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
+{
+ int ret_value = 0;
+ hid_t c_prp_id;
+ hsize_t c_size;
+
+ c_prp_id = (hid_t)*prp_id;
+ c_size = (hsize_t)*size;
+ if ( H5Pset_buffer(c_prp_id, c_size, NULL, NULL) < 0 ) ret_value = -1;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_buffer_c
+ * Purpose: Call H5Pget_buffer to get size of conversion buffer
+ * Inputs: prp_id - t`dataset trasfer property list identifier
+ * Outputs: size - size of conversion buffer
+ * Returns: 0 on success, -1 on failure
+ * Programmer: Elena Pourmal
+ * Wednesday, October 2, 2002
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
+{
+ int ret_value = -1;
+ hid_t c_prp_id;
+ hsize_t c_size;
+
+ c_prp_id = (hid_t)*prp_id;
+ c_size = H5Pget_buffer(c_prp_id, NULL, NULL);
+ if ( c_size < 0 ) return ret_value;
+ *size = (hsize_t)c_size;
+ ret_value = 0;
+ return ret_value;
+}