Lines Matching defs:father
603 int father = HEAP_FATHER(son) ;
606 if (DN_KEY_LT( h->p[father].key, h->p[son].key ) )
608 /* son smaller than father, swap and repeat */
609 HEAP_SWAP(h->p[son], h->p[father], tmp) ;
611 son = father ;
623 int child, father, maxelt = h->elements - 1 ;
630 father = 0 ; /* default: move up smallest child */
634 father = *((int *)((char *)obj + h->offset)) ;
635 if (father < 0 || father >= h->elements) {
636 printf("dummynet: heap_extract, father %d out of bound 0..%d\n",
637 father, h->elements);
641 RESET_OFFSET(h, father);
642 child = HEAP_LEFT(father) ; /* left child */
646 h->p[father] = h->p[child] ;
647 SET_OFFSET(h, father);
648 father = child ;
652 if (father != maxelt) {
656 h->p[father] = h->p[maxelt] ;
657 heap_insert(h, father, NULL); /* this one cannot fail */