]> git.cworth.org Git - wordgame/commit
Complete the dict layer by adding dict_cursor_t and dict_entry_t
authorCarl Worth <cworth@raht.cworth.org>
Thu, 21 Sep 2006 07:36:10 +0000 (00:36 -0700)
committerCarl Worth <cworth@raht.cworth.org>
Thu, 21 Sep 2006 07:36:10 +0000 (00:36 -0700)
commitdd4b319cdb6e2883ae76317036b57b670344160a
tree8a34796b0caaf9f52f4773dc265e7818bbba47f8
parent70914305c0fe98948ba7e105a220fe7a36a62fec
Complete the dict layer by adding dict_cursor_t and dict_entry_t

Some might argue that this is a gratuitous layer and that it
hides the elegance of the trie implementation where pointers
to the entire structure and pointers to a single node are
equivalent.

But I think the elegance is still all there in the implementation,
and I think there's some real benefit in making separate notions
of the entire structure (dict_t) and a pointer to a single element
for navigating (dict_cursor_t) since the operations one might want
to perform on one or the other are entirely separate.

With this change, the only remaining dependence of grid.c on any
trie or TRIE symbols is a single flag definition (which I want to
put entirely in grid.c) and the print functionality.
dict.c
dict.h
grid.c