comparison src/protocols/yahoo/yahoo.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 0ed37c803503
comparison
equal deleted inserted replaced
4792:9212d1c5b7dc 4793:677d3cb193a1
513 } 513 }
514 514
515 if (!msg) 515 if (!msg)
516 return; 516 return;
517 517
518 if (!g_strncasecmp(msg, "TYPING", strlen("TYPING"))) { 518 if (!g_ascii_strncasecmp(msg, "TYPING", strlen("TYPING"))) {
519 if (*stat == '1') 519 if (*stat == '1')
520 serv_got_typing(gc, from, 0, TYPING); 520 serv_got_typing(gc, from, 0, TYPING);
521 else 521 else
522 serv_got_typing_stopped(gc, from); 522 serv_got_typing_stopped(gc, from);
523 } else if (!g_strncasecmp(msg, "GAME", strlen("GAME"))) { 523 } else if (!g_ascii_strncasecmp(msg, "GAME", strlen("GAME"))) {
524 struct buddy *bud = gaim_find_buddy(gc->account, from); 524 struct buddy *bud = gaim_find_buddy(gc->account, from);
525 void *free1=NULL, *free2=NULL; 525 void *free1=NULL, *free2=NULL;
526 if (!bud) 526 if (!bud)
527 debug_printf("%s is playing a game, and doesn't want you to know.\n", from); 527 debug_printf("%s is playing a game, and doesn't want you to know.\n", from);
528 if (*stat == '1') { 528 if (*stat == '1') {
965 yd->fd = -1; 965 yd->fd = -1;
966 yd->hash = g_hash_table_new(g_str_hash, g_str_equal); 966 yd->hash = g_hash_table_new(g_str_hash, g_str_equal);
967 yd->games = g_hash_table_new(g_str_hash, g_str_equal); 967 yd->games = g_hash_table_new(g_str_hash, g_str_equal);
968 968
969 969
970 if (!g_strncasecmp(account->proto_opt[USEROPT_PAGERHOST], "cs.yahoo.com", strlen("cs.yahoo.com"))) { 970 if (!g_ascii_strncasecmp(account->proto_opt[USEROPT_PAGERHOST], "cs.yahoo.com", strlen("cs.yahoo.com"))) {
971 /* Figured out the new auth method -- cs.yahoo.com likes to disconnect on buddy remove and add now */ 971 /* Figured out the new auth method -- cs.yahoo.com likes to disconnect on buddy remove and add now */
972 debug_printf("Setting new Yahoo! server.\n"); 972 debug_printf("Setting new Yahoo! server.\n");
973 g_snprintf(account->proto_opt[USEROPT_PAGERHOST], strlen("scs.yahoo.com") + 1, "scs.yahoo.com"); 973 g_snprintf(account->proto_opt[USEROPT_PAGERHOST], strlen("scs.yahoo.com") + 1, "scs.yahoo.com");
974 save_prefs(); 974 save_prefs();
975 } 975 }