Lines Matching refs:q

292   node q, root;  in __tsearch()  local
337 q = (struct node_t *) malloc (sizeof (struct node_t)); in __tsearch()
338 if (q != NULL) in __tsearch()
347 assert (((uintptr_t) q & (uintptr_t) 0x1) == 0); in __tsearch()
349 SETNODEPTR(nextp,q); /* link new node to old */ in __tsearch()
350 q->key = key; /* initialize new node */ in __tsearch()
351 SETRED(q); in __tsearch()
352 SETLEFT(q,NULL); in __tsearch()
353 SETRIGHT(q,NULL); in __tsearch()
361 return q; in __tsearch()
405 node p, q, r, retval; in weak_alias() local
463 q = LEFT(root); in weak_alias()
465 if (q == NULL || r == NULL) in weak_alias()
499 q = DEREFNODEPTR(nodestack[sp-1]); in weak_alias()
500 if (unchained == RIGHT(q)) in weak_alias()
501 SETRIGHT(q,r); in weak_alias()
503 SETLEFT(q,r); in weak_alias()
526 q = RIGHT(p); in weak_alias()
527 if (RED(q)) in weak_alias()
536 SETBLACK(q); in weak_alias()
539 SETRIGHT(p,LEFT(q)); in weak_alias()
540 SETLEFT(q,p); in weak_alias()
541 SETNODEPTR(pp,q); in weak_alias()
544 nodestack[sp++] = pp = LEFTPTR(q); in weak_alias()
545 q = RIGHT(p); in weak_alias()
549 if ((LEFT(q) == NULL || !RED(LEFT(q))) in weak_alias()
550 && (RIGHT(q) == NULL || !RED(RIGHT(q)))) in weak_alias()
560 SETRED(q); in weak_alias()
568 if (RIGHT(q) == NULL || !RED(RIGHT(q))) in weak_alias()
580 node q2 = LEFT(q); in weak_alias()
586 SETLEFT(q,RIGHT(q2)); in weak_alias()
587 SETRIGHT(q2,q); in weak_alias()
599 SETRED(q); in weak_alias()
601 SETBLACK(q); in weak_alias()
604 SETBLACK(RIGHT(q)); in weak_alias()
607 SETRIGHT(p,LEFT(q)); in weak_alias()
608 SETLEFT(q,p); in weak_alias()
609 SETNODEPTR(pp,q); in weak_alias()
620 q = LEFT(p); in weak_alias()
621 if (RED(q)) in weak_alias()
623 SETBLACK(q); in weak_alias()
625 SETLEFT(p,RIGHT(q)); in weak_alias()
626 SETRIGHT(q,p); in weak_alias()
627 SETNODEPTR(pp,q); in weak_alias()
628 nodestack[sp++] = pp = RIGHTPTR(q); in weak_alias()
629 q = LEFT(p); in weak_alias()
631 if ((RIGHT(q) == NULL || !RED(RIGHT(q))) in weak_alias()
632 && (LEFT(q) == NULL || !RED(LEFT(q)))) in weak_alias()
634 SETRED(q); in weak_alias()
639 if (LEFT(q) == NULL || !RED(LEFT(q))) in weak_alias()
641 node q2 = RIGHT(q); in weak_alias()
647 SETRIGHT(q,LEFT(q2)); in weak_alias()
648 SETLEFT(q2,q); in weak_alias()
656 SETRED(q); in weak_alias()
658 SETBLACK(q); in weak_alias()
660 SETBLACK(LEFT(q)); in weak_alias()
661 SETLEFT(p,RIGHT(q)); in weak_alias()
662 SETRIGHT(q,p); in weak_alias()
663 SETNODEPTR(pp,q); in weak_alias()