diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-05-18 10:01:53 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-05-18 10:01:53 +0000 |
commit | ca99b617483dd3b59fd42738e810309c4229a538 (patch) | |
tree | be7bb1cb1020f4022e41c004e2fa9d561ea3580d /navit/util.c | |
parent | 77ebd4f9df170e6211c5ace8d43c997d385d9ec9 (diff) | |
download | navit-svn-ca99b617483dd3b59fd42738e810309c4229a538.tar.gz |
Fix:Core:Renamed src to navit for cleanup of includes
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1059 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/util.c')
-rw-r--r-- | navit/util.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/navit/util.c b/navit/util.c new file mode 100644 index 00000000..44643d4f --- /dev/null +++ b/navit/util.c @@ -0,0 +1,36 @@ +#include <glib.h> +#include <ctype.h> +#include "util.h" + +void +strtoupper(char *dest, const char *src) +{ + while (*src) + *dest++=toupper(*src++); + *dest='\0'; +} + +void +strtolower(char *dest, const char *src) +{ + while (*src) + *dest++=tolower(*src++); + *dest='\0'; +} + + +static void +hash_callback(gpointer key, gpointer value, gpointer user_data) +{ + GList **l=user_data; + *l=g_list_prepend(*l, value); +} + +GList * +g_hash_to_list(GHashTable *h) +{ + GList *ret=NULL; + g_hash_table_foreach(h, hash_callback, &ret); + + return ret; +} |