Lines Matching defs:tt
113 rn_new_radix_mask(struct radix_node *tt,
401 struct radix_node *tt = nodes, *t = tt + 1;
404 t->rn_left = tt;
406 tt->rn_bit = -1;
407 tt->rn_key = (caddr_t)v;
408 tt->rn_parent = t;
409 tt->rn_flags = t->rn_flags = RNF_ACTIVE;
410 tt->rn_mklist = t->rn_mklist = NULL;
412 tt->rn_info = rn_nodenum++; t->rn_info = rn_nodenum++;
413 tt->rn_twin = t;
414 tt->rn_ybro = rn_clist;
415 rn_clist = tt;
430 struct radix_node *tt;
466 tt = t->rn_left;
476 t->rn_right = tt;
484 return (tt);
574 rn_new_radix_mask(struct radix_node *tt, struct radix_mask *next)
584 m->rm_bit = tt->rn_bit;
585 m->rm_flags = tt->rn_flags;
586 if (tt->rn_flags & RNF_NORMAL)
587 m->rm_leaf = tt;
589 m->rm_mask = tt->rn_mask;
591 tt->rn_mklist = m;
600 struct radix_node *t, *x = NULL, *tt;
624 saved_tt = tt = rn_insert(v, head, &keyduplicated, treenodes);
626 for (t = tt; tt; t = tt, tt = tt->rn_dupedkey) {
627 if (tt->rn_mask == netmask)
630 (tt->rn_mask &&
631 ((b_leaf < tt->rn_bit) /* index(netmask) > node */
632 || rn_refines(netmask, tt->rn_mask)
633 || rn_lexobetter(netmask, tt->rn_mask))))
646 if (tt == saved_tt) {
649 (tt = treenodes)->rn_dupedkey = t;
650 tt->rn_flags = t->rn_flags;
651 tt->rn_parent = x = t->rn_parent;
652 t->rn_parent = tt; /* parent */
654 x->rn_left = tt;
656 x->rn_right = tt;
657 saved_tt = tt; x = xx;
659 (tt = treenodes)->rn_dupedkey = t->rn_dupedkey;
660 t->rn_dupedkey = tt;
661 tt->rn_parent = t; /* parent */
662 if (tt->rn_dupedkey) /* parent */
663 tt->rn_dupedkey->rn_parent = tt; /* parent */
666 t=tt+1; tt->rn_info = rn_nodenum++; t->rn_info = rn_nodenum++;
667 tt->rn_twin = t; tt->rn_ybro = rn_clist; rn_clist = tt;
669 tt->rn_key = (caddr_t) v;
670 tt->rn_bit = -1;
671 tt->rn_flags = RNF_ACTIVE;
678 tt->rn_mask = netmask;
679 tt->rn_bit = x->rn_bit;
680 tt->rn_flags |= x->rn_flags & RNF_NORMAL;
710 return tt; /* can't lift at all */
711 b_leaf = tt->rn_bit;
729 if (tt->rn_flags & RNF_NORMAL) {
732 return tt;
738 tt->rn_mklist = m;
739 return tt;
745 *mp = rn_new_radix_mask(tt, *mp);
746 return tt;
752 struct radix_node *t, *p, *x, *tt;
761 tt = rn_search(v, x);
764 saved_tt = tt;
766 if (tt == 0 ||
767 Bcmp(v + head_off, tt->rn_key + head_off, vlen - head_off))
776 while (tt->rn_mask != netmask)
777 if ((tt = tt->rn_dupedkey) == 0)
780 if (tt->rn_mask == 0 || (saved_m = m = tt->rn_mklist) == 0)
782 if (tt->rn_flags & RNF_NORMAL) {
783 if (m->rm_leaf != tt || m->rm_refs > 0) {
788 if (m->rm_mask != tt->rn_mask) {
795 b = -1 - tt->rn_bit;
811 if (tt->rn_flags & RNF_NORMAL)
818 if (tt->rn_flags & RNF_ROOT)
823 for (t = rn_clist; t && t->rn_ybro != tt; t = t->rn_ybro) {}
824 if (t) t->rn_ybro = tt->rn_ybro;
826 t = tt->rn_parent;
830 * at this point, tt is the deletion target and saved_tt
833 if (tt == saved_tt) {
836 if (t->rn_left == tt)
841 /* find node in front of tt on the chain */
842 for (x = p = saved_tt; p && p->rn_dupedkey != tt;)
845 p->rn_dupedkey = tt->rn_dupedkey;
846 if (tt->rn_dupedkey) /* parent */
847 tt->rn_dupedkey->rn_parent = p;
851 t = tt + 1;
871 if (t->rn_left == tt)
910 x = tt + 1;
928 tt->rn_flags &= ~RNF_ACTIVE;
929 tt[1].rn_flags &= ~RNF_ACTIVE;
930 return (tt);
1119 struct radix_node *t, *tt, *ttt;
1131 tt = t->rn_left;
1132 tt->rn_flags = t->rn_flags = RNF_ROOT | RNF_ACTIVE;
1133 tt->rn_bit = -1 - off;
1134 *ttt = *tt;