diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-11 16:24:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-11 16:24:11 (GMT) |
commit | d9e5ca72f39934531b534524d07cf784c3d0e613 (patch) | |
tree | 1913b13a317132523091035f1175b2291c8b9db7 /fortran | |
parent | 053807fa81579e6bd9ac6a701ddcaac39e4d0b87 (diff) | |
download | hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.zip hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.tar.gz hdf5-d9e5ca72f39934531b534524d07cf784c3d0e613.tar.bz2 |
[svn-r14199] Description:
Add H5Dcreate to API versioned routines, replacing internal usage with
H5Dcreate2
Fix thread-safe error stack initialization for API versioned error
stack printing routines.
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/H5Df.c | 36 | ||||
-rw-r--r-- | fortran/src/README | 6 |
2 files changed, 16 insertions, 26 deletions
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index 78d484f..929a056 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -19,7 +19,7 @@ /*---------------------------------------------------------------------------- * Name: h5dcreate_c - * Purpose: Call H5Dcreate to create a dataset + * Purpose: Call H5Dcreate2 to create a dataset * Inputs: loc_id - file or group identifier * name - name of the dataset * namelen - name length @@ -35,41 +35,29 @@ 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) { - int ret_value = -1; - char *c_name; - size_t c_namelen; - hid_t c_loc_id; - hid_t c_type_id; - hid_t c_space_id; + char *c_name = NULL; hid_t c_dset_id; - hid_t c_crt_prp; - - /* - * Define creation property - */ - c_crt_prp = (hid_t)*crt_prp; + int ret_value = -1; /* * Convert FORTRAN name to C name */ - c_namelen = *namelen; - c_name = (char *)HD5f2cstring(name, c_namelen); - if (c_name == NULL) return ret_value; + if(NULL == ( c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) + goto DONE; /* - * Call H5Dcreate function. + * Call H5Dcreate2 function. */ - c_loc_id = (hid_t)*loc_id; - c_type_id = (hid_t)*type_id; - c_space_id = (hid_t)*space_id; - c_dset_id = H5Dcreate(c_loc_id, c_name, c_type_id, c_space_id, c_crt_prp); - if (c_dset_id < 0) goto DONE; + 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) + goto DONE; *dset_id = (hid_t_f)c_dset_id; + ret_value = 0; DONE: - HDfree(c_name); - return ret_value; + if(c_name) + HDfree(c_name); + return ret_value; } /*---------------------------------------------------------------------------- diff --git a/fortran/src/README b/fortran/src/README index 6dcc0e0..508da69 100644 --- a/fortran/src/README +++ b/fortran/src/README @@ -156,8 +156,9 @@ About the Fortran APIs For example, the C function to create a dataset has the following prototype: - hid_t H5Dcreate(hid_it loc_id, char *name, hid_t type_id, - hid_t space_id, hid_t creation_prp); + hid_t H5Dcreate2(hid_it loc_id, char *name, hid_t type_id, + hid_t space_id, hid_t link_creation_prp, hid_t dset_creation_prp, + hid_t dset_access_prop); The corresponding Fortran subroutine has the following form: @@ -172,6 +173,7 @@ About the Fortran APIs in the Reference Manual.) The seventh input parameter creation_prp is optional, and may be omitted when the default creation property list is used. + (XXX: Update this! - QAK) * Parameters to the Fortran subroutines have one of the following predefined datatypes (see the file H5fortran_types.f90 for KIND |