From 46fc711c16ec619fc316bf215b615d0e264a9440 Mon Sep 17 00:00:00 2001 From: martin-s Date: Mon, 26 Jan 2009 10:00:13 +0000 Subject: Add:Core:Converted graphics to hashes git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1970 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/util.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'navit/util.c') diff --git a/navit/util.c b/navit/util.c index 8ccd5236d..9fb374f2b 100644 --- a/navit/util.c +++ b/navit/util.c @@ -55,6 +55,22 @@ g_hash_to_list(GHashTable *h) return ret; } +static void +hash_callback_key(gpointer key, gpointer value, gpointer user_data) +{ + GList **l=user_data; + *l=g_list_prepend(*l, key); +} + +GList * +g_hash_to_list_keys(GHashTable *h) +{ + GList *ret=NULL; + g_hash_table_foreach(h, hash_callback_key, &ret); + + return ret; +} + gchar * g_strconcat_printf(gchar *buffer, gchar *fmt, ...) { -- cgit v1.2.1