From f830d3f686b793d084ea0b725026c2d6d3f39bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 13 Dec 2007 19:05:32 +0100 Subject: Make _x_io_(file|tcp)_(write|read) accept a void* parameter. --- src/xine-engine/io_helper.c | 11 ++++++----- src/xine-engine/io_helper.h | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/xine-engine/io_helper.c b/src/xine-engine/io_helper.c index c3654c762..b51442402 100644 --- a/src/xine-engine/io_helper.c +++ b/src/xine-engine/io_helper.c @@ -324,7 +324,8 @@ int _x_io_tcp_connect_finish(xine_stream_t *stream, int fd, int timeout_msec) { } -static off_t xio_rw_abort(xine_stream_t *stream, int fd, int cmd, char *buf, off_t todo) { +static off_t xio_rw_abort(xine_stream_t *stream, int fd, int cmd, void *buf_gen, off_t todo) { + uint8_t *buf = buf_gen; off_t ret = -1; off_t total = 0; @@ -411,19 +412,19 @@ static off_t xio_rw_abort(xine_stream_t *stream, int fd, int cmd, char *buf, off return total; } -off_t _x_io_tcp_read (xine_stream_t *stream, int s, char *buf, off_t todo) { +off_t _x_io_tcp_read (xine_stream_t *stream, int s, void *buf, off_t todo) { return xio_rw_abort (stream, s, XIO_TCP_READ, buf, todo); } -off_t _x_io_tcp_write (xine_stream_t *stream, int s, char *buf, off_t todo) { +off_t _x_io_tcp_write (xine_stream_t *stream, int s, void *buf, off_t todo) { return xio_rw_abort (stream, s, XIO_TCP_WRITE, buf, todo); } -off_t _x_io_file_read (xine_stream_t *stream, int s, char *buf, off_t todo) { +off_t _x_io_file_read (xine_stream_t *stream, int s, void *buf, off_t todo) { return xio_rw_abort (stream, s, XIO_FILE_READ, buf, todo); } -off_t _x_io_file_write (xine_stream_t *stream, int s, char *buf, off_t todo) { +off_t _x_io_file_write (xine_stream_t *stream, int s, void *buf, off_t todo) { return xio_rw_abort (stream, s, XIO_FILE_WRITE, buf, todo); } diff --git a/src/xine-engine/io_helper.h b/src/xine-engine/io_helper.h index 3e96e8dc1..0aac8fcfc 100644 --- a/src/xine-engine/io_helper.h +++ b/src/xine-engine/io_helper.h @@ -97,7 +97,7 @@ int _x_io_tcp_connect_finish(xine_stream_t *stream, int fd, int timeout_msec) XI * * aborts with zero if no data is available and *abort is set */ -off_t _x_io_tcp_read (xine_stream_t *stream, int s, char *buf, off_t todo) XINE_PROTECTED; +off_t _x_io_tcp_read (xine_stream_t *stream, int s, void *buf, off_t todo) XINE_PROTECTED; /* @@ -108,7 +108,7 @@ off_t _x_io_tcp_read (xine_stream_t *stream, int s, char *buf, off_t todo) XINE_ * * aborts with zero if no data is available and *abort is set */ -off_t _x_io_tcp_write (xine_stream_t *stream, int s, char *buf, off_t todo) XINE_PROTECTED; +off_t _x_io_tcp_write (xine_stream_t *stream, int s, void *buf, off_t todo) XINE_PROTECTED; /* * read from a file descriptor checking demux_action_pending @@ -118,7 +118,7 @@ off_t _x_io_tcp_write (xine_stream_t *stream, int s, char *buf, off_t todo) XINE * * aborts with zero if no data is available and *abort is set */ -off_t _x_io_file_read (xine_stream_t *stream, int fd, char *buf, off_t todo) XINE_PROTECTED; +off_t _x_io_file_read (xine_stream_t *stream, int fd, void *buf, off_t todo) XINE_PROTECTED; /* @@ -129,7 +129,7 @@ off_t _x_io_file_read (xine_stream_t *stream, int fd, char *buf, off_t todo) XIN * * aborts with zero if *abort is set */ -off_t _x_io_file_write (xine_stream_t *stream, int fd, char *buf, off_t todo) XINE_PROTECTED; +off_t _x_io_file_write (xine_stream_t *stream, int fd, void *buf, off_t todo) XINE_PROTECTED; /* * read a string from socket, return string length (same as strlen) -- cgit v1.2.3