[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)
This commit is contained in:
Quincey Koziol 2001-10-20 14:24:03 -05:00
parent 5efe5534ce
commit 8c076f6921

View File

@ -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 */