aboutsummaryrefslogtreecommitdiff
path: root/libsylph/utils.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-03-27 08:19:53 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-03-27 08:19:53 +0000
commit1ad1a3e1721e99e8b2c055328e98297dc06dd907 (patch)
treee7646b8e4a458715d7e0b1a5a105ae9b532d0d09 /libsylph/utils.c
parent505ab32fedc5de7984c2a4d1095d60dd292e0fd5 (diff)
fixed a bug that bold face was disabled with GLib 2.10 and Pango 1.12.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1058 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/utils.c')
-rw-r--r--libsylph/utils.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/libsylph/utils.c b/libsylph/utils.c
index 914fd007..3cee525e 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -1079,7 +1079,7 @@ void subst_chars(gchar *str, gchar *orig, gchar subst)
while (*p) {
if (strchr(orig, *p) != NULL)
*p = subst;
- p++;
+ ++p;
}
}
@@ -1090,7 +1090,18 @@ void subst_null(gchar *str, gint len, gchar subst)
while (len--) {
if (*p == '\0')
*p = subst;
- p++;
+ ++p;
+ }
+}
+
+void subst_control(gchar *str, gchar subst)
+{
+ register gchar *p = str;
+
+ while (*p) {
+ if (g_ascii_iscntrl(*p))
+ *p = subst;
+ ++p;
}
}