[goffice] go_url_decode: Remove



commit 484912a6a28d243b3f23baca0395552572c20ec9
Author: Morten Welinder <terra gnome org>
Date:   Fri Mar 16 10:48:11 2012 -0400

    go_url_decode: Remove
    
    Glib's g_uri_unescape_string does the same thing.

 ChangeLog                               |    5 ++++
 docs/reference/TODO                     |    1 -
 docs/reference/goffice-0.8-sections.txt |    1 -
 goffice/utils/go-file.c                 |   36 -------------------------------
 goffice/utils/go-file.h                 |    1 -
 5 files changed, 5 insertions(+), 39 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9020a79..1f20b60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-16  Morten Welinder  <terra gnome org>
+
+	* goffice/utils/go-file.c (go_url_decode): Remove.  Glib's
+	g_uri_unescape_string does the same thing.
+
 2012-03-10  Jean Brefort  <jean brefort normalesup org>
 
 	* goffice/component/go-component.c: add some doc.
diff --git a/docs/reference/TODO b/docs/reference/TODO
index 205e38d..abcbb03 100644
--- a/docs/reference/TODO
+++ b/docs/reference/TODO
@@ -837,7 +837,6 @@ go_shell_argv_to_glib_encoding_free
 go_file_open
 go_file_create
 go_file_split_urls
-go_url_decode
 go_url_encode
 go_url_show
 go_url_check_extension
diff --git a/docs/reference/goffice-0.8-sections.txt b/docs/reference/goffice-0.8-sections.txt
index fa49341..bf5f769 100644
--- a/docs/reference/goffice-0.8-sections.txt
+++ b/docs/reference/goffice-0.8-sections.txt
@@ -2723,7 +2723,6 @@ GODataScalarClass
 <FILE>go-url</FILE>
 <TITLE>GOUrl</TITLE>
 go_url_check_extension
-go_url_decode
 go_url_encode
 go_url_make_relative
 go_url_resolve_relative
diff --git a/goffice/utils/go-file.c b/goffice/utils/go-file.c
index d1a29a5..fe229cf 100644
--- a/goffice/utils/go-file.c
+++ b/goffice/utils/go-file.c
@@ -909,42 +909,6 @@ go_file_get_date_changed (char const *uri)
 /* ------------------------------------------------------------------------- */
 
 /**
- * go_url_decode:
- * @text: constant buffer to decode.
- *
- * Decode the result of go_url_encode.
- *
- * Returns: a decoded string which the caller is responsible for freeing.
- **/
-gchar*
-go_url_decode (gchar const *text)
-{
-	GString *result;
-
-	g_return_val_if_fail (text != NULL, NULL);
-	g_return_val_if_fail (*text != '\0', NULL);
-
-	result = g_string_new (NULL);
-	while (*text) {
-		unsigned char c = *text++;
-		if (c == '%') {
-			if (g_ascii_isxdigit (text[0]) && g_ascii_isxdigit (text[1])) {
-				g_string_append_c (result,
-						   (g_ascii_xdigit_value (text[0]) << 4) |
-						   g_ascii_xdigit_value (text[1]));
-				text += 2;
-			} else {
-				/* Bogus.  */
-				return g_string_free (result, TRUE);
-			}
-		} else
-			g_string_append_c (result, c);
-	}
-
-	return g_string_free (result, FALSE);
-}
-
-/**
  * go_url_encode:
  * @text: The constant text to be encoded
  * @type: 0 : mailto, 1: file or http
diff --git a/goffice/utils/go-file.h b/goffice/utils/go-file.h
index b834518..ff4321b 100644
--- a/goffice/utils/go-file.h
+++ b/goffice/utils/go-file.h
@@ -86,7 +86,6 @@ time_t go_file_get_date_changed  (char const *uri);
 
 gint	 go_file_access (char const *uri, gint mode);
 
-gchar	*go_url_decode		(gchar const *text);
 gchar	*go_url_encode		(gchar const *text, int type);
 GError	*go_url_show		(gchar const *url);
 gboolean go_url_check_extension (gchar const *uri,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]