aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-14 02:58:58 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-14 02:58:58 +0800
commit39dad59354eb6d7093c9f95817b5278de9f19982 (patch)
tree50b5ee15fcc46459a98c2267cdfef3712d32c369 /lib
parent43955b584199f99428660d47bc2a7297ffdf763f (diff)
downloadgsoc2013-epiphany-39dad59354eb6d7093c9f95817b5278de9f19982.tar
gsoc2013-epiphany-39dad59354eb6d7093c9f95817b5278de9f19982.tar.gz
gsoc2013-epiphany-39dad59354eb6d7093c9f95817b5278de9f19982.tar.bz2
gsoc2013-epiphany-39dad59354eb6d7093c9f95817b5278de9f19982.tar.lz
gsoc2013-epiphany-39dad59354eb6d7093c9f95817b5278de9f19982.tar.xz
gsoc2013-epiphany-39dad59354eb6d7093c9f95817b5278de9f19982.tar.zst
gsoc2013-epiphany-39dad59354eb6d7093c9f95817b5278de9f19982.zip
Get rid of ephy_string_[elide|double]_underscores(). Remove unnecessary
2004-12-13 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-encodings.c: (elide_underscores), (add_encoding): * embed/mozilla/FilePicker.cpp: * lib/ephy-dnd.c: * lib/ephy-node.c: * lib/ephy-string.c: (ephy_string_blank_chr): * lib/ephy-string.h: * lib/widgets/ephy-node-view.c: * src/ephy-encoding-menu.c: * src/ephy-notebook.c: * src/ephy-session.c: * src/ephy-statusbar.c: * src/ephy-tab.c: (ephy_tab_set_title): * src/ephy-tabs-menu.c: (connect_proxy_cb): * src/ppview-toolbar.c: Get rid of ephy_string_[elide|double]_underscores(). Remove unnecessary ephy-string.h includes.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-dnd.c1
-rw-r--r--lib/ephy-node.c1
-rw-r--r--lib/ephy-string.c67
-rw-r--r--lib/ephy-string.h4
-rw-r--r--lib/widgets/ephy-node-view.c3
5 files changed, 1 insertions, 75 deletions
diff --git a/lib/ephy-dnd.c b/lib/ephy-dnd.c
index 6ff9cff16..68510d85f 100644
--- a/lib/ephy-dnd.c
+++ b/lib/ephy-dnd.c
@@ -21,7 +21,6 @@
#include "config.h"
#include "ephy-dnd.h"
-#include "ephy-string.h"
#include "ephy-node.h"
#include <gtk/gtkselection.h>
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index 1a8e53292..1be64cb21 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -31,7 +31,6 @@
#include <time.h>
#include "ephy-node.h"
-#include "ephy-string.h"
typedef struct
{
diff --git a/lib/ephy-string.c b/lib/ephy-string.c
index da89dd2c5..2d53c25b5 100644
--- a/lib/ephy-string.c
+++ b/lib/ephy-string.c
@@ -85,70 +85,3 @@ ephy_string_blank_chr (char *source)
return source;
}
-
-/* copied from egg-toolbar-editor.c */
-char *
-ephy_string_elide_underscores (const char *original)
-{
- char *q, *result;
- const char *p;
- gboolean last_underscore;
-
- q = result = g_malloc (strlen (original) + 1);
- last_underscore = FALSE;
-
- for (p = original; *p; p++)
- {
- if (!last_underscore && *p == '_')
- {
- last_underscore = TRUE;
- }
- else
- {
- last_underscore = FALSE;
- *q++ = *p;
- }
- }
-
- *q = '\0';
-
- return result;
-}
-
-char *
-ephy_string_double_underscores (const char *string)
-{
- int underscores;
- const char *p;
- char *q;
- char *escaped;
-
- if (string == NULL)
- {
- return NULL;
- }
-
- underscores = 0;
- for (p = string; *p != '\0'; p++)
- {
- underscores += (*p == '_');
- }
-
- if (underscores == 0)
- {
- return g_strdup (string);
- }
-
- escaped = g_new (char, strlen (string) + underscores + 1);
- for (p = string, q = escaped; *p != '\0'; p++, q++)
- {
- /* Add an extra underscore. */
- if (*p == '_') {
- *q++ = '_';
- }
- *q = *p;
- }
- *q = '\0';
-
- return escaped;
-}
diff --git a/lib/ephy-string.h b/lib/ephy-string.h
index 886bca5dc..36e23d1c3 100644
--- a/lib/ephy-string.h
+++ b/lib/ephy-string.h
@@ -30,10 +30,6 @@ gboolean ephy_string_to_int (const char *string,
char *ephy_string_blank_chr (char *source);
-char *ephy_string_elide_underscores (const char *original);
-
-char *ephy_string_double_underscores (const char *string);
-
G_END_DECLS
#endif
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 2f3df35e7..c0e34b62a 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -36,8 +36,7 @@
#include "ephy-dnd.h"
#include "ephy-gui.h"
#include "ephy-marshal.h"
-#include "ephy-string.h"
-#include "string.h"
+#include <string.h>
static void ephy_node_view_class_init (EphyNodeViewClass *klass);
static void ephy_node_view_init (EphyNodeView *view);