Mercurial > pidgin
diff src/protocols/yahoo/yahoo.c @ 11644:f4e58e94ced3
[gaim-migrate @ 13922]
Yahoo! whitespace cleanup from Peter Lawler
Gracias!
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 12 Oct 2005 04:02:46 +0000 |
parents | eb14bbcf7249 |
children | c7aaac1fb252 |
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c Wed Oct 12 02:47:31 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Wed Oct 12 04:02:46 2005 +0000 @@ -84,11 +84,14 @@ switch (gc->account->perm_deny) { case GAIM_PRIVACY_DENY_ALL: - deb = "GAIM_PRIVACY_DENY_ALL"; break; + deb = "GAIM_PRIVACY_DENY_ALL"; + break; case GAIM_PRIVACY_DENY_USERS: - deb = "GAIM_PRIVACY_DENY_USERS"; break; + deb = "GAIM_PRIVACY_DENY_USERS"; + break; case GAIM_PRIVACY_ALLOW_BUDDYLIST: - deb = "GAIM_PRIVACY_ALLOW_BUDDYLIST"; break; + deb = "GAIM_PRIVACY_ALLOW_BUDDYLIST"; + break; } if(deb) gaim_debug_info("yahoo", @@ -380,7 +383,6 @@ GSList *list, *i; gboolean onlist = 0; char *oname = NULL; - char **oname_p = &oname; GSList **list_p = &list; @@ -562,7 +564,6 @@ g_hash_table_destroy(ht); } - if (yd->tmp_serv_ilist) { buddies = g_strsplit(yd->tmp_serv_ilist->str, ",", -1); for (bud = buddies; bud && *bud; bud++) { @@ -878,7 +879,7 @@ /* TODO: this is almost exactly the same as what MSN does, * this should probably be moved to the core. - * */ + */ prompt_msg = g_strdup_printf(_("The user %s wants to add %s to " "his or her buddy list%s%s."), add_req->who, add_req->id, @@ -942,8 +943,6 @@ static void yahoo_process_contact(GaimConnection *gc, struct yahoo_packet *pkt) { - - switch (pkt->status) { case 1: yahoo_process_status(gc, pkt); @@ -1287,16 +1286,14 @@ while (*magic_ptr != (int)NULL) { char *loc; - /* Ignore parentheses. - */ + /* Ignore parentheses. */ if (*magic_ptr == '(' || *magic_ptr == ')') { magic_ptr++; continue; } - /* Characters and digits verify against the challenge lookup. - */ + /* Characters and digits verify against the challenge lookup. */ if (isalpha(*magic_ptr) || isdigit(*magic_ptr)) { loc = strchr(challenge_lookup, *magic_ptr); @@ -1304,8 +1301,7 @@ /* SME XXX Error - disconnect here */ } - /* Get offset into lookup table and shl 3. - */ + /* Get offset into lookup table and shl 3. */ magic_work = loc - challenge_lookup; magic_work <<= 3; @@ -1322,8 +1318,7 @@ local_store = loc - operand_lookup; - /* Oops; how did this happen? - */ + /* Oops; how did this happen? */ if (magic_cnt >= 64) break; @@ -1337,15 +1332,15 @@ magic_len = magic_cnt; magic_cnt = 0; - /* Magic: Phase 2. Take generated magic value and sprinkle fairy dust on the values. + /* Magic: Phase 2. Take generated magic value and sprinkle fairy + * dust on the values. */ for (magic_cnt = magic_len-2; magic_cnt >= 0; magic_cnt--) { unsigned char byte1; unsigned char byte2; - /* Bad. Abort. - */ + /* Bad. Abort. */ if ((magic_cnt + 1 > magic_len) || (magic_cnt > magic_len)) break; @@ -1509,8 +1504,7 @@ memset(&byte, 0, 6); - /* First two bytes of digest stuffed together. - */ + /* First two bytes of digest stuffed together. */ val = digest2[x]; val <<= 8; @@ -1545,8 +1539,7 @@ strcat(resp_6, byte); } - /* Our second authentication response is based off of the crypto hash. - */ + /* Our second authentication response is based off of the crypto hash. */ cnt = 0; memset(&digest1, 0, 20); @@ -1604,8 +1597,7 @@ memset(&byte, 0, 6); - /* First two bytes of digest stuffed together. - */ + /* First two bytes of digest stuffed together. */ val = digest2[x]; val <<= 8; @@ -1664,7 +1656,6 @@ int m = 0; gchar *buf; - while (l) { struct yahoo_pair *pair = l->data; if (pair->key == 94) @@ -2086,7 +2077,8 @@ yahoo_process_stealth(gc, pkt); break; case YAHOO_SERVICE_P2PFILEXFER: - yahoo_process_p2pfilexfer( gc, pkt ); // This case had no break and continued; thus keeping it this way. + /* This case had no break and continued; thus keeping it this way.*/ + yahoo_process_p2pfilexfer( gc, pkt ); case YAHOO_SERVICE_FILETRANSFER: yahoo_process_filetransfer(gc, pkt); break; @@ -2925,7 +2917,6 @@ return m; } - static GList *yahoo_blist_node_menu(GaimBlistNode *node) { if(GAIM_BLIST_NODE_IS_BUDDY(node)) { @@ -2935,7 +2926,6 @@ } } - static void yahoo_act_id(GaimConnection *gc, const char *entry) { struct yahoo_data *yd = gc->proto_data; @@ -2997,8 +2987,9 @@ yahoo_packet_hash_str(pkt, 97, "1"); yahoo_packet_hash_str(pkt, 14, msg2); - // If this message is to a user who is also Doodling with the local user, - // format the chat packet with the correct IMV information (thanks Yahoo!) + /* If this message is to a user who is also Doodling with the local user, + * format the chat packet with the correct IMV information (thanks Yahoo!) + */ wb = gaim_whiteboard_get_session(gc->account, (char*)who); if (wb) yahoo_packet_hash_str(pkt, 63, "doodle;11"); @@ -3166,7 +3157,6 @@ else if (!idle && yd->current_status == YAHOO_STATUS_IDLE) yd->current_status = YAHOO_STATUS_AVAILABLE; - pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_STATUS_UPDATE, YAHOO_STATUS_AVAILABLE, 0); yahoo_packet_hash_int(pkt, 10, yd->current_status); @@ -3190,7 +3180,6 @@ else if (!gaim_presence_is_available(gaim_account_get_presence(gaim_connection_get_account(gc)))) yahoo_packet_hash_str(pkt, 47, "1"); - yahoo_packet_send_and_free(pkt, yd); g_free(msg); @@ -3220,7 +3209,6 @@ gaim_value_new(GAIM_TYPE_STRING), NULL); types = g_list_append(types, type); - type = gaim_status_type_new(GAIM_STATUS_AWAY, YAHOO_STATUS_TYPE_BRB, _("Be Right Back"), TRUE); types = g_list_append(types, type); @@ -3257,7 +3245,6 @@ type = gaim_status_type_new(GAIM_STATUS_HIDDEN, YAHOO_STATUS_TYPE_INVISIBLE, _("Invisible"), TRUE); types = g_list_append(types, type); - return types; } @@ -3503,7 +3490,6 @@ static GaimPlugin *my_protocol = NULL; - static GaimCmdRet yahoogaim_cmd_chat_join(GaimConversation *conv, const char *cmd, char **args, char **error, void *data) @@ -3634,7 +3620,6 @@ 0, /**< flags */ NULL, /**< dependencies */ GAIM_PRIORITY_DEFAULT, /**< priority */ - "prpl-yahoo", /**< id */ "Yahoo", /**< name */ VERSION, /**< version */ @@ -3644,11 +3629,9 @@ N_("Yahoo Protocol Plugin"), NULL, /**< author */ GAIM_WEBSITE, /**< homepage */ - NULL, /**< load */ yahoo_unload_plugin, /**< unload */ NULL, /**< destroy */ - NULL, /**< ui_info */ &prpl_info, /**< extra_info */ NULL,