From 29748a7520497dddc02ec2ee69522b6dd4d1537e Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 31 Oct 2002 21:57:29 +0000 Subject: Removed hash-table-utils.[c,h] from the build. 2002-10-31 Jeffrey Stedfast * Makefile.am: Removed hash-table-utils.[c,h] from the build. * hash-table-utils.[c,h]: Removed. * string-util.c: Imported g_strcase[hash,equal] into here so we can remove hash-table-utils.[c,h]. * camel-medium.c: Removed #include "hash-table-utils.h" * camel-mime-message.c: Same here. * camel-mime-part.c: And here. * camel-session.c: Here too. * providers/imap/camel-imap-store-summary.c: #include string-utils.h instead of hash-table-utils.h * camel-charset-map.c: Same. * camel-folder-summary.c: Here too. * camel-provider.c: Again here. * camel-store-summary.c: And again... svn path=/trunk/; revision=18473 --- camel/string-utils.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'camel/string-utils.c') diff --git a/camel/string-utils.c b/camel/string-utils.c index 02cfded80c..8fa82ed4ec 100644 --- a/camel/string-utils.c +++ b/camel/string-utils.c @@ -26,10 +26,35 @@ #endif #include +#include #include "string-utils.h" +int +g_strcase_equal (gconstpointer a, gconstpointer b) +{ + return (strcasecmp ((const char *) a, (const char *) b) == 0); +} + +guint +g_strcase_hash (gconstpointer v) +{ + const char *p = (char *) v; + guint h = 0, g; + + for ( ; *p != '\0'; p++) { + h = (h << 4) + toupper (*p); + if ((g = h & 0xf0000000)) { + h = h ^ (g >> 24); + h = h ^ g; + } + } + + return h; +} + + static void free_string (gpointer string, gpointer user_data) { -- cgit v1.2.3