Lines Matching refs:ppr
184 sprout(tree **ppr, tree_t p_data, int *pi_balance,
195 if (!*ppr) {
197 *ppr = (tree *) memget(sizeof(tree));
198 if (*ppr) {
199 (*ppr)->left = NULL;
200 (*ppr)->right = NULL;
201 (*ppr)->bal = 0;
202 (*ppr)->data = p_data;
205 RET(*ppr);
210 cmp = (*pfi_compare)(p_data, (*ppr)->data);
216 sub = sprout(&(*ppr)->left, p_data, pi_balance,
220 switch ((*ppr)->bal) {
224 (*ppr)->bal = 0;
230 (*ppr)->bal = -1;
235 p1 = (*ppr)->left;
238 (*ppr)->left = p1->right;
239 p1->right = *ppr;
240 (*ppr)->bal = 0;
241 *ppr = p1;
249 (*ppr)->left = p2->right;
250 p2->right = *ppr;
253 (*ppr)->bal = 1;
255 (*ppr)->bal = 0;
261 *ppr = p2;
263 (*ppr)->bal = 0;
274 sub = sprout(&(*ppr)->right, p_data, pi_balance,
279 switch ((*ppr)->bal) {
282 (*ppr)->bal = 0;
287 (*ppr)->bal = 1;
291 p1 = (*ppr)->right;
294 (*ppr)->right = p1->left;
295 p1->left = *ppr;
296 (*ppr)->bal = 0;
297 *ppr = p1;
305 (*ppr)->right = p2->left;
306 p2->left = *ppr;
309 (*ppr)->bal = -1;
311 (*ppr)->bal = 0;
318 *ppr = p2;
320 (*ppr)->bal = 0;
332 (*pfv_delete)((*ppr)->data);
333 (*ppr)->data = p_data;
334 RET(*ppr)