aboutsummaryrefslogtreecommitdiff
path: root/hardinfo2/util.c
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2009-04-19 10:01:20 -0300
committerLeandro Pereira <leandro@hardinfo.org>2009-04-19 10:01:20 -0300
commitab149c6b07e5e183a0ad4dec6c886f06df6d2efc (patch)
treeab903683a7f83193de945cff42d9a9a1f00df07c /hardinfo2/util.c
parentb8ec48cc434da4c35e574cdd8d9c7465f101799c (diff)
Clean up CPU description on benchmark display
Diffstat (limited to 'hardinfo2/util.c')
-rw-r--r--hardinfo2/util.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index ac2ad3b5..dd89e199 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -493,7 +493,7 @@ void open_url(gchar * url)
}
/* Copyright: Jens Låås, SLU 2002 */
-gchar *strreplace(gchar * string, gchar * replace, gchar new_char)
+gchar *strreplacechr(gchar * string, gchar * replace, gchar new_char)
{
gchar *s;
for (s = string; *s; s++)
@@ -503,6 +503,17 @@ gchar *strreplace(gchar * string, gchar * replace, gchar new_char)
return string;
}
+gchar *strreplace(gchar *string, gchar *replace, gchar *replacement)
+{
+ gchar **tmp, *ret;
+
+ tmp = g_strsplit(string, replace, 0);
+ ret = g_strjoinv(replacement, tmp);
+ g_strfreev(tmp);
+
+ return ret;
+}
+
static GHashTable *__module_methods = NULL;
static void module_register_methods(ShellModule * module)