aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe+gnomebugz@stud.uni-saarland.de>2003-04-30 00:55:51 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-30 00:55:51 +0800
commitdb1b85b940e4ea707c0fadda76ba79ddec8f697b (patch)
tree841432e26b270148e0fc359141942df8eb7ed681 /lib
parentc46158a00cd6572504ded30c8a9d1ec1b468d07f (diff)
downloadgsoc2013-epiphany-db1b85b940e4ea707c0fadda76ba79ddec8f697b.tar
gsoc2013-epiphany-db1b85b940e4ea707c0fadda76ba79ddec8f697b.tar.gz
gsoc2013-epiphany-db1b85b940e4ea707c0fadda76ba79ddec8f697b.tar.bz2
gsoc2013-epiphany-db1b85b940e4ea707c0fadda76ba79ddec8f697b.tar.lz
gsoc2013-epiphany-db1b85b940e4ea707c0fadda76ba79ddec8f697b.tar.xz
gsoc2013-epiphany-db1b85b940e4ea707c0fadda76ba79ddec8f697b.tar.zst
gsoc2013-epiphany-db1b85b940e4ea707c0fadda76ba79ddec8f697b.zip
Remove unused function and fix a leak.
2003-04-29 Christian Persch <chpe+gnomebugz@stud.uni-saarland.de> * lib/ephy-dnd.c: (ephy_dnd_drag_data_get), (ephy_dnd_node_list_extract_nodes): * lib/ephy-dnd.h: Remove unused function and fix a leak.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-dnd.c52
-rw-r--r--lib/ephy-dnd.h2
2 files changed, 2 insertions, 52 deletions
diff --git a/lib/ephy-dnd.c b/lib/ephy-dnd.c
index 1543d9818..84ea8d0da 100644
--- a/lib/ephy-dnd.c
+++ b/lib/ephy-dnd.c
@@ -102,6 +102,8 @@ ephy_dnd_drag_data_get (GtkWidget *widget,
selection_data->target,
8, result->str, result->len);
+ g_string_free (result, TRUE);
+
return TRUE;
}
@@ -130,53 +132,3 @@ ephy_dnd_node_list_extract_nodes (const char *node_list)
return result;
}
-
-GList *
-ephy_dnd_uri_list_extract_uris (const char *uri_list)
-{
- /* Note that this is mostly very stolen from old libgnome/gnome-mime.c */
-
- const gchar *p, *q;
- gchar *retval;
- GList *result = NULL;
-
- g_return_val_if_fail (uri_list != NULL, NULL);
-
- p = uri_list;
-
- /* We don't actually try to validate the URI according to RFC
- * 2396, or even check for allowed characters - we just ignore
- * comments and trim whitespace off the ends. We also
- * allow LF delimination as well as the specified CRLF.
- */
- while (p != NULL) {
- if (*p != '#') {
- while (g_ascii_isspace (*p))
- p++;
-
- q = p;
- while ((*q != '\0')
- && (*q != '\n')
- && (*q != '\r'))
- q++;
-
- if (q > p) {
- q--;
- while (q > p
- && g_ascii_isspace (*q))
- q--;
-
- retval = g_malloc (q - p + 2);
- strncpy (retval, p, q - p + 1);
- retval[q - p + 1] = '\0';
-
- result = g_list_prepend (result, retval);
- }
- }
- p = strchr (p, '\n');
- if (p != NULL)
- p++;
- }
-
- return g_list_reverse (result);
-}
diff --git a/lib/ephy-dnd.h b/lib/ephy-dnd.h
index b8c415b0b..e708654f5 100644
--- a/lib/ephy-dnd.h
+++ b/lib/ephy-dnd.h
@@ -49,8 +49,6 @@ gboolean ephy_dnd_drag_data_get (GtkWidget *widget,
GList *ephy_dnd_node_list_extract_nodes (const char *node_list);
-GList *ephy_dnd_uri_list_extract_uris (const char *uri_list);
-
G_END_DECLS
#endif