summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Pf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/H5Pf.c')
-rw-r--r--fortran/src/H5Pf.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 7a3f899..98e5ff6 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -5546,3 +5546,73 @@ nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nb
ret_value = 0;
return ret_value;
}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_file_image_c
+ * Purpose: Calls H5Pset_file_image
+ *
+ * Inputs:
+ * fapl_id - File access property list identifier
+ * buf_ptr - Pointer to the initial file image,
+ * or NULL if no initial file image is desired
+ * buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M. Scot Breitenfeld
+ * February 19, 2012
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5pset_file_image_c(hid_t_f *fapl_id, void *buf_ptr, size_t_f *buf_len)
+{
+ int ret_value = -1;
+ /*
+ * Call H5Pset_file_image function.
+ */
+ if( (H5Pset_file_image((hid_t)*fapl_id, buf_ptr, (size_t)*buf_len)) <0 )
+ return ret_value; /* error occurred */
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_file_image_c
+ * Purpose: Calls H5Pget_file_image
+ *
+ * Inputs:
+ * fapl_id - File access property list identifier
+ * Outputs:
+ * buf_ptr - Pointer to the initial file image,
+ * or NULL if no initial file image is desired
+ * buf_len - Size of the supplied buffer, or 0 (zero) if no initial image is desired
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M. Scot Breitenfeld
+ * February 19, 2012
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5pget_file_image_c(hid_t_f *fapl_id, void **buf_ptr, size_t_f *buf_len_ptr)
+{
+ int ret_value = -1;
+ size_t c_buf_len_ptr;
+ void *c_buf_ptr = NULL;
+
+ c_buf_len_ptr = (size_t)*buf_len_ptr;
+
+ /*
+ * Call H5Pget_file_image function.
+ */
+ if( (H5Pget_file_image((hid_t)*fapl_id, (void **)&c_buf_ptr, &c_buf_len_ptr)) <0 )
+ return ret_value; /* error occurred */
+
+ HDmemcpy((void *)*buf_ptr, (void *)c_buf_ptr, c_buf_len_ptr);
+
+ *buf_len_ptr=(size_t_f)c_buf_len_ptr;
+
+ ret_value = 0;
+ if(c_buf_ptr) HDfree(c_buf_ptr);
+
+ return ret_value;
+}