Lines Matching defs:father
294 int father = HEAP_FATHER(son) ;
297 if (DN_KEY_LT( h->p[father].key, h->p[son].key ) )
299 /* son smaller than father, swap and repeat */
300 HEAP_SWAP(h->p[son], h->p[father], tmp) ;
302 son = father ;
314 int child, father, maxelt = h->elements - 1 ;
320 father = 0 ; /* default: move up smallest child */
324 father = *((int *)((char *)obj + h->offset)) ;
325 if (father < 0 || father >= h->elements) {
326 printf("dummynet: heap_extract, father %d out of bound 0..%d\n",
327 father, h->elements);
331 RESET_OFFSET(h, father);
332 child = HEAP_LEFT(father) ; /* left child */
336 h->p[father] = h->p[child] ;
337 SET_OFFSET(h, father);
338 father = child ;
342 if (father != maxelt) {
346 h->p[father] = h->p[maxelt] ;
347 heap_insert(h, father, NULL); /* this one cannot fail */