changeset 18918:abb5b6ec99a6

Change two strcmp()s to purple_utf8_strcasecmp() for case-insensitive comparison.
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Tue, 14 Aug 2007 02:33:01 +0000
parents 0f46f13c0805
children 0651af21ceee
files libpurple/protocols/myspace/myspace.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Mon Aug 13 05:59:24 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Tue Aug 14 02:33:01 2007 +0000
@@ -1252,19 +1252,19 @@
 	 * Currently, the 's' value will be overwritten when b/i/u is nested
 	 * within another one, and only the inner-most formatting will be 
 	 * applied to the text. */
-	if (!strcmp(root->name, "root")) {
+	if (!purple_utf8_strcasecmp(root->name, "root")) {
 		*begin = g_strdup("");
 		*end = g_strdup("");
-	} else if (!strcmp(root->name, "b") || !strcmp(root->name, "B")) {
+	} else if (!purple_utf8_strcasecmp(root->name, "b")) {
 		*begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_BOLD);
 		*end = g_strdup("</f>");
-	} else if (!strcmp(root->name, "i") || !strcmp(root->name, "I")) {
+	} else if (!purple_utf8_strcasecmp(root->name, "i")) {
 		*begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_ITALIC);
 		*end = g_strdup("</f>");
-	} else if (!strcmp(root->name, "u") || !strcmp(root->name, "U")) {
+	} else if (!purple_utf8_strcasecmp(root->name, "u")) {
 		*begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_UNDERLINE);
 		*end = g_strdup("</f>");
-	} else if (!strcmp(root->name, "a") || !strcmp(root->name, "A")) {
+	} else if (!purple_utf8_strcasecmp(root->name, "a")) {
 		const gchar *href, *link_text;
 
 		href = xmlnode_get_attrib(root, "href");
@@ -1300,7 +1300,7 @@
 		root->child = NULL;
 
 		*end = g_strdup("");
-	} else if (!strcmp(root->name, "font") || !strcmp(root->name, "FONT")) {
+	} else if (!purple_utf8_strcasecmp(root->name, "font")) {
 		const gchar *size;
 		const gchar *face;