diff libpurple/protocols/qq/char_conv.c @ 15822:32c366eeeb99

sed -ie 's/gaim/purple/g'
author Sean Egan <seanegan@gmail.com>
date Mon, 19 Mar 2007 07:01:17 +0000
parents 48f3837a9625
children 44b4e8bd759b
line wrap: on
line diff
--- a/libpurple/protocols/qq/char_conv.c	Mon Mar 19 06:11:46 2007 +0000
+++ b/libpurple/protocols/qq/char_conv.c	Mon Mar 19 07:01:17 2007 +0000
@@ -1,9 +1,9 @@
 /**
  * @file char_conv.c
  *
- * gaim
+ * purple
  *
- * Gaim is the legal property of its developers, whose names are too numerous
+ * Purple is the legal property of its developers, whose names are too numerous
  * to list here.  Please refer to the COPYRIGHT file distributed with this
  * source distribution.
  *
@@ -58,7 +58,7 @@
 };
 
 
-const gchar *gaim_smiley_map[QQ_SMILEY_AMOUNT] = {
+const gchar *purple_smiley_map[QQ_SMILEY_AMOUNT] = {
 	"/jy", "/pz", "/se", "/fd", "/dy", "/ll", "/hx", "/bz",
 	"/shui", "/dk	", "/gg", "/fn", "/tp", "/cy", "/wx", "/ng",
 	"/kuk", "/feid", "/zk", "/tu", "/tx", "/ka", "/by", "/am",
@@ -115,8 +115,8 @@
 		return ret;	/* conversion is OK */
 	else {			/* conversion error */
 		gchar *failed = hex_dump_to_str((guint8 *) str, (len == -1) ? strlen(str) : len);
-		gaim_debug(GAIM_DEBUG_ERROR, "QQ", "%s\n", error->message);
-		gaim_debug(GAIM_DEBUG_WARNING, "QQ", "Dump failed text\n%s", failed);
+		purple_debug(PURPLE_DEBUG_ERROR, "QQ", "%s\n", error->message);
+		purple_debug(PURPLE_DEBUG_WARNING, "QQ", "Dump failed text\n%s", failed);
 		g_free(failed);
 		g_error_free(error);
 		return g_strdup(QQ_NULL_MSG);
@@ -138,8 +138,8 @@
 	return len + 1;
 }
 
-/* convert QQ formatted msg to Gaim formatted msg (and UTF-8) */
-gchar *qq_encode_to_gaim(guint8 *data, gint len, const gchar *msg)
+/* convert QQ formatted msg to Purple formatted msg (and UTF-8) */
+gchar *qq_encode_to_purple(guint8 *data, gint len, const gchar *msg)
 {
 	GString *encoded;
 	guint8 font_attr, font_size, color[3], bar, *cursor;
@@ -179,7 +179,7 @@
 	g_string_append_printf(encoded,
 			       "<font color=\"%s\"><font face=\"%s\"><font size=\"%d\">",
 			       color_code, font_name, font_size / 3);
-	gaim_debug(GAIM_DEBUG_INFO, "QQ_MESG",
+	purple_debug(PURPLE_DEBUG_INFO, "QQ_MESG",
 		   "recv <font color=\"%s\"><font face=\"%s\"><font size=\"%d\">\n",
 		   color_code, font_name, font_size / 3);
 	g_string_append(encoded, msg_utf8);
@@ -219,9 +219,9 @@
 	return _my_convert(str, -1, UTF8, from_charset);
 }
 
-/* QQ uses binary code for smiley, while gaim uses strings. 
+/* QQ uses binary code for smiley, while purple uses strings. 
  * There is a mapping relation between these two. */
-gchar *qq_smiley_to_gaim(gchar *text)
+gchar *qq_smiley_to_purple(gchar *text)
 {
 	gint index;
 	gchar qq_smiley, *cur_seg, **segments, *ret;
@@ -241,7 +241,7 @@
 		if (index >= QQ_SMILEY_AMOUNT) {
 			g_string_append(converted, QQ_NULL_SMILEY);
 		} else {
-			g_string_append(converted, gaim_smiley_map[index]);
+			g_string_append(converted, purple_smiley_map[index]);
 			g_string_append(converted, (cur_seg + 1));
 		}
 	}
@@ -251,8 +251,8 @@
 	return ret;
 }
 
-/* convert smiley from gaim style to qq binary code */
-gchar *gaim_smiley_to_qq(gchar *text)
+/* convert smiley from purple style to qq binary code */
+gchar *purple_smiley_to_qq(gchar *text)
 {
 	gchar *begin, *cursor, *ret;
 	gint index;
@@ -262,8 +262,8 @@
 
 	for (index = 0; index < QQ_SMILEY_AMOUNT; index++) {
 		begin = cursor = converted->str;
-		while ((cursor = g_strstr_len(cursor, -1, gaim_smiley_map[index]))) {
-			g_string_erase(converted, (cursor - begin), strlen(gaim_smiley_map[index]));
+		while ((cursor = g_strstr_len(cursor, -1, purple_smiley_map[index]))) {
+			g_string_erase(converted, (cursor - begin), strlen(purple_smiley_map[index]));
 			g_string_insert_c(converted, (cursor - begin), 0x14);
 			g_string_insert_c(converted, (cursor - begin + 1), qq_smiley_map[index]);
 			cursor++;