Home | History | Annotate | Download | only in microhttpd

Lines Matching refs:rootp

29 	node_t **rootp = (node_t **)vrootp;
31 if (rootp == NULL)
34 while (*rootp != NULL) { /* Knuth's T1: */
37 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */
38 return *rootp; /* we found it! */
40 rootp = (r < 0) ?
41 &(*rootp)->llink : /* T3: follow left branch */
42 &(*rootp)->rlink; /* T4: follow right branch */
47 *rootp = q; /* link new node to old */
62 node_t **rootp = (node_t **)vrootp;
64 if (rootp == NULL)
67 while (*rootp != NULL) { /* T1: */
70 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */
71 return *rootp; /* key found */
72 rootp = (r < 0) ?
73 &(*rootp)->llink : /* T3: follow left branch */
74 &(*rootp)->rlink; /* T4: follow right branch */
90 node_t **rootp = (node_t **)vrootp;
94 if (rootp == NULL || (p = *rootp) == NULL)
97 while ((cmp = (*compar)(vkey, (*rootp)->key)) != 0) {
98 p = *rootp;
99 rootp = (cmp < 0) ?
100 &(*rootp)->llink : /* follow llink branch */
101 &(*rootp)->rlink; /* follow rlink branch */
102 if (*rootp == NULL)
105 r = (*rootp)->rlink; /* D1: */
106 if ((q = (*rootp)->llink) == NULL) /* Left NULL? */
116 q->llink = (*rootp)->llink;
117 q->rlink = (*rootp)->rlink;
120 free(*rootp); /* D4: Free node */
121 *rootp = q; /* link parent to new node */