Mercurial > pidgin.yaz
changeset 12151:de798f2f4bf1
[gaim-migrate @ 14452]
Sort out the ft.h include situation. I changed from ssize_t to gssize in the file transfer stuff.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 19 Nov 2005 03:16:49 +0000 |
parents | e91f3f06a435 |
children | cda86ce5b026 |
files | plugins/ChangeLog.API src/ft.c src/ft.h src/protocols/irc/dcc_send.c src/protocols/jabber/oob.c src/protocols/yahoo/yahoo_filexfer.c src/protocols/yahoo/yahoo_filexfer.h |
diffstat | 7 files changed, 28 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/ChangeLog.API Sat Nov 19 02:08:39 2005 +0000 +++ b/plugins/ChangeLog.API Sat Nov 19 03:16:49 2005 +0000 @@ -52,6 +52,9 @@ secondary parameters * Idle timers are now added and removed in gtkidle.c in response to the signed-on and signed-off signals + * GaimXfer->ops.read, GaimXfer->ops.write, gaim_xfer_set_read_fnc(), + gaim_xfer_set_write_fnc(), gaim_xfer_read(), gaim_xfer_write(): + Changed ssize_t to gssize Removed: * gaim_gtk_sound_{get,set}_mute() (replaced by the /gaim/gtk/sound/mute
--- a/src/ft.c Sat Nov 19 02:08:39 2005 +0000 +++ b/src/ft.c Sat Nov 19 03:16:49 2005 +0000 @@ -693,7 +693,7 @@ } void -gaim_xfer_set_read_fnc(GaimXfer *xfer, ssize_t (*fnc)(guchar **, GaimXfer *)) +gaim_xfer_set_read_fnc(GaimXfer *xfer, gssize (*fnc)(guchar **, GaimXfer *)) { g_return_if_fail(xfer != NULL); @@ -702,7 +702,7 @@ void gaim_xfer_set_write_fnc(GaimXfer *xfer, - ssize_t (*fnc)(const guchar *, size_t, GaimXfer *)) + gssize (*fnc)(const guchar *, size_t, GaimXfer *)) { g_return_if_fail(xfer != NULL); @@ -750,10 +750,10 @@ xfer->ops.cancel_recv = fnc; } -ssize_t +gssize gaim_xfer_read(GaimXfer *xfer, guchar **buffer) { - ssize_t s, r; + gssize s, r; g_return_val_if_fail(xfer != NULL, 0); g_return_val_if_fail(buffer != NULL, 0); @@ -779,10 +779,10 @@ return r; } -ssize_t +gssize gaim_xfer_write(GaimXfer *xfer, const guchar *buffer, size_t size) { - ssize_t r, s; + gssize r, s; g_return_val_if_fail(xfer != NULL, 0); g_return_val_if_fail(buffer != NULL, 0); @@ -807,7 +807,7 @@ GaimXferUiOps *ui_ops; GaimXfer *xfer = (GaimXfer *)data; guchar *buffer = NULL; - ssize_t r = 0; + gssize r = 0; if (condition & GAIM_INPUT_READ) { r = gaim_xfer_read(xfer, &buffer);
--- a/src/ft.h Sat Nov 19 02:08:39 2005 +0000 +++ b/src/ft.h Sat Nov 19 03:16:49 2005 +0000 @@ -30,8 +30,10 @@ /**************************************************************************/ typedef struct _GaimXfer GaimXfer; +#include <glib.h> +#include <stdio.h> + #include "account.h" -#include "internal.h" /** * Types of file transfers. @@ -116,8 +118,8 @@ void (*end)(GaimXfer *xfer); void (*cancel_send)(GaimXfer *xfer); void (*cancel_recv)(GaimXfer *xfer); - ssize_t (*read)(guchar **buffer, GaimXfer *xfer); - ssize_t (*write)(const guchar *buffer, size_t size, GaimXfer *xfer); + gssize (*read)(guchar **buffer, GaimXfer *xfer); + gssize (*write)(const guchar *buffer, size_t size, GaimXfer *xfer); void (*ack)(GaimXfer *xfer, const guchar *buffer, size_t size); } ops; @@ -382,7 +384,7 @@ * @param fnc The read function. */ void gaim_xfer_set_read_fnc(GaimXfer *xfer, - ssize_t (*fnc)(guchar **, GaimXfer *)); + gssize (*fnc)(guchar **, GaimXfer *)); /** * Sets the write function for the file transfer. @@ -391,7 +393,7 @@ * @param fnc The write function. */ void gaim_xfer_set_write_fnc(GaimXfer *xfer, - ssize_t (*fnc)(const guchar *, size_t, GaimXfer *)); + gssize (*fnc)(const guchar *, size_t, GaimXfer *)); /** * Sets the acknowledge function for the file transfer. @@ -462,7 +464,7 @@ * * @return The number of bytes read, or -1. */ -ssize_t gaim_xfer_read(GaimXfer *xfer, guchar **buffer); +gssize gaim_xfer_read(GaimXfer *xfer, guchar **buffer); /** * Writes data to a file transfer stream. @@ -473,7 +475,7 @@ * * @return The number of bytes written, or -1. */ -ssize_t gaim_xfer_write(GaimXfer *xfer, const guchar *buffer, size_t size); +gssize gaim_xfer_write(GaimXfer *xfer, const guchar *buffer, gsize size); /** * Starts a file transfer.
--- a/src/protocols/irc/dcc_send.c Sat Nov 19 02:08:39 2005 +0000 +++ b/src/protocols/irc/dcc_send.c Sat Nov 19 03:16:49 2005 +0000 @@ -214,9 +214,9 @@ } } -ssize_t irc_dccsend_send_write(const guchar *buffer, size_t size, GaimXfer *xfer) +gssize irc_dccsend_send_write(const guchar *buffer, size_t size, GaimXfer *xfer) { - ssize_t s; + gssize s; s = MIN(gaim_xfer_get_bytes_remaining(xfer), size); if (!s)
--- a/src/protocols/jabber/oob.c Sat Nov 19 02:08:39 2005 +0000 +++ b/src/protocols/jabber/oob.c Sat Nov 19 03:16:49 2005 +0000 @@ -85,7 +85,7 @@ g_free(buf); } -static ssize_t jabber_oob_xfer_read(guchar **buffer, GaimXfer *xfer) { +static gssize jabber_oob_xfer_read(guchar **buffer, GaimXfer *xfer) { JabberOOBXfer *jox = xfer->data; char test; int size;
--- a/src/protocols/yahoo/yahoo_filexfer.c Sat Nov 19 02:08:39 2005 +0000 +++ b/src/protocols/yahoo/yahoo_filexfer.c Sat Nov 19 03:16:49 2005 +0000 @@ -226,10 +226,10 @@ return 0; } -ssize_t yahoo_xfer_read(guchar **buffer, GaimXfer *xfer) +gssize yahoo_xfer_read(guchar **buffer, GaimXfer *xfer) { gchar buf[4096]; - ssize_t len; + gssize len; gchar *start = NULL; gchar *length; gchar *end; @@ -291,9 +291,9 @@ return len; } -ssize_t yahoo_xfer_write(const guchar *buffer, size_t size, GaimXfer *xfer) +gssize yahoo_xfer_write(const guchar *buffer, size_t size, GaimXfer *xfer) { - ssize_t len; + gssize len; struct yahoo_xfer_data *xd = xfer->data; if (!xd)
--- a/src/protocols/yahoo/yahoo_filexfer.h Sat Nov 19 02:08:39 2005 +0000 +++ b/src/protocols/yahoo/yahoo_filexfer.h Sat Nov 19 03:16:49 2005 +0000 @@ -20,6 +20,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "ft.h" + /** * Process ymsg events, particular IMViroments like Doodle */