Home | History | Annotate | Download | only in Modules

Lines Matching refs:node

28 /* Insert a new node into the tree.
31 RotatingTree_Add(rotating_node_t **root, rotating_node_t *node)
34 if (KEY_LOWER_THAN(node->key, (*root)->key))
39 node->left = NULL;
40 node->right = NULL;
41 *root = node;
44 /* Locate the node with the given key. This is the most complicated
46 resulting node closer to the root. */
52 rotating_node_t *node = *root;
53 while (node != NULL) {
54 if (node->key == key)
55 return node;
56 if (KEY_LOWER_THAN(key, node->key))
57 node = node->left;
59 node = node->right;
65 rotating_node_t *node = *pnode;
68 if (node == NULL)
71 if (node->key == key)
72 return node;
74 if (KEY_LOWER_THAN(key, node->key)) {
75 next = node->left;
79 node->left = next->right;
80 next->right = node;
84 pnode = &(node->left);
87 next = node->right;
91 node->right = next->left;
92 next->left = node;
96 pnode = &(node->right);
98 node = next;
111 rotating_node_t *node;
115 node = root->right;
118 root = node;