]> git.cworth.org Git - wordgame/commitdiff
Pass the dict entry flags to the for_each callback
authorCarl Worth <cworth@cworth.org>
Mon, 18 Dec 2006 17:22:10 +0000 (09:22 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 18 Dec 2006 17:22:10 +0000 (09:22 -0800)
dict.c
dict.h
rack-fancy.c

diff --git a/dict.c b/dict.c
index d7edc47a579ba64180e8588074cc97a9d20d1931..a842fa9dbda1863f6e936957c2a61d31d1e05ada 100644 (file)
--- a/dict.c
+++ b/dict.c
@@ -226,7 +226,7 @@ trie_for_each (trie_t               *trie,
     {
        count = 1;
 
-       action (closure, string->s);
+       action (closure, string->s, &trie->flags);
     }
 
     if (length == max_length)
@@ -442,7 +442,7 @@ dict_for_each_by_length (dict_t             *dict,
 }
 
 static void
-dict_action_print (void *closure, char *word)
+dict_action_print (void *closure, char *word, dict_entry_t *entry)
 {
     int *length_of_last = closure;
     int length = strlen (word);
diff --git a/dict.h b/dict.h
index 6152c724e303c8d4177a44ea0cb024c8c9a2e69e..ab962c20469bfae94808dbc8e2271a169edfd3b1 100644 (file)
--- a/dict.h
+++ b/dict.h
@@ -94,7 +94,7 @@ dict_print_by_length_if (dict_t                       *dict,
                         dict_entry_predicate_t  predicate);
 
 /* More general callback-based iteration of all entries */
-typedef void (* dict_action_t) (void *closure, char *word);
+typedef void (* dict_action_t) (void *closure, char *word, dict_entry_t *entry);
 
 int
 dict_for_each (dict_t          *dict,
index 63677da3d52594a37b995256854ccfca8ea5a2ca..87b39f56c74283d05bd34f4382d00d362b434365 100644 (file)
@@ -77,7 +77,7 @@ typedef struct _dict_paint_cursor
 } dict_paint_cursor_t;
 
 static void
-dict_paint_action (void *closure, char *word)
+dict_paint_action (void *closure, char *word, dict_entry_t *entry)
 {
     dict_paint_cursor_t *cursor = closure;
     cairo_t *cr = cursor->cr;