Ignore:
Timestamp:
2015-02-20T22:50:54Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
0b9daac, 3d45471, 7733b8c
Parents:
af359b4
git-author:
Indent <please@…> (19-02-15 05:47:20)
git-committer:
dequis <dx@…> (20-02-15 22:50:54)
Message:

Reindent everything to K&R style with tabs

Used uncrustify, with the configuration file in ./doc/uncrustify.cfg

Commit author set to "Indent <please@…>" so that it's easier to
skip while doing git blame.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/misc.c

    raf359b4 r5ebff60  
    77 * Other things...
    88 *
    9  *   - Idle setting 
    10  * 
    11  *
    12  */
    13 
    14 #include <aim.h> 
    15 
    16 /* 
     9 *   - Idle setting
     10 *
     11 *
     12 */
     13
     14#include <aim.h>
     15
     16/*
    1717 * aim_bos_setprofile(profile)
    1818 *
    1919 * Gives BOS your profile.
    20  * 
     20 *
    2121 */
    2222int aim_bos_setprofile(aim_session_t *sess, aim_conn_t *conn, const char *profile, const char *awaymsg, guint32 caps)
    2323{
    24         static const char defencoding[] = {"text/aolrtf; charset=\"utf-8\""};
     24        static const char defencoding[] = { "text/aolrtf; charset=\"utf-8\"" };
    2525        aim_frame_t *fr;
    2626        aim_tlvlist_t *tl = NULL;
     
    2929        /* Build to packet first to get real length */
    3030        if (profile) {
    31                 aim_addtlvtochain_raw(&tl, 0x0001, strlen(defencoding), (guint8 *)defencoding);
    32                 aim_addtlvtochain_raw(&tl, 0x0002, strlen(profile), (guint8 *)profile);
     31                aim_addtlvtochain_raw(&tl, 0x0001, strlen(defencoding), (guint8 *) defencoding);
     32                aim_addtlvtochain_raw(&tl, 0x0002, strlen(profile), (guint8 *) profile);
    3333        }
    3434
     
    4343        if (awaymsg) {
    4444                if (strlen(awaymsg)) {
    45                         aim_addtlvtochain_raw(&tl, 0x0003, strlen(defencoding), (guint8 *)defencoding);
    46                         aim_addtlvtochain_raw(&tl, 0x0004, strlen(awaymsg), (guint8 *)awaymsg);
    47                 } else
     45                        aim_addtlvtochain_raw(&tl, 0x0003, strlen(defencoding), (guint8 *) defencoding);
     46                        aim_addtlvtochain_raw(&tl, 0x0004, strlen(awaymsg), (guint8 *) awaymsg);
     47                } else {
    4848                        aim_addtlvtochain_noval(&tl, 0x0004);
     49                }
    4950        }
    5051
    5152        aim_addtlvtochain_caps(&tl, 0x0005, caps);
    5253
    53         if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + aim_sizetlvchain(&tl))))
    54                 return -ENOMEM;
     54        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + aim_sizetlvchain(&tl)))) {
     55                return -ENOMEM;
     56        }
    5557
    5658        snacid = aim_cachesnac(sess, 0x0002, 0x0004, 0x0000, NULL, 0);
    57        
     59
    5860        aim_putsnac(&fr->data, 0x0002, 0x004, 0x0000, snacid);
    5961        aim_writetlvchain(&fr->data, &tl);
     
    9395        aim_snacid_t snacid = 0x00000000;
    9496
    95         if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10)))
    96                 return -ENOMEM;
     97        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10))) {
     98                return -ENOMEM;
     99        }
    97100
    98101        aim_putsnac(&fr->data, family, subtype, 0x0000, snacid);
     
    108111        aim_snacid_t snacid;
    109112
    110         if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10)))
    111                 return -ENOMEM;
     113        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10))) {
     114                return -ENOMEM;
     115        }
    112116
    113117        snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0);
     
    124128        aim_snacid_t snacid;
    125129
    126         if (!longdata)
     130        if (!longdata) {
    127131                return aim_genericreq_n(sess, conn, family, subtype);
    128 
    129         if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+4)))
    130                 return -ENOMEM;
     132        }
     133
     134        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 4))) {
     135                return -ENOMEM;
     136        }
    131137
    132138        snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0);
     
    145151        aim_snacid_t snacid;
    146152
    147         if (!shortdata)
     153        if (!shortdata) {
    148154                return aim_genericreq_n(sess, conn, family, subtype);
    149 
    150         if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+2)))
    151                 return -ENOMEM;
     155        }
     156
     157        if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 2))) {
     158                return -ENOMEM;
     159        }
    152160
    153161        snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0);
     
    185193        snac2 = aim_remsnac(sess, snac->id);
    186194
    187         if (aim_bstream_empty(bs))
     195        if (aim_bstream_empty(bs)) {
    188196                error = aimbs_get16(bs);
    189 
    190         if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
     197        }
     198
     199        if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) {
    191200                ret = userfunc(sess, rx, error, snac2 ? snac2->data : NULL);
    192 
    193         if (snac2)
     201        }
     202
     203        if (snac2) {
    194204                g_free(snac2->data);
     205        }
    195206        g_free(snac2);
    196207
     
    201212{
    202213
    203         if (snac->subtype == 0x0001)
     214        if (snac->subtype == 0x0001) {
    204215                return generror(sess, mod, rx, snac, bs);
    205         else if ((snac->family == 0xffff) && (snac->subtype == 0xffff)) {
     216        } else if ((snac->family == 0xffff) && (snac->subtype == 0xffff)) {
    206217                aim_rxcallback_t userfunc;
    207218
    208                 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype)))
     219                if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) {
    209220                        return userfunc(sess, rx);
     221                }
    210222        }
    211223
Note: See TracChangeset for help on using the changeset viewer.