Lines Matching refs:node_t
17 typedef struct node_t { struct
19 struct node_t *left, *right; argument
31 if (rootp == (struct node_t **)0) in tsearch()
33 while (*rootp != (struct node_t *)0) { /* Knuth's T1: */ in tsearch()
43 if (q != (struct node_t *)0) { /* make new node */ in tsearch()
46 q->left = q->right = (struct node_t *)0; in tsearch()
63 if (rootp == (struct node_t **)0 || *rootp == (struct node_t *)0) in tdelete()
64 return ((struct node_t *)0); in tdelete()
70 if (*rootp == (struct node_t *)0) in tdelete()
74 if ((q = (*rootp)->left) == (struct node_t *)0) /* Left (struct node_t *)0? */ in tdelete()
76 else if (r != (struct node_t *)0) { /* Right link is null? */ in tdelete()
77 if (r->left == (struct node_t *)0) { /* D2: Find successor */ in tdelete()
81 for (q = r->left; q->left != (struct node_t *)0; q = r->left) in tdelete()
88 free((struct node_t *) *rootp); /* D4: Free node */ in tdelete()
97 if (root->left == (struct node_t *)0 && root->right == (struct node_t *)0) in trecurse()
101 if (root->left != (struct node_t *)0) in trecurse()
104 if (root->right != (struct node_t *)0) in trecurse()