diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2004-04-15 21:59:05 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2004-04-15 21:59:05 (GMT) |
commit | 508b06e28609af97be50591b49066381957e9c4e (patch) | |
tree | cf889684fc36977ce9df2b9e3310b9372c26c085 /fortran/src/H5Af.c | |
parent | da3f980be5516deea598cb1a11f79ef1c20c9257 (diff) | |
download | hdf5-508b06e28609af97be50591b49066381957e9c4e.zip hdf5-508b06e28609af97be50591b49066381957e9c4e.tar.gz hdf5-508b06e28609af97be50591b49066381957e9c4e.tar.bz2 |
[svn-r8357]
Purpose: Maintenance
Description: Fortran functions h5dwrite/read_f and h5awrite/read_f
were overloaded with the dims parameter being of type
INTEGER. It was a design flaw. dims should be of type
INTEGER(HSIZE_T). Overloading was done to assure backward
compatibility of 1.4.* branch with hdf5 1.2.* branch.
We promised to remove the old function with INTEGER dims
in 1.6.0. It was removed from the documentation but
was not removed from the source code.
Solution: Finally cleaned up the code.
Platforms tested: Windows 2000 with DEC Fortran, LInux with Intel Fortran,
Solaris 2.7 32/64-bit mode.
Misc. update:
Diffstat (limited to 'fortran/src/H5Af.c')
-rw-r--r-- | fortran/src/H5Af.c | 146 |
1 files changed, 9 insertions, 137 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index 7bba6d7..c8422a7 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -117,69 +117,9 @@ DONE: return ret_value; } -/*---------------------------------------------------------------------------- - * Name: h5awritec_c - * Purpose: Call h5awrite_c to write a character attribute - * Inputs: attr_id - dataset identifier - * mem_type_id - memory datatype identifier - * buf - character data buffer - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Thursday , August 12, 1999 - * Modifications: dims paramete added. - * April 4, 2001 - *---------------------------------------------------------------------------*/ -int_f -nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, int_f *dims) -{ - int ret_value = -1; - - /* - * Call h5awrite_c function. - */ - ret_value = nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); - - return ret_value; -} - -/*---------------------------------------------------------------------------- - * Name: h5awrite_c - * Purpose: Call H5Awrite to write a attribute - * Inputs: attr_id - attribute identifier - * mem_type_id - memory datatype identifier - * buf - data buffer - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Thursday, August 12, 1999 - * Modifications: dims parameter added - * April 4, 2001 - *---------------------------------------------------------------------------*/ -int_f -nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, int_f *dims) -{ - int ret_value = -1; - herr_t ret; - hid_t c_attr_id; - hid_t c_mem_type_id; - - /* - * Call H5Awrite function. - */ - c_attr_id = *attr_id; - c_mem_type_id = *mem_type_id; - ret = H5Awrite(c_attr_id, c_mem_type_id, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} /*---------------------------------------------------------------------------- - * Name: h5awritec_c_b + * Name: h5awritec_c * Purpose: Call h5awrite_c_b to write a character attribute * Inputs: attr_id - dataset identifier * mem_type_id - memory datatype identifier @@ -189,24 +129,22 @@ nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, int_f *dims) * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal * Tuesday, May 14, 2002 - * Modifications: This function was added to accomodate h5awrite_f call with - * dims buffer being of INTEGER(HSIZE_T) type *---------------------------------------------------------------------------*/ int_f -nh5awritec_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims) +nh5awritec_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims) { int ret_value = -1; /* * Call h5awrite_c function. */ - ret_value = nh5awrite_c_b(attr_id, mem_type_id, _fcdtocp(buf), dims); + ret_value = nh5awrite_c(attr_id, mem_type_id, _fcdtocp(buf), dims); return ret_value; } /*---------------------------------------------------------------------------- - * Name: h5awrite_c_b + * Name: h5awrite_c * Purpose: Call H5Awrite to write a attribute * Inputs: attr_id - attribute identifier * mem_type_id - memory datatype identifier @@ -216,11 +154,9 @@ nh5awritec_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dim * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal * Tuesday, May 14, 2002 - * Modifications: This function was added to accomodate h5awrite_f call with - * dims buffer being of INTEGER(HSIZE_T) type *---------------------------------------------------------------------------*/ int_f -nh5awrite_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims) +nh5awrite_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims) { int ret_value = -1; herr_t ret; @@ -243,66 +179,6 @@ nh5awrite_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dim /*---------------------------------------------------------------------------- * Name: h5areadc_c - * Purpose: Call h5aread_c to read character attribute - * Inputs: dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * Outputs: buf - character data buffer - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Thursday, August 12, 1999 - * Modifications: dims parameter added. - * April 4, 2001 - *---------------------------------------------------------------------------*/ -int_f -nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, int_f *dims) -{ - int ret_value = -1; - - /* - * Call h5aread_c function. - */ - ret_value = nh5aread_c(attr_id, mem_type_id, (_fcdtocp(buf)), dims); - - return ret_value; -} - -/*---------------------------------------------------------------------------- - * Name: h5aread_c - * Purpose: Call H5Araed to read an attribute - * Inputs: dset_id - dataset identifier - * mem_type_id - memory datatype identifier - * dims - array to store dimensions sizes of buf; used only - * by Fortran routine. - * Outputs: buf - data buffer - * Returns: 0 on success, -1 on failure - * Programmer: Elena Pourmal - * Thursday, August 12, 1999 - * Modifications: dims paramete added. - * April 4, 2001 - *---------------------------------------------------------------------------*/ -int_f -nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, int_f *dims) -{ - int ret_value = -1; - herr_t ret; - hid_t c_attr_id; - hid_t c_mem_type_id; - - /* - * Call H5Aread function. - */ - c_attr_id = *attr_id; - c_mem_type_id = *mem_type_id; - ret = H5Aread(c_attr_id, c_mem_type_id, buf); - - if (ret < 0) return ret_value; - ret_value = 0; - return ret_value; -} -/*---------------------------------------------------------------------------- - * Name: h5areadc_c_b * Purpose: Call h5aread_c_b to read character attribute * Inputs: dset_id - dataset identifier * mem_type_id - memory datatype identifier @@ -312,24 +188,22 @@ nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, int_f *dims) * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal * Tuesday, May 14, 2002 - * Modifications: This function was added to accomodate h5aread_f call with - * dims buffer being of INTEGER(HSIZE_T) type *---------------------------------------------------------------------------*/ int_f -nh5areadc_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims) +nh5areadc_c (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims) { int ret_value = -1; /* * Call h5aread_c function. */ - ret_value = nh5aread_c_b(attr_id, mem_type_id, (_fcdtocp(buf)), dims); + ret_value = nh5aread_c(attr_id, mem_type_id, (_fcdtocp(buf)), dims); return ret_value; } /*---------------------------------------------------------------------------- - * Name: h5aread_c_b + * Name: h5aread_c * Purpose: Call H5Aread to read an attribute * Inputs: dset_id - dataset identifier * mem_type_id - memory datatype identifier @@ -339,11 +213,9 @@ nh5areadc_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, _fcd buf, hsize_t_f *dims * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal * Tuesday, May 14, 2002 - * Modifications: This function was added to accomodate h5awrite_f call with - * dims buffer being of INTEGER(HSIZE_T) type *---------------------------------------------------------------------------*/ int_f -nh5aread_c_b (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims) +nh5aread_c (hid_t_f *attr_id, hid_t_f *mem_type_id, void *buf, hsize_t_f *dims) { int ret_value = -1; herr_t ret; |