summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-10-20 19:24:03 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-10-20 19:24:03 (GMT)
commit8c076f692190428fb123ae2418737db31af9343d (patch)
treea5cec805aa49ad3a735972ae1f250db42b066725 /src/H5Shyper.c
parent5efe5534cede17e0cd73848730eb94523d3038e8 (diff)
downloadhdf5-8c076f692190428fb123ae2418737db31af9343d.zip
hdf5-8c076f692190428fb123ae2418737db31af9343d.tar.gz
hdf5-8c076f692190428fb123ae2418737db31af9343d.tar.bz2
[svn-r4560] Purpose:
Bug fix. Description: H5S_select_hyperslab fails to correctly define a hyperslab when the space to put the hyperslab into is currently a 'none' selection and the hyperslab operation is the 'or' operation. Solution: Detect the situation and internally modify the hyperslab operation to be a 'set' operation, since that's the next affect desired. Platforms tested: FreeBSD 4.4. (hawkwind)
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 398e4b3..175d0c6 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -5698,6 +5698,14 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
block = _block;
}
+ /* Fixup operation if selection is 'none' and operation is an OR */
+ /* (Allows for 'or'ing a sequence of hyperslab into a 'none' selection to */
+ /* have same affect as setting the first hyperslab in the sequence to have */
+ /* the 'set' operation and the rest of the hyperslab sequence to be 'or'ed */
+ /* after that */
+ if(space->select.type==H5S_SEL_NONE && op==H5S_SELECT_OR)
+ op=H5S_SELECT_SET;
+
#ifdef QAK
printf("%s: check 1.0, op=%s\n",FUNC,(op==H5S_SELECT_SET? "H5S_SELECT_SET" : (op==H5S_SELECT_OR ? "H5S_SELECT_OR" : "Unknown")));
#endif /* QAK */