]> git.0d.be Git - empathy.git/commitdiff
remove unused string util functions
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 29 Jun 2011 09:48:20 +0000 (11:48 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 29 Jun 2011 09:53:42 +0000 (11:53 +0200)
libempathy/empathy-utils.c
libempathy/empathy-utils.h
tests/Makefile.am
tests/empathy-utils-test.c [deleted file]

index e334d6ca7f88d808d6aabc31534571cceb003899..5f9178a55b70d8554f27eea75c3530a88009a3f7 100644 (file)
@@ -105,39 +105,6 @@ empathy_init (void)
   initialized = TRUE;
 }
 
   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)
 gboolean
 empathy_xml_validate (xmlDoc      *doc,
     const gchar *dtd_filename)
index dca55702863a42281359913b712457f20c203d77..97490b939071b24bb88745d2141827306554e252 100644 (file)
@@ -45,16 +45,6 @@ G_BEGIN_DECLS
 
 void empathy_init (void);
 
 
 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);
 /* XML */
 gboolean empathy_xml_validate (xmlDoc *doc,
     const gchar *dtd_filename);
index a9fc0cb1ea2e9cb318c4c1ecf18ba932c23fd911..7bcfa5e49c4857a54c6134b5613912a7e84afd72 100644 (file)
@@ -25,7 +25,6 @@ LDADD =                                                               \
        $(NULL)
 
 TEST_PROGS =                                     \
        $(NULL)
 
 TEST_PROGS =                                     \
-     empathy-utils-test                          \
      empathy-irc-server-test                     \
      empathy-irc-network-test                    \
      empathy-irc-network-manager-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-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
 
 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 (file)
index 896793a..0000000
+++ /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;
-}