# HG changeset patch # User Nathan Walp # Date 1069744571 0 # Node ID ea2d07ad05a975218d1490aed375d6b404345389 # Parent 2df4d470c12a592d6ae46f8d39a354d6a1ffb18f [gaim-migrate @ 8255] long car rides and a power inverter can generate some interesting code tweaks committer: Tailor Script diff -r 2df4d470c12a -r ea2d07ad05a9 .todo --- a/.todo Tue Nov 25 06:56:44 2003 +0000 +++ b/.todo Tue Nov 25 07:16:11 2003 +0000 @@ -109,9 +109,6 @@ icq - - jabber - msn diff -r 2df4d470c12a -r ea2d07ad05a9 plugins/gaim-remote/remote.c --- a/plugins/gaim-remote/remote.c Tue Nov 25 06:56:44 2003 +0000 +++ b/plugins/gaim-remote/remote.c Tue Nov 25 07:16:11 2003 +0000 @@ -501,7 +501,7 @@ gchar type; gchar subtype; - guint32 len; + gint len; GError *error = NULL; diff -r 2df4d470c12a -r ea2d07ad05a9 plugins/gestures/gstroke.h --- a/plugins/gestures/gstroke.h Tue Nov 25 06:56:44 2003 +0000 +++ b/plugins/gestures/gstroke.h Tue Nov 25 07:16:11 2003 +0000 @@ -28,7 +28,7 @@ gboolean gstroke_draw_strokes(void); void gstroke_set_mouse_button(gint button); -int gstroke_get_mouse_button(void); +guint gstroke_get_mouse_button(void); /* enable strokes for the widget */ void gstroke_enable (GtkWidget *widget); diff -r 2df4d470c12a -r ea2d07ad05a9 plugins/gestures/stroke-draw.c --- a/plugins/gestures/stroke-draw.c Tue Nov 25 06:56:44 2003 +0000 +++ b/plugins/gestures/stroke-draw.c Tue Nov 25 07:16:11 2003 +0000 @@ -202,7 +202,7 @@ mouse_button = button; } -int +guint gstroke_get_mouse_button(void) { return mouse_button; diff -r 2df4d470c12a -r ea2d07ad05a9 plugins/spellchk.c --- a/plugins/spellchk.c Tue Nov 25 06:56:44 2003 +0000 +++ b/plugins/spellchk.c Tue Nov 25 07:16:11 2003 +0000 @@ -140,7 +140,7 @@ static int num_words(const char *m) { int count = 0; - int pos; + guint pos; int state = 0; for (pos = 0; pos < strlen(m); pos++) { @@ -169,7 +169,7 @@ static int get_word(char *m, int word) { int count = 0; - int pos = 0; + guint pos = 0; int state = 0; for (pos = 0; pos < strlen(m) && count <= word; pos++) { diff -r 2df4d470c12a -r ea2d07ad05a9 plugins/ssl/ssl-gnutls.c --- a/plugins/ssl/ssl-gnutls.c Tue Nov 25 06:56:44 2003 +0000 +++ b/plugins/ssl/ssl-gnutls.c Tue Nov 25 07:16:11 2003 +0000 @@ -144,9 +144,6 @@ if(gnutls_data) s = gnutls_record_send(gnutls_data->session, data, len); - if (s < 0) - s = 0; - return s; } diff -r 2df4d470c12a -r ea2d07ad05a9 plugins/ticker/gtkticker.h --- a/plugins/ticker/gtkticker.h Tue Nov 25 06:56:44 2003 +0000 +++ b/plugins/ticker/gtkticker.h Tue Nov 25 07:16:11 2003 +0000 @@ -51,11 +51,11 @@ { GtkContainer container; guint interval; /* how often to scootch */ - guint spacing; /* inter-child horizontal spacing */ + gint spacing; /* inter-child horizontal spacing */ guint scootch; /* how many pixels to move each scootch */ gint timer; /* timer object */ - guint total; /* total width of widgets */ - guint width; /* width of containing window */ + gint total; /* total width of widgets */ + gint width; /* width of containing window */ gboolean dirty; GList *children; }; diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/gg/gg.c --- a/src/protocols/gg/gg.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/gg/gg.c Tue Nov 25 07:16:11 2003 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 8091 2003-11-11 20:34:00Z hermanator $ + * $Id: gg.c 8255 2003-11-25 07:16:11Z faceprint $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz * @@ -86,7 +86,7 @@ static gboolean invalid_uin(const char *uin) { unsigned long int res = strtol(uin, (char **)NULL, 10); - if (res == LONG_MIN || res == LONG_MAX || res == 0) + if (res == ULONG_MAX || res == 0) return TRUE; return FALSE; } diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/irc/parse.c --- a/src/protocols/irc/parse.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/irc/parse.c Tue Nov 25 07:16:11 2003 +0000 @@ -127,7 +127,7 @@ { "voice", ":", irc_cmd_op }, { "wallops", ":", irc_cmd_wallops }, { "whois", "n", irc_cmd_whois }, - { NULL, NULL } + { NULL, NULL, NULL } }; static char *irc_send_convert(struct irc_conn *irc, const char *string) @@ -380,7 +380,7 @@ { struct _irc_msg *msgent; char *cur, *end, *tmp, *from, *msgname, *fmt, **args, *msg; - int i; + guint i; if (!strncmp(input, "PING ", 5)) { msg = irc_format(irc, "vv", "PONG", input + 5); @@ -461,7 +461,8 @@ const char *cur, *end, *fmt; char *tmp, *cmd, **args; struct _irc_user_cmd *cmdent; - int i, ret; + guint i; + int ret; cur = cmdstr; end = strchr(cmdstr, ' '); diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/msn/session.h --- a/src/protocols/msn/session.h Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/msn/session.h Tue Nov 25 07:16:11 2003 +0000 @@ -37,7 +37,7 @@ MsnUser *user; char *away_state; - int protocol_ver; + guint protocol_ver; char *dispatch_server; int dispatch_port; diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/msn/state.c --- a/src/protocols/msn/state.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/msn/state.c Tue Nov 25 07:16:11 2003 +0000 @@ -39,7 +39,7 @@ const char * msn_away_get_text(MsnAwayType type) { - g_return_val_if_fail(type >= 0 && type <= MSN_HIDDEN, NULL); + g_return_val_if_fail(type <= MSN_HIDDEN, NULL); return _(away_text[type]); } diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/oscar/aim_internal.h --- a/src/protocols/oscar/aim_internal.h Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/oscar/aim_internal.h Tue Nov 25 07:16:11 2003 +0000 @@ -68,7 +68,7 @@ faim_internal int aim_bstream_init(aim_bstream_t *bs, fu8_t *data, int len); faim_internal int aim_bstream_empty(aim_bstream_t *bs); faim_internal int aim_bstream_curpos(aim_bstream_t *bs); -faim_internal int aim_bstream_setpos(aim_bstream_t *bs, int off); +faim_internal int aim_bstream_setpos(aim_bstream_t *bs, unsigned int off); faim_internal void aim_bstream_rewind(aim_bstream_t *bs); faim_internal int aim_bstream_advance(aim_bstream_t *bs, int n); faim_internal fu8_t aimbs_get8(aim_bstream_t *bs); diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/oscar/auth.c --- a/src/protocols/oscar/auth.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/oscar/auth.c Tue Nov 25 07:16:11 2003 +0000 @@ -45,7 +45,7 @@ 0x53, 0x7a, 0x95, 0x7c #endif }; - int i; + unsigned int i; for (i = 0; i < strlen(password); i++) encoded[i] = (password[i] ^ encoding_table[i]); diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/oscar/bstream.c --- a/src/protocols/oscar/bstream.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/oscar/bstream.c Tue Nov 25 07:16:11 2003 +0000 @@ -30,7 +30,7 @@ return bs->offset; } -faim_internal int aim_bstream_setpos(aim_bstream_t *bs, int off) +faim_internal int aim_bstream_setpos(aim_bstream_t *bs, unsigned int off) { if (off > bs->len) diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/oscar/oscar.c Tue Nov 25 07:16:11 2003 +0000 @@ -2716,7 +2716,7 @@ } break; case 0x13: { /* Someone has sent you some ICQ buddies */ - int i, num; + guint i, num; gchar **text; text = g_strsplit(args->msg, "\376", 0); if (text) { @@ -5346,7 +5346,7 @@ GaimConversation *b = NULL; struct chat_connection *c = NULL; char *buf, *buf2; - int i, j; + guint i, j; while (bcs) { b = (GaimConversation *)bcs->data; diff -r 2df4d470c12a -r ea2d07ad05a9 src/protocols/yahoo/yahoo.c --- a/src/protocols/yahoo/yahoo.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/protocols/yahoo/yahoo.c Tue Nov 25 07:16:11 2003 +0000 @@ -2107,8 +2107,6 @@ default: return g_strdup(yahoo_get_status_string(f->status)); } - - return NULL; } static char *yahoo_tooltip_text(GaimBuddy *b) diff -r 2df4d470c12a -r ea2d07ad05a9 src/prpl.c --- a/src/prpl.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/prpl.c Tue Nov 25 07:16:11 2003 +0000 @@ -97,7 +97,7 @@ return NULL; } -void gaim_prpl_ask_send_file (GaimConnection *gc, char *name) +void gaim_prpl_ask_send_file (GaimConnection *gc, const char *name) { GaimPluginProtocolInfo *prpl_info = NULL; @@ -105,13 +105,13 @@ prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl); if (prpl_info->has_send_file == NULL || prpl_info->send_file == NULL) - return FALSE; + return; prpl_info->ask_send_file(gc, name); } -gboolean gaim_prpl_has_send_file (GaimConnection *gc, char *name) +gboolean gaim_prpl_has_send_file (GaimConnection *gc, const char *name) { GaimPluginProtocolInfo *prpl_info = NULL; diff -r 2df4d470c12a -r ea2d07ad05a9 src/prpl.h --- a/src/prpl.h Tue Nov 25 06:56:44 2003 +0000 +++ b/src/prpl.h Tue Nov 25 07:16:11 2003 +0000 @@ -363,7 +363,7 @@ * @param gc The Gaim Connection to send the file trough; * @param name The screen name of the one we are sending the file; */ -void gaim_prpl_ask_send_file (GaimConnection *gc, char *name); +void gaim_prpl_ask_send_file (GaimConnection *gc, const char *name); /** * Checks if a given user supports file sends @@ -372,7 +372,7 @@ * @param name The screen name of the one we are sending the file; * @return TRUE if we can send files to this user, FALSE otherwise. */ -gboolean gaim_prpl_has_send_file (GaimConnection *gc, char *name); +gboolean gaim_prpl_has_send_file (GaimConnection *gc, const char *name); #ifdef __cplusplus } diff -r 2df4d470c12a -r ea2d07ad05a9 src/util.c --- a/src/util.c Tue Nov 25 06:56:44 2003 +0000 +++ b/src/util.c Tue Nov 25 07:16:11 2003 +0000 @@ -1556,7 +1556,8 @@ gaim_str_add_cr(const char *text) { char *ret = NULL; - int count = 0, i, j; + int count = 0, j; + guint i; g_return_val_if_fail(text != NULL, NULL); @@ -2057,7 +2058,7 @@ gaim_url_decode(const char *str) { static char buf[BUF_LEN]; - int i, j = 0; + guint i, j = 0; char *bum; g_return_val_if_fail(str != NULL, NULL); @@ -2094,7 +2095,7 @@ gaim_url_encode(const char *str) { static char buf[BUF_LEN]; - int i, j = 0; + guint i, j = 0; g_return_val_if_fail(str != NULL, NULL);