summaryrefslogtreecommitdiffstats
path: root/src/H5Spoint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1999-06-25 19:36:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1999-06-25 19:36:54 (GMT)
commit21403c5ec467bea879c1887ec5c9429a26458942 (patch)
tree4ca90b8969b8de21213f4ce3b83b629538c6c1c0 /src/H5Spoint.c
parent78f622071f1199581775479811b5d730d14f0779 (diff)
downloadhdf5-21403c5ec467bea879c1887ec5c9429a26458942.zip
hdf5-21403c5ec467bea879c1887ec5c9429a26458942.tar.gz
hdf5-21403c5ec467bea879c1887ec5c9429a26458942.tar.bz2
[svn-r1385] Updated H5Rdereference, H5Rget_object_type and H5Rget_region to accept a
location ID (i.e. a file or group ID) as well as the dataset ID. This should allow Dave to get the palettes stored in the file correctly and also enable Bob and/or Bruce's indexing stuff. This change should be folded into the documentation for these three functions for the release. Also, I fixed a number of bugs in the hyperslab and point selection iterators for H5Diterate and they are working correctly now.
Diffstat (limited to 'src/H5Spoint.c')
-rw-r--r--src/H5Spoint.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 583aab7..4d248b8 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -1149,6 +1149,7 @@ H5S_point_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t
void *operator_data)
{
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /* Dataspace size */
+ hsize_t mem_offset[H5O_LAYOUT_NDIMS]; /* Point offset */
hsize_t offset; /* offset of region in buffer */
void *tmp_buf; /* temporary location of the element in the buffer */
H5S_pnt_node_t *node; /* Point node */
@@ -1160,7 +1161,7 @@ H5S_point_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t
assert(buf);
assert(space);
assert(operator);
- assert(H5I_DATATYPE != H5I_get_type(type_id));
+ assert(H5I_DATATYPE == H5I_get_type(type_id));
/* Get the dataspace extent rank */
rank=space->extent.u.simple.rank;
@@ -1172,8 +1173,12 @@ H5S_point_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t
/* Iterate through the node, checking the bounds on each element */
node=space->select.sel_info.pnt_lst->head;
while(node!=NULL && ret_value==0) {
+ /* Set up the location of the point */
+ HDmemcpy(mem_offset, node->pnt, rank*sizeof(hssize_t));
+ mem_offset[rank]=0;
+
/* Get the offset in the memory buffer */
- offset=H5V_array_offset(rank+1,mem_size,node->pnt);
+ offset=H5V_array_offset(rank+1,mem_size,mem_offset);
tmp_buf=((char *)buf+offset);
ret_value=(*operator)(tmp_buf,type_id,rank,node->pnt,operator_data);