From 2866997d04d9d314869cb757a7cec2f7d4c830a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Fri, 17 Sep 2004 19:21:33 +0000 Subject: Warning patch for Win32 - casted off_t to intmax_t for printing. CVS patchset: 6979 CVS date: 2004/09/17 19:21:33 --- src/demuxers/demux_avi.c | 22 ++++++++------------- src/demuxers/demux_film.c | 6 +++--- src/demuxers/demux_flv.c | 11 ++++++----- src/demuxers/demux_matroska.c | 25 ++++++++++++++--------- src/demuxers/ebml.c | 16 ++++++++------- src/input/input_gnome_vfs.c | 4 ++-- src/input/input_http.c | 14 +++++++------ src/input/input_net.c | 46 +++++++++++++++++++++---------------------- src/input/input_pnm.c | 3 ++- src/input/input_stdin_fifo.c | 5 +++-- src/xine-engine/input_rip.c | 28 +++++++++++++------------- 11 files changed, 94 insertions(+), 86 deletions(-) diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 3017343bc..635a11aea 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.c @@ -19,7 +19,7 @@ */ /* - * $Id: demux_avi.c,v 1.207 2004/07/04 21:27:23 mroi Exp $ + * $Id: demux_avi.c,v 1.208 2004/09/17 19:21:33 valtri Exp $ * * demultiplexer for avi streams * @@ -639,9 +639,7 @@ static int idx_grow(demux_avi_t *this, int (*stopper)(demux_avi_t *, void *), } } if (!valid_chunk) { - xine_log (this->stream->xine, XINE_LOG_MSG, - _("demux_avi: invalid avi chunk \"%c%c%c%c\" at pos %lld\n"), - data[0], data[1], data[2], data[3], chunk_pos); + xine_log(this->stream->xine, XINE_LOG_MSG, _("demux_avi: invalid avi chunk \"%c%c%c%c\" at pos %" PRIiMAX "\n"), data[0], data[1], data[2], data[3], (intmax_t)chunk_pos); } chunk_pos = this->input->seek(this->input, this->idx_grow.nexttagoffset, SEEK_SET); if (chunk_pos != this->idx_grow.nexttagoffset) { @@ -784,8 +782,7 @@ static avi_t *AVI_init(demux_avi_t *this) { this->idx_grow.nexttagoffset = this->input->get_current_pos(this->input); if (this->input->read(this->input, data,8) != 8 ) { - xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "failed to read 8 bytes at pos %lld\n", - this->idx_grow.nexttagoffset); + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, "failed to read 8 bytes at pos %" PRIiMAX "\n", (intmax_t)this->idx_grow.nexttagoffset); break; /* We assume it's EOF */ } @@ -849,9 +846,7 @@ static avi_t *AVI_init(demux_avi_t *this) { } } if (next_chunk != this->input->seek(this->input, next_chunk, SEEK_SET)) { - xine_log (this->stream->xine, XINE_LOG_MSG, - _("demux_avi: failed to seek to the next chunk (pos %lld)\n"), - next_chunk); + xine_log (this->stream->xine, XINE_LOG_MSG, _("demux_avi: failed to seek to the next chunk (pos %" PRIiMAX ")\n"), (intmax_t)next_chunk); break; /* probably slow seek */ } } @@ -1691,9 +1686,7 @@ static int get_chunk_header(demux_avi_t *this, uint32_t *len, int *audio_stream) return AVI_HEADER_AUDIO; } } - xine_log (this->stream->xine, XINE_LOG_MSG, - _("demux_avi: invalid avi chunk \"%c%c%c%c\" at pos %lld\n"), - data[0], data[1], data[2], data[3], this->input->get_current_pos(this->input)); + xine_log (this->stream->xine, XINE_LOG_MSG, _("demux_avi: invalid avi chunk \"%c%c%c%c\" at pos %" PRIiMAX "\n"), data[0], data[1], data[2], data[3], (intmax_t)this->input->get_current_pos(this->input)); return AVI_HEADER_UNKNOWN; } /* unreachable code */ @@ -2080,8 +2073,9 @@ static int demux_avi_seek_internal (demux_avi_t *this) { * seek to start pos / time */ - xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, - "start pos is %lld, start time is %d\n",start_pos, start_time); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, + "start pos is %" PRIiMAX ", start time is %d\n", (intmax_t)start_pos, + start_time); /* Seek video. We do a single idx_grow at the beginning rather than * incrementally growing the index in a loop, so that if the index diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index 762c243f2..d7a1b8205 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -21,7 +21,7 @@ * For more information on the FILM file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_film.c,v 1.76 2004/06/13 21:28:52 miguelfreitas Exp $ + * $Id: demux_film.c,v 1.77 2004/09/17 19:21:34 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -311,9 +311,9 @@ static int open_film_file(demux_film_t *film) { if (film->sample_table[j].pts > largest_pts) largest_pts = film->sample_table[j].pts; - llprintf(DEBUG_FILM_LOAD, "sample %4d @ %8llX, %8X bytes, %s, pts %lld, duration %lld%s\n", + llprintf(DEBUG_FILM_LOAD, "sample %4d @ %8" PRIXMAX ", %8X bytes, %s, pts %lld, duration %lld%s\n", j, - film->sample_table[j].sample_offset, + (intmax_t)film->sample_table[j].sample_offset, film->sample_table[j].sample_size, (film->sample_table[j].audio) ? "audio" : "video", film->sample_table[j].pts, diff --git a/src/demuxers/demux_flv.c b/src/demuxers/demux_flv.c index c9eba89ce..3f09d2b73 100644 --- a/src/demuxers/demux_flv.c +++ b/src/demuxers/demux_flv.c @@ -24,7 +24,7 @@ * For more information on the FLV file format, visit: * http://download.macromedia.com/pub/flash/flash_file_format_specification.pdf * - * $Id: demux_flv.c,v 1.3 2004/06/13 21:28:53 miguelfreitas Exp $ + * $Id: demux_flv.c,v 1.4 2004/09/17 19:21:34 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -99,7 +99,8 @@ static int open_flv_file(demux_flv_t *this) { first_offset = BE_32(buffer); this->input->seek(this->input, first_offset, SEEK_SET); -printf (" qualified FLV file, repositioned @ offset 0x%llX\n", first_offset); + lprintf(" qualified FLV file, repositioned @ offset 0x%" PRIXMAX "\n", + (intmax_t)first_offset); return 1; } @@ -114,7 +115,7 @@ static int demux_flv_send_chunk(demux_plugin_t *this_gen) { unsigned char buffer[12]; -printf (" sending FLV chunk...\n"); + lprintf (" sending FLV chunk...\n"); this->input->seek(this->input, 4, SEEK_CUR); if (this->input->read(this->input, buffer, 12) != 12) { this->status = DEMUX_FINISHED; @@ -131,8 +132,8 @@ printf (" sending FLV chunk...\n"); /* Flash timestamps are in milliseconds; multiply by 90 to get xine pts */ pts *= 90; -printf (" chunk_type = %X, 0x%X -1 bytes, pts %lld, sub-type = %X\n", - chunk_type, remaining_bytes, pts, sub_type); + lprintf (" chunk_type = %X, 0x%X -1 bytes, pts %lld, sub-type = %X\n", + chunk_type, remaining_bytes, pts, sub_type); /* only handle the chunk right now if chunk type is 9 and lower nibble * of sub-type is 2 */ diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index e37fc81e3..6df061197 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_matroska.c,v 1.30 2004/08/27 21:07:31 miguelfreitas Exp $ + * $Id: demux_matroska.c,v 1.31 2004/09/17 19:21:34 valtri Exp $ * * demultiplexer for matroska streams * @@ -1448,8 +1448,9 @@ static int parse_ebml_uint(demux_matroska_t *this, uint8_t *data, uint64_t *num) } if (size > 8) { off_t pos = this->input->get_current_pos(this->input); - xprintf(this->stream->xine, XINE_VERBOSITY_LOG, - "demux_matroska: Invalid Track Number at position %llu\n", pos); + xprintf(this->stream->xine, XINE_VERBOSITY_LOG, + "demux_matroska: Invalid Track Number at position %" PRIiMAX "\n", + (intmax_t)pos); return 0; } @@ -1502,7 +1503,8 @@ static int read_block_data (demux_matroska_t *this, int len) { if (this->input->read(this->input, this->block_data, len) != len) { off_t pos = this->input->get_current_pos(this->input); xprintf(this->stream->xine, XINE_VERBOSITY_LOG, - "demux_matroska: read error at position %llu\n", pos); + "demux_matroska: read error at position %" PRIiMAX "\n", + (intmax_t)pos); return 0; } return 1; @@ -1871,7 +1873,8 @@ static int parse_seek_entry(demux_matroska_t *this) { this->ebml->level = 1; if (this->input->seek(this->input, seek_pos, SEEK_SET) < 0) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "demux_matroska: failed to seek to pos: %lld\n", seek_pos); + "demux_matroska: failed to seek to pos: %" PRIiMAX "\n", + (intmax_t)seek_pos); return 0; } if (!parse_top_level_head(this, &next_level)) @@ -1881,12 +1884,14 @@ static int parse_seek_entry(demux_matroska_t *this) { memcpy(this->ebml, &ebml_bak, sizeof(ebml_parser_t)); /* FIXME */ if (this->input->seek(this->input, current_pos, SEEK_SET) < 0) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "demux_matroska: failed to seek to pos: %lld\n", current_pos); + "demux_matroska: failed to seek to pos: %" PRIiMAX "\n", + (intmax_t)current_pos); return 0; } } else { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "demux_matroska: out of stream seek pos: %lld\n", seek_pos); + "demux_matroska: out of stream seek pos: %" PRIiMAX "\n", + (intmax_t)seek_pos); } return 1; } else { @@ -2173,7 +2178,8 @@ static void demux_matroska_send_headers (demux_plugin_t *this_gen) { next_level = 1; if (this->input->seek(this->input, this->segment.start, SEEK_SET) < 0) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "demux_matroska: failed to seek to pos: %lld\n", this->segment.start); + "demux_matroska: failed to seek to pos: %" PRIiMAX "\n", + (intmax_t)this->segment.start); this->status = DEMUX_FINISHED; return; } @@ -2192,7 +2198,8 @@ static void demux_matroska_send_headers (demux_plugin_t *this_gen) { next_level = 1; if (this->input->seek(this->input, this->segment.start, SEEK_SET) < 0) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "demux_matroska: failed to seek to pos: %lld\n", this->segment.start); + "demux_matroska: failed to seek to pos: %" PRIiMAX "\n", + (intmax_t)this->segment.start); this->status = DEMUX_FINISHED; } } diff --git a/src/demuxers/ebml.c b/src/demuxers/ebml.c index b6f0658fc..1fda69b38 100644 --- a/src/demuxers/ebml.c +++ b/src/demuxers/ebml.c @@ -20,7 +20,7 @@ * EBML parser * a lot of ideas from the gstreamer parser * - * $Id: ebml.c,v 1.1 2004/01/05 00:40:54 tmattern Exp $ + * $Id: ebml.c,v 1.2 2004/09/17 19:21:45 valtri Exp $ * */ #ifdef HAVE_CONFIG_H @@ -107,7 +107,8 @@ static int ebml_read_elem_id(ebml_parser_t *ebml, uint32_t *id) { if (size > 4) { off_t pos = ebml->input->get_current_pos(ebml->input); xprintf(ebml->xine, XINE_VERBOSITY_LOG, - "ebml: invalid EBML ID size (0x%x) at position %llu\n", data[0], pos); + "ebml: invalid EBML ID size (0x%x) at position %" PRIiMAX "\n", + data[0], (intmax_t)pos); return 0; } @@ -115,7 +116,7 @@ static int ebml_read_elem_id(ebml_parser_t *ebml, uint32_t *id) { if (ebml->input->read(ebml->input, data + 1, size - 1) != (size - 1)) { off_t pos = ebml->input->get_current_pos(ebml->input); xprintf(ebml->xine, XINE_VERBOSITY_LOG, - "ebml: read error at position %llu\n", pos); + "ebml: read error at position %" PRIiMAX "\n", (intmax_t)pos); return 0; } for(i = 1; i < size; i++) { @@ -138,7 +139,7 @@ static int ebml_read_elem_len(ebml_parser_t *ebml, uint64_t *len) { if (ebml->input->read(ebml->input, data, 1) != 1) { off_t pos = ebml->input->get_current_pos(ebml->input); xprintf(ebml->xine, XINE_VERBOSITY_LOG, - "ebml: read error at position %llu\n", pos); + "ebml: read error at position %" PRIiMAX "\n", (intmax_t)pos); return 0; } value = data[0]; @@ -151,7 +152,8 @@ static int ebml_read_elem_len(ebml_parser_t *ebml, uint64_t *len) { if (size > 8) { off_t pos = ebml->input->get_current_pos(ebml->input); xprintf(ebml->xine, XINE_VERBOSITY_LOG, - "ebml: Invalid EBML length size (0x%x) at position %llu\n", data[0], pos); + "ebml: Invalid EBML length size (0x%x) at position %" PRIiMAX "\n", + data[0], (intmax_t)pos); return 0; } @@ -168,7 +170,7 @@ static int ebml_read_elem_len(ebml_parser_t *ebml, uint64_t *len) { if (ebml->input->read(ebml->input, data + 1, size - 1) != (size - 1)) { off_t pos = ebml->input->get_current_pos(ebml->input); xprintf(ebml->xine, XINE_VERBOSITY_LOG, - "ebml: read error at position %llu\n", pos); + "ebml: read error at position %" PRIiMAX "\n", (intmax_t)pos); return 0; } for (i = 1; i < size; i++) { @@ -191,7 +193,7 @@ static int ebml_read_elem_data(ebml_parser_t *ebml, int8_t *buf, int64_t len) { if (ebml->input->read(ebml->input, buf, len) != len) { off_t pos = ebml->input->get_current_pos(ebml->input); xprintf(ebml->xine, XINE_VERBOSITY_LOG, - "ebml: read error at position %llu\n", pos); + "ebml: read error at position %" PRIiMAX "\n", (intmax_t)pos); return 0; } diff --git a/src/input/input_gnome_vfs.c b/src/input/input_gnome_vfs.c index 4c7a61842..fe4efb5ba 100644 --- a/src/input/input_gnome_vfs.c +++ b/src/input/input_gnome_vfs.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_gnome_vfs.c,v 1.21 2004/06/13 21:28:56 miguelfreitas Exp $ + * $Id: input_gnome_vfs.c,v 1.22 2004/09/17 19:21:45 valtri Exp $ */ @@ -223,7 +223,7 @@ static char return _("gnome-vfs input plugin as shipped with xine"); } -static char +static const char *gnomevfs_klass_get_identifier (input_class_t *this_gen) { return "gnomevfs"; diff --git a/src/input/input_http.c b/src/input/input_http.c index 546e9813b..2ad0bcc4a 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -19,7 +19,7 @@ * * input plugin for http network streams * - * $Id: input_http.c,v 1.95 2004/07/23 13:47:39 f1rmb Exp $ + * $Id: input_http.c,v 1.96 2004/09/17 19:21:46 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -594,7 +594,8 @@ static off_t http_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin this->curpos = offset; else xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, - "http: cannot seek back! (%lld > %lld)\n", this->curpos, offset); + "http: cannot seek back! (%" PRIiMAX " > %" PRIiMAX ")\n", + (intmax_t)this->curpos, (intmax_t)offset); } else { offset -= this->curpos; @@ -872,12 +873,13 @@ static int http_plugin_open (input_plugin_t *this_gen ) { } } else { if (this->contentlength == 0) { - off_t contentlength; + intmax_t contentlength; - if (sscanf(this->buf, "Content-Length: %Ld", &contentlength) == 1) { + if (sscanf(this->buf, "Content-Length: %" SCNdMAX , &contentlength) == 1) { xine_log (this->stream->xine, XINE_LOG_MSG, - _("input_http: content length = %Ld bytes\n"), contentlength); - this->contentlength = contentlength; + _("input_http: content length = %" PRIiMAX " bytes\n"), + contentlength); + this->contentlength = (off_t)contentlength; } } diff --git a/src/input/input_net.c b/src/input/input_net.c index f44bb6d81..df0c6c499 100644 --- a/src/input/input_net.c +++ b/src/input/input_net.c @@ -20,7 +20,7 @@ * Read from a tcp network stream over a lan (put a tweaked mp1e encoder the * other end and you can watch tv anywhere in the house ..) * - * $Id: input_net.c,v 1.59 2004/07/20 00:50:11 rockyb Exp $ + * $Id: input_net.c,v 1.60 2004/09/17 19:21:46 valtri Exp $ * * how to set up mp1e for use with this plugin: * @@ -119,8 +119,8 @@ static int host_connect_attempt_ipv4(struct in_addr ia, int port, xine_t *xine) s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (s==-1) { - xine_log (xine, XINE_LOG_MSG, - _("input_net: socket(): %s\n"), strerror(errno)); + xine_log(xine, XINE_LOG_MSG, + _("input_net: socket(): %s\n"), strerror(errno)); return -1; } @@ -134,8 +134,8 @@ static int host_connect_attempt_ipv4(struct in_addr ia, int port, xine_t *xine) if (connect(s, (struct sockaddr *)&sin, sizeof(sin))==-1 && WSAGetLastError() != WSAEINPROGRESS) #endif { - xine_log (xine, XINE_LOG_MSG, - _("input_net: connect(): %s\n"), strerror(errno)); + xine_log(xine, XINE_LOG_MSG, + _("input_net: connect(): %s\n"), strerror(errno)); close(s); return -1; } @@ -149,8 +149,8 @@ static int host_connect_attempt(int family, struct sockaddr* sin, int addrlen, x s = socket(family, SOCK_STREAM, IPPROTO_TCP); if (s==-1) { - xine_log (xine, XINE_LOG_MSG, - _("input_net: socket(): %s\n"), strerror(errno)); + xine_log(xine, XINE_LOG_MSG, + _("input_net: socket(): %s\n"), strerror(errno)); return -1; } @@ -160,8 +160,8 @@ static int host_connect_attempt(int family, struct sockaddr* sin, int addrlen, x if (connect(s, sin, addrlen)==-1 && WSAGetLastError() != WSAEINPROGRESS) #endif { - xine_log (xine, XINE_LOG_MSG, - _("input_net: connect(): %s\n"), strerror(errno)); + xine_log(xine, XINE_LOG_MSG, + _("input_net: connect(): %s\n"), strerror(errno)); close(s); return -1; } @@ -178,8 +178,8 @@ static int host_connect_ipv4(const char *host, int port, xine_t *xine) { h = gethostbyname(host); if (h==NULL) { - xine_log (xine, XINE_LOG_MSG, - _("input_net: unable to resolve '%s'.\n"), host); + xine_log(xine, XINE_LOG_MSG, + _("input_net: unable to resolve '%s'.\n"), host); return -1; } @@ -191,8 +191,8 @@ static int host_connect_ipv4(const char *host, int port, xine_t *xine) { return s; } - xine_log (xine, XINE_LOG_MSG, - _("input_net: unable to connect to '%s'.\n"), host); + xine_log(xine, XINE_LOG_MSG, + _("input_net: unable to connect to '%s'.\n"), host); return -1; } #endif @@ -221,8 +221,8 @@ static int host_connect(const char *host, int port, xine_t *xine) { if (error) { - xine_log (xine, XINE_LOG_MSG, - _("input_net: unable to resolve '%s'.\n"), host); + xine_log(xine, XINE_LOG_MSG, + _("input_net: unable to resolve '%s'.\n"), host); return -1; } @@ -238,8 +238,8 @@ static int host_connect(const char *host, int port, xine_t *xine) { tmpaddr = tmpaddr->ai_next; } - xine_log (xine, XINE_LOG_MSG, - _("input_net: unable to connect to '%s'.\n"), host); + xine_log(xine, XINE_LOG_MSG, + _("input_net: unable to connect to '%s'.\n"), host); return -1; #endif @@ -254,7 +254,7 @@ static off_t net_plugin_read (input_plugin_t *this_gen, net_input_plugin_t *this = (net_input_plugin_t *) this_gen; off_t n, total; - lprintf ("reading %d bytes...\n", len); + lprintf("reading %d bytes...\n", len); total=0; if (this->curpos < this->preview_size) { @@ -262,7 +262,7 @@ static off_t net_plugin_read (input_plugin_t *this_gen, if (n > (len - total)) n = len - total; - lprintf ("%lld bytes from preview (which has %lld bytes)\n", n, this->preview_size); + lprintf("%lld bytes from preview (which has %lld bytes)\n", n, this->preview_size); memcpy (&buf[total], &this->preview[this->curpos], n); this->curpos += n; @@ -272,8 +272,7 @@ static off_t net_plugin_read (input_plugin_t *this_gen, if( (len-total) > 0 ) { n = _x_read_abort (this->stream, this->fh, &buf[total], len-total); - xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, - "input_net: got %lld bytes (%lld/%lld bytes read)\n", n,total,len); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "input_net: got %" PRIiMAX " bytes (%" PRIiMAX "/%" PRIiMAX " bytes read)\n", (intmax_t)n, (intmax_t)total, (intmax_t)len); if (n < 0) { _x_message(this->stream, XINE_MSG_READ_ERROR, this->host_port, NULL); @@ -349,8 +348,9 @@ static off_t net_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin if( this->curpos <= this->preview_size ) this->curpos = offset; else - xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, - "input_net: cannot seek back! (%lld > %lld)\n", this->curpos, offset); + xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, + "input_net: cannot seek back! (%" PRIiMAX " > %" PRIiMAX ")\n", + (intmax_t)this->curpos, (intmax_t)offset); } else { offset -= this->curpos; diff --git a/src/input/input_pnm.c b/src/input/input_pnm.c index 0f5df891f..52c8ea997 100644 --- a/src/input/input_pnm.c +++ b/src/input/input_pnm.c @@ -121,7 +121,8 @@ static off_t pnm_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin pnm_input_plugin_t *this = (pnm_input_plugin_t *) this_gen; xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, - "input_pnm: seek %lld bytes, origin %d\n", offset, origin); + "input_pnm: seek %" PRIiMAX " bytes, origin %d\n", (intmax_t)offset, + origin); /* only realtive forward-seeking is implemented */ diff --git a/src/input/input_stdin_fifo.c b/src/input/input_stdin_fifo.c index 37db6049f..5c427d9f4 100644 --- a/src/input/input_stdin_fifo.c +++ b/src/input/input_stdin_fifo.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_stdin_fifo.c,v 1.59 2004/07/20 00:50:11 rockyb Exp $ + * $Id: input_stdin_fifo.c,v 1.60 2004/09/17 19:21:46 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -158,7 +158,8 @@ static off_t stdin_plugin_seek (input_plugin_t *this_gen, off_t offset, int orig this->curpos = offset; else xprintf (this->xine, XINE_VERBOSITY_LOG, - _("stdin: cannot seek back! (%lld > %lld)\n"), this->curpos, offset); + _("stdin: cannot seek back! (%" PRIiMAX " > %" PRIiMAX ")\n"), + (intmax_t)this->curpos, (intmax_t)offset); } else { offset -= this->curpos; diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c index 8035fc94a..495658d11 100644 --- a/src/xine-engine/input_rip.c +++ b/src/xine-engine/input_rip.c @@ -29,7 +29,7 @@ * - it's possible speeder saving streams in the xine without playing: * xine stream_mrl#save:file.raw\;noaudio\;novideo * - * $Id: input_rip.c,v 1.22 2004/05/09 17:42:23 valtri Exp $ + * $Id: input_rip.c,v 1.23 2004/09/17 19:21:46 valtri Exp $ */ /* TODO: @@ -126,8 +126,7 @@ static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { if (nread_file) { lprintf(" => read %lld bytes from file\n", nread_file); if (fread(&buf[npreview], nread_file, 1, this->file) != 1) { - xine_log(this->stream->xine, XINE_LOG_MSG, - _("input_rip: reading of saved data failed: %s\n"), strerror(errno)); + xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: reading of saved data failed: %s\n"), strerror(errno)); return -1; } } @@ -142,7 +141,7 @@ static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { if (retlen < 0) { xine_log(this->stream->xine, XINE_LOG_MSG, - _("input_rip: reading by input plugin failed\n")); + _("input_rip: reading by input plugin failed\n")); return -1; } @@ -150,9 +149,7 @@ static off_t rip_plugin_read(input_plugin_t *this_gen, char *buf, off_t len) { if (retlen > nread_orig) { nwrite = retlen - nread_orig; if (fwrite(buf + this->savepos - this->curpos, nwrite, 1, this->file) != 1) { - xine_log(this->stream->xine, XINE_LOG_MSG, - _("input_rip: error writing to file %lld bytes: %s\n"), - retlen - nread_orig, strerror(errno)); + xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: error writing to file %" PRIiMAX " bytes: %s\n"), (intmax_t)(retlen - nread_orig), strerror(errno)); return -1; } this->savepos += nwrite; @@ -173,7 +170,7 @@ static int rip_plugin_open(input_plugin_t *this_gen) { rip_input_plugin_t *this = (rip_input_plugin_t *)this_gen; xine_log(this->stream->xine, XINE_LOG_MSG, - _("input_rip: open() function should never be called\n")); + _("input_rip: open() function should never be called\n")); return 0; } @@ -249,7 +246,8 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe lprintf(" => read %lld bytes from the file (block)\n", nread_file); if (fread(&buf->content[npreview], nread_file, 1, this->file) != 1) { xine_log(this->stream->xine, XINE_LOG_MSG, - _("input_rip: reading of saved data failed: %s\n"), strerror(errno)); + _("input_rip: reading of saved data failed: %s\n"), + strerror(errno)); return NULL; } } @@ -280,8 +278,8 @@ static buf_element_t *rip_plugin_read_block(input_plugin_t *this_gen, fifo_buffe nwrite = retlen - nread_orig; if (fwrite(buf->content + this->savepos - this->curpos, nwrite, 1, this->file) != 1) { xine_log(this->stream->xine, XINE_LOG_MSG, - _("input_rip: error writing to file %lld bytes: %s\n"), - retlen - nread_orig, strerror(errno)); + _("input_rip: error writing to file %" PRIiMAX " bytes: %s\n"), + (intmax_t)(retlen - nread_orig), strerror(errno)); return NULL; } this->savepos += nwrite; @@ -385,8 +383,9 @@ static off_t rip_plugin_seek(input_plugin_t *this_gen, off_t offset, int origin) } else { if ((pos = rip_seek_original(this, this->savepos)) == -1) return -1; if (pos > this->savepos) - xine_log(this->stream->xine, XINE_LOG_MSG, _("input_rip: %lld bytes dropped\n"), - pos - this->savepos); + xine_log(this->stream->xine, XINE_LOG_MSG, + _("input_rip: %" PRIiMAX " bytes dropped\n"), + (intmax_t)(pos - this->savepos)); } } @@ -631,7 +630,8 @@ input_plugin_t *_x_rip_plugin_get_instance (xine_stream_t *stream, const char *f if (this->preview && this->preview_size) { if (fwrite(this->preview, this->preview_size, 1, this->file) != 1) { xine_log(this->stream->xine, XINE_LOG_MSG, - _("input_rip: error writing to file %lld bytes: %s\n"), this->preview_size, strerror(errno)); + _("input_rip: error writing to file %" PRIiMAX " bytes: %s\n"), + (intmax_t)(this->preview_size), strerror(errno)); fclose(this->file); free(this); return NULL; -- cgit v1.2.3