changeset 18907:1a11b26fcb11

Replace non-portable stricmp() with two calls to strcmp(), one uppercase and one lowercase. Needed because Pidgin sends links as <A HREF=...> (capitals).
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sun, 12 Aug 2007 18:11:29 +0000
parents 8b3ca7be9b72
children 6541b0edee26
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	Sun Aug 12 07:45:30 2007 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Sun Aug 12 18:11:29 2007 +0000
@@ -1153,19 +1153,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 (!stricmp(root->name, "root")) {
+	if (!strcmp(root->name, "root")) {
 		*begin = g_strdup("");
 		*end = g_strdup("");
-	} else if (!stricmp(root->name, "b")) {
+	} else if (!strcmp(root->name, "b") || !strcmp(root->name, "B")) {
 		*begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_BOLD);
 		*end = g_strdup("</f>");
-	} else if (!stricmp(root->name, "i")) {
+	} else if (!strcmp(root->name, "i") || !strcmp(root->name, "I")) {
 		*begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_ITALIC);
 		*end = g_strdup("</f>");
-	} else if (!stricmp(root->name, "u")) {
+	} else if (!strcmp(root->name, "u") || !strcmp(root->name, "U")) {
 		*begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_UNDERLINE);
 		*end = g_strdup("</f>");
-	} else if (!stricmp(root->name, "a")) {
+	} else if (!strcmp(root->name, "a") || !strcmp(root->name, "A")) {
 		const gchar *href, *link_text;
 
 		href = xmlnode_get_attrib(root, "href");
@@ -1201,7 +1201,7 @@
 		root->child = NULL;
 
 		*end = g_strdup("");
-	} else if (!stricmp(root->name, "font")) {
+	} else if (!strcmp(root->name, "font") || !strcmp(root->name, "FONT")) {
 		const gchar *size;
 		const gchar *face;