diff libpurple/protocols/irc/parse.c @ 27773:0f3a131d23da

- import nosuke's hash 244 patch and others to yahoo plugin - do not perform any conversion in sanitize_* if _WIN32 defined - suppress warning as much as possible - fix indentation
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Fri, 29 Feb 2008 17:56:13 +0000
parents 9a60b9fab0ea
children 25c34e4140d4
line wrap: on
line diff
--- a/libpurple/protocols/irc/parse.c	Fri Feb 29 08:32:34 2008 +0000
+++ b/libpurple/protocols/irc/parse.c	Fri Feb 29 17:56:13 2008 +0000
@@ -244,7 +244,7 @@
 	char *pos = NULL;
 	gboolean irc_use_sosi, irc_use_8bit;
 	char *strtmp;
-	size_t strtmp_len;
+	gsize strtmp_len;
 
 	enclist = purple_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET);
 	encodings = g_strsplit(enclist, ",", 2);
@@ -257,7 +257,7 @@
 		return g_strdup(string);
 	}
 
-	strtmp  = (char *)sanitize_utf((unsigned char *)string, strlen(string), &strtmp_len);
+	strtmp  = sanitize_utf(string, strlen(string), &strtmp_len);
 	utf8 = g_convert(strtmp, strlen(strtmp), encodings[0], "UTF-8", NULL, NULL, &err);
 
 	if (err) {
@@ -341,7 +341,7 @@
 	gsize in_len, out_len;
 	int conv_len;
 	char *strtmp;
-	size_t strtmp_len;
+	gsize strtmp_len;
 
 	enclist = purple_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET);
 	encodings = g_strsplit(enclist, ",", -1);
@@ -472,7 +472,7 @@
 
 
 		if(utf8){
-			strtmp  = (char *)botch_utf((unsigned char *)utf8, strlen(utf8), &strtmp_len);
+			strtmp = botch_utf(utf8, strlen(utf8), &strtmp_len);
  			g_strfreev(encodings);
 			g_free(utf8);
 			return strtmp;