diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-06-05 21:03:49 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-06-05 21:03:49 (GMT) |
commit | 1e8ebeecfc67073a3019f9c2084a5977d2b8c62e (patch) | |
tree | 9ad027ec237578472f22d62b8adb6edfa9aafdfa /src/H5D.c | |
parent | a63ccc0c6b02c232744a35ed6fbb8c3708f7a3aa (diff) | |
download | hdf5-1e8ebeecfc67073a3019f9c2084a5977d2b8c62e.zip hdf5-1e8ebeecfc67073a3019f9c2084a5977d2b8c62e.tar.gz hdf5-1e8ebeecfc67073a3019f9c2084a5977d2b8c62e.tar.bz2 |
[svn-r410] Changes since 19980604
----------------------
./src/H5A.c
Named data types can have attributes.
Fixed bugs where the API functions didn't check the return
values of their internal counterparts and thus the automatic
error reporting didn't work.
Fixed some places where the error stack wasn't cleared after a
function returned failure.
Data types returned by H5Aget_type() are always read-only.
If the `attr_num' argument of H5Aiterate() is null then it
acts like H5Giterate() instead of failing -- it begins
processing attributes with the first one.
./src/H5D.c
We check for allocation overruns when scalar datasets are
stored in external files.
./src/H5O.c
H5O_modify() will fail if the message is >=16kB.
./src/H5Oattr.c
Split some long lines
./src/H5T.c
./src/H5Tprivate.h
Added H5T_entof() to support attributes on named types.
./src/h5ls.c
Prints the names of attributes and their sizes.
./test/cmpd_dset.c
./test/dsets.c
./test/dtypes.c
./test/extend.c
./test/external.c
./test/gheap.c
./test/istore.c
./test/links.c
./test/shtype.c
If the environment variable HDF5_NOCLEANUP is defined then the
temporary files are not removed. The testhdf5 program still
has the bug that it removes *.h5, clobbering test files from
other programs... oh well.
./test/dtypes.c
Added attribute tests.
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 49 |
1 files changed, 22 insertions, 27 deletions
@@ -423,7 +423,7 @@ H5Dget_type (hid_t dataset_id) } if (H5T_lock (copied_type, FALSE)<0) { H5T_close (copied_type); - HRETURN_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL, + HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to lock transient data type"); } @@ -793,36 +793,31 @@ H5D_create(H5G_t *loc, const char *name, const H5T_t *type, const H5S_t *space, "unable to initialize contiguous storage"); } - /* Don't go through all these checks for scalar dataspaces */ - if(ndims>0) { - for (i=1; i<ndims; i++) { - if (max_dim[i]>new_dset->layout.dim[i]) { - HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, - "only the first dimension can be extendible"); - } + for (i=1; i<ndims; i++) { + if (max_dim[i]>new_dset->layout.dim[i]) { + HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, + "only the first dimension can be extendible"); } - if (efl->nused>0) { - hsize_t max_points = H5S_get_npoints_max (space); - hsize_t max_storage = H5O_efl_total_size (efl); - - if (H5S_UNLIMITED==max_points) { - if (H5O_EFL_UNLIMITED!=max_storage) { - HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, - "unlimited data space but finite " - "storage"); - } - } else if (max_points * H5T_get_size (type) < max_points) { - HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, - "data space * type size overflowed"); - } else if (max_points * H5T_get_size (type) > max_storage) { + } + if (efl->nused>0) { + hsize_t max_points = H5S_get_npoints_max (space); + hsize_t max_storage = H5O_efl_total_size (efl); + + if (H5S_UNLIMITED==max_points) { + if (H5O_EFL_UNLIMITED!=max_storage) { HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, - "data space size exceeds external storage " - "size"); + "unlimited data space but finite storage"); } - } else if (max_dim[0]>new_dset->layout.dim[0]) { - HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, NULL, - "extendible contiguous non-external dataset"); + } else if (max_points * H5T_get_size (type) < max_points) { + HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, + "data space * type size overflowed"); + } else if (max_points * H5T_get_size (type) > max_storage) { + HGOTO_ERROR (H5E_DATASET, H5E_CANTINIT, NULL, + "data space size exceeds external storage size"); } + } else if (ndims>0 && max_dim[0]>new_dset->layout.dim[0]) { + HGOTO_ERROR (H5E_DATASET, H5E_UNSUPPORTED, NULL, + "extendible contiguous non-external dataset"); } break; |