]> git.cworth.org Git - wordgame/blob - dict.h
Eliminate useless layer of dict wrapping trie.
[wordgame] / dict.h
1 /*
2  * Copyright © 2006 Carl Worth
3  *
4  * This program is free software; you can redistribute it and\/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA."
17  */
18
19 #ifndef _DICT_H_
20 #define _DICT_H_
21
22 #include "dict-impl.h"
23
24 /* Only looks opaque. Perfectly stack-allocatable */
25 typedef trie_t dict_t;
26
27 void
28 dict_init (dict_t *dict);
29
30 void
31 dict_add_word (dict_t           *dict,
32                const char       *word);
33 void
34 dict_add_words_from_file (dict_t        *dict,
35                           const char    *filename);
36
37 void
38 dict_fini (dict_t *dict);
39
40 #endif /* _DICT_H_ */