Lines Matching refs:root
119 search_item (struct item *root, char const *str) in search_item() argument
126 if (root->right == nullptr) in search_item()
127 return (root->right = new_item (str)); in search_item()
130 t = root; in search_item()
131 s = p = root->right; in search_item()
397 recurse_tree (struct item *root, bool (*action) (struct item *)) in recurse_tree() argument
399 if (root->left == nullptr && root->right == nullptr) in recurse_tree()
400 return (*action) (root); in recurse_tree()
403 if (root->left != nullptr) in recurse_tree()
404 if (recurse_tree (root->left, action)) in recurse_tree()
406 if ((*action) (root)) in recurse_tree()
408 if (root->right != nullptr) in recurse_tree()
409 if (recurse_tree (root->right, action)) in recurse_tree()
420 walk_tree (struct item *root, bool (*action) (struct item *)) in walk_tree() argument
422 if (root->right) in walk_tree()
423 recurse_tree (root->right, action); in walk_tree()
438 struct item *root = new_item (nullptr); in tsort() local
460 k = search_item (root, tokenbuffer.buffer); in tsort()
476 walk_tree (root, count_items); in tsort()
481 walk_tree (root, scan_zeros); in tsort()
518 walk_tree (root, detect_loop); in tsort()