summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Df.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2008-05-03 23:39:37 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2008-05-03 23:39:37 (GMT)
commitdcad778b42d371c5429b913c65ec5c32f658d94e (patch)
tree3aa9f6ad4ef79064db548aa0ff692d2d1c6bbb51 /fortran/src/H5Df.c
parent8090e1c6035e784402f8185434f291b63fe1d7c2 (diff)
downloadhdf5-dcad778b42d371c5429b913c65ec5c32f658d94e.zip
hdf5-dcad778b42d371c5429b913c65ec5c32f658d94e.tar.gz
hdf5-dcad778b42d371c5429b913c65ec5c32f658d94e.tar.bz2
[svn-r14923] Maintenance: This check-in merges changes from the fortran_1_8 branch back into the trunk (up to revision 14921)
Platforms tested: kagiso with g95 and Intel compilers; more testing will be done after checking in a fresh copy from the trunk. New code itself was tested with all Fortran compilers available at THG
Diffstat (limited to 'fortran/src/H5Df.c')
-rw-r--r--fortran/src/H5Df.c61
1 files changed, 52 insertions, 9 deletions
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index 929a056..49f8266 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -30,10 +30,13 @@
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, August 4, 1999
- * Modifications:
+ * Modifications:
+ * - Added optional parameters introduced in version 1.8
+ * February, 2008
*---------------------------------------------------------------------------*/
int_f
-nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *dset_id)
+nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *lcpl_id, hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id)
{
char *c_name = NULL;
hid_t c_dset_id;
@@ -48,7 +51,8 @@ nh5dcreate_c (hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *type_id, hid_
/*
* Call H5Dcreate2 function.
*/
- if((c_dset_id = H5Dcreate2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*space_id, H5P_DEFAULT, (hid_t)*crt_prp, H5P_DEFAULT)) < 0)
+ if((c_dset_id = H5Dcreate2((hid_t)*loc_id, c_name, (hid_t)*type_id, (hid_t)*space_id,
+ (hid_t)*lcpl_id, (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
goto DONE;
*dset_id = (hid_t_f)c_dset_id;
@@ -66,14 +70,15 @@ DONE:
* Inputs: loc_id - file or group identifier
* name - name of the dataset
* namelen - name length
+ * dapl_id - Dataset access property list
* Outputs: dset_id - dataset identifier
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Wednesday, August 4, 1999
- * Modifications:
+ * Modifications: Added 1.8 parameter: dapl_id
*---------------------------------------------------------------------------*/
int_f
-nh5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dset_id)
+nh5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dapl_id, hid_t_f *dset_id)
{
char *c_name = NULL;
hid_t c_dset_id;
@@ -88,7 +93,7 @@ nh5dopen_c(hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t_f *dset_id)
/*
* Call H5Dopen2 function.
*/
- if((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, H5P_DEFAULT)) < 0)
+ if((c_dset_id = H5Dopen2((hid_t)*loc_id, c_name, (hid_t)*dapl_id)) < 0)
goto DONE;
*dset_id = (hid_t_f)c_dset_id;
@@ -1257,18 +1262,21 @@ nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id)
/*----------------------------------------------------------------------------
- * Name: h5dextend_c
+ * Name: h5dset_extent_c
* Purpose: Call H5Dset_extent to extend dataset with unlimited dimensions
* Inputs: dset_id - identifier of the dataset
* Outputs: dims - array with the dimension sizes
* Returns: 0 on success, -1 on failure
* Programmer: Elena Pourmal
* Thursday, August 19, 1999
- * Modifications:
+ *
+ * Modifications: Changed name from the now obsolete h5dextend
+ * to h5dset_extent in order to match new fortran interface.
+ * -MSB- March 14, 2008
*---------------------------------------------------------------------------*/
int_f
-nh5dextend_c ( hid_t_f *dset_id , hsize_t_f *dims)
+nh5dset_extent_c ( hid_t_f *dset_id , hsize_t_f *dims)
{
hid_t c_space_id;
hsize_t c_dims[H5S_MAX_RANK];
@@ -1946,4 +1954,39 @@ nh5dget_space_status_c ( hid_t_f *dset_id, int_f *flag)
ret_value = 0;
return ret_value;
}
+/*----------------------------------------------------------------------------
+ * Name: h5dcreate_anon_c
+ * Purpose: Call H5Dcreate_anon
+ * Inputs:
+ * loc_id - Identifier of the file or group within which to create the dataset.
+ * type_id - Identifier of the datatype to use when creating the dataset.
+ * space_id - Identifier of the dataspace to use when creating the dataset.
+ * dcpl_id - Dataset creation property list identifier.
+ * dapl_id - Dataset access property list identifier.
+ * Outputs:
+ * dset_id - dataset identifier
+ *
+ * Returns: 0 on success, -1 on failure
+ * Programmer: M.S. Breitenfeld
+ * February, 2008
+ *---------------------------------------------------------------------------*/
+int_f
+nh5dcreate_anon_c (hid_t_f *loc_id, hid_t_f *type_id, hid_t_f *space_id,
+ hid_t_f *dcpl_id, hid_t_f *dapl_id, hid_t_f *dset_id)
+{
+ int ret_value = -1;
+
+ /*
+ * Call H5Dcreate2 function.
+ */
+ if((*dset_id = (hid_t_f)H5Dcreate_anon((hid_t)*loc_id, (hid_t)*type_id, (hid_t)*space_id,
+ (hid_t)*dcpl_id, (hid_t)*dapl_id)) < 0)
+ goto DONE;
+
+ ret_value = 0;
+
+ DONE:
+ return ret_value;
+}
+