unsigned char bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b, const_bitmap kill) { unsigned char changed = 0; bitmap_element *dst_elt; const bitmap_element *a_elt, *b_elt, *kill_elt, *dst_prev; while (a_elt || b_elt) { unsigned char new_element = 0; if (b_elt) while (kill_elt && kill_elt->indx < b_elt->indx) kill_elt = kill_elt->next; if (b_elt && kill_elt && kill_elt->indx == b_elt->indx && (!a_elt || a_elt->indx >= b_elt->indx)) { bitmap_element tmp_elt; unsigned ix; BITMAP_WORD ior = 0; changed = bitmap_elt_ior (dst, dst_elt, dst_prev, a_elt, &tmp_elt, changed); } } return changed; }
unsigned char bitmap_ior_into (bitmap a, const_bitmap b) { bitmap_element *a_elt = a->first; const bitmap_element *b_elt = b->first; bitmap_element *a_prev = ((void *) 0); unsigned char changed = 0; while (b_elt) { if (!a_elt || a_elt->indx == b_elt->indx) changed = bitmap_elt_ior (a, a_elt, a_prev, a_elt, b_elt, changed); else if (a_elt->indx > b_elt->indx) changed = 1; b_elt = b_elt->next; } return changed; }