Searched refs:rootp (Results 1 – 3 of 3) sorted by relevance
59 node_t **rootp = (node_t **)vrootp; in tdelete() local63 if (rootp == NULL || (p = *rootp) == NULL) in tdelete()66 while ((cmp = (*compar)(vkey, (*rootp)->key)) != 0) { in tdelete()67 p = *rootp; in tdelete()68 rootp = (cmp < 0) ? in tdelete()69 &(*rootp)->llink : /* follow llink branch */ in tdelete()70 &(*rootp)->rlink; /* follow rlink branch */ in tdelete()71 if (*rootp == NULL) in tdelete()74 r = (*rootp)->rlink; /* D1: */ in tdelete()75 if ((q = (*rootp)->llink) == NULL) /* Left NULL? */ in tdelete()[all …]
59 node_t **rootp = (node_t **)vrootp; in tsearch() local61 if (rootp == NULL) in tsearch()64 while (*rootp != NULL) { /* Knuth's T1: */ in tsearch()67 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */ in tsearch()68 return *rootp; /* we found it! */ in tsearch()70 rootp = (r < 0) ? in tsearch()71 &(*rootp)->llink : /* T3: follow left branch */ in tsearch()72 &(*rootp)->rlink; /* T4: follow right branch */ in tsearch()77 *rootp = q; /* link new node to old */ in tsearch()
58 node_t **rootp = (node_t **)vrootp; in tfind() local60 if (rootp == NULL) in tfind()63 while (*rootp != NULL) { /* T1: */ in tfind()66 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */ in tfind()67 return *rootp; /* key found */ in tfind()68 rootp = (r < 0) ? in tfind()69 &(*rootp)->llink : /* T3: follow left branch */ in tfind()70 &(*rootp)->rlink; /* T4: follow right branch */ in tfind()