aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-11-01 05:57:29 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-11-01 05:57:29 +0800
commit29748a7520497dddc02ec2ee69522b6dd4d1537e (patch)
tree4b5039f01455eeb1c457db4b00b2dc93d83ea97b /camel
parentf48db35928c31854f828f04d52b5ee9df858e4e5 (diff)
downloadgsoc2013-evolution-29748a7520497dddc02ec2ee69522b6dd4d1537e.tar
gsoc2013-evolution-29748a7520497dddc02ec2ee69522b6dd4d1537e.tar.gz
gsoc2013-evolution-29748a7520497dddc02ec2ee69522b6dd4d1537e.tar.bz2
gsoc2013-evolution-29748a7520497dddc02ec2ee69522b6dd4d1537e.tar.lz
gsoc2013-evolution-29748a7520497dddc02ec2ee69522b6dd4d1537e.tar.xz
gsoc2013-evolution-29748a7520497dddc02ec2ee69522b6dd4d1537e.tar.zst
gsoc2013-evolution-29748a7520497dddc02ec2ee69522b6dd4d1537e.zip
Removed hash-table-utils.[c,h] from the build.
2002-10-31 Jeffrey Stedfast <fejj@ximian.com> * 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
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog28
-rw-r--r--camel/Makefile.am2
-rw-r--r--camel/camel-charset-map.c2
-rw-r--r--camel/camel-folder-summary.c2
-rw-r--r--camel/camel-medium.c3
-rw-r--r--camel/camel-mime-message.c1
-rw-r--r--camel/camel-mime-part.c1
-rw-r--r--camel/camel-provider.c2
-rw-r--r--camel/camel-session.c2
-rw-r--r--camel/camel-store-summary.c2
-rw-r--r--camel/hash-table-utils.c63
-rw-r--r--camel/hash-table-utils.h45
-rw-r--r--camel/providers/imap/camel-imap-store-summary.c2
-rw-r--r--camel/string-utils.c25
-rw-r--r--camel/string-utils.h3
15 files changed, 64 insertions, 119 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index c504171765..4f5abb9031 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,33 @@
2002-10-31 Jeffrey Stedfast <fejj@ximian.com>
+ * 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...
+
+2002-10-31 Jeffrey Stedfast <fejj@ximian.com>
+
Remove a ton of useless snot.
* Makefile.am: Remove gstring-util.[c,h] from the build.
diff --git a/camel/Makefile.am b/camel/Makefile.am
index ab2160375b..7b6b45e0e5 100644
--- a/camel/Makefile.am
+++ b/camel/Makefile.am
@@ -114,7 +114,6 @@ libcamel_la_SOURCES = \
camel-vee-store.c \
camel-vtrash-folder.c \
camel.c \
- hash-table-utils.c \
string-utils.c
libcamelinclude_HEADERS = \
@@ -213,7 +212,6 @@ libcamelinclude_HEADERS = \
camel-vee-store.h \
camel-vtrash-folder.h \
camel.h \
- hash-table-utils.h \
string-utils.h
libcamel_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
diff --git a/camel/camel-charset-map.c b/camel/camel-charset-map.c
index 8594f261cf..981a90314f 100644
--- a/camel/camel-charset-map.c
+++ b/camel/camel-charset-map.c
@@ -199,7 +199,7 @@ int main (void)
#include "camel-charset-map.h"
#include "camel-charset-map-private.h"
-#include "hash-table-utils.h"
+#include "string-utils.h"
#include <gal/unicode/gunicode.h>
#include <locale.h>
#include <string.h>
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index b66b57753e..b68e8995c4 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -50,7 +50,7 @@
#include <camel/camel-stream-null.h>
#include <camel/camel-stream-filter.h>
-#include "hash-table-utils.h"
+#include "string-utils.h"
#include "e-util/md5-utils.h"
#include "e-util/e-memory.h"
diff --git a/camel/camel-medium.c b/camel/camel-medium.c
index 2537989639..afa685326d 100644
--- a/camel/camel-medium.c
+++ b/camel/camel-medium.c
@@ -22,15 +22,16 @@
* USA
*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <ctype.h>
+
#include "camel-medium.h"
#include "string-utils.h"
-#include "hash-table-utils.h"
#define d(x)
diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c
index 7f7a35466d..428cfd061d 100644
--- a/camel/camel-mime-message.c
+++ b/camel/camel-mime-message.c
@@ -39,7 +39,6 @@
#include "camel-multipart.h"
#include "camel-stream-mem.h"
#include "string-utils.h"
-#include "hash-table-utils.h"
#include "camel-url.h"
#include "camel-stream-filter.h"
diff --git a/camel/camel-mime-part.c b/camel/camel-mime-part.c
index 8d5730c904..b8e259b3e2 100644
--- a/camel/camel-mime-part.c
+++ b/camel/camel-mime-part.c
@@ -34,7 +34,6 @@
#include <gal/util/e-iconv.h>
-#include "hash-table-utils.h"
#include "camel-mime-parser.h"
#include "camel-stream-mem.h"
#include "camel-stream-filter.h"
diff --git a/camel/camel-provider.c b/camel/camel-provider.c
index f8484278d7..6f22795fbd 100644
--- a/camel/camel-provider.c
+++ b/camel/camel-provider.c
@@ -42,7 +42,7 @@
#include "camel-provider.h"
#include "camel-exception.h"
-#include "hash-table-utils.h"
+#include "string-utils.h"
/**
* camel_provider_init:
diff --git a/camel/camel-session.c b/camel/camel-session.c
index a3e94a5f38..750c34c18c 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -33,13 +33,13 @@
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
+
#include "camel-session.h"
#include "camel-store.h"
#include "camel-transport.h"
#include "camel-exception.h"
#include "string-utils.h"
#include "camel-url.h"
-#include "hash-table-utils.h"
#include "camel-vee-store.h"
#include "camel-private.h"
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index f33205dd50..1eb931820f 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -35,7 +35,7 @@
#include "camel-file-utils.h"
-#include "hash-table-utils.h"
+#include "string-utils.h"
#include "e-util/md5-utils.h"
#include "e-util/e-memory.h"
diff --git a/camel/hash-table-utils.c b/camel/hash-table-utils.c
deleted file mode 100644
index 195afbee2d..0000000000
--- a/camel/hash-table-utils.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* generic utilities for hash tables */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#include <string.h>
-#include <ctype.h>
-
-#include "hash-table-utils.h"
-
-
-/***/
-/* use these two funcs for case insensitive hash table */
-
-gint
-g_strcase_equal (gconstpointer a, gconstpointer b)
-{
- return (strcasecmp ((char *) a, (char *) b) == 0);
-}
-
-
-/* modified g_str_hash from glib/gstring.c
- because it would have been too slow to
- us g_strdown() on the string */
-/* a char* hash function from ASU */
-guint
-g_strcase_hash (gconstpointer v)
-{
- const char *s = (char*)v;
- const char *p;
- guint h = 0, g;
-
- for (p = s; *p != '\0'; p += 1) {
- h = (h << 4) + toupper (*p);
- if ((g = h & 0xf0000000)) {
- h = h ^ (g >> 24);
- h = h ^ g;
- }
- }
-
- return h;
-}
diff --git a/camel/hash-table-utils.h b/camel/hash-table-utils.h
deleted file mode 100644
index 0d3ab7dce6..0000000000
--- a/camel/hash-table-utils.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* generic utilities for hash tables */
-
-/*
- *
- * Author :
- * Bertrand Guiheneuf <bertrand@helixcode.com>
- *
- * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- * USA
- */
-
-
-#ifndef HASH_TABLE_UTILS_H
-#define HASH_TABLE_UTILS_H 1
-
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus }*/
-
-#include <glib.h>
-
-gint g_strcase_equal (gconstpointer a, gconstpointer b);
-guint g_strcase_hash (gconstpointer v);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* HASH_TABLE_UTILS_H */
diff --git a/camel/providers/imap/camel-imap-store-summary.c b/camel/providers/imap/camel-imap-store-summary.c
index 9cdebba3e9..ed6e5392a4 100644
--- a/camel/providers/imap/camel-imap-store-summary.c
+++ b/camel/providers/imap/camel-imap-store-summary.c
@@ -32,7 +32,7 @@
#include "camel-file-utils.h"
-#include "hash-table-utils.h"
+#include "string-utils.h"
#include "e-util/md5-utils.h"
#include "e-util/e-memory.h"
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 <string.h>
+#include <ctype.h>
#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)
{
diff --git a/camel/string-utils.h b/camel/string-utils.h
index 76004f03a4..ab881a08fb 100644
--- a/camel/string-utils.h
+++ b/camel/string-utils.h
@@ -31,6 +31,9 @@ extern "C" {
#include <glib.h>
+int g_strcase_equal (gconstpointer a, gconstpointer b);
+guint g_strcase_hash (gconstpointer v);
+
void string_list_free (GList *string_list);
char *strstrcase (const char *haystack, const char *needle);