Lines Matching refs:t

44                              struct Curl_tree *t)  in Curl_splay()  argument
48 if(!t) in Curl_splay()
54 timediff_t comp = compare(i, t->key); in Curl_splay()
56 if(!t->smaller) in Curl_splay()
58 if(compare(i, t->smaller->key) < 0) { in Curl_splay()
59 y = t->smaller; /* rotate smaller */ in Curl_splay()
60 t->smaller = y->larger; in Curl_splay()
61 y->larger = t; in Curl_splay()
62 t = y; in Curl_splay()
63 if(!t->smaller) in Curl_splay()
66 r->smaller = t; /* link smaller */ in Curl_splay()
67 r = t; in Curl_splay()
68 t = t->smaller; in Curl_splay()
71 if(!t->larger) in Curl_splay()
73 if(compare(i, t->larger->key) > 0) { in Curl_splay()
74 y = t->larger; /* rotate larger */ in Curl_splay()
75 t->larger = y->smaller; in Curl_splay()
76 y->smaller = t; in Curl_splay()
77 t = y; in Curl_splay()
78 if(!t->larger) in Curl_splay()
81 l->larger = t; /* link larger */ in Curl_splay()
82 l = t; in Curl_splay()
83 t = t->larger; in Curl_splay()
89 l->larger = t->smaller; /* assemble */ in Curl_splay()
90 r->smaller = t->larger; in Curl_splay()
91 t->smaller = N.larger; in Curl_splay()
92 t->larger = N.smaller; in Curl_splay()
94 return t; in Curl_splay()
103 struct Curl_tree *t, in Curl_splayinsert() argument
112 if(t) { in Curl_splayinsert()
113 t = Curl_splay(i, t); in Curl_splayinsert()
114 DEBUGASSERT(t); in Curl_splayinsert()
115 if(compare(i, t->key) == 0) { in Curl_splayinsert()
122 node->samen = t; in Curl_splayinsert()
123 node->samep = t->samep; in Curl_splayinsert()
124 t->samep->samen = node; in Curl_splayinsert()
125 t->samep = node; in Curl_splayinsert()
127 return t; /* the root node always stays the same */ in Curl_splayinsert()
131 if(!t) { in Curl_splayinsert()
134 else if(compare(i, t->key) < 0) { in Curl_splayinsert()
135 node->smaller = t->smaller; in Curl_splayinsert()
136 node->larger = t; in Curl_splayinsert()
137 t->smaller = NULL; in Curl_splayinsert()
141 node->larger = t->larger; in Curl_splayinsert()
142 node->smaller = t; in Curl_splayinsert()
143 t->larger = NULL; in Curl_splayinsert()
157 struct Curl_tree *t, in Curl_splaygetbest() argument
163 if(!t) { in Curl_splaygetbest()
169 t = Curl_splay(tv_zero, t); in Curl_splaygetbest()
170 DEBUGASSERT(t); in Curl_splaygetbest()
171 if(compare(i, t->key) < 0) { in Curl_splaygetbest()
174 return t; in Curl_splaygetbest()
178 x = t->samen; in Curl_splaygetbest()
179 if(x != t) { in Curl_splaygetbest()
184 x->key = t->key; in Curl_splaygetbest()
185 x->larger = t->larger; in Curl_splaygetbest()
186 x->smaller = t->smaller; in Curl_splaygetbest()
187 x->samep = t->samep; in Curl_splaygetbest()
188 t->samep->samen = x; in Curl_splaygetbest()
190 *removed = t; in Curl_splaygetbest()
195 x = t->larger; in Curl_splaygetbest()
196 *removed = t; in Curl_splaygetbest()
213 int Curl_splayremove(struct Curl_tree *t, in Curl_splayremove() argument
222 if(!t) in Curl_splayremove()
240 *newroot = t; /* return the same root */ in Curl_splayremove()
244 t = Curl_splay(removenode->key, t); in Curl_splayremove()
245 DEBUGASSERT(t); in Curl_splayremove()
254 if(t != removenode) in Curl_splayremove()
259 x = t->samen; in Curl_splayremove()
260 if(x != t) { in Curl_splayremove()
264 x->key = t->key; in Curl_splayremove()
265 x->larger = t->larger; in Curl_splayremove()
266 x->smaller = t->smaller; in Curl_splayremove()
267 x->samep = t->samep; in Curl_splayremove()
268 t->samep->samen = x; in Curl_splayremove()
272 if(!t->smaller) in Curl_splayremove()
273 x = t->larger; in Curl_splayremove()
275 x = Curl_splay(removenode->key, t->smaller); in Curl_splayremove()
277 x->larger = t->larger; in Curl_splayremove()