diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-13 19:05:32 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-13 19:05:32 +0100 |
commit | f830d3f686b793d084ea0b725026c2d6d3f39bce (patch) | |
tree | 55f5b6799b036dc46f878d2ca66c6c3a47182757 | |
parent | bb7bafd782ec1d32cf47797a9bfd597181ff18c4 (diff) | |
download | xine-lib-f830d3f686b793d084ea0b725026c2d6d3f39bce.tar.gz xine-lib-f830d3f686b793d084ea0b725026c2d6d3f39bce.tar.bz2 |
Make _x_io_(file|tcp)_(write|read) accept a void* parameter.
-rw-r--r-- | src/xine-engine/io_helper.c | 11 | ||||
-rw-r--r-- | 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) |