Lines Matching refs:rchild
95 int lchild[N + 1], rchild[N + 257], parent[N + 1];
156 * For i = 0 to N - 1, rchild[i] and lchild[i] will be the right and left
159 * for 'not used.' For i = 0 to 255, rchild[N + i + 1] is the root of the
171 sp->rchild[i] = NIL;
192 sp->rchild[r] = sp->lchild[r] = NIL;
196 if (sp->rchild[p] != NIL)
197 p = sp->rchild[p];
199 sp->rchild[p] = r;
224 sp->rchild[r] = sp->rchild[p];
226 sp->parent[sp->rchild[p]] = r;
227 if (sp->rchild[sp->parent[p]] == p)
228 sp->rchild[sp->parent[p]] = r;
241 if (sp->rchild[p] == NIL)
244 q = sp->rchild[p];
247 if (sp->rchild[q] != NIL) {
249 q = sp->rchild[q];
250 } while (sp->rchild[q] != NIL);
251 sp->rchild[sp->parent[q]] = sp->lchild[q];
256 sp->rchild[q] = sp->rchild[p];
257 sp->parent[sp->rchild[p]] = q;
260 if (sp->rchild[sp->parent[p]] == p)
261 sp->rchild[sp->parent[p]] = q;