# HG changeset patch # User Mark Doliner # Date 1122352477 0 # Node ID bd8ac1d4b2f20bb32e5f57527208a5f84db5f956 # Parent 2c930d5914926d187375581a5dec2d45f2b6e762 [gaim-migrate @ 13246] Get rid of a bunch of gcc4 compile warnings in oscar. Here's what I'm doing: -For random bits of binary data, use guchar * -For textual data (not necessarily utf8), use gchar * This seems to be what glib and gtk do committer: Tailor Script diff -r 2c930d591492 -r bd8ac1d4b2f2 src/account.h --- a/src/account.h Mon Jul 25 23:46:34 2005 +0000 +++ b/src/account.h Tue Jul 26 04:34:37 2005 +0000 @@ -268,7 +268,7 @@ * @param account The account. * @param presence The presence. * - * This function does not seem to be implemented anywhere ... + * TODO: This function does not seem to be implemented anywhere... */ void gaim_account_set_presence(GaimAccount *account, GaimPresence *presence); diff -r 2c930d591492 -r bd8ac1d4b2f2 src/ft.c --- a/src/ft.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/ft.c Tue Jul 26 04:34:37 2005 +0000 @@ -225,7 +225,7 @@ { GaimXfer *xfer = (GaimXfer *)user_data; - gaim_xfer_set_status(xfer, GAIM_XFER_STATUS_CANCEL_LOCAL); + gaim_xfer_set_status(xfer, GAIM_XFER_STATUS_CANCEL_LOCAL); gaim_xfer_request_denied(xfer); } @@ -243,7 +243,7 @@ static int cancel_recv_cb(GaimXfer *xfer) { - gaim_xfer_set_status(xfer, GAIM_XFER_STATUS_CANCEL_LOCAL); + gaim_xfer_set_status(xfer, GAIM_XFER_STATUS_CANCEL_LOCAL); gaim_xfer_request_denied(xfer); gaim_xfer_unref(xfer); @@ -391,7 +391,7 @@ } if (g_stat(filename, &st) == -1) { - gaim_xfer_show_file_error(xfer, filename); + gaim_xfer_show_file_error(xfer, filename); gaim_xfer_unref(xfer); return; } @@ -651,7 +651,7 @@ } void -gaim_xfer_set_read_fnc(GaimXfer *xfer, ssize_t (*fnc)(char **, GaimXfer *)) +gaim_xfer_set_read_fnc(GaimXfer *xfer, ssize_t (*fnc)(guchar **, GaimXfer *)) { g_return_if_fail(xfer != NULL); @@ -660,7 +660,7 @@ void gaim_xfer_set_write_fnc(GaimXfer *xfer, - ssize_t (*fnc)(const char *, size_t, GaimXfer *)) + ssize_t (*fnc)(const guchar *, size_t, GaimXfer *)) { g_return_if_fail(xfer != NULL); @@ -669,7 +669,7 @@ void gaim_xfer_set_ack_fnc(GaimXfer *xfer, - void (*fnc)(GaimXfer *, const char *, size_t)) + void (*fnc)(GaimXfer *, const guchar *, size_t)) { g_return_if_fail(xfer != NULL); @@ -709,7 +709,7 @@ } ssize_t -gaim_xfer_read(GaimXfer *xfer, char **buffer) +gaim_xfer_read(GaimXfer *xfer, guchar **buffer) { ssize_t s, r; @@ -738,7 +738,7 @@ } ssize_t -gaim_xfer_write(GaimXfer *xfer, const char *buffer, size_t size) +gaim_xfer_write(GaimXfer *xfer, const guchar *buffer, size_t size) { ssize_t r, s; @@ -764,7 +764,7 @@ { GaimXferUiOps *ui_ops; GaimXfer *xfer = (GaimXfer *)data; - char *buffer = NULL; + guchar *buffer = NULL; ssize_t r = 0; if (condition & GAIM_INPUT_READ) { diff -r 2c930d591492 -r bd8ac1d4b2f2 src/ft.h --- a/src/ft.h Mon Jul 25 23:46:34 2005 +0000 +++ b/src/ft.h Tue Jul 26 04:34:37 2005 +0000 @@ -115,9 +115,9 @@ void (*end)(GaimXfer *xfer); void (*cancel_send)(GaimXfer *xfer); void (*cancel_recv)(GaimXfer *xfer); - ssize_t (*read)(char **buffer, GaimXfer *xfer); - ssize_t (*write)(const char *buffer, size_t size, GaimXfer *xfer); - void (*ack)(GaimXfer *xfer, const char *buffer, size_t size); + ssize_t (*read)(guchar **buffer, GaimXfer *xfer); + ssize_t (*write)(const guchar *buffer, size_t size, GaimXfer *xfer); + void (*ack)(GaimXfer *xfer, const guchar *buffer, size_t size); } ops; @@ -381,7 +381,7 @@ * @param fnc The read function. */ void gaim_xfer_set_read_fnc(GaimXfer *xfer, - ssize_t (*fnc)(char **, GaimXfer *)); + ssize_t (*fnc)(guchar **, GaimXfer *)); /** * Sets the write function for the file transfer. @@ -390,7 +390,7 @@ * @param fnc The write function. */ void gaim_xfer_set_write_fnc(GaimXfer *xfer, - ssize_t (*fnc)(const char *, size_t, GaimXfer *)); + ssize_t (*fnc)(const guchar *, size_t, GaimXfer *)); /** * Sets the acknowledge function for the file transfer. @@ -399,7 +399,7 @@ * @param fnc The acknowledge function. */ void gaim_xfer_set_ack_fnc(GaimXfer *xfer, - void (*fnc)(GaimXfer *, const char *, size_t)); + void (*fnc)(GaimXfer *, const guchar *, size_t)); /** * Sets the function to be called if the request is denied. @@ -461,7 +461,7 @@ * * @return The number of bytes read, or -1. */ -ssize_t gaim_xfer_read(GaimXfer *xfer, char **buffer); +ssize_t gaim_xfer_read(GaimXfer *xfer, guchar **buffer); /** * Writes data to a file transfer stream. @@ -472,7 +472,7 @@ * * @return The number of bytes written, or -1. */ -ssize_t gaim_xfer_write(GaimXfer *xfer, const char *buffer, size_t size); +ssize_t gaim_xfer_write(GaimXfer *xfer, const guchar *buffer, size_t size); /** * Starts a file transfer. diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/irc/dcc_send.c --- a/src/protocols/irc/dcc_send.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/irc/dcc_send.c Tue Jul 26 04:34:37 2005 +0000 @@ -51,7 +51,7 @@ * It sends the acknowledgement (in the form of a total byte count as an * unsigned 4 byte integer in network byte order) */ -static void irc_dccsend_recv_ack(GaimXfer *xfer, const char *data, size_t size) { +static void irc_dccsend_recv_ack(GaimXfer *xfer, const guchar *data, size_t size) { unsigned long l; l = htonl(xfer->bytes_sent); @@ -214,7 +214,7 @@ } } -ssize_t irc_dccsend_send_write(const char *buffer, size_t size, GaimXfer *xfer) +ssize_t irc_dccsend_send_write(const guchar *buffer, size_t size, GaimXfer *xfer) { ssize_t s; diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/jabber/oob.c --- a/src/protocols/jabber/oob.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/jabber/oob.c Tue Jul 26 04:34:37 2005 +0000 @@ -85,7 +85,7 @@ g_free(buf); } -static ssize_t jabber_oob_xfer_read(char **buffer, GaimXfer *xfer) { +static ssize_t jabber_oob_xfer_read(guchar **buffer, GaimXfer *xfer) { JabberOOBXfer *jox = xfer->data; char test; int size; diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/oscar/aim.h --- a/src/protocols/oscar/aim.h Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/oscar/aim.h Tue Jul 26 04:34:37 2005 +0000 @@ -9,12 +9,10 @@ #ifndef __AIM_H__ #define __AIM_H__ -#define FAIM_VERSION_MAJOR 0 -#define FAIM_VERSION_MINOR 99 -#define FAIM_VERSION_MINORMINOR 1 +#include "faimconfig.h" +#include "aim_cbtypes.h" -#include -#include +#include "internal.h" #include #include @@ -691,7 +689,7 @@ #define AIM_IMFLAGS_BUDDYREQ 0x0010 /* buddy icon requested */ #define AIM_IMFLAGS_HASICON 0x0020 /* already has icon */ #define AIM_IMFLAGS_SUBENC_MACINTOSH 0x0040 /* damn that Steve Jobs! */ -#define AIM_IMFLAGS_CUSTOMFEATURES 0x0080 /* features field present */ +#define AIM_IMFLAGS_CUSTOMFEATURES 0x0080 /* features field present */ #define AIM_IMFLAGS_EXTDATA 0x0100 #define AIM_IMFLAGS_X 0x0200 #define AIM_IMFLAGS_MULTIPART 0x0400 /* ->mpmsg section valid */ @@ -708,7 +706,7 @@ typedef struct aim_mpmsg_section_s { fu16_t charset; fu16_t charsubset; - fu8_t *data; + gchar *data; fu16_t datalen; struct aim_mpmsg_section_s *next; } aim_mpmsg_section_t; @@ -719,7 +717,7 @@ } aim_mpmsg_t; faim_export int aim_mpmsg_init(aim_session_t *sess, aim_mpmsg_t *mpm); -faim_export int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, const fu8_t *data, fu16_t datalen); +faim_export int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, const gchar *data, fu16_t datalen); faim_export int aim_mpmsg_addascii(aim_session_t *sess, aim_mpmsg_t *mpm, const char *ascii); faim_export int aim_mpmsg_addunicode(aim_session_t *sess, aim_mpmsg_t *mpm, const fu16_t *unicode, fu16_t unicodelen); faim_export void aim_mpmsg_free(aim_session_t *sess, aim_mpmsg_t *mpm); @@ -787,7 +785,7 @@ fu32_t icbmflags; /* some flags apply only to ->msg, not all mpmsg */ /* Only provided if message has a human-readable section */ - fu8_t *msg; + gchar *msg; int msglen; /* Only provided if AIM_IMFLAGS_HASICON is set */ @@ -861,7 +859,7 @@ fu32_t uin; /* Of the sender of the ICBM */ fu8_t type; fu8_t flags; - fu8_t *msg; /* Reason for auth request, deny, or accept */ + gchar *msg; /* Reason for auth request, deny, or accept */ int msglen; }; @@ -888,37 +886,37 @@ /* ft.c */ struct aim_fileheader_t { #if 0 - char magic[4]; /* 0 */ - fu16_t hdrlen; /* 4 */ - fu16_t hdrtype; /* 6 */ + char magic[4]; /* 0 */ + fu16_t hdrlen; /* 4 */ + fu16_t hdrtype; /* 6 */ #endif - char bcookie[8]; /* 8 */ - fu16_t encrypt; /* 16 */ - fu16_t compress; /* 18 */ - fu16_t totfiles; /* 20 */ - fu16_t filesleft; /* 22 */ - fu16_t totparts; /* 24 */ - fu16_t partsleft; /* 26 */ - fu32_t totsize; /* 28 */ - fu32_t size; /* 32 */ - fu32_t modtime; /* 36 */ - fu32_t checksum; /* 40 */ - fu32_t rfrcsum; /* 44 */ - fu32_t rfsize; /* 48 */ - fu32_t cretime; /* 52 */ - fu32_t rfcsum; /* 56 */ - fu32_t nrecvd; /* 60 */ - fu32_t recvcsum; /* 64 */ - fu8_t idstring[32]; /* 68 */ - fu8_t flags; /* 100 */ - fu8_t lnameoffset; /* 101 */ - fu8_t lsizeoffset; /* 102 */ - char dummy[69]; /* 103 */ - char macfileinfo[16]; /* 172 */ - fu16_t nencode; /* 188 */ - fu16_t nlanguage; /* 190 */ - char name[64]; /* 192 */ - /* 256 */ + guchar bcookie[8]; /* 8 */ + fu16_t encrypt; /* 16 */ + fu16_t compress; /* 18 */ + fu16_t totfiles; /* 20 */ + fu16_t filesleft; /* 22 */ + fu16_t totparts; /* 24 */ + fu16_t partsleft; /* 26 */ + fu32_t totsize; /* 28 */ + fu32_t size; /* 32 */ + fu32_t modtime; /* 36 */ + fu32_t checksum; /* 40 */ + fu32_t rfrcsum; /* 44 */ + fu32_t rfsize; /* 48 */ + fu32_t cretime; /* 52 */ + fu32_t rfcsum; /* 56 */ + fu32_t nrecvd; /* 60 */ + fu32_t recvcsum; /* 64 */ + char idstring[32]; /* 68 */ + fu8_t flags; /* 100 */ + fu8_t lnameoffset; /* 101 */ + fu8_t lsizeoffset; /* 102 */ + guchar dummy[69]; /* 103 */ + guchar macfileinfo[16]; /* 172 */ + fu16_t nencode; /* 188 */ + fu16_t nlanguage; /* 190 */ + char name[64]; /* 192 */ + /* 256 */ }; struct aim_oft_info { @@ -940,7 +938,7 @@ faim_export int aim_odc_send_typing(aim_session_t *sess, aim_conn_t *conn, int typing); faim_export int aim_odc_send_im(aim_session_t *sess, aim_conn_t *conn, const char *msg, int len, int encoding, int isawaymsg); faim_export const char *aim_odc_getsn(aim_conn_t *conn); -faim_export const char *aim_odc_getcookie(aim_conn_t *conn); +faim_export const guchar *aim_odc_getcookie(aim_conn_t *conn); faim_export aim_conn_t *aim_odc_getconn(aim_session_t *sess, const char *sn); faim_export aim_conn_t *aim_odc_initiate(aim_session_t *sess, const char *sn, int listenfd, const fu8_t *localip, fu16_t port, const fu8_t *mycookie); @@ -1087,7 +1085,7 @@ faim_export void aim_locate_dorequest(aim_session_t *sess); /* 0x0002 */ faim_export int aim_locate_reqrights(aim_session_t *sess); -/* 0x0004 */ faim_export int aim_locate_setprofile(aim_session_t *sess, const char *profile_encoding, const fu8_t *profile, const int profile_len, const char *awaymsg_encoding, const fu8_t *awaymsg, const int awaymsg_len); +/* 0x0004 */ faim_export int aim_locate_setprofile(aim_session_t *sess, const char *profile_encoding, const gchar *profile, const int profile_len, const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len); /* 0x0004 */ faim_export int aim_locate_setcaps(aim_session_t *sess, fu32_t caps); /* 0x0005 */ faim_export int aim_locate_getinfo(aim_session_t *sess, const char *, fu16_t); /* 0x0009 */ faim_export int aim_locate_setdirinfo(aim_session_t *sess, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, fu16_t privacy); @@ -1132,7 +1130,7 @@ #define AIM_CHATFLAGS_NOREFLECT 0x0001 #define AIM_CHATFLAGS_AWAY 0x0002 -faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const fu8_t *msg, int msglen, const char *encoding, const char *language); +faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const gchar *msg, int msglen, const char *encoding, const char *language); faim_export int aim_chat_join(aim_session_t *sess, aim_conn_t *conn, fu16_t exchange, const char *roomname, fu16_t instance); faim_export int aim_chat_attachname(aim_conn_t *conn, fu16_t exchange, const char *roomname, fu16_t instance); faim_export char *aim_chat_getname(aim_conn_t *conn); diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/oscar/chat.c --- a/src/protocols/oscar/chat.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/oscar/chat.c Tue Jul 26 04:34:37 2005 +0000 @@ -320,7 +320,7 @@ * * XXX convert this to use tlvchains */ -faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const fu8_t *msg, int msglen, const char *encoding, const char *language) +faim_export int aim_chat_send_im(aim_session_t *sess, aim_conn_t *conn, fu16_t flags, const gchar *msg, int msglen, const char *encoding, const char *language) { int i; aim_frame_t *fr; @@ -376,7 +376,7 @@ /* * SubTLV: Type 1: Message */ - aim_tlvlist_add_raw(&itl, 0x0001, msglen, msg); + aim_tlvlist_add_raw(&itl, 0x0001, msglen, (guchar *)msg); /* * SubTLV: Type 2: Encoding diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/oscar/ft.c --- a/src/protocols/oscar/ft.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/oscar/ft.c Tue Jul 26 04:34:37 2005 +0000 @@ -394,7 +394,7 @@ aimbs_put16(hdrbs, 0x393e); aimbs_put16(hdrbs, 0xcac8); #endif - aimbs_putraw(hdrbs, msg, len); + aimbs_putraw(hdrbs, (guchar *)msg, len); aim_tx_enqueue(sess, fr); @@ -429,7 +429,7 @@ * @param conn The ODC connection. * @return The cookie, an 8 byte unterminated string, or NULL if there was an anomaly. */ -faim_export const char *aim_odc_getcookie(aim_conn_t *conn) +faim_export const guchar *aim_odc_getcookie(aim_conn_t *conn) { struct aim_odc_intdata *intdata; @@ -789,7 +789,7 @@ fh->rfcsum = aimbs_get32(bs); fh->nrecvd = aimbs_get32(bs); fh->recvcsum = aimbs_get32(bs); - aimbs_getrawbuf(bs, fh->idstring, 32); + aimbs_getrawbuf(bs, (guchar *)fh->idstring, 32); fh->flags = aimbs_get8(bs); fh->lnameoffset = aimbs_get8(bs); fh->lsizeoffset = aimbs_get8(bs); @@ -797,7 +797,7 @@ aimbs_getrawbuf(bs, fh->macfileinfo, 16); fh->nencode = aimbs_get16(bs); fh->nlanguage = aimbs_get16(bs); - aimbs_getrawbuf(bs, fh->name, 64); /* XXX - filenames longer than 64B */ + aimbs_getrawbuf(bs, (guchar *)fh->name, 64); /* XXX - filenames longer than 64B */ fh->name[63] = '\0'; return fh; @@ -838,7 +838,7 @@ aimbs_put32(bs, fh->rfcsum); aimbs_put32(bs, fh->nrecvd); aimbs_put32(bs, fh->recvcsum); - aimbs_putraw(bs, fh->idstring, 32); + aimbs_putraw(bs, (const guchar *)fh->idstring, 32); aimbs_put8(bs, fh->flags); aimbs_put8(bs, fh->lnameoffset); aimbs_put8(bs, fh->lsizeoffset); @@ -846,7 +846,7 @@ aimbs_putraw(bs, fh->macfileinfo, 16); aimbs_put16(bs, fh->nencode); aimbs_put16(bs, fh->nlanguage); - aimbs_putraw(bs, fh->name, 64); /* XXX - filenames longer than 64B */ + aimbs_putraw(bs, (const guchar *)fh->name, 64); /* XXX - filenames longer than 64B */ return 0; } diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/oscar/im.c --- a/src/protocols/oscar/im.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/oscar/im.c Tue Jul 26 04:34:37 2005 +0000 @@ -324,7 +324,7 @@ aimbs_put16(&fr->data, sec->datalen + 4); aimbs_put16(&fr->data, sec->charset); aimbs_put16(&fr->data, sec->charsubset); - aimbs_putraw(&fr->data, sec->data, sec->datalen); + aimbs_putraw(&fr->data, (guchar *)sec->data, sec->datalen); } } else { @@ -340,7 +340,7 @@ aimbs_put16(&fr->data, args->charsubset); /* Message. Not terminated */ - aimbs_putraw(&fr->data, args->msg, args->msglen); + aimbs_putraw(&fr->data, (guchar *)args->msg, args->msglen); } /* Set the Autoresponse flag */ @@ -1200,7 +1200,7 @@ return 0; } -static int mpmsg_addsection(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, fu8_t *data, fu16_t datalen) +static int mpmsg_addsection(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, gchar *data, fu16_t datalen) { aim_mpmsg_section_t *sec; @@ -1228,9 +1228,9 @@ return 0; } -faim_export int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, const fu8_t *data, fu16_t datalen) +faim_export int aim_mpmsg_addraw(aim_session_t *sess, aim_mpmsg_t *mpm, fu16_t charset, fu16_t charsubset, const gchar *data, fu16_t datalen) { - fu8_t *dup; + gchar *dup; if (!(dup = malloc(datalen))) return -1; @@ -1247,9 +1247,9 @@ /* XXX - should provide a way of saying ISO-8859-1 specifically */ faim_export int aim_mpmsg_addascii(aim_session_t *sess, aim_mpmsg_t *mpm, const char *ascii) { - fu8_t *dup; - - if (!(dup = (fu8_t *)strdup(ascii))) + gchar *dup; + + if (!(dup = strdup(ascii))) return -1; if (mpmsg_addsection(sess, mpm, 0x0000, 0x0000, dup, strlen(ascii)) == -1) { @@ -1262,14 +1262,14 @@ faim_export int aim_mpmsg_addunicode(aim_session_t *sess, aim_mpmsg_t *mpm, const fu16_t *unicode, fu16_t unicodelen) { - fu8_t *buf; + gchar *buf; aim_bstream_t bs; int i; if (!(buf = malloc(unicodelen * 2))) return -1; - aim_bstream_init(&bs, buf, unicodelen * 2); + aim_bstream_init(&bs, (guchar *)buf, unicodelen * 2); /* We assume unicode is in /host/ byte order -- convert to network */ for (i = 0; i < unicodelen; i++) @@ -1325,7 +1325,7 @@ while (aim_bstream_empty(&mbs)) { fu16_t msglen, flag1, flag2; - fu8_t *msgbuf; + gchar *msgbuf; aimbs_get8(&mbs); /* 01 */ aimbs_get8(&mbs); /* 01 */ @@ -1358,7 +1358,7 @@ * the received messages are given in network byte order. * */ - msgbuf = aimbs_getraw(&mbs, msglen); + msgbuf = (gchar *)aimbs_getraw(&mbs, msglen); mpmsg_addsection(sess, &args->mpmsg, flag1, flag2, msgbuf, msglen); } /* while */ @@ -1964,7 +1964,7 @@ args.type = aimbs_getle8(&meat); args.flags = aimbs_getle8(&meat); args.msglen = aimbs_getle16(&meat); - args.msg = aimbs_getraw(&meat, args.msglen); + args.msg = (gchar *)aimbs_getraw(&meat, args.msglen); if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) ret = userfunc(sess, rx, channel, userinfo, &args); @@ -2140,7 +2140,7 @@ * AIM_TRANSFER_DENY_NOTSUPPORTED -- "client does not support" * AIM_TRANSFER_DENY_DECLINE -- "client has declined transfer" * AIM_TRANSFER_DENY_NOTACCEPTING -- "client is not accepting transfers" - * + * */ faim_export int aim_im_denytransfer(aim_session_t *sess, const char *sender, const fu8_t *cookie, fu16_t code) { @@ -2185,7 +2185,8 @@ aim_rxcallback_t userfunc; fu16_t channel, reason; char *sn; - fu8_t *ck, snlen; + guchar *ck; + guint8 snlen; ck = aimbs_getraw(bs, 8); channel = aimbs_get16(bs); diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/oscar/locate.c --- a/src/protocols/oscar/locate.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/oscar/locate.c Tue Jul 26 04:34:37 2005 +0000 @@ -963,21 +963,21 @@ * profile_encoding and awaymsg_encoding MUST be set if profile or * away are set, respectively, and their value may or may not be * restricted to a few choices. I am currently aware of: - * + * * us-ascii Just that * unicode-2-0 UCS2-BE - * + * * profile_len and awaymsg_len MUST be set similarly, and they MUST * be the length of their respective strings in bytes. * * To get the previous behavior of awaymsg == "" un-setting the away * message, set awaymsg non-NULL and awaymsg_len to 0 (this is the * obvious equivalent). - * + * */ faim_export int aim_locate_setprofile(aim_session_t *sess, - const char *profile_encoding, const fu8_t *profile, const int profile_len, - const char *awaymsg_encoding, const fu8_t *awaymsg, const int awaymsg_len) + const char *profile_encoding, const gchar *profile, const int profile_len, + const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len) { aim_conn_t *conn; aim_frame_t *fr; @@ -1005,7 +1005,7 @@ } snprintf(encoding, strlen(defencoding) + strlen(profile_encoding), defencoding, profile_encoding); aim_tlvlist_add_str(&tl, 0x0001, encoding); - aim_tlvlist_add_raw(&tl, 0x0002, profile_len, profile); + aim_tlvlist_add_raw(&tl, 0x0002, profile_len, (const guchar *)profile); free(encoding); } @@ -1025,7 +1025,7 @@ } snprintf(encoding, strlen(defencoding) + strlen(awaymsg_encoding), defencoding, awaymsg_encoding); aim_tlvlist_add_str(&tl, 0x0003, encoding); - aim_tlvlist_add_raw(&tl, 0x0004, awaymsg_len, awaymsg); + aim_tlvlist_add_raw(&tl, 0x0004, awaymsg_len, (const guchar *)awaymsg); free(encoding); } else aim_tlvlist_add_noval(&tl, 0x0004); diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/oscar/oscar.c Tue Jul 26 04:34:37 2005 +0000 @@ -297,7 +297,7 @@ static gboolean gaim_icon_timerfunc(gpointer data); static void oscar_callback(gpointer data, gint source, GaimInputCondition condition); -static void oscar_direct_im_initiate(GaimConnection *gc, const char *who, const char *cookie); +static void oscar_direct_im_initiate(GaimConnection *gc, const char *who, const guchar *cookie); static void oscar_set_info(GaimConnection *gc, const char *text); static void recent_buddies_cb(const char *name, GaimPrefType type, gpointer value, gpointer data); static void oscar_xfer_init_recv(GaimXfer *xfer); @@ -415,7 +415,7 @@ } static gchar * -gaim_plugin_oscar_convert_to_utf8(const fu8_t *data, fu16_t datalen, const char *charsetstr, gboolean fallback) +gaim_plugin_oscar_convert_to_utf8(const gchar *data, gsize datalen, const char *charsetstr, gboolean fallback) { gchar *ret = NULL; GError *err = NULL; @@ -454,7 +454,7 @@ * charsetstr1 is always set to what the correct encoding should be. */ static gchar * -gaim_plugin_oscar_decode_im_part(GaimAccount *account, const char *sourcesn, fu16_t charset, fu16_t charsubset, fu8_t *data, fu16_t datalen) +gaim_plugin_oscar_decode_im_part(GaimAccount *account, const char *sourcesn, fu16_t charset, fu16_t charsubset, const gchar *data, gsize datalen) { gchar *ret = NULL; const gchar *charsetstr1, *charsetstr2; @@ -1009,9 +1009,9 @@ oscar_direct_im_disconnect(od, dim); return; } else { - fu8_t cookie[8]; + guchar cookie[8]; char *who = g_strdup(dim->name); - const char *tmp = aim_odc_getcookie(dim->conn); + const guchar *tmp = aim_odc_getcookie(dim->conn); memcpy(cookie, tmp, 8); oscar_direct_im_destroy(od, dim); @@ -1038,9 +1038,9 @@ oscar_direct_im_disconnect(od, dim); return; } else { - fu8_t cookie[8]; + guchar cookie[8]; char *who = g_strdup(dim->name); - const char *tmp = aim_odc_getcookie(dim->conn); + const guchar *tmp = aim_odc_getcookie(dim->conn); memcpy(cookie, tmp, 8); oscar_direct_im_destroy(od, dim); @@ -1498,7 +1498,7 @@ * * note that cookie is an 8 byte string that isn't NULL terminated */ -static void oscar_direct_im_initiate(GaimConnection *gc, const char *who, const char *cookie) { +static void oscar_direct_im_initiate(GaimConnection *gc, const char *who, const guchar *cookie) { OscarData *od; struct oscar_direct_im *dim; int listenfd; @@ -2141,7 +2141,7 @@ od->file_transfers = g_slist_remove(od->file_transfers, xfer); } -static void oscar_xfer_ack_recv(GaimXfer *xfer, const char *buffer, size_t size) +static void oscar_xfer_ack_recv(GaimXfer *xfer, const guchar *buffer, size_t size) { struct aim_oft_info *oft_info = xfer->data; @@ -2211,7 +2211,7 @@ od->file_transfers = g_slist_remove(od->file_transfers, xfer); } -static void oscar_xfer_ack_send(GaimXfer *xfer, const char *buffer, size_t size) +static void oscar_xfer_ack_send(GaimXfer *xfer, const guchar *buffer, size_t size) { struct aim_oft_info *oft_info = xfer->data; @@ -3188,7 +3188,7 @@ } static void gaim_check_comment(OscarData *od, const char *str) { - if ((str == NULL) || strcmp(str, ck)) + if ((str == NULL) || strcmp(str, (const char *)ck)) aim_locate_setcaps(od->sess, caps_aim); else aim_locate_setcaps(od->sess, caps_aim | AIM_CAPS_SECUREIM); @@ -3443,7 +3443,7 @@ struct stat st; if (!g_stat(iconfile, &st)) { - char *buf = g_malloc(st.st_size); + guchar *buf = g_malloc(st.st_size); file = g_fopen(iconfile, "rb"); if (file) { /* XXX - Use g_file_get_contents() */ @@ -3467,8 +3467,8 @@ message = g_string_new(""); curpart = args->mpmsg.parts; while (curpart != NULL) { - tmp = gaim_plugin_oscar_decode_im_part(account, userinfo->sn, curpart->charset, curpart->charsubset, - curpart->data, curpart->datalen); + tmp = gaim_plugin_oscar_decode_im_part(account, userinfo->sn, curpart->charset, + curpart->charsubset, curpart->data, curpart->datalen); if (tmp != NULL) { g_string_append(message, tmp); g_free(tmp); @@ -4162,7 +4162,7 @@ return 1; } -static int gaim_parse_clientauto_ch2(aim_session_t *sess, const char *who, fu16_t reason, const char *cookie) { +static int gaim_parse_clientauto_ch2(aim_session_t *sess, const char *who, fu16_t reason, const guchar *cookie) { GaimConnection *gc = sess->aux_data; OscarData *od = gc->proto_data; @@ -4237,7 +4237,7 @@ reason = (fu16_t)va_arg(ap, unsigned int); if (chan == 0x0002) { /* File transfer declined */ - char *cookie = va_arg(ap, char *); + guchar *cookie = va_arg(ap, guchar *); return gaim_parse_clientauto_ch2(sess, who, reason, cookie); } else if (chan == 0x0004) { /* ICQ message */ fu32_t state = 0; @@ -4799,7 +4799,7 @@ if (iconfile == NULL) { aim_ssi_delicon(od->sess); } else if (!g_stat(iconfile, &st)) { - char *buf = g_malloc(st.st_size); + guchar *buf = g_malloc(st.st_size); FILE *file = g_fopen(iconfile, "rb"); if (file) { /* XXX - Use g_file_get_contents()? */ @@ -5645,7 +5645,7 @@ if (iconfile && !g_stat(iconfile, &st)) { FILE *file = g_fopen(iconfile, "rb"); if (file) { - char *buf = g_malloc(st.st_size); + guchar *buf = g_malloc(st.st_size); /* XXX - Use g_file_get_contents()? */ fread(buf, 1, st.st_size, file); fclose(file); @@ -6872,7 +6872,7 @@ va_list ap; fu16_t type; fu8_t flags = 0, length = 0; - char *md5 = NULL; + guchar *md5 = NULL; va_start(ap, fr); @@ -6883,7 +6883,7 @@ case 0x0001: { flags = va_arg(ap, int); length = va_arg(ap, int); - md5 = va_arg(ap, char *); + md5 = va_arg(ap, guchar *); if (flags == 0x41) { if (!aim_getconn_type(od->sess, AIM_CONN_TYPE_ICON) && !od->iconconnecting) { @@ -6896,7 +6896,7 @@ if (iconfile == NULL) { aim_ssi_delicon(od->sess); } else if (!g_stat(iconfile, &st)) { - char *buf = g_malloc(st.st_size); + guchar *buf = g_malloc(st.st_size); FILE *file = g_fopen(iconfile, "rb"); if (file) { /* XXX - Use g_file_get_contents()? */ @@ -7427,11 +7427,11 @@ if (iconfile == NULL) { aim_ssi_delicon(od->sess); } else if (!g_stat(iconfile, &st)) { - char *buf = g_malloc(st.st_size); + guchar *buf = g_malloc(st.st_size); file = g_fopen(iconfile, "rb"); if (file) { md5_state_t *state; - char md5[16]; + guchar md5[16]; /* XXX - Use g_file_get_contents()? */ int len = fread(buf, 1, st.st_size, file); fclose(file); diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/oscar/service.c --- a/src/protocols/oscar/service.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/oscar/service.c Tue Jul 26 04:34:37 2005 +0000 @@ -161,7 +161,7 @@ redir.group = aim_tlv_get16(tlvlist, 0x000d, 1); redir.ip = aim_tlv_getstr(tlvlist, 0x0005, 1); redir.cookielen = aim_tlv_gettlv(tlvlist, 0x0006, 1)->length; - redir.cookie = aim_tlv_getstr(tlvlist, 0x0006, 1); + redir.cookie = (guchar *)aim_tlv_getstr(tlvlist, 0x0006, 1); /* Fetch original SNAC so we can get csi if needed */ origsnac = aim_remsnac(sess, snac->id); diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/oscar/tlv.c --- a/src/protocols/oscar/tlv.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/oscar/tlv.c Tue Jul 26 04:34:37 2005 +0000 @@ -92,7 +92,7 @@ return NULL; } if (cur->tlv->length > 0) { - cur->tlv->value = aimbs_getraw(bs, length); + cur->tlv->value = aimbs_getraw(bs, length); if (!cur->tlv->value) { freetlv(&cur->tlv); free(cur); @@ -646,8 +646,8 @@ } /** - * Substitute a TLV of a given type with a new TLV of the same type. If - * you attempt to replace a TLV that does not exist, this function will + * Substitute a TLV of a given type with a new TLV of the same type. If + * you attempt to replace a TLV that does not exist, this function will * just add a new TLV as if you called aim_tlvlist_add_str(). * * @param list Desination chain (%NULL pointer if empty). @@ -657,12 +657,12 @@ */ faim_internal int aim_tlvlist_replace_str(aim_tlvlist_t **list, const fu16_t type, const char *str) { - return aim_tlvlist_replace_raw(list, type, strlen(str), str); + return aim_tlvlist_replace_raw(list, type, strlen(str), (const guchar *)str); } /** - * Substitute a TLV of a given type with a new TLV of the same type. If - * you attempt to replace a TLV that does not exist, this function will + * Substitute a TLV of a given type with a new TLV of the same type. If + * you attempt to replace a TLV that does not exist, this function will * just add a new TLV as if you called aim_tlvlist_add_raw(). * * @param list Desination chain (%NULL pointer if empty). @@ -675,8 +675,8 @@ } /** - * Substitute a TLV of a given type with a new TLV of the same type. If - * you attempt to replace a TLV that does not exist, this function will + * Substitute a TLV of a given type with a new TLV of the same type. If + * you attempt to replace a TLV that does not exist, this function will * just add a new TLV as if you called aim_tlvlist_add_raw(). * * @param list Desination chain (%NULL pointer if empty). @@ -844,8 +844,8 @@ * @param list Source TLV chain. * @param type TLV type to search for. * @param nth Index of TLV to return. - * @return The value of the TLV you were looking for, or NULL if one could - * not be found. This is a dynamic buffer and must be freed by the + * @return The value of the TLV you were looking for, or NULL if one could + * not be found. This is a dynamic buffer and must be freed by the * caller. */ faim_internal char *aim_tlv_getstr(aim_tlvlist_t *list, const fu16_t type, const int nth) diff -r 2c930d591492 -r bd8ac1d4b2f2 src/protocols/yahoo/yahoo_filexfer.c --- a/src/protocols/yahoo/yahoo_filexfer.c Mon Jul 25 23:46:34 2005 +0000 +++ b/src/protocols/yahoo/yahoo_filexfer.c Tue Jul 26 04:34:37 2005 +0000 @@ -231,7 +231,7 @@ } -ssize_t yahoo_xfer_read(char **buffer, GaimXfer *xfer) +ssize_t yahoo_xfer_read(guchar **buffer, GaimXfer *xfer) { gchar buf[4096]; ssize_t len; @@ -297,7 +297,7 @@ return len; } -ssize_t yahoo_xfer_write(const char *buffer, size_t size, GaimXfer *xfer) +ssize_t yahoo_xfer_write(const guchar *buffer, size_t size, GaimXfer *xfer) { ssize_t len; struct yahoo_xfer_data *xd = xfer->data;