summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-03-10 23:50:03 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-03-10 23:50:03 (GMT)
commitae782bd7ac0d7f3342d4317cbcd487d4bfefc206 (patch)
tree43c7965a2a9a3014f8b27915e0a5685919907dd2 /src/H5R.c
parent354a6dcc0120bc857a22736fb0eb3d7cdda11525 (diff)
downloadhdf5-ae782bd7ac0d7f3342d4317cbcd487d4bfefc206.zip
hdf5-ae782bd7ac0d7f3342d4317cbcd487d4bfefc206.tar.gz
hdf5-ae782bd7ac0d7f3342d4317cbcd487d4bfefc206.tar.bz2
[svn-r1132] Dataset region references are now finished and working correctly. Also, there
are five new API functions for querying selections: H5Sget_select_hyper_nblocks - retrieves the number of hyperslab blocks in current hyperslab selection for a dataspace H5Sget_select_elem_npoints - retrieves the number of element points in current element selection for a dataspace H5Sget_select_hyper_blocklist - retrieves a list of the hyperslab blocks in current hyperslab selection for a dataspace H5Sget_select_elem_pointlist - retrieves a list of the element points in current element selection for a dataspace H5Sget_select_bounds - retrieves a n-dimensional bounding box containing current selection.
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 261aae1..3844072 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -370,9 +370,6 @@ H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref)
INT32DECODE(p,hobjid.idx);
/* Get the dataset region from the heap (allocate inside routine) */
- printf("%s: hobjid.addr=",FUNC);
- H5F_addr_print(stdout,&hobjid.addr);
- printf(", hobjid.idx=%d\n", hobjid.idx);
if((buf=H5HG_read(ent.file,&hobjid,NULL))==NULL)
HGOTO_ERROR(H5E_REFERENCE, H5E_READERROR, FAIL,
"Unable to read dataset region information");
@@ -528,13 +525,18 @@ H5R_get_region(H5D_t *dset, H5R_type_t __unused__ ref_type, void *_ref)
HGOTO_ERROR(H5E_DATASPACE, H5E_NOTFOUND, NULL, "not found");
}
-/* Unserialize the selection */
+ /* Unserialize the selection */
+ if (H5S_select_deserialize(ret_value,p) < 0) {
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDECODE, NULL, "can't deserialize selection");
+ }
/* Free the buffer allocated in H5HG_read() */
H5MM_xfree(buf);
-/* Close the dataset we opened */
-
+ /* Close the dataset we opened */
+ if (H5D_close(dataset) < 0) {
+ HGOTO_ERROR(H5E_DATASET, H5E_CLOSEERROR, NULL, "not found");
+ }
done:
FUNC_LEAVE(ret_value);