summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Pf.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2008-05-06 19:23:32 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2008-05-06 19:23:32 (GMT)
commit0bfb17bf00b9d4dae00e7f454c437ca98f2a5677 (patch)
tree1d4ef1dd28b642ee28d27fd5fc579c5a10714538 /fortran/src/H5Pf.c
parent464e4619f670006c2477583b7f9d7b0530b0a245 (diff)
downloadhdf5-0bfb17bf00b9d4dae00e7f454c437ca98f2a5677.zip
hdf5-0bfb17bf00b9d4dae00e7f454c437ca98f2a5677.tar.gz
hdf5-0bfb17bf00b9d4dae00e7f454c437ca98f2a5677.tar.bz2
[svn-r14942] Maintenance: Merged new Fortran APIs and tests from trunk into hdf5_1_8 branch
(used svn merge -r 14505:14941 http://svn.hdfgorup.uiuc.edu/hdf5/trunk/fortran command). Updated MANIFEST Disabled -O3 optimization for gcc 4.3 (long due check-in) Platforms tested: kagiso with PGI compilers, smirom with g95 and v16 option, linew
Diffstat (limited to 'fortran/src/H5Pf.c')
-rw-r--r--fortran/src/H5Pf.c1034
1 files changed, 1026 insertions, 8 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index f674530..ea7a4bb 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -1,3 +1,4 @@
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
@@ -17,7 +18,6 @@
#include "H5f90.h"
-
/*----------------------------------------------------------------------------
* Name: h5pcreate_c
* Purpose: Call H5Pcreate to create a property list
@@ -2710,16 +2710,20 @@ int_f
nh5pget_class_name_c(hid_t_f *class, _fcd name, int_f *name_len)
{
int_f ret_value = -1;
- hid_t c_class;
- char* c_name;
-
+ char *c_name = NULL; /* Buffer to hold C string */
+ size_t c_size;
- c_class = (hid_t)*class;
+ c_size = (size_t)*name_len + 1;
+ /*
+ * Allocate buffer to hold name
+ */
+ if ((c_name = HDmalloc(c_size)) == NULL)
+ goto DONE;
/*
* Call H5Pget_class_name function.
*/
- c_name = H5Pget_class_name(c_class);
- if( c_name == NULL) goto DONE;
+ c_name = H5Pget_class_name((hid_t)*class);
+ if(c_name == NULL) goto DONE;
HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len);
ret_value = (int_f)HDstrlen(c_name);
@@ -3131,7 +3135,7 @@ nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag)
*/
status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax);
- if ( status < 0 ) return ret_value;
+ if ( status < 0 ) return ret_value; /* error occurred */
ret_value = 0;
return ret_value;
}
@@ -3414,3 +3418,1017 @@ DONE:
return ret_value;
}
+/*----------------------------------------------------------------------------
+ * Name: h5pget_attr_phase_change_c
+ * Purpose: Calls H5Pget_attr_phase_change
+ *
+ * Inputs: ocpl_id - Object (dataset or group) creation property list identifier
+ * Outputs max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * January, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense )
+{
+ int ret_value = -1;
+ hid_t c_ocpl_id;
+ unsigned c_max_compact;
+ unsigned c_min_dense;
+ herr_t ret;
+ /*
+ * Call H5Pget_attr_phase_change function.
+ */
+ c_ocpl_id = (hid_t)*ocpl_id;
+ ret = H5Pget_attr_phase_change(c_ocpl_id, &c_max_compact,&c_min_dense);
+ if (ret < 0) return ret_value;
+
+ *max_compact = (int_f)c_max_compact;
+ *min_dense = (int_f)c_min_dense;
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_attr_creation_order_c
+ * Purpose: Calls H5Ppset_attr_creation_order
+ *
+ * Inputs: ocpl_id - Object (dataset or group) creation property list identifier
+ * Outputs crt_order_flags - Flags specifying whether to track and index attribute creation order
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * January, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags )
+{
+ int ret_value = -1;
+ unsigned c_crt_order_flags;
+ herr_t ret;
+ /*
+ * Call h5pset_attr_creation_order function.
+ */
+ c_crt_order_flags = (unsigned)*crt_order_flags;
+ ret = H5Pset_attr_creation_order((hid_t)*ocpl_id, c_crt_order_flags);
+ if (ret < 0) return ret_value;
+
+ *crt_order_flags = (int_f)c_crt_order_flags;
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_shared_mesg_nindexes_c
+ * Purpose: Calls h5pset_shared_mesg_nindexes
+ *
+ * Inputs:
+ * plist_id - file creation property list
+ * nindexes - Number of shared object header message indexes
+ * available in files created WITH this property list
+ *
+ * Outputs:
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * January, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes )
+{
+ int ret_value = -1;
+ hid_t c_plist_id;
+ unsigned c_nindexes;
+ herr_t ret;
+ /*
+ * Call h5pset_shared_mesg_nindexes function.
+ */
+ c_plist_id = (hid_t)*plist_id;
+ c_nindexes = (unsigned)*nindexes;
+ ret = H5Pset_shared_mesg_nindexes(c_plist_id, c_nindexes );
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_shared_mesg_index_c
+ * Purpose: Calls H5Pset_shared_mesg_index
+ *
+ * Inputs:
+ * fcpl_id - File creation property list identifier.
+ * index_num - Index being configured.
+ * mesg_type_flags - Types of messages that should be stored in this index.
+ * min_mesg_size - Minimum message size.
+ *
+ * Outputs:
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * January, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size)
+{
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call h5pset_shared_mesg_index function.
+ */
+ ret = H5Pset_shared_mesg_index((hid_t)*fcpl_id,(unsigned)*index_num, (unsigned)*mesg_type_flags, (unsigned)*min_mesg_size);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_attr_creation_order_c
+ * Purpose: Calls H5Pget_attr_creation_order
+ *
+ * Inputs:
+ * ocpl_id - Object (group or dataset) creation property list identifier
+ * Outputs:
+ * crt_order_flags - Flags specifying whether to track and index attribute creation order
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * February, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
+{
+ int ret_value = -1;
+ herr_t ret;
+
+ unsigned c_crt_order_flags;
+ /*
+ * Call h5pget_attr_creation_order function.
+ */
+
+ ret = H5Pget_attr_creation_order((hid_t)*ocpl_id, &c_crt_order_flags);
+ if (ret < 0) return ret_value;
+
+ *crt_order_flags = (int_f)c_crt_order_flags;
+
+ ret_value = 0;
+ return ret_value;
+}
+/*----------------------------------------------------------------------------
+ * Name: h5pset_libver_bounds_c
+ * Purpose: Calls H5Pset_libver_bounds
+ *
+ * Inputs:
+ * fapl_id - File access property list identifier
+ * low - The earliest version of the library that will be used for writing objects.
+ * high - The latest version of the library that will be used for writing objects.
+ * Outputs:
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * February 18, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high )
+{
+ int ret_value = -1;
+ herr_t ret;
+
+ /*
+ * Call H5Pset_libver_bounds function.
+ */
+ ret = H5Pset_libver_bounds( (hid_t)*fapl_id, (H5F_libver_t)*low, (H5F_libver_t)*high );
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_link_creation_order_c
+ * Purpose: Calls H5Pset_link_creation_order
+ *
+ * Inputs: gcpl_id - Group creation property list identifier
+ * crt_order_flags - Creation order flag(s)
+ * Outputs:
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * February 18, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags )
+{
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_link_creation_order function.
+ */
+ ret = H5Pset_link_creation_order((hid_t)*gcpl_id, (unsigned)*crt_order_flags);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_link_phase_change_c
+ * Purpose: Calls H5Pget_link_phase_change
+ *
+ * Inputs: gcpl_id - Group creation property list identifier
+ * Outputs max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * February 20, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense )
+{
+ int ret_value = -1;
+ unsigned c_max_compact;
+ unsigned c_min_dense;
+ herr_t ret;
+
+ /*
+ * Call H5Pget_link_phase_change function.
+ */
+ ret = H5Pget_link_phase_change((hid_t)*gcpl_id, &c_max_compact,&c_min_dense);
+ if (ret < 0) return ret_value;
+
+ *max_compact = (int_f)c_max_compact;
+ *min_dense = (int_f)c_min_dense;
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_obj_track_times_c
+ * Purpose: Call H5Pget_obj_track_times
+ *
+ * Inputs: plist_id - property list id
+ * Outputs:
+ * flag - TRUE/FALSE flag
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * February 22, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
+{
+ int ret_value = -1;
+ hbool_t c_track_times=0;
+ herr_t ret;
+
+ /*
+ * Call H5Pget_obj_track_times function.
+ */
+ ret = H5Pget_obj_track_times((hid_t)*plist_id, &c_track_times);
+
+ if (ret < 0) return ret_value; /* error occurred */
+
+ *flag = 0;
+ if(c_track_times > 0) *flag = 1;
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_obj_track_times_c
+ * Purpose: Call H5Pset_obj_track_times
+ *
+ * Inputs: plist_id - property list id
+ * flag - TRUE/FALSE flag
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * February 22, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
+{
+ int ret_value = -1;
+ hbool_t c_track_times;
+ herr_t ret;
+
+
+ c_track_times = (hbool_t)*flag;
+
+ /*
+ * Call H5Pset_obj_track_times function.
+ */
+ ret = H5Pset_obj_track_times((hid_t)*plist_id, c_track_times);
+
+ if (ret < 0) return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_create_inter_group_c
+ * Purpose: Calls H5Pset_create_intermediate_group
+ *
+ * Inputs:
+ * lcpl_id - Link creation property list identifier
+ * crt_intermed_group - crt_intermed_group specifying whether
+ * to create intermediate groups upon the
+ * creation of an object
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * February 22, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
+{
+ int ret_value = -1;
+ herr_t ret;
+
+ /*
+ * Call H5Pset_create_intermediate_group function.
+ */
+ ret = H5Pset_create_intermediate_group((hid_t)*lcpl_id, (unsigned)*crt_intermed_group);
+
+ if (ret < 0) return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_link_creation_order_c
+ * Purpose: Calls H5Pget_link_creation_order
+ *
+ * Inputs:
+ * gcpl_id - Group creation property list identifier
+ * Outputs:
+ * crt_order_flags - Creation order flag(s)
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 3, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
+{
+ int ret_value = -1;
+ herr_t ret;
+
+ unsigned c_crt_order_flags;
+ /*
+ * Call h5pget_link_creation_order function.
+ */
+
+ ret = H5Pget_link_creation_order((hid_t)*gcpl_id, &c_crt_order_flags);
+ if (ret < 0) return ret_value;
+
+ *crt_order_flags = (int_f)c_crt_order_flags;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_char_encoding_c
+ * Purpose: Calls H5Pset_char_encoding
+ *
+ * Inputs:
+ * plist_id - Property list identifier
+ * encoding - String encoding character set:
+ * H5T_CSET_ASCII_F -> US ASCII
+ * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
+ * Outputs: NONE
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 3, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
+{
+ int ret_value = -1;
+ herr_t ret;
+
+ /*
+ * Call H5Pset_char_encoding function.
+ */
+ ret = H5Pset_char_encoding((hid_t)*plist_id, (H5T_cset_t)*encoding);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_char_encoding_c
+ * Purpose: Calls H5Pget_char_encoding
+ *
+ * Inputs:
+ * plist_id - Property list identifier
+ * Outputs:
+ * encoding - Encoding character set:
+ * H5T_CSET_ASCII_F -> US ASCII
+ * H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 3, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
+{
+ int ret_value = -1;
+ H5T_cset_t c_encoding;
+ herr_t ret;
+ /*
+ * Call H5Pget_char_encoding function.
+ */
+ ret = H5Pget_char_encoding((hid_t)*plist_id, &c_encoding);
+ if (ret < 0) return ret_value;
+
+ *encoding = (int_f)c_encoding;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_copy_object_c
+ * Purpose: Calls H5Pset_copy_object
+ *
+ * Inputs:
+ * ocp_plist_id - Object copy property list identifier
+ * copy_options - Copy option(s) to be set
+ *
+ * Outputs:
+ * NONE
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 3, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
+{
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_copy_object function.
+ */
+ ret = H5Pset_copy_object((hid_t)*ocp_plist_id, (unsigned)*copy_options);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_copy_object_c
+ * Purpose: Calls H5Pget_copy_object
+ *
+ * Inputs:
+ * ocp_plist_id - Object copy property list identifier
+ *
+ * Outputs:
+ * copy_options - Copy option(s) to be get
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 3, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
+{
+ int ret_value = -1;
+ unsigned c_copy_options;
+ herr_t ret;
+ /*
+ * Call H5Pget_copy_object function.
+ */
+ ret = H5Pget_copy_object((hid_t)*ocp_plist_id, &c_copy_options);
+ if (ret < 0) return ret_value;
+
+ *copy_options = (int_f)c_copy_options;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_data_transform_c
+ * Purpose: Calls H5Pget_data_transform
+ * Inputs:
+ * prp_id - property list identifier to query
+ * expression_len - buffer size transorm expression
+ *
+ * Output:
+ * expression - buffer to hold transform expression
+ *
+ * Returns:
+ * Success: 0
+ * Failure: -1
+ *
+ * Programmer: M.S. Breitenfeld
+ * March 19, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size)
+{
+ int_f ret_value = -1;
+ char *c_expression = NULL; /* Buffer to hold C string */
+ size_t c_expression_len;
+ ssize_t ret;
+
+
+ c_expression_len = (size_t)*expression_len + 1;
+
+ /* should expression_len be size_t_f? */
+ /*
+ * Allocate memory to store the expression.
+ */
+ if( c_expression_len) c_expression = (char*) HDmalloc(c_expression_len);
+ if (c_expression == NULL) return ret_value;
+
+ /*
+ * Call h5pget_data_transform function.
+ */
+ ret = H5Pget_data_transform((hid_t)*plist_id, c_expression, c_expression_len);
+ if(ret < 0) return ret_value;
+ /* or strlen ? */
+ HD5packFstring(c_expression, _fcdtocp(expression), c_expression_len-1);
+
+ *size = (size_t_f)ret;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_data_transform_c
+ * Purpose: Calls H5Pset_data_transform
+ * Inputs:
+ * prp_id - property list identifier to query
+ * expression - buffer to hold transform expression
+ * expression_len - buffer size transorm expression
+ *
+ * Output:
+ *
+ * Returns:
+ * Success: 0
+ * Failure: -1
+ *
+ * Programmer: M.S. Breitenfeld
+ * March 19, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len)
+{
+ int_f ret_value = -1; /* Return value */
+ char* c_expression = NULL; /* Buffer to hold C string */
+ herr_t ret;
+ /*
+ * Convert FORTRAN name to C name
+ */
+ if(NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len)))
+ return ret_value;
+ /*
+ * Call h5pset_data_transform function.
+ */
+ ret = H5Pset_data_transform((hid_t)*plist_id, c_expression);
+ if(ret<0) return ret_value;
+
+ ret_value = 0;
+ if(c_expression)
+ HDfree(c_expression);
+
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_local_heap_size_hint_c
+ * Purpose: Calls H5Pget_local_heap_size_hint
+ * Inputs:
+ * gcpl_id - Group creation property list identifier
+ *
+ * Output:
+ * size_hint - Hint for size of local heap
+ * Returns:
+ * Success: 0
+ * Failure: -1
+ *
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
+{
+ int_f ret_value = -1; /* Return value */
+ size_t c_size_hint;
+ herr_t ret;
+ /*
+ * Call H5Pget_local_heap_size_hint function.
+ */
+ ret = H5Pget_local_heap_size_hint((hid_t)*gcpl_id, &c_size_hint);
+ if(ret<0) return ret_value;
+
+ *size_hint = (size_t_f)c_size_hint;
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_est_link_info_c
+ * Purpose: Calls H5Pget_est_link_info
+ * Inputs:
+ * gcpl_id - Group creation property list identifier
+ *
+ * Output:
+ * est_num_entries - Estimated number of links to be inserted into group
+ * est_name_len - Estimated average length of link names
+ * Returns:
+ * Success: 0
+ * Failure: -1
+ *
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len)
+{
+ int_f ret_value = -1; /* Return value */
+ unsigned c_est_num_entries;
+ unsigned c_est_name_len;
+ herr_t ret;
+ /*
+ * Call h5pget_est_link_info function.
+ */
+ ret = H5Pget_est_link_info((hid_t)*gcpl_id, &c_est_num_entries, &c_est_name_len);
+ if(ret<0) return ret_value;
+
+ *est_num_entries = (int_f)c_est_num_entries;
+ *est_name_len = (int_f)c_est_name_len;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_local_heap_size_hint_c
+ * Purpose: Calls H5Pset_local_heap_size_hint
+ * Inputs:
+ * gcpl_id - Group creation property list identifier
+ * size_hint - Hint for size of local heap
+ *
+ * Output:
+ *
+ * Returns:
+ * Success: 0
+ * Failure: -1
+ *
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
+{
+ int_f ret_value = -1; /* Return value */
+ herr_t ret;
+ /*
+ * Call H5Pget_local_heap_size_hint function.
+ */
+ ret = H5Pset_local_heap_size_hint((hid_t)*gcpl_id, (size_t)*size_hint);
+ if(ret<0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_est_link_info_c
+ * Purpose: Calls H5Pset_est_link_info
+ * Inputs:
+ * gcpl_id - Group creation property list identifier
+ * est_num_entries - Estimated number of links to be inserted into group
+ * est_name_len - Estimated average length of link names
+ *
+ * Output:
+ * Returns:
+ * Success: 0
+ * Failure: -1
+ *
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len)
+{
+ int_f ret_value = -1; /* Return value */
+ herr_t ret;
+ /*
+ * Call h5pset_est_link_info function.
+ */
+ ret = H5Pset_est_link_info((hid_t)*gcpl_id, (unsigned)*est_num_entries, (unsigned)*est_name_len);
+ if(ret<0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_link_phase_change_c
+ * Purpose: Calls H5Pset_link_phase_change
+ *
+ * Inputs: gcpl_id - Group creation property list identifier
+ * max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
+ * Outputs
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense )
+{
+ int ret_value = -1;
+ herr_t ret;
+
+ /*
+ * Call H5Pset_link_phase_change function.
+ */
+ ret = H5Pset_link_phase_change((hid_t)*gcpl_id, (unsigned)*max_compact,(unsigned)*min_dense);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_fapl_direct_c
+ * Purpose: Calls H5Pset_fapl_direct
+ *
+ * Inputs:
+ * fapl_id - File access property list identifier
+ * alignment - Required memory alignment boundary
+ * block_size - File system block size
+ * cbuf_size - Copy buffer size
+ * Outputs
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size )
+{
+ int ret_value = -1;
+ herr_t ret;
+
+ /*
+ * Call H5Pset_link_phase_change function.
+ */
+#ifdef H5_HAVE_DIRECT
+ ret = H5Pset_fapl_direct((hid_t)*fapl_id, (size_t)*alignment, (size_t)*block_size, (size_t)*cbuf_size );
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+
+#endif
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_fapl_direct_c
+ * Purpose: Calls H5Pget_fapl_direct
+ *
+ * Inputs:
+ * fapl_id - File access property list identifier
+ * Outputs:
+ * alignment - Required memory alignment boundary
+ * block_size - File system block size
+ * cbuf_size - Copy buffer size
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_fapl_direct_c(hid_t_f *fapl_id, size_t_f *alignment, size_t_f *block_size, size_t_f *cbuf_size )
+{
+ int ret_value = -1;
+ herr_t ret;
+ size_t c_alignment;
+ size_t c_block_size;
+ size_t c_cbuf_size;
+
+ /*
+ * Call H5Pget_link_phase_change function.
+ */
+#ifdef H5_HAVE_DIRECT
+ ret = H5Pget_fapl_direct((hid_t)*fapl_id, &c_alignment, &c_block_size, &c_cbuf_size );
+ if (ret < 0) return ret_value;
+
+ *alignment = (size_t_f)c_alignment;
+ *block_size = (size_t_f)c_block_size;
+ *cbuf_size = (size_t_f)c_cbuf_size;
+
+ ret_value = 0;
+#endif
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_attr_phase_change_c
+ * Purpose: Calls H5Pset_attr_phase_change
+ *
+ * Inputs: ocpl_id - Object (dataset or group) creation property list identifier
+ * max_compact - Maximum number of attributes to be stored in compact storage
+ * min_dense - Minimum number of attributes to be stored in dense storage
+ * Outputs:
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense )
+{
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_attr_phase_change function.
+ */
+ ret = H5Pset_attr_phase_change((hid_t)*ocpl_id, (unsigned)*max_compact,(unsigned)*min_dense);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_nbit_c
+ * Purpose: Calls H5Pset_nbit
+ *
+ * Inputs: plist_id - Dataset creation property list identifier
+ * Outputs:
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_nbit_c(hid_t_f *plist_id )
+{
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_nbit_change function.
+ */
+ ret = H5Pset_nbit((hid_t)*plist_id);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+/*----------------------------------------------------------------------------
+ * Name: h5pset_scaleoffset_c
+ * Purpose: Calls H5Pset_scaleoffset
+ *
+ * Inputs:
+ * plist_id - Dataset creation property list identifier
+ * scale_type - Flag indicating compression method.
+ * scale_factor - Parameter related to scale.
+ * Outputs:
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 21, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor )
+{
+ int ret_value = -1;
+ H5Z_SO_scale_type_t c_scale_type;
+ herr_t ret;
+ /*
+ * Call H5Pset_scaleoffset_change function.
+ */
+ c_scale_type = (H5Z_SO_scale_type_t)*scale_type;
+
+ ret = H5Pset_scaleoffset((hid_t)*plist_id, c_scale_type, (int)*scale_factor);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pset_nlinks
+ * Purpose: Calls H5Pset_nlinks
+ *
+ * Inputs:
+ * lapl_id - File access property list identifier
+ * nlinks - Maximum number of links to traverse
+ * Outputs:
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 24, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
+{
+ int ret_value = -1;
+ herr_t ret;
+ /*
+ * Call H5Pset_nlinks function.
+ */
+ ret = H5Pset_nlinks((hid_t)*lapl_id, (size_t)*nlinks);
+ if (ret < 0) return ret_value;
+
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_nlinks
+ * Purpose: Calls H5Pget_nlinks
+ *
+ * Inputs:
+ * lapl_id - File access property list identifier
+ *
+ * Outputs:
+ * nlinks - Maximum number of links to traverse
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * March 24, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+int_f
+nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
+{
+ int ret_value = -1;
+ herr_t ret;
+ size_t c_nlinks;
+ /*
+ * Call H5Pget_nlinks function.
+ */
+ ret = H5Pget_nlinks((hid_t)*lapl_id, &c_nlinks);
+ if (ret < 0) return ret_value;
+
+ *nlinks = (size_t_f)c_nlinks;
+ ret_value = 0;
+ return ret_value;
+}
+
+/*----------------------------------------------------------------------------
+ * Name: h5pget_create_inter_group_c
+ * Purpose: Calls H5Pget_create_intermediate_group
+ *
+ * Inputs:
+ * lcpl_id - Link creation property list identifier
+ * crt_intermed_group - Specifying whether to create intermediate groups upon
+ * the creation of an object
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * April 4, 2008
+ * Modifications:
+ *---------------------------------------------------------------------------*/
+
+int_f
+nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
+{
+ int ret_value = -1;
+ herr_t ret;
+
+ /*
+ * Call H5Pget_create_intermediate_group function.
+ */
+ ret = H5Pget_create_intermediate_group((hid_t)*lcpl_id, (unsigned)*crt_intermed_group);
+
+ if (ret < 0) return ret_value; /* error occurred */
+ ret_value = 0;
+ return ret_value;
+}