diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-08 15:26:02 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-08 15:26:02 (GMT) |
commit | d3ee3988b68292524b3a893b9db55c074f4b9e87 (patch) | |
tree | 64395dd8ffd157ccd761ea54f7ee2c739e7b48ed /fortran/src/H5Df.c | |
parent | a6f5c793469cba3e0c1168e07bd6c7f833321623 (diff) | |
download | hdf5-d3ee3988b68292524b3a893b9db55c074f4b9e87.zip hdf5-d3ee3988b68292524b3a893b9db55c074f4b9e87.tar.gz hdf5-d3ee3988b68292524b3a893b9db55c074f4b9e87.tar.bz2 |
[svn-r14192] Description:
Deprecate H5Dextend in favor of H5Dset_extent (without using API
versioning, due to changed behavior) and switch internal usage to H5Dset_extent
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/src/H5Df.c')
-rw-r--r-- | fortran/src/H5Df.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c index b2d9a61..082bed5 100644 --- a/fortran/src/H5Df.c +++ b/fortran/src/H5Df.c @@ -1273,7 +1273,7 @@ nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) /*---------------------------------------------------------------------------- * Name: h5dextend_c - * Purpose: Call H5Dextend to extend dataset with unlimited dimensions + * 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 @@ -1285,34 +1285,27 @@ nh5dget_create_plist_c ( hid_t_f *dset_id , hid_t_f *plist_id) int_f nh5dextend_c ( hid_t_f *dset_id , hsize_t_f *dims) { - int ret_value = -1; - hsize_t *c_dims; - int status; + hid_t c_space_id; + hsize_t c_dims[H5S_MAX_RANK]; int rank; int i; - hid_t c_dset_id; - hid_t c_space_id; - - c_dset_id = (hid_t)*dset_id; - c_space_id = H5Dget_space(c_dset_id); - if (c_space_id < 0) return ret_value; + int status; + int ret_value = -1; - rank = H5Sget_simple_extent_ndims(c_space_id); - if (rank < 0) return ret_value; + if((c_space_id = H5Dget_space((hid_t)*dset_id)) < 0) return ret_value; - c_dims = malloc(sizeof(hsize_t)*rank); - if (!c_dims) return ret_value; + if((rank = H5Sget_simple_extent_ndims(c_space_id)) < 0) return ret_value; /* * Reverse dimensions due to C-FORTRAN storage order. */ - for (i=0; i < rank; i++) + for(i = 0; i < rank; i++) c_dims[i] = dims[rank - i - 1]; - status = H5Dextend(c_dset_id, c_dims); + status = H5Dset_extent((hid_t)*dset_id, c_dims); - if ( status >= 0 ) ret_value = 0; - HDfree(c_dims); + if(status >= 0) + ret_value = 0; return ret_value; } |