From 8c076f692190428fb123ae2418737db31af9343d Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Sat, 20 Oct 2001 14:24:03 -0500 Subject: [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) --- src/H5Shyper.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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 */ -- cgit v0.12