From c11f1953e31a1baa1d6785757169c7fd35cdc51d Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth@cworth.org>
Date: Mon, 18 Dec 2006 09:22:10 -0800
Subject: [PATCH] Pass the dict entry flags to the for_each callback

---
 dict.c       | 4 ++--
 dict.h       | 2 +-
 rack-fancy.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dict.c b/dict.c
index d7edc47..a842fa9 100644
--- 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 6152c72..ab962c2 100644
--- 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,
diff --git a/rack-fancy.c b/rack-fancy.c
index 63677da..87b39f5 100644
--- a/rack-fancy.c
+++ b/rack-fancy.c
@@ -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;
-- 
2.45.2