diff src/protocols/jabber/jabber.c @ 4793:677d3cb193a1

[gaim-migrate @ 5113] this removes all the remaining deprecated glib, gdk, gdk-pixbuf, and gtk function calls. Hopefully I didn't break anything. Most of this is due to the deprecation of g_strcasecmp and g_strncasecmp. Two functions I never thought would be deprecated, but apparently they're no good at comparing utf8 text. g_ascii_str{,n}casecmp is OK when you're sure that it's ASCII. Otherwise, we're supposed to use g_utf8_collate(), except that it is case sensitive. Since glib doesn't currently have a case-insensitive one, I wrote one. If you need to compare utf8 text, you can use gaim_utf8_strcasecmp(). I have to go do dishes now. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sun, 16 Mar 2003 00:01:49 +0000
parents e23a7e166680
children 4a689f8d3d2f
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c	Sat Mar 15 22:22:39 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Sun Mar 16 00:01:49 2003 +0000
@@ -2970,7 +2970,7 @@
 	xmlnode_put_attrib(x, "type", "groupchat");
 
 	if (message && strlen(message) > strlen("/topic ") &&
-			!g_strncasecmp(message, "/topic ", strlen("/topic "))) {
+			!g_ascii_strncasecmp(message, "/topic ", strlen("/topic "))) {
 		char buf[8192];
 		y = xmlnode_insert_tag(x, "subject");
 		xmlnode_insert_cdata(y, message + strlen("/topic "), -1);
@@ -3025,9 +3025,7 @@
 	if(s == NULL) {
 		return(NULL);
 	} else {
-		u = t = g_strdup(s);
-
-		g_strdown(t);
+		u = t = g_utf8_strdown(s, -1);
 
 		while (*t && (x < BUF_LEN - 1)) {
 			if (*t != ' ')
@@ -3787,7 +3785,7 @@
 	 * Send only if there's actually any *information* to send
 	 */
 	if((vc_node = xmlstr2xmlnode(info)) != NULL && xmlnode_get_name(vc_node) != NULL &&
-			g_strncasecmp(xmlnode_get_name(vc_node), "vcard", 5) == 0) {
+			g_ascii_strncasecmp(xmlnode_get_name(vc_node), "vcard", 5) == 0) {
 		xmlnode_insert_tag_node(x, vc_node);
 		debug_printf("jabber: vCard packet: %s\n", xmlnode2str(x));
 		gjab_send(gjc, x);