Mercurial > pidgin
diff libpurple/protocols/qq/char_conv.c @ 24093:22745e6a3136
disapproval of revision '5316525f53e27f838d18a6a08b82c7d55f674591'
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 15 Sep 2008 03:03:33 +0000 |
parents | d4e0b7c484b1 |
children | 225e0e9e1055 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/char_conv.c Thu Sep 11 13:34:33 2008 +0000 +++ b/libpurple/protocols/qq/char_conv.c Mon Sep 15 03:03:33 2008 +0000 @@ -98,7 +98,7 @@ } /* convert a string from from_charset to to_charset, using g_convert */ -static gchar *_my_convert(const gchar *str, gssize len, const gchar *to_charset, const gchar *from_charset) +static gchar *_my_convert(const gchar *str, gssize len, const gchar *to_charset, const gchar *from_charset) { GError *error = NULL; gchar *ret; @@ -111,7 +111,7 @@ if (error == NULL) { return ret; /* conversion is OK */ } - + /* conversion error */ purple_debug_error("QQ_CONVERT", "%s\n", error->message); @@ -127,8 +127,8 @@ * take the input as a pascal string and return a converted c-string in UTF-8 * returns the number of bytes read, return -1 if fatal error * the converted UTF-8 will be saved in ret - */ -gint convert_as_pascal_string(guint8 *data, gchar **ret, const gchar *from_charset) + */ +gint convert_as_pascal_string(guint8 *data, gchar **ret, const gchar *from_charset) { guint8 len; @@ -222,7 +222,7 @@ return _my_convert(str, -1, UTF8, from_charset); } -/* QQ uses binary code for smiley, while purple uses strings. +/* QQ uses binary code for smiley, while purple uses strings. * There is a mapping relation between these two. */ gchar *qq_smiley_to_purple(gchar *text) { @@ -286,8 +286,7 @@ } for (temp = str; *temp != 0; temp++) { - /*if (*temp == '\r' || *temp == '\n') *temp = ' ';*/ - if (*temp > 0 && *temp < 0x20) *temp = ' '; + if (*temp == '\r' || *temp == '\n') *temp = ' '; } g_strstrip(str); }