Mercurial > pidgin
comparison libpurple/protocols/myspace/myspace.c @ 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 | 3f95e691bad2 |
children | 6541b0edee26 |
comparison
equal
deleted
inserted
replaced
18906:8b3ca7be9b72 | 18907:1a11b26fcb11 |
---|---|
1151 { | 1151 { |
1152 /* TODO: Coalesce nested tags into one <f> tag! | 1152 /* TODO: Coalesce nested tags into one <f> tag! |
1153 * Currently, the 's' value will be overwritten when b/i/u is nested | 1153 * Currently, the 's' value will be overwritten when b/i/u is nested |
1154 * within another one, and only the inner-most formatting will be | 1154 * within another one, and only the inner-most formatting will be |
1155 * applied to the text. */ | 1155 * applied to the text. */ |
1156 if (!stricmp(root->name, "root")) { | 1156 if (!strcmp(root->name, "root")) { |
1157 *begin = g_strdup(""); | 1157 *begin = g_strdup(""); |
1158 *end = g_strdup(""); | 1158 *end = g_strdup(""); |
1159 } else if (!stricmp(root->name, "b")) { | 1159 } else if (!strcmp(root->name, "b") || !strcmp(root->name, "B")) { |
1160 *begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_BOLD); | 1160 *begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_BOLD); |
1161 *end = g_strdup("</f>"); | 1161 *end = g_strdup("</f>"); |
1162 } else if (!stricmp(root->name, "i")) { | 1162 } else if (!strcmp(root->name, "i") || !strcmp(root->name, "I")) { |
1163 *begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_ITALIC); | 1163 *begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_ITALIC); |
1164 *end = g_strdup("</f>"); | 1164 *end = g_strdup("</f>"); |
1165 } else if (!stricmp(root->name, "u")) { | 1165 } else if (!strcmp(root->name, "u") || !strcmp(root->name, "U")) { |
1166 *begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_UNDERLINE); | 1166 *begin = g_strdup_printf("<f s='%d'>", MSIM_TEXT_UNDERLINE); |
1167 *end = g_strdup("</f>"); | 1167 *end = g_strdup("</f>"); |
1168 } else if (!stricmp(root->name, "a")) { | 1168 } else if (!strcmp(root->name, "a") || !strcmp(root->name, "A")) { |
1169 const gchar *href, *link_text; | 1169 const gchar *href, *link_text; |
1170 | 1170 |
1171 href = xmlnode_get_attrib(root, "href"); | 1171 href = xmlnode_get_attrib(root, "href"); |
1172 | 1172 |
1173 if (!href) { | 1173 if (!href) { |
1199 /* Sorry, kid. MySpace doesn't support you within <a> tags. */ | 1199 /* Sorry, kid. MySpace doesn't support you within <a> tags. */ |
1200 xmlnode_free(root->child); | 1200 xmlnode_free(root->child); |
1201 root->child = NULL; | 1201 root->child = NULL; |
1202 | 1202 |
1203 *end = g_strdup(""); | 1203 *end = g_strdup(""); |
1204 } else if (!stricmp(root->name, "font")) { | 1204 } else if (!strcmp(root->name, "font") || !strcmp(root->name, "FONT")) { |
1205 const gchar *size; | 1205 const gchar *size; |
1206 const gchar *face; | 1206 const gchar *face; |
1207 | 1207 |
1208 size = xmlnode_get_attrib(root, "size"); | 1208 size = xmlnode_get_attrib(root, "size"); |
1209 face = xmlnode_get_attrib(root, "face"); | 1209 face = xmlnode_get_attrib(root, "face"); |