Carl Worth [Thu, 21 Sep 2006 09:02:39 +0000 (02:02 -0700)]
Move private portions of dict from dict-impl.h back to dict.c
This is the punch line in the recent series of commits which removed
trie_t and string_t code from grid.c. We now finally have a nice,
clean dict_t interface for new programs to use.
Carl Worth [Thu, 21 Sep 2006 07:36:10 +0000 (00:36 -0700)]
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.