Lines Matching refs:dictionary
1 //===-- dictionary.c ---------------------------------------------*- C -*-===//
94 populate_dictionary (tree_node **dictionary, char *filename)
106 if (*dictionary == NULL)
112 *dictionary = new_node;
115 insert (*dictionary, new_word);
124 find_word (tree_node *dictionary, char *word)
126 if (!word || !dictionary)
129 int compare_value = strcmp (word, dictionary->word);
134 return find_word (dictionary->left, word);
136 return find_word (dictionary->right, word);
142 print_tree (tree_node *dictionary)
144 if (!dictionary)
147 if (dictionary->left)
148 print_tree (dictionary->left);
150 printf ("%s\n", dictionary->word);
153 if (dictionary->right)
154 print_tree (dictionary->right);
161 tree_node *dictionary = NULL;
172 populate_dictionary (&dictionary, filename);
189 if (find_word (dictionary, word))