* invalidate all iterators pointing to it (including the one passed to the
* insertion or removal function).
*
- * btree currently doesn't have convenience functions for the simple tasks of
- * "look up by key", "insert a key", and "remove a key". To insert or remove,
- * you first have use btree_find* to position an iterator on the
- * insertion/removal point, then call btree_insert_at or btree_remove_at using
- * that iterator. Since a btree can hold multiple items with the same key,
- * it isn't clear how the convenience functions should work yet. I'm open to
- * suggestions.
- *
* A B-tree (not to be confused with a binary tree) is a data structure that
* performs insertion, removal, and lookup in O(log n) time per operation.
* Although B-trees are typically used for databases and filesystems, this is
* };
*
* //Define the ordering function order_by_letter_set
- * btree_search_implement
+ * static btree_search_implement
* (
* order_by_letter_set,
* struct word *,
* char *chomp(char *str);
* char *make_letter_set(char *str);
*
- * void insert_word(struct btree *btree, struct word *word)
+ * static void insert_word(struct btree *btree, struct word *word)
* {
* btree_iterator iter;
*
* btree_insert_at(iter, word);
* }
*
- * void print_anagrams(struct btree *btree, char *line)
+ * static void print_anagrams(struct btree *btree, char *line)
* {
* btree_iterator iter, end;
* struct word key = {
* }
* }
*
- * int destroy_word(struct word *word, void *ctx)
+ * static int destroy_word(struct word *word, void *ctx)
* {
* (void) ctx;
*
* return 1;
* }
*
- * struct btree *read_dictionary(const char *filename)
+ * static struct btree *read_dictionary(const char *filename)
* {
* FILE *f;
* char line[256];
*
* return btree;
*
- * fail:
+ * fail:
* btree_delete(btree);
* fprintf(stderr, "%s: %s\n", filename, strerror(errno));
* return NULL;
* return str;
* }
*
- * Author: Joey Adams
- * Version: 0.1.0
- * Licence: BSD
+ * Author: Joey Adams <joeyadams3.14159@gmail.com>
+ * License: MIT
+ * Version: 0.2
*/
int main(int argc, char *argv[])
{