From: Nathan W. <fac...@us...> - 2003-03-16 00:01:51
|
Update of /cvsroot/gaim/gaim/src/protocols/yahoo In directory sc8-pr-cvs1:/tmp/cvs-serv19860/src/protocols/yahoo Modified Files: yahoo.c Log Message: 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. Index: yahoo.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/protocols/yahoo/yahoo.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- yahoo.c 14 Mar 2003 22:49:32 -0000 1.82 +++ yahoo.c 16 Mar 2003 00:01:47 -0000 1.83 @@ -515,12 +515,12 @@ if (!msg) return; - if (!g_strncasecmp(msg, "TYPING", strlen("TYPING"))) { + if (!g_ascii_strncasecmp(msg, "TYPING", strlen("TYPING"))) { if (*stat == '1') serv_got_typing(gc, from, 0, TYPING); else serv_got_typing_stopped(gc, from); - } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) { + } else if (!g_ascii_strncasecmp(msg, "GAME", strlen("GAME"))) { struct buddy *bud = gaim_find_buddy(gc->account, from); void *free1=NULL, *free2=NULL; if (!bud) @@ -967,7 +967,7 @@ yd->games = g_hash_table_new(g_str_hash, g_str_equal); - if (!g_strncasecmp(account->proto_opt[USEROPT_PAGERHOST], "cs.yahoo.com", strlen("cs.yahoo.com"))) { + if (!g_ascii_strncasecmp(account->proto_opt[USEROPT_PAGERHOST], "cs.yahoo.com", strlen("cs.yahoo.com"))) { /* Figured out the new auth method -- cs.yahoo.com likes to disconnect on buddy remove and add now */ debug_printf("Setting new Yahoo! server.\n"); g_snprintf(account->proto_opt[USEROPT_PAGERHOST], strlen("scs.yahoo.com") + 1, "scs.yahoo.com"); |