Lines Matching refs:link
130 if(root && (disc->link < 0 || disc->freef) )
244 st->space = sizeof(Dttree_t) + (dt->disc->link >= 0 ? 0 : size*sizeof(Dthold_t));
285 static Dtlink_t* troot(Dt_t* dt, Dtlink_t* list, Dtlink_t* link, Void_t* obj, int type)
294 { list->_left = link->_rght;
295 list->_rght = link->_left;
320 link->_rght = list->_left;
321 link->_left = list->_rght;
328 while(!root && (t = link->_rght) ) /* link->_rght is the left subtree <= obj */
334 { link->_rght = t; /* no more of this group in subtree */
338 { link->_rght = t->_left; /* found the exact object */
342 { link->_rght = t->_left;
350 while(!root && (t = link->_left) ) /* link->_left is the right subtree >= obj */
356 { link->_left = t; /* no more of this group in subtree */
360 { link->_left = t->_rght; /* found the exact object */
364 { link->_left = t->_rght;
381 { last->_left = link->_rght;
382 link->_rght = list;
385 { last->_rght = link->_left;
386 link->_left = list;
404 Dtlink_t *root, *t, *l, *r, *me, link;
442 memset(&link, 0, sizeof(link));
443 l = r = &link; /* link._rght(_left) will be LEFT(RIGHT) tree after splaying */
512 root = troot(dt, root, &link, obj, type);
517 root->_left = link._rght;
518 root->_rght = link._left;
523 { root->_left = link._rght;
525 link._rght = root;
527 if((root = link._left) )
530 link._left = root->_rght;
536 { root->_rght = link._left;
538 link._left = root;
540 if((root = link._rght) )
543 link._rght = root->_left;
552 { root->_left = link._rght;
553 root->_rght = link._left;
572 root->_rght = link._left;
573 link._left = root;
582 me->_rght = link._left;
583 link._left = me;
591 if(!(l = link._rght) ) /* no LEFT subtree */
592 tree->root = link._left; /* tree is RIGHT tree */
599 l->_rght = link._left; /* hook RIGHT tree to LEFT root */