Lines Matching refs:father
611 int father = HEAP_FATHER(son); in heap_insert() local
614 if (DN_KEY_LT( h->p[father].key, h->p[son].key )) { in heap_insert()
618 HEAP_SWAP(h->p[son], h->p[father], tmp); in heap_insert()
620 son = father; in heap_insert()
632 int child, father, maxelt = h->elements - 1; in heap_extract() local
639 father = 0; /* default: move up smallest child */ in heap_extract()
644 father = *((int *)(void *)((char *)obj + h->offset)); in heap_extract()
645 if (father < 0 || father >= h->elements) { in heap_extract()
647 father, h->elements); in heap_extract()
651 RESET_OFFSET(h, father); in heap_extract()
652 child = HEAP_LEFT(father); /* left child */ in heap_extract()
657 h->p[father] = h->p[child]; in heap_extract()
658 SET_OFFSET(h, father); in heap_extract()
659 father = child; in heap_extract()
663 if (father != maxelt) { in heap_extract()
667 h->p[father] = h->p[maxelt]; in heap_extract()
668 heap_insert(h, father, NULL); /* this one cannot fail */ in heap_extract()