Mercurial > pidgin.yaz
changeset 28226:dad4cb8f81df
Fix building on win32, which has #define write wpurple_write (and similar for read).
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 12 Aug 2009 07:36:51 +0000 |
parents | 22ae131b8a0c |
children | 359800ae7d17 |
files | libpurple/ft.c libpurple/ft.h |
diffstat | 2 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/ft.c Wed Aug 12 05:51:51 2009 +0000 +++ b/libpurple/ft.c Wed Aug 12 07:36:51 2009 +0000 @@ -537,7 +537,7 @@ return; } - if (ui_ops == NULL || (ui_ops->read == NULL && ui_ops->write == NULL)) { + if (ui_ops == NULL || (ui_ops->ui_read == NULL && ui_ops->ui_write == NULL)) { if (g_stat(filename, &st) == -1) { purple_xfer_show_file_error(xfer, filename); purple_xfer_unref(xfer); @@ -993,8 +993,8 @@ r = purple_xfer_read(xfer, &buffer); if (r > 0) { size_t wc; - if (ui_ops && ui_ops->write) - wc = ui_ops->write(xfer, buffer, r); + if (ui_ops && ui_ops->ui_write) + wc = ui_ops->ui_write(xfer, buffer, r); else wc = fwrite(buffer, 1, r, xfer->dest_fp); @@ -1023,8 +1023,8 @@ return; } - if (ui_ops && ui_ops->read) { - gssize tmp = ui_ops->read(xfer, &buffer, s); + if (ui_ops && ui_ops->ui_read) { + gssize tmp = ui_ops->ui_read(xfer, &buffer, s); if (tmp == 0) { /* * UI isn't ready to send data. It will call @@ -1063,7 +1063,7 @@ g_free(buffer); return; } else if (r < result) { - if (ui_ops == NULL || (ui_ops->read == NULL && ui_ops->write == NULL)) { + if (ui_ops == NULL || (ui_ops->ui_read == NULL && ui_ops->ui_write == NULL)) { /* We have to seek back in the file now. */ fseek(xfer->dest_fp, r - s, SEEK_CUR); } @@ -1126,7 +1126,7 @@ PurpleXferType type = purple_xfer_get_type(xfer); PurpleXferUiOps *ui_ops = purple_xfer_get_ui_ops(xfer); - if (ui_ops == NULL || (ui_ops->read == NULL && ui_ops->write == NULL)) { + if (ui_ops == NULL || (ui_ops->ui_read == NULL && ui_ops->ui_write == NULL)) { xfer->dest_fp = g_fopen(purple_xfer_get_local_filename(xfer), type == PURPLE_XFER_RECEIVE ? "wb" : "rb");
--- a/libpurple/ft.h Wed Aug 12 05:51:51 2009 +0000 +++ b/libpurple/ft.h Wed Aug 12 07:36:51 2009 +0000 @@ -89,7 +89,7 @@ * size on error. * @since 2.6.0 */ - gssize (*write)(PurpleXfer *xfer, const guchar *buffer, gssize size); + gssize (*ui_write)(PurpleXfer *xfer, const guchar *buffer, gssize size); /** * UI op to read data to send to the prpl for a file transfer. @@ -104,7 +104,7 @@ * should be cancelled (libpurple will cancel). * @since 2.6.0 */ - gssize (*read)(PurpleXfer *xfer, guchar **buffer, gssize size); + gssize (*ui_read)(PurpleXfer *xfer, guchar **buffer, gssize size); /** * Op to notify the UI that not all the data read in was written. The UI