summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-04 22:19:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-04 22:19:07 (GMT)
commit1de51c7bc148b9cb5104936dfd23096a222d0cb8 (patch)
treeb23ea23404fd02a41f4539ebbc8311a1c43fecbe /fortran
parent041de441c5d7468812be8af1346b30db6ea94e3a (diff)
downloadhdf5-1de51c7bc148b9cb5104936dfd23096a222d0cb8.zip
hdf5-1de51c7bc148b9cb5104936dfd23096a222d0cb8.tar.gz
hdf5-1de51c7bc148b9cb5104936dfd23096a222d0cb8.tar.bz2
[svn-r14187] Description:
Put H5Acreate() under API versioning, with all internal usage shifted to H5Acreate2(). Add regression tests for H5Acreate1(). Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Af.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 4d66103..76e7d89 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -20,7 +20,7 @@
/*----------------------------------------------------------------------------
* Name: h5acreate_c
- * Purpose: Call H5Acreate to create an attribute
+ * Purpose: Call H5Acreate2 to create an attribute
* Inputs: obj_id - object identifier
* name - name of the attribute
* namelen - name length
@@ -34,25 +34,27 @@
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5acreate_c (hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id, hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *attr_id)
+nh5acreate_c(hid_t_f *obj_id, _fcd name, size_t_f *namelen, hid_t_f *type_id,
+ hid_t_f *space_id, hid_t_f *crt_prp, hid_t_f *attr_id)
{
- char *c_name=NULL; /* Buffer to hold C string */
- int_f ret_value=0; /* Return value */
+ char *c_name = NULL; /* Buffer to hold C string */
+ int_f ret_value = 0; /* Return value */
/*
* Convert FORTRAN name to C name
*/
- if ((c_name = HD5f2cstring(name, (size_t)*namelen)) == NULL)
+ if(NULL == (c_name = HD5f2cstring(name, (size_t)*namelen)))
HGOTO_DONE(FAIL);
/*
- * Call H5Acreate function.
+ * Call H5Acreate2 function.
*/
- if((*attr_id = (hid_t_f)H5Acreate((hid_t)*obj_id, c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp))<0)
+ if((*attr_id = (hid_t_f)H5Acreate2((hid_t)*obj_id, ".", c_name, (hid_t)*type_id, (hid_t)*space_id, (hid_t)*crt_prp, H5P_DEFAULT, H5P_DEFAULT)) < 0)
HGOTO_DONE(FAIL);
done:
- if(c_name) HDfree(c_name);
+ if(c_name)
+ HDfree(c_name);
return ret_value;
}