]> git.cworth.org Git - wordgame/blobdiff - dict.c
Begin to wean grid.c away from trie and toward dict.
[wordgame] / dict.c
diff --git a/dict.c b/dict.c
index a783ffcef36809a732f1b2789314ed838ae7891c..00d54e04036b79576a4fa2dc155853ee9d663864 100644 (file)
--- a/dict.c
+++ b/dict.c
@@ -247,6 +247,13 @@ dict_fini (dict_t *dict)
     trie_fini (dict);
 }
 
+void
+dict_add_word (dict_t          *dict,
+              const char       *word)
+{
+    trie_add (dict, word);
+}
+
 void
 dict_add_words_from_file (dict_t       *dict,
                          const char    *filename)
@@ -268,7 +275,7 @@ dict_add_words_from_file (dict_t    *dict,
        if (bytes_read == -1)
            break;
        chomp (line);
-       trie_add (dict, line);
+       dict_add_word (dict, line);
     }
     if (line)
        free (line);