aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-06-29 17:48:20 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-06-29 17:53:42 +0800
commitdb0fd2e3da0b075282169e2a220a1c4051c4309d (patch)
treeeea626de23a1fa6b5909d0febff7f722550d0918
parent442e6acd522cfaaeae71b8ebde6031de0a3cc44e (diff)
downloadgsoc2013-empathy-db0fd2e3da0b075282169e2a220a1c4051c4309d.tar
gsoc2013-empathy-db0fd2e3da0b075282169e2a220a1c4051c4309d.tar.gz
gsoc2013-empathy-db0fd2e3da0b075282169e2a220a1c4051c4309d.tar.bz2
gsoc2013-empathy-db0fd2e3da0b075282169e2a220a1c4051c4309d.tar.lz
gsoc2013-empathy-db0fd2e3da0b075282169e2a220a1c4051c4309d.tar.xz
gsoc2013-empathy-db0fd2e3da0b075282169e2a220a1c4051c4309d.tar.zst
gsoc2013-empathy-db0fd2e3da0b075282169e2a220a1c4051c4309d.zip
remove unused string util functions
-rw-r--r--libempathy/empathy-utils.c33
-rw-r--r--libempathy/empathy-utils.h10
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/empathy-utils-test.c33
4 files changed, 0 insertions, 80 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index e334d6ca7..5f9178a55 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -105,39 +105,6 @@ empathy_init (void)
initialized = TRUE;
}
-gchar *
-empathy_substring (const gchar *str,
- gint start,
- gint end)
-{
- return g_strndup (str + start, end - start);
-}
-
-gint
-empathy_strcasecmp (const gchar *s1,
- const gchar *s2)
-{
- return empathy_strncasecmp (s1, s2, -1);
-}
-
-gint
-empathy_strncasecmp (const gchar *s1,
- const gchar *s2,
- gsize n)
-{
- gchar *u1, *u2;
- gint ret_val;
-
- u1 = g_utf8_casefold (s1, n);
- u2 = g_utf8_casefold (s2, n);
-
- ret_val = g_utf8_collate (u1, u2);
- g_free (u1);
- g_free (u2);
-
- return ret_val;
-}
-
gboolean
empathy_xml_validate (xmlDoc *doc,
const gchar *dtd_filename)
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index dca557028..97490b939 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -45,16 +45,6 @@ G_BEGIN_DECLS
void empathy_init (void);
-/* Strings */
-gchar * empathy_substring (const gchar *str,
- gint start,
- gint end);
-gint empathy_strcasecmp (const gchar *s1,
- const gchar *s2);
-gint empathy_strncasecmp (const gchar *s1,
- const gchar *s2,
- gsize n);
-
/* XML */
gboolean empathy_xml_validate (xmlDoc *doc,
const gchar *dtd_filename);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a9fc0cb1e..7bcfa5e49 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -25,7 +25,6 @@ LDADD = \
$(NULL)
TEST_PROGS = \
- empathy-utils-test \
empathy-irc-server-test \
empathy-irc-network-test \
empathy-irc-network-manager-test \
@@ -35,9 +34,6 @@ TEST_PROGS = \
empathy-live-search-test \
empathy-tls-test
-empathy_utils_test_SOURCES = empathy-utils-test.c \
- test-helper.c test-helper.h
-
empathy_tls_test_SOURCES = empathy-tls-test.c \
test-helper.c test-helper.h
diff --git a/tests/empathy-utils-test.c b/tests/empathy-utils-test.c
deleted file mode 100644
index 896793aa0..000000000
--- a/tests/empathy-utils-test.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <libempathy/empathy-utils.h>
-#include "test-helper.h"
-
-static void
-test_substring (void)
-{
- gchar *tmp;
-
- tmp = empathy_substring ("empathy", 2, 6);
- g_assert (tmp != NULL);
- g_assert (strcmp (tmp, "path") == 0);
-
- g_free (tmp);
-}
-
-int
-main (int argc,
- char **argv)
-{
- int result;
-
- test_init (argc, argv);
-
- g_test_add_func ("/utils/substring", test_substring);
-
- result = g_test_run ();
- test_deinit ();
- return result;
-}