* Sherlock Library -- Universal Heap Macros
*
* (c) 2001 Martin Mares <mj@ucw.cz>
+ *
+ * This software may be freely distributed and used according to the terms
+ * of the GNU Lesser General Public License.
*/
#define HEAP_BUBBLE_DOWN_J(heap,num,less,swap) \
do { \
uns j, l, u; \
type x; \
- swap(heap,pos,num,x); \
- num--; \
j = pos; \
+ swap(heap,j,num,x); \
+ num--; \
if (less(heap[j], heap[num+1])) \
HEAP_BUBBLE_UP_J(heap,num,less,swap) \
else \