diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-10-20 19:25:58 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-10-20 19:25:58 (GMT) |
commit | fc0bc212bb6e12d4623f270bee3cf87e4dacc876 (patch) | |
tree | 8d969df6e0c650d0bafe649a1729a653ee402804 /src | |
parent | 8c076f692190428fb123ae2418737db31af9343d (diff) | |
download | hdf5-fc0bc212bb6e12d4623f270bee3cf87e4dacc876.zip hdf5-fc0bc212bb6e12d4623f270bee3cf87e4dacc876.tar.gz hdf5-fc0bc212bb6e12d4623f270bee3cf87e4dacc876.tar.bz2 |
[svn-r4561] Purpose:
Bug fix
Description:
H5S_select_elements is not actually putting the new point on the list of
points selected when there are no points currently selected and the
'append' operation is chosen.
Solution:
Add new point to list correctly.
Platforms tested:
FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Spkg.h | 2 | ||||
-rw-r--r-- | src/H5Spoint.c | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/H5Spkg.h b/src/H5Spkg.h index bc6f66e..cf6001b 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -150,6 +150,8 @@ __DLL__ herr_t H5S_point_select_serialize(const H5S_t *space, uint8_t *buf); __DLL__ herr_t H5S_point_select_deserialize(H5S_t *space, const uint8_t *buf); __DLL__ herr_t H5S_point_bounds(H5S_t *space, hsize_t *start, hsize_t *end); __DLL__ htri_t H5S_point_select_contiguous(const H5S_t *space); +__DLL__ herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, + size_t num_elem, const hssize_t **coord); __DLL__ herr_t H5S_point_select_iterate(void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op, void *operator_data); diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 9668233..b21096d 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -48,8 +48,6 @@ static herr_t H5S_point_mscat (const void *_tconv_buf, size_t elmt_size, const H5S_t *mem_space, H5S_sel_iter_t *mem_iter, hsize_t nelmts, void *_buf/*out*/); -static herr_t H5S_select_elements(H5S_t *space, H5S_seloper_t op, - size_t num_elem, const hssize_t **coord); const H5S_fconv_t H5S_POINT_FCONV[1] = {{ "point", /*name */ @@ -196,16 +194,19 @@ herr_t H5S_point_add (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hss /* Put new list in point selection */ space->select.sel_info.pnt_lst->head=top; - } + } /* end if */ else { /* op==H5S_SELECT_APPEND */ new_node=space->select.sel_info.pnt_lst->head; - if(new_node!=NULL) + if(new_node!=NULL) { while(new_node->next!=NULL) new_node=new_node->next; - /* Append new list to point selection */ - new_node->next=top; - } + /* Append new list to point selection */ + new_node->next=top; + } /* end if */ + else + space->select.sel_info.pnt_lst->head=top; + } /* end else */ /* Add the number of elements in the new selection */ space->select.num_elem+=num_elem; @@ -1155,7 +1156,7 @@ H5S_point_select_contiguous(const H5S_t *space) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -static herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, size_t num_elem, +herr_t H5S_select_elements (H5S_t *space, H5S_seloper_t op, size_t num_elem, const hssize_t **coord) { herr_t ret_value=SUCCEED; /* return value */ |