Lines Matching defs:tree
36 ** Functions to manage the tree of partial-completions for keycodes.
49 _nc_expand_try(TRIES * tree, unsigned code, int *count, size_t len)
51 TRIES *ptr = tree;
84 * Remove a code from the specified tree, freeing the unused nodes. Returns
88 _nc_remove_key(TRIES ** tree, unsigned code)
90 T((T_CALLED("_nc_remove_key(%p,%d)"), tree, code));
95 while (*tree != 0) {
96 if (_nc_remove_key(&(*tree)->child, code)) {
99 if ((*tree)->value == code) {
100 if ((*tree)->child) {
101 /* don't cut the whole sub-tree */
102 (*tree)->value = 0;
104 TRIES *to_free = *tree;
105 *tree = (*tree)->sibling;
110 tree = &(*tree)->sibling;
116 * Remove a string from the specified tree, freeing the unused nodes. Returns
120 _nc_remove_string(TRIES ** tree, const char *string)
122 T((T_CALLED("_nc_remove_string(%p,%s)"), tree, _nc_visbuf(string)));
127 while (*tree != 0) {
128 if (UChar((*tree)->ch) == UChar(*string)) {
130 returnCode(_nc_remove_string(&(*tree)->child, string + 1));
131 if ((*tree)->child == 0) {
132 TRIES *to_free = *tree;
133 *tree = (*tree)->sibling;
140 tree = &(*tree)->sibling;