Mercurial > pidgin.yaz
diff src/protocols/toc/toc.c @ 7107:9220c7490cd1
[gaim-migrate @ 7672]
This is a big one: normalize() -> gaim_normalize, linkify_text() ->
gaim_markup_linkify(), gaim_get_size_string() -> gaim_str_size_to_units(),
and moved clean_pid() to main.c.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Wed, 01 Oct 2003 06:17:28 +0000 |
| parents | c8bf2da398e3 |
| children | 943085b0ff8b |
line wrap: on
line diff
--- a/src/protocols/toc/toc.c Wed Oct 01 05:56:58 2003 +0000 +++ b/src/protocols/toc/toc.c Wed Oct 01 06:17:28 2003 +0000 @@ -634,7 +634,7 @@ else password = g_strdup(gaim_account_get_password(gc->account)); g_snprintf(snd, sizeof snd, "toc_signon %s %d %s %s %s \"%s\"", - AUTH_HOST, AUTH_PORT, normalize(username), + AUTH_HOST, AUTH_PORT, gaim_normalize(username), roast_password(password), LANGUAGE, REVISION); g_free(password); if (sflap_send(gc, snd, -1, TYPE_DATA) < 0) { @@ -702,7 +702,7 @@ tdt->state = STATE_ONLINE; g_snprintf(snd, sizeof snd, "toc_signon %s %d %s %s %s \"%s\"", AUTH_HOST, AUTH_PORT, - normalize(gaim_account_get_username(gc->account)), + gaim_normalize(gaim_account_get_username(gc->account)), roast_password(gaim_account_get_password(gc->account)), LANGUAGE, REVISION); if (sflap_send(gc, snd, -1, TYPE_DATA) < 0) { @@ -779,8 +779,8 @@ } else time_idle = 0; - tmp = g_strdup(normalize(gaim_account_get_username(gc->account))); - if (!strcmp(tmp, normalize(c))) + tmp = g_strdup(gaim_normalize(gaim_account_get_username(gc->account))); + if (!strcmp(tmp, gaim_normalize(c))) gaim_connection_set_display_name(gc, c); g_free(tmp); @@ -1067,7 +1067,7 @@ g_free(buf1); return -E2BIG; } - buf2 = g_strdup_printf("toc_send_im %s \"%s\"%s", normalize(name), buf1, + buf2 = g_strdup_printf("toc_send_im %s \"%s\"%s", gaim_normalize(name), buf1, ((flags & GAIM_IM_AUTO_RESP) ? " auto" : "")); g_free(buf1); #else @@ -1091,7 +1091,7 @@ return -E2BIG; } - buf2 = g_strdup_printf("toc2_send_im_enc %s F U en \"%s\" %s", normalize(name), buf1, + buf2 = g_strdup_printf("toc2_send_im_enc %s F U en \"%s\" %s", gaim_normalize(name), buf1, ((flags & GAIM_IM_AUTO_RESP) ? "auto" : "")); g_free(buf1); #endif @@ -1114,14 +1114,14 @@ static void toc_get_info(GaimConnection *g, const char *name) { char buf[BUF_LEN * 2]; - g_snprintf(buf, MSG_LEN, "toc_get_info %s", normalize(name)); + g_snprintf(buf, MSG_LEN, "toc_get_info %s", gaim_normalize(name)); sflap_send(g, buf, -1, TYPE_DATA); } static void toc_get_dir(GaimConnection *g, const char *name) { char buf[BUF_LEN * 2]; - g_snprintf(buf, MSG_LEN, "toc_get_dir %s", normalize(name)); + g_snprintf(buf, MSG_LEN, "toc_get_dir %s", gaim_normalize(name)); sflap_send(g, buf, -1, TYPE_DATA); } @@ -1187,7 +1187,7 @@ static void toc_add_buddy(GaimConnection *g, const char *name, GaimGroup *group) { char buf[BUF_LEN * 2]; - g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", normalize(name)); + g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", gaim_normalize(name)); sflap_send(g, buf, -1, TYPE_DATA); toc_set_config(g); } @@ -1199,11 +1199,11 @@ n = g_snprintf(buf, sizeof(buf), "toc_add_buddy"); while (buddies) { - if (strlen(normalize(buddies->data)) + n + 32 > MSG_LEN) { + if (strlen(gaim_normalize(buddies->data)) + n + 32 > MSG_LEN) { sflap_send(g, buf, -1, TYPE_DATA); n = g_snprintf(buf, sizeof(buf), "toc_add_buddy"); } - n += g_snprintf(buf + n, sizeof(buf) - n, " %s", normalize(buddies->data)); + n += g_snprintf(buf + n, sizeof(buf) - n, " %s", gaim_normalize(buddies->data)); buddies = buddies->next; } sflap_send(g, buf, -1, TYPE_DATA); @@ -1212,7 +1212,7 @@ static void toc_remove_buddy(GaimConnection *g, const char *name, const char *group) { char buf[BUF_LEN * 2]; - g_snprintf(buf, sizeof(buf), "toc_remove_buddy %s", normalize(name)); + g_snprintf(buf, sizeof(buf), "toc_remove_buddy %s", gaim_normalize(name)); sflap_send(g, buf, -1, TYPE_DATA); toc_set_config(g); } @@ -1224,11 +1224,11 @@ n = g_snprintf(buf, sizeof(buf), "toc_remove_buddy"); while (buddies) { - if (strlen(normalize(buddies->data)) + n + 32 > MSG_LEN) { + if (strlen(gaim_normalize(buddies->data)) + n + 32 > MSG_LEN) { sflap_send(g, buf, -1, TYPE_DATA); n = g_snprintf(buf, sizeof(buf), "toc_remove_buddy"); } - n += g_snprintf(buf + n, sizeof(buf) - n, " %s", normalize(buddies->data)); + n += g_snprintf(buf + n, sizeof(buf) - n, " %s", gaim_normalize(buddies->data)); buddies = buddies->next; } sflap_send(g, buf, -1, TYPE_DATA); @@ -1293,7 +1293,7 @@ { char buf[BUF_LONG]; g_snprintf(buf, sizeof(buf) / 2, "toc_chat_invite %d \"%s\" %s", id, - message ? message : "", normalize(name)); + message ? message : "", gaim_normalize(name)); sflap_send(g, buf, -1, TYPE_DATA); } @@ -1328,7 +1328,7 @@ { char *buf1, *buf2; buf1 = escape_text(message); - buf2 = g_strdup_printf("toc_chat_whisper %d %s \"%s\"", id, normalize(who), buf1); + buf2 = g_strdup_printf("toc_chat_whisper %d %s \"%s\"", id, gaim_normalize(who), buf1); g_free(buf1); sflap_send(g, buf2, -1, TYPE_DATA); g_free(buf2); @@ -1411,7 +1411,7 @@ char buf2[BUF_LEN * 2]; if (gc->account->perm_deny != 3) return; - g_snprintf(buf2, sizeof(buf2), "toc_add_permit %s", normalize(who)); + g_snprintf(buf2, sizeof(buf2), "toc_add_permit %s", gaim_normalize(who)); sflap_send(gc, buf2, -1, TYPE_DATA); toc_set_config(gc); } @@ -1421,7 +1421,7 @@ char buf2[BUF_LEN * 2]; if (gc->account->perm_deny != 4) return; - g_snprintf(buf2, sizeof(buf2), "toc_add_deny %s", normalize(who)); + g_snprintf(buf2, sizeof(buf2), "toc_add_deny %s", gaim_normalize(who)); sflap_send(gc, buf2, -1, TYPE_DATA); toc_set_config(gc); } @@ -1458,7 +1458,7 @@ at = g_snprintf(buf2, sizeof(buf2), "toc_add_permit "); list = gc->account->permit; while (list) { - at += g_snprintf(buf2 + at, sizeof(buf2) - at, "%s ", normalize(list->data)); + at += g_snprintf(buf2 + at, sizeof(buf2) - at, "%s ", gaim_normalize(list->data)); if (at > MSG_LEN + 32) { /* from out my ass comes greatness */ sflap_send(gc, buf2, -1, TYPE_DATA); at = g_snprintf(buf2, sizeof(buf2), "toc_add_permit "); @@ -1476,7 +1476,7 @@ at = g_snprintf(buf2, sizeof(buf2), "toc_add_deny "); list = gc->account->deny; while (list) { - at += g_snprintf(buf2 + at, sizeof(buf2) - at, "%s ", normalize(list->data)); + at += g_snprintf(buf2 + at, sizeof(buf2) - at, "%s ", gaim_normalize(list->data)); if (at > MSG_LEN + 32) { /* from out my ass comes greatness */ sflap_send(gc, buf2, -1, TYPE_DATA); at = g_snprintf(buf2, sizeof(buf2), "toc_add_deny ");
