Home
last modified time | relevance | path

Searched refs:rootp (Results 1 – 3 of 3) sorted by relevance

/picolibc-3.7.0-3.6.0/newlib/libc/search/
Dtdelete.c61 node_t **rootp = (node_t **)vrootp; in tdelete() local
65 if (rootp == NULL || (p = *rootp) == NULL) in tdelete()
68 while ((cmp = (*compar)(vkey, (*rootp)->key)) != 0) { in tdelete()
69 p = *rootp; in tdelete()
70 rootp = (cmp < 0) ? in tdelete()
71 &(*rootp)->llink : /* follow llink branch */ in tdelete()
72 &(*rootp)->rlink; /* follow rlink branch */ in tdelete()
73 if (*rootp == NULL) in tdelete()
76 r = (*rootp)->rlink; /* D1: */ in tdelete()
77 if ((q = (*rootp)->llink) == NULL) /* Left NULL? */ in tdelete()
[all …]
Dtsearch.c61 node_t **rootp = (node_t **)vrootp; in tsearch() local
63 if (rootp == NULL) in tsearch()
66 while (*rootp != NULL) { /* Knuth's T1: */ in tsearch()
69 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */ in tsearch()
70 return *rootp; /* we found it! */ in tsearch()
72 rootp = (r < 0) ? in tsearch()
73 &(*rootp)->llink : /* T3: follow left branch */ in tsearch()
74 &(*rootp)->rlink; /* T4: follow right branch */ in tsearch()
79 *rootp = q; /* link new node to old */ in tsearch()
Dtfind.c60 node_t **rootp = (node_t **)vrootp; in tfind() local
62 if (rootp == NULL) in tfind()
65 while (*rootp != NULL) { /* T1: */ in tfind()
68 if ((r = (*compar)(vkey, (*rootp)->key)) == 0) /* T2: */ in tfind()
69 return *rootp; /* key found */ in tfind()
70 rootp = (r < 0) ? in tfind()
71 &(*rootp)->llink : /* T3: follow left branch */ in tfind()
72 &(*rootp)->rlink; /* T4: follow right branch */ in tfind()