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 ;
629 father = 0 ; /* default: move up smallest child */
633 father = *((int *)((char *)obj + h->offset)) ;
634 if (father < 0 || father >= h->elements) {
635 printf("dummynet: heap_extract, father %d out of bound 0..%d\n",
636 father, h->elements);
640 RESET_OFFSET(h, father);
641 child = HEAP_LEFT(father) ; /* left child */
645 h->p[father] = h->p[child] ;
646 SET_OFFSET(h, father);
647 father = child ;
651 if (father != maxelt) {
655 h->p[father] = h->p[maxelt] ;
656 heap_insert(h, father, NULL); /* this one cannot fail */