pidgin: 235259ea: Fix building on win32, which has #define...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Wed Aug 12 03:40:37 EDT 2009
-----------------------------------------------------------------
Revision: 235259eaef44e8bacfe07e83eb5c66ddd4887ace
Ancestor: 4d826f39a9a7e9be09284e2f25a11f75aa9b87f1
Author: darkrain42 at pidgin.im
Date: 2009-08-12T07:36:51
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/235259eaef44e8bacfe07e83eb5c66ddd4887ace
Modified files:
libpurple/ft.c libpurple/ft.h
ChangeLog:
Fix building on win32, which has #define write wpurple_write (and similar for read).
-------------- next part --------------
============================================================
--- libpurple/ft.c 3f729c170caca25e0b9284b474742fe30bf5c35b
+++ libpurple/ft.c 0b75c2b2b36c61bbc68e0843518cf1a00e708d81
@@ -537,7 +537,7 @@ purple_xfer_request_accepted(PurpleXfer
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 @@ do_transfer(PurpleXfer *xfer)
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 @@ do_transfer(PurpleXfer *xfer)
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 @@ do_transfer(PurpleXfer *xfer)
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 @@ begin_transfer(PurpleXfer *xfer, PurpleI
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");
============================================================
--- libpurple/ft.h 8d4d3387e1bbbcde694d536ff749cf155fb94c64
+++ libpurple/ft.h 3e5c64188c251300aa037022b1f0ea825314f548
@@ -89,7 +89,7 @@ typedef struct
* 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 @@ typedef struct
* 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
More information about the Commits
mailing list