aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-unicode.c')
-rw-r--r--e-util/e-unicode.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/e-util/e-unicode.c b/e-util/e-unicode.c
index de22525898..d92244107a 100644
--- a/e-util/e-unicode.c
+++ b/e-util/e-unicode.c
@@ -49,7 +49,9 @@
/* FIXME: this has not been ported fully yet - non ASCII people beware. */
gchar *
-e_utf8_from_gtk_event_key (GtkWidget *widget, guint keyval, const gchar *string)
+e_utf8_from_gtk_event_key (GtkWidget *widget,
+ guint keyval,
+ const gchar *string)
{
gint unival;
gchar *utf;
@@ -73,7 +75,9 @@ e_utf8_from_gtk_event_key (GtkWidget *widget, guint keyval, const gchar *string)
}
gchar *
-e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
+e_utf8_from_iconv_string_sized (iconv_t ic,
+ const gchar *string,
+ gint bytes)
{
gchar *new, *ob;
const gchar *ib;
@@ -85,7 +89,7 @@ e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
gint i;
/* iso-8859-1 */
ib = (gchar *) string;
- new = ob = (gchar *) g_new (unsigned char, bytes * 2 + 1);
+ new = ob = (gchar *) g_new (guchar, bytes * 2 + 1);
for (i = 0; i < (bytes); i++) {
ob += e_unichar_to_utf8 (ib[i], ob);
}
@@ -124,7 +128,9 @@ e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
}
gchar *
-e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
+e_utf8_to_iconv_string_sized (iconv_t ic,
+ const gchar *string,
+ gint bytes)
{
gchar *new, *ob;
const gchar *ib;
@@ -137,7 +143,7 @@ e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes)
const gchar *u;
gunichar uc;
- new = (gchar *) g_new (unsigned char, bytes * 4 + 1);
+ new = (gchar *) g_new (guchar, bytes * 4 + 1);
u = string;
len = 0;
@@ -201,7 +207,8 @@ e_utf8_to_charset_string_sized (const gchar *charset,
}
gchar *
-e_utf8_from_locale_string_sized (const gchar *string, gint bytes)
+e_utf8_from_locale_string_sized (const gchar *string,
+ gint bytes)
{
iconv_t ic;
gchar *ret;
@@ -256,7 +263,8 @@ e_utf8_ensure_valid (const gchar *string)
**/
gint
-e_unichar_to_utf8 (gint c, gchar *outbuf)
+e_unichar_to_utf8 (gint c,
+ gchar *outbuf)
{
gsize len = 0;
gint first;
@@ -307,10 +315,11 @@ e_unichar_to_utf8 (gint c, gchar *outbuf)
}
gchar *
-e_unicode_get_utf8 (const gchar *text, gunichar *out)
+e_unicode_get_utf8 (const gchar *text,
+ gunichar *out)
{
*out = g_utf8_get_char (text);
- return (*out == (gunichar)-1) ? NULL : g_utf8_next_char (text);
+ return (*out == (gunichar) - 1) ? NULL : g_utf8_next_char (text);
}
gchar *