diff -ur --exclude-from dontdiff vanilla/main/asxparser.c main/asxparser.c --- vanilla/main/asxparser.c 2002-10-25 16:09:37.000000000 +0200 +++ main/asxparser.c 2002-10-28 15:29:53.000000000 +0100 @@ -89,6 +89,7 @@ return NULL; } +/* static int asx_attrib_to_enum(char* val,char** valid_vals) { char** ptr; @@ -128,7 +129,9 @@ parser->line,attrib,elem,val,str); free(str); } +*/ +/* static int asx_get_yes_no_attrib(ASX_Parser_t* parser, char* element, char* attrib,char** attribs,int def) { char* val = asx_get_attrib(attrib,attribs); @@ -146,6 +149,7 @@ free(val); return r; } +*/ #define asx_free_attribs(a) asx_list_free((void***)&a,free) diff -ur --exclude-from dontdiff vanilla/main/cfgparser.c main/cfgparser.c --- vanilla/main/cfgparser.c 2002-10-23 22:49:10.000000000 +0200 +++ main/cfgparser.c 2002-10-28 14:03:44.000000000 +0100 @@ -439,7 +439,7 @@ long tmp_int; off_t tmp_off; double tmp_float; - int dummy; + char dummy; int ret = -1; char *endptr; config_t* conf=NULL; diff -ur --exclude-from dontdiff vanilla/main/cpudetect.c main/cpudetect.c --- vanilla/main/cpudetect.c 2002-05-20 03:00:51.000000000 +0200 +++ main/cpudetect.c 2002-10-28 14:01:57.000000000 +0100 @@ -8,6 +8,7 @@ #include #endif #include +#include #ifdef ARCH_X86 diff -ur --exclude-from dontdiff vanilla/main/find_sub.c main/find_sub.c --- vanilla/main/find_sub.c 2002-08-28 18:06:34.000000000 +0200 +++ main/find_sub.c 2002-10-28 15:31:00.000000000 +0100 @@ -18,7 +18,7 @@ static int nosub_range_start=-1; static int nosub_range_end=-1; -void find_sub(subtitle* subtitles,int key){ +void find_sub(subtitle* subtitles, unsigned int key){ int i,j; if ( !subtitles ) return; @@ -26,7 +26,7 @@ if(vo_sub){ if(key>=vo_sub->start && key<=vo_sub->end) return; // OK! } else { - if(key>nosub_range_start && keynosub_range_start && (int)keya_buffer_size=0; sh_audio->a_buffer=NULL; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/asf_mmst_streaming.c main/libmpdemux/asf_mmst_streaming.c --- vanilla/main/libmpdemux/asf_mmst_streaming.c 2002-10-23 22:49:10.000000000 +0200 +++ main/libmpdemux/asf_mmst_streaming.c 2002-10-28 17:04:45.000000000 +0100 @@ -36,7 +36,7 @@ static int num_stream_ids; static int stream_ids[20]; -static int get_data (int s, char *buf, size_t count); +static int get_data (int s, void *buf, size_t count); static void put_32 (command_t *cmd, uint32_t value) { @@ -131,14 +131,16 @@ } } -static int get_data (int s, char *buf, size_t count) +static int get_data (int s, void *buf, size_t count) { - ssize_t len, total; + ssize_t len; + size_t total; + total = 0; while (total < count) { - len = read (s, &buf[total], count-total); + len = read (s, buf+total, count-total); if (len<0) { perror ("read error:"); @@ -161,7 +163,7 @@ static int get_header (int s, uint8_t *header, streaming_ctrl_t *streaming_ctrl) { unsigned char pre_header[8]; - int header_len,i ; + int header_len; header_len = 0; @@ -209,7 +211,7 @@ return 0; } - packet_len = get_32 (&packet_len, 0) + 4; + packet_len = get_32 ((char*)&packet_len, 0) + 4; // printf ("command packet detected, len=%d\n", packet_len); @@ -304,7 +306,6 @@ static int get_media_packet (int s, int padding, streaming_ctrl_t *stream_ctrl) { unsigned char pre_header[8]; - int i; char data[BUF_SIZE]; if (!get_data (s, pre_header, 8)) { @@ -340,7 +341,7 @@ return 0; } - packet_len = get_32 (&packet_len, 0) + 4; + packet_len = get_32 ((char*)&packet_len, 0) + 4; if (!get_data (s, data, packet_len)) { printf ("command data read failed\n"); @@ -428,11 +429,13 @@ URL_t *url1 = stream->streaming_ctrl->url; int s; +/* if( s>0 ) { close( stream->fd ); stream->fd = -1; } - +*/ + /* parse url */ path = strchr(url1->file,'/') + 1; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/asf_streaming.c main/libmpdemux/asf_streaming.c --- vanilla/main/libmpdemux/asf_streaming.c 2002-09-22 20:21:09.000000000 +0200 +++ main/libmpdemux/asf_streaming.c 2002-10-28 16:52:33.000000000 +0100 @@ -23,6 +23,10 @@ extern int verbose; +int asf_http_streaming_start( stream_t *stream ); +int asf_mmst_streaming_start( stream_t *stream ); +int http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry); + // ASF streaming support several network protocol. // One use UDP, not known, yet! // Another is HTTP, this one is known. @@ -143,7 +147,7 @@ // is big, the ASF header will be split in 2 network chunk. // So we need to retrieve all the chunk before starting to parse the header. do { - for( r=0; r < sizeof(ASF_stream_chunck_t) ; ) { + for( r=0; r < (int)sizeof(ASF_stream_chunck_t) ; ) { i = nop_streaming_read(fd,((char*)&chunk)+r,sizeof(ASF_stream_chunck_t) - r,streaming_ctrl); if(i <= 0) return -1; r += i; @@ -270,7 +274,7 @@ if( streaming_ctrl->bandwidth!=0 ) { int stream_count, stream_id, max_bitrate; char *ptr = buffer+pos; - int total_bitrate=0, p_id, p_br; + unsigned int total_bitrate=0, p_id=0, p_br=0; int i; ptr += sizeof(objh); stream_count = le2me_16(*(uint16_t*)ptr); @@ -393,7 +397,7 @@ asf_header_check( HTTP_header_t *http_hdr ) { ASF_obj_header_t *objh; if( http_hdr==NULL ) return -1; - if( http_hdr->body==NULL || http_hdr->body_sizebody==NULL || http_hdr->body_size<(int)sizeof(ASF_obj_header_t) ) return -1; objh = (ASF_obj_header_t*)http_hdr->body; if( ASF_LOAD_GUID_PREFIX(objh->guid)==0x75B22630 ) return 0; @@ -422,7 +426,7 @@ // so we could used mime type to know the stream type, // but guess what? All of them are not well configured. // So we have to check for an asf header :(, but it works :p - if( http_hdr->body_size>sizeof(ASF_obj_header_t) ) { + if( http_hdr->body_size>(int)sizeof(ASF_obj_header_t) ) { if( asf_header_check( http_hdr )==0 ) { mp_msg(MSGT_NETWORK,MSGL_V,"=====> ASF Plain text\n"); return ASF_PlainText_e; @@ -584,14 +588,14 @@ end = strstr( pragma, "," ); if( end==NULL ) { int s = strlen(pragma); - if(s > sizeof(features)) { + if(s > (int)sizeof(features)) { mp_msg(MSGT_NETWORK,MSGL_WARN,"ASF HTTP PARSE WARNING : Pragma %s cuted from %d bytes to %d\n",pragma,s,sizeof(features)); len = sizeof(features); } else { len = s; } } else { - len = MIN(end-pragma,sizeof(features)); + len = MIN(end-pragma,(int)sizeof(features)); } strncpy( features, pragma, len ); features[len]='\0'; @@ -671,11 +675,13 @@ mp_msg(MSGT_NETWORK,MSGL_DBG2,"Response [%s]\n", http_hdr->buffer ); } streaming_type = asf_http_parse_response(http_hdr); +/* if( streaming_type<0 ) { mp_msg(MSGT_NETWORK,MSGL_ERR,"Failed to parse header\n"); http_free( http_hdr ); return -1; } +*/ asf_http_ctrl->streaming_type = streaming_type; switch( streaming_type ) { case ASF_Live_e: diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/aviprint.c main/libmpdemux/aviprint.c --- vanilla/main/libmpdemux/aviprint.c 2002-09-22 20:21:10.000000000 +0200 +++ main/libmpdemux/aviprint.c 2002-10-28 15:36:14.000000000 +0100 @@ -17,7 +17,7 @@ //#include "stheader.h" void print_avih_flags(MainAVIHeader *h){ - printf("MainAVIHeader.dwFlags: (%ld)%s%s%s%s%s%s\n",h->dwFlags, + printf("MainAVIHeader.dwFlags: (%d)%s%s%s%s%s%s\n",h->dwFlags, (h->dwFlags&AVIF_HASINDEX)?" HAS_INDEX":"", (h->dwFlags&AVIF_MUSTUSEINDEX)?" MUST_USE_INDEX":"", (h->dwFlags&AVIF_ISINTERLEAVED)?" IS_INTERLEAVED":"", @@ -29,35 +29,35 @@ void print_avih(MainAVIHeader *h){ printf("======= AVI Header =======\n"); - printf("us/frame: %ld (fps=%5.3f)\n",h->dwMicroSecPerFrame,1000000.0f/(float)h->dwMicroSecPerFrame); - printf("max bytes/sec: %ld\n",h->dwMaxBytesPerSec); - printf("padding: %ld\n",h->dwPaddingGranularity); + printf("us/frame: %d (fps=%5.3f)\n",h->dwMicroSecPerFrame,1000000.0f/(float)h->dwMicroSecPerFrame); + printf("max bytes/sec: %d\n",h->dwMaxBytesPerSec); + printf("padding: %d\n",h->dwPaddingGranularity); print_avih_flags(h); - printf("frames total: %ld initial: %ld\n",h->dwTotalFrames,h->dwInitialFrames); - printf("streams: %ld\n",h->dwStreams); - printf("Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize); - printf("Size: %ld x %ld\n",h->dwWidth,h->dwHeight); + printf("frames total: %d initial: %d\n",h->dwTotalFrames,h->dwInitialFrames); + printf("streams: %d\n",h->dwStreams); + printf("Suggested BufferSize: %d\n",h->dwSuggestedBufferSize); + printf("Size: %d x %d\n",h->dwWidth,h->dwHeight); } void print_strh(AVIStreamHeader *h){ printf("======= STREAM Header =======\n"); printf("Type: %.4s FCC: %.4s (%X)\n",(char *)&h->fccType,(char *)&h->fccHandler,(unsigned int)h->fccHandler); - printf("Flags: %ld\n",h->dwFlags); + printf("Flags: %d\n",h->dwFlags); printf("Priority: %d Language: %d\n",h->wPriority,h->wLanguage); - printf("InitialFrames: %ld\n",h->dwInitialFrames); - printf("Rate: %ld/%ld = %5.3f\n",h->dwRate,h->dwScale,(float)h->dwRate/(float)h->dwScale); - printf("Start: %ld Len: %ld\n",h->dwStart,h->dwLength); - printf("Suggested BufferSize: %ld\n",h->dwSuggestedBufferSize); - printf("Quality %ld\n",h->dwQuality); - printf("Sample size: %ld\n",h->dwSampleSize); + printf("InitialFrames: %d\n",h->dwInitialFrames); + printf("Rate: %d/%d = %5.3f\n",h->dwRate,h->dwScale,(float)h->dwRate/(float)h->dwScale); + printf("Start: %d Len: %d\n",h->dwStart,h->dwLength); + printf("Suggested BufferSize: %d\n",h->dwSuggestedBufferSize); + printf("Quality %d\n",h->dwQuality); + printf("Sample size: %d\n",h->dwSampleSize); } void print_wave_header(WAVEFORMATEX *h){ printf("======= WAVE Format =======\n"); printf("Format Tag: %d (0x%X)\n",h->wFormatTag,h->wFormatTag); printf("Channels: %d\n",h->nChannels); - printf("Samplerate: %ld\n",h->nSamplesPerSec); - printf("avg byte/sec: %ld\n",h->nAvgBytesPerSec); + printf("Samplerate: %d\n",h->nSamplesPerSec); + printf("avg byte/sec: %d\n",h->nAvgBytesPerSec); printf("Block align: %d\n",h->nBlockAlign); printf("bits/sample: %d\n",h->wBitsPerSample); printf("cbSize: %d\n",h->cbSize); @@ -83,13 +83,13 @@ void print_video_header(BITMAPINFOHEADER *h){ printf("======= VIDEO Format ======\n"); - printf(" biSize %ld\n", h->biSize); - printf(" biWidth %ld\n", h->biWidth); - printf(" biHeight %ld\n", h->biHeight); + printf(" biSize %d\n", h->biSize); + printf(" biWidth %d\n", h->biWidth); + printf(" biHeight %d\n", h->biHeight); printf(" biPlanes %d\n", h->biPlanes); printf(" biBitCount %d\n", h->biBitCount); - printf(" biCompression %ld='%.4s'\n", h->biCompression, (char *)&h->biCompression); - printf(" biSizeImage %ld\n", h->biSizeImage); + printf(" biCompression %d='%.4s'\n", h->biCompression, (char *)&h->biCompression); + printf(" biSizeImage %d\n", h->biSizeImage); printf("===========================\n"); } @@ -102,7 +102,7 @@ for(i=0;i255) id=255; - printf("%5d: %.4s %4X %08X len:%6ld pos:%7d->%7.3f %7d->%7.3f\n",i, + printf("%5d: %.4s %4X %08X len:%6d pos:%7d->%7.3f %7d->%7.3f\n",i, (char *)&idx[i].ckid, (unsigned int)idx[i].dwFlags, (unsigned int)idx[i].dwChunkOffset, diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/aviwrite.c main/libmpdemux/aviwrite.c --- vanilla/main/libmpdemux/aviwrite.c 2002-08-30 18:28:44.000000000 +0200 +++ main/libmpdemux/aviwrite.c 2002-10-28 15:37:26.000000000 +0100 @@ -93,7 +93,7 @@ } } -void aviwrite_write_chunk(aviwrite_t *muxer,aviwrite_stream_t *s, FILE *f,int len,unsigned int flags){ +void aviwrite_write_chunk(aviwrite_t *muxer,aviwrite_stream_t *s, FILE *f,unsigned int len,unsigned int flags){ // add to the index: if(muxer->idx_pos>=muxer->idx_size){ @@ -142,7 +142,7 @@ void aviwrite_write_header(aviwrite_t *muxer,FILE *f){ unsigned int riff[3]; - int i; + unsigned int i; unsigned int hdrsize; aviwrite_info_t info[16]; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/aviwrite.h main/libmpdemux/aviwrite.h --- vanilla/main/libmpdemux/aviwrite.h 2002-08-30 18:28:44.000000000 +0200 +++ main/libmpdemux/aviwrite.h 2002-10-28 15:37:05.000000000 +0100 @@ -48,7 +48,7 @@ aviwrite_stream_t* aviwrite_new_stream(aviwrite_t *muxer,int type); aviwrite_t* aviwrite_new_muxer(); -void aviwrite_write_chunk(aviwrite_t *muxer,aviwrite_stream_t *s, FILE *f,int len,unsigned int flags); +void aviwrite_write_chunk(aviwrite_t *muxer,aviwrite_stream_t *s, FILE *f,unsigned int len,unsigned int flags); void aviwrite_write_header(aviwrite_t *muxer,FILE *f); void aviwrite_write_index(aviwrite_t *muxer,FILE *f); diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_asf.c main/libmpdemux/demux_asf.c --- vanilla/main/libmpdemux/demux_asf.c 2002-09-22 20:21:12.000000000 +0200 +++ main/libmpdemux/demux_asf.c 2002-10-28 15:40:22.000000000 +0100 @@ -12,7 +12,6 @@ #include "asf.h" #include "demuxer.h" - /* * Load 16/32-bit values in little endian byte order * from an unaligned address @@ -232,7 +231,7 @@ unsigned int rlen; // int len; - unsigned int time2; + unsigned int time2=0; int keyframe=0; if(p>=p_end) mp_msg(MSGT_DEMUX,MSGL_V,"Warning! invalid packet 1, sig11 coming soon...\n"); @@ -343,6 +342,7 @@ } #include "stheader.h" +#include "../libmpcodecs/dec_audio.h" void demux_seek_asf(demuxer_t *demuxer,float rel_seek_secs,int flags){ demux_stream_t *d_audio=demuxer->audio; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_audio.c main/libmpdemux/demux_audio.c --- vanilla/main/libmpdemux/demux_audio.c 2002-10-23 19:59:22.000000000 +0200 +++ main/libmpdemux/demux_audio.c 2002-10-28 16:43:57.000000000 +0100 @@ -28,6 +28,7 @@ extern void free_sh_audio(sh_audio_t* sh); extern void resync_audio_stream(sh_audio_t *sh_audio); +extern void print_wave_header(WAVEFORMATEX *h); int hr_mp3_seek = 0; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_avi.c main/libmpdemux/demux_avi.c --- vanilla/main/libmpdemux/demux_avi.c 2002-10-18 00:03:10.000000000 +0200 +++ main/libmpdemux/demux_avi.c 2002-10-28 15:40:52.000000000 +0100 @@ -11,6 +11,7 @@ #include "stream.h" #include "demuxer.h" #include "stheader.h" +#include "../libmpcodecs/dec_audio.h" #include "aviheader.h" diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demuxer.c main/libmpdemux/demuxer.c --- vanilla/main/libmpdemux/demuxer.c 2002-10-23 19:59:22.000000000 +0200 +++ main/libmpdemux/demuxer.c 2002-10-28 15:55:05.000000000 +0100 @@ -514,6 +514,7 @@ int demux_open_film(demuxer_t* demuxer); int demux_open_bmp(demuxer_t* demuxer); int demux_open_roq(demuxer_t* demuxer); +demuxer_t * demux_open_pva (demuxer_t * demuxer); #ifdef HAVE_LIBDV095 int demux_open_rawdv(demuxer_t* demuxer); extern int rawdv_check_file(demuxer_t *demuxer); @@ -534,6 +535,7 @@ extern int demux_rawaudio_open(demuxer_t* demuxer); extern int smjpeg_check_file(demuxer_t *demuxer); extern int demux_open_smjpeg(demuxer_t* demuxer); +extern int bmp_check_file(demuxer_t *demuxer); extern demuxer_t* init_avi_with_ogg(demuxer_t* demuxer); diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_mov.c main/libmpdemux/demux_mov.c --- vanilla/main/libmpdemux/demux_mov.c 2002-10-17 09:26:04.000000000 +0200 +++ main/libmpdemux/demux_mov.c 2002-10-28 15:50:33.000000000 +0100 @@ -58,32 +58,32 @@ #define char2int(x,y) BE_32(&(x)[(y)]) typedef struct { - unsigned int pts; // duration - unsigned int size; + int pts; // duration + int size; off_t pos; } mov_sample_t; typedef struct { - unsigned int sample; // number of the first sample in the chunk - unsigned int size; // number of samples in the chunk + int sample; // number of the first sample in the chunk + int size; // number of samples in the chunk int desc; // for multiple codecs mode - not used off_t pos; } mov_chunk_t; typedef struct { - unsigned int first; - unsigned int spc; - unsigned int sdid; + int first; + int spc; + int sdid; } mov_chunkmap_t; typedef struct { - unsigned int num; - unsigned int dur; + int num; + int dur; } mov_durmap_t; typedef struct { - unsigned int dur; - unsigned int pos; + int dur; + int pos; int speed; // int frames; @@ -377,7 +377,7 @@ id = be2me_32(id); mp_msg(MSGT_DEMUX,MSGL_V,"MOV: unknown chunk: %.4s %d\n",&id,(int)len); } -skip_chunk: +//skip_chunk: if(!stream_skip(demuxer->stream,len-skipped)) break; ++no; } @@ -457,7 +457,7 @@ break; } case MOV_FOURCC('m','d','h','d'): { - unsigned int tmp; +// unsigned int tmp; mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sMedia header!\n",level,""); #if 0 tmp=stream_read_dword(demuxer->stream); @@ -527,7 +527,7 @@ break; } case MOV_FOURCC('s','t','t','s'): { - int temp=stream_read_dword(demuxer->stream); +// int temp=stream_read_dword(demuxer->stream); int len=stream_read_dword(demuxer->stream); int i; unsigned int pts=0; @@ -582,7 +582,7 @@ break; } case MOV_FOURCC('s','t','c','o'): { - int temp=stream_read_dword(demuxer->stream); +// int temp=stream_read_dword(demuxer->stream); int len=stream_read_dword(demuxer->stream); int i; mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*sChunk offset table! (%d chunks)\n",level,"",len); @@ -596,7 +596,7 @@ break; } case MOV_FOURCC('c','o','6','4'): { - int temp=stream_read_dword(demuxer->stream); +// int temp=stream_read_dword(demuxer->stream); int len=stream_read_dword(demuxer->stream); int i; mp_msg(MSGT_DEMUX,MSGL_V,"MOV: %*s64bit chunk offset table! (%d chunks)\n",level,"",len); @@ -1477,7 +1477,7 @@ while(trak->poschunks_size && trak->chunks[trak->pos].samplepos; pts=(float)(trak->chunks[trak->pos].sample*trak->duration)/(float)trak->timescale; } else { - unsigned int ipts; + int ipts; if(!(flags&1)) pts+=trak->samples[trak->pos].pts; if(pts<0) pts=0; ipts=pts; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_mpg.c main/libmpdemux/demux_mpg.c --- vanilla/main/libmpdemux/demux_mpg.c 2002-10-09 19:54:53.000000000 +0200 +++ main/libmpdemux/demux_mpg.c 2002-10-28 15:51:08.000000000 +0100 @@ -12,6 +12,7 @@ #include "demuxer.h" #include "parse_es.h" #include "stheader.h" +#include "../libmpcodecs/dec_audio.h" #include "mp3_hdr.h" #include "dvdauth.h" diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_nuv.c main/libmpdemux/demux_nuv.c --- vanilla/main/libmpdemux/demux_nuv.c 2002-10-06 17:11:30.000000000 +0200 +++ main/libmpdemux/demux_nuv.c 2002-10-28 16:42:21.000000000 +0100 @@ -67,7 +67,7 @@ while(current_time < target_time ) { - if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader)) + if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < (int)sizeof(rtjpeg_frameheader)) return; /* EOF */ if ( rtjpeg_frameheader.frametype == 'V' ) @@ -143,7 +143,7 @@ int want_audio = (demuxer->audio)&&(demuxer->audio->id!=-2); demuxer->filepos = orig_pos = stream_tell ( demuxer->stream ); - if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader)) + if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < (int)sizeof(rtjpeg_frameheader)) return 0; /* EOF */ #if 0 diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_ogg.c main/libmpdemux/demux_ogg.c --- vanilla/main/libmpdemux/demux_ogg.c 2002-10-22 18:10:30.000000000 +0200 +++ main/libmpdemux/demux_ogg.c 2002-10-28 16:45:08.000000000 +0100 @@ -12,10 +12,14 @@ #include "stream.h" #include "demuxer.h" #include "stheader.h" +#include "../libmpcodecs/dec_audio.h" #include #include +extern void print_wave_header(WAVEFORMATEX *h); +extern void print_video_header(BITMAPINFOHEADER *h); + #define BLOCK_SIZE 4096 /// Vorbis decoder context : we need the vorbis_info for vorbis timestamping diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_pva.c main/libmpdemux/demux_pva.c --- vanilla/main/libmpdemux/demux_pva.c 2002-10-08 09:58:38.000000000 +0200 +++ main/libmpdemux/demux_pva.c 2002-10-28 15:51:47.000000000 +0100 @@ -280,7 +280,7 @@ uint16_t pack_size; off_t next_offset,pva_payload_start; unsigned char buffer[256]; - demux_packet_t * dp; //hack to deliver the preBytes (see PVA doc) +// demux_packet_t * dp; //hack to deliver the preBytes (see PVA doc) pva_priv_t * priv=(pva_priv_t *) d->priv; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_real.c main/libmpdemux/demux_real.c --- vanilla/main/libmpdemux/demux_real.c 2002-10-11 10:42:05.000000000 +0200 +++ main/libmpdemux/demux_real.c 2002-10-28 16:40:41.000000000 +0100 @@ -117,6 +117,8 @@ #include "stheader.h" #include "bswap.h" +extern void print_wave_header(WAVEFORMATEX *h); + //#define mp_dbg(mod,lev, args... ) mp_msg_c((mod<<8)|lev, ## args ) #define MKTAG(a, b, c, d) (a | (b << 8) | (c << 16) | (d << 24)) @@ -423,10 +425,10 @@ } typedef struct dp_hdr_s { - uint32_t chunks; // number of chunks - uint32_t timestamp; // timestamp from packet header - uint32_t len; // length of actual data - uint32_t chunktab; // offset to chunk offset array + int32_t chunks; // number of chunks + int32_t timestamp; // timestamp from packet header + int32_t len; // length of actual data + int32_t chunktab; // offset to chunk offset array } dp_hdr_t; // return value: @@ -439,7 +441,6 @@ int len; int timestamp; int stream_id; - int i; int flags; int version; int reserved; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/demux_viv.c main/libmpdemux/demux_viv.c --- vanilla/main/libmpdemux/demux_viv.c 2002-09-22 20:21:27.000000000 +0200 +++ main/libmpdemux/demux_viv.c 2002-10-28 15:52:43.000000000 +0100 @@ -649,7 +649,7 @@ sh->format = 0x111; if (priv->audio_codec == VIVO_AUDIO_SIREN) sh->format = 0x112; - if (sh->format == -1) + if (sh->format == 0xffffffff) { mp_msg(MSGT_DEMUX, MSGL_ERR, "VIVO: Not support audio codec (%d)\n", priv->audio_codec); @@ -708,7 +708,7 @@ if (vivo_param_bytesperblock != -1) sh->wf->nBlockAlign = vivo_param_bytesperblock; -sound_ok: +//sound_ok: /* insert as stream */ demuxer->audio->sh=sh; sh->ds=demuxer->audio; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/mf.c main/libmpdemux/mf.c --- vanilla/main/libmpdemux/mf.c 2002-09-19 18:43:53.000000000 +0200 +++ main/libmpdemux/mf.c 2002-10-28 16:43:41.000000000 +0100 @@ -27,7 +27,7 @@ mf_t* open_mf(char * filename){ glob_t gg; struct stat fs; - int i; + unsigned int i; char * fname; mf_t * mf; int error_count = 0; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/network.c main/libmpdemux/network.c --- vanilla/main/libmpdemux/network.c 2002-10-24 08:17:58.000000000 +0200 +++ main/libmpdemux/network.c 2002-10-28 16:54:41.000000000 +0100 @@ -34,6 +34,7 @@ extern int stream_cache_size; extern int mp_input_check_interrupt(int time); +extern int asf_streaming_start( stream_t *stream ); /* Variables for the command line option -user, -passwd & -bandwidth */ char *network_username=NULL; @@ -150,7 +151,7 @@ fd_set set; struct timeval tv; struct sockaddr_in server_address; - struct hostent *hp; + struct hostent *hp = 0; socket_server_fd = socket(AF_INET, SOCK_STREAM, 0); if( socket_server_fd==-1 ) { @@ -354,7 +355,6 @@ int http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry) { char *aut; - int ret; if( *auth_retry==1 ) { mp_msg(MSGT_NETWORK,MSGL_ERR,"Authentication failed\n"); mp_msg(MSGT_NETWORK,MSGL_ERR,"Please use the option -user and -passwd to provide your username/password for a list of URLs,\n"); @@ -805,7 +805,7 @@ int streaming_start(stream_t *stream, int *demuxer_type, URL_t *url) { - int ret, val; + int ret; if( stream==NULL ) return -1; stream->streaming_ctrl = streaming_ctrl_new(); @@ -884,7 +884,6 @@ streaming_ctrl_free( stream->streaming_ctrl ); stream->streaming_ctrl = NULL; } else if( stream->streaming_ctrl->buffering ) { - int cache_size = stream_cache_size; if(stream_cache_size<0) { // cache option not set, will use our computed value. // buffer in KBytes, *5 because the prefill is 20% of the buffer. diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/open.c main/libmpdemux/open.c --- vanilla/main/libmpdemux/open.c 2002-10-23 19:59:22.000000000 +0200 +++ main/libmpdemux/open.c 2002-10-28 16:32:36.000000000 +0100 @@ -22,6 +22,7 @@ #ifdef STREAMING #include "url.h" #include "network.h" +int streaming_start( stream_t *stream, int *demuxer_type, URL_t *url ); #ifdef STREAMING_LIVE_DOT_COM #include "demux_rtp.h" int isSDPFile = 0; @@ -531,7 +532,6 @@ int dvd_parse_chapter_range(struct config *conf, const char *range){ const char *s; char *t; - conf; /* prevent warning from GCC */ s = range; dvd_chapter = 1; dvd_last_chapter = 0; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/stream.h main/libmpdemux/stream.h --- vanilla/main/libmpdemux/stream.h 2002-10-23 19:59:22.000000000 +0200 +++ main/libmpdemux/stream.h 2002-10-28 16:34:30.000000000 +0100 @@ -242,8 +242,8 @@ // int cur_cell; int last_cell; - int cur_pack; - int cell_last_pack; + unsigned int cur_pack; + unsigned int cell_last_pack; // Navi: int packs_left; dsi_t dsi_pack; diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/tv.c main/libmpdemux/tv.c --- vanilla/main/libmpdemux/tv.c 2002-10-25 11:16:09.000000000 +0200 +++ main/libmpdemux/tv.c 2002-10-28 16:36:59.000000000 +0100 @@ -29,6 +29,7 @@ #include "stheader.h" #include "../libao2/afmt.h" +#include "../libao2/audio_out.h" #include "../libvo/img_format.h" #include "../libvo/fastmemcpy.h" @@ -67,6 +68,9 @@ char* tv_param_adevice = NULL; #endif +int tv_set_freq(tvi_handle_t *tvh, unsigned long freq); +int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq); + /* ================== DEMUX_TV ===================== */ /* Return value: diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/tvi_def.h main/libmpdemux/tvi_def.h --- vanilla/main/libmpdemux/tvi_def.h 2002-04-12 12:40:38.000000000 +0200 +++ main/libmpdemux/tvi_def.h 2002-10-28 15:55:47.000000000 +0100 @@ -1,4 +1,5 @@ #include /* malloc */ +#include static int init(priv_t *priv); static int uninit(priv_t *priv); diff -ur --exclude-from dontdiff vanilla/main/libmpdemux/yuv4mpeg.c main/libmpdemux/yuv4mpeg.c --- vanilla/main/libmpdemux/yuv4mpeg.c 2001-12-27 03:08:31.000000000 +0100 +++ main/libmpdemux/yuv4mpeg.c 2002-10-28 16:41:27.000000000 +0100 @@ -142,7 +142,7 @@ } - +#if 0 static int y4m_snprint_xtags(char *s, int maxn, y4m_xtag_list_t *xtags) { int i, room; @@ -157,7 +157,7 @@ s[1] = '\0'; /* ...and end-of-string */ return Y4M_OK; } - +#endif int y4m_xtag_count(const y4m_xtag_list_t *xtags) { diff -ur --exclude-from dontdiff vanilla/main/loader/afl.c main/loader/afl.c --- vanilla/main/loader/afl.c 2002-09-19 18:44:29.000000000 +0200 +++ main/loader/afl.c 2002-10-28 14:49:38.000000000 +0100 @@ -187,7 +187,6 @@ PWINE_ACMDRIVERID padid; PWINE_ACMDRIVER pad; ICOPEN icopen; - HDRVR hdrv; TRACE("(%p, %x, %08lu)\n", phad, hadid, fdwOpen); @@ -429,7 +428,6 @@ goto errCleanUp; } else { PWINE_ACMDRIVERID wadi; - short drv_tag; ret = ACMERR_NOTPOSSIBLE; /* if(pwfxSrc->wFormatTag==1)//compression drv_tag=pwfxDst->wFormatTag; diff -ur --exclude-from dontdiff vanilla/main/loader/driver.c main/loader/driver.c --- vanilla/main/loader/driver.c 2002-09-19 18:44:30.000000000 +0200 +++ main/loader/driver.c 2002-10-28 14:41:02.000000000 +0100 @@ -10,6 +10,7 @@ #endif #include "win32.h" +#include "ext.h" #include "wine/driver.h" #include "wine/pe_image.h" #include "wine/winreg.h" @@ -127,7 +128,6 @@ HDRVR DrvOpen(LPARAM lParam2) { NPDRVR hDriver; - int i; char unknown[0x124]; const char* filename = (const char*) ((ICOPEN*) lParam2)->pV1Reserved; diff -ur --exclude-from dontdiff vanilla/main/loader/dshow/allocator.c main/loader/dshow/allocator.c --- vanilla/main/loader/dshow/allocator.c 2002-09-19 18:44:58.000000000 +0200 +++ main/loader/dshow/allocator.c 2002-10-28 15:12:08.000000000 +0100 @@ -212,7 +212,7 @@ /* [out] */ IMediaSample **ppBuffer, /* [in] */ REFERENCE_TIME *pStartTime, /* [in] */ REFERENCE_TIME *pEndTime, - /* [in] */ DWORD dwFlags) + /* [in] */ unsigned long dwFlags) { MemAllocator* me = (MemAllocator*)This; CMediaSample* sample; diff -ur --exclude-from dontdiff vanilla/main/loader/dshow/DS_AudioDecoder.c main/loader/dshow/DS_AudioDecoder.c --- vanilla/main/loader/dshow/DS_AudioDecoder.c 2002-05-20 05:51:58.000000000 +0200 +++ main/loader/dshow/DS_AudioDecoder.c 2002-10-28 14:50:19.000000000 +0100 @@ -12,6 +12,7 @@ #include "libwin32.h" #endif +#include "ldt_keeper.h" #include "DS_Filter.h" struct _DS_AudioDecoder diff -ur --exclude-from dontdiff vanilla/main/loader/dshow/DS_VideoDecoder.c main/loader/dshow/DS_VideoDecoder.c --- vanilla/main/loader/dshow/DS_VideoDecoder.c 2002-09-22 20:21:55.000000000 +0200 +++ main/loader/dshow/DS_VideoDecoder.c 2002-10-28 15:10:23.000000000 +0100 @@ -8,6 +8,7 @@ #include "guids.h" #include "interfaces.h" #include "registry.h" +#include "ldt_keeper.h" #ifndef NOAVIFILE_HEADERS #include "videodecoder.h" @@ -66,7 +67,7 @@ struct _ct { unsigned int bits; fourcc_t fcc; - GUID *subtype; + const GUID *subtype; int cap; }; @@ -79,7 +80,7 @@ {16, fccYVYU, &MEDIASUBTYPE_YVYU, CAP_YVYU}, {12, fccI420, &MEDIASUBTYPE_I420, CAP_I420}, {9, fccYVU9, &MEDIASUBTYPE_YVU9, CAP_YVU9}, - {0}, + {0, 0, 0, 0}, }; @@ -104,8 +105,8 @@ { unsigned int bihs; - bihs = (format->biSize < (int) sizeof(BITMAPINFOHEADER)) ? - sizeof(BITMAPINFOHEADER) : format->biSize; + bihs = ((unsigned int)format->biSize < sizeof(BITMAPINFOHEADER)) ? + sizeof(BITMAPINFOHEADER) : (unsigned int)format->biSize; this->iv.m_bh = (BITMAPINFOHEADER*)malloc(bihs); memcpy(this->iv.m_bh, format, bihs); @@ -224,7 +225,7 @@ if (!result) { this->m_Caps = (this->m_Caps | c->cap); - printf("%.4s ", &c->fcc); + printf("%.4s ", (char*)&c->fcc); } } printf("\n"); diff -ur --exclude-from dontdiff vanilla/main/loader/dshow/inputpin.c main/loader/dshow/inputpin.c --- vanilla/main/loader/dshow/inputpin.c 2002-09-19 18:45:01.000000000 +0200 +++ main/loader/dshow/inputpin.c 2002-10-28 15:17:30.000000000 +0100 @@ -25,9 +25,9 @@ } CEnumPins; static long STDCALL CEnumPins_Next(IEnumPins* This, - /* [in] */ unsigned long cMediaTypes, + /* [in] */ ULONG cMediaTypes, /* [size_is][out] */ IPin** ppMediaTypes, - /* [out] */ unsigned long* pcFetched) + /* [out] */ ULONG* pcFetched) { CEnumPins* pin = (CEnumPins*)This; @@ -69,7 +69,7 @@ } static long STDCALL CEnumPins_Skip(IEnumPins* This, - /* [in] */ unsigned long cMediaTypes) + /* [in] */ ULONG cMediaTypes) { Debug unimplemented("CEnumPins_Skip", This); return E_NOTIMPL; @@ -222,7 +222,7 @@ static long STDCALL CInputPin_QueryInternalConnections(IPin* This, /* [out] */ IPin** apPin, - /* [out][in] */ unsigned long *nPin) + /* [out][in] */ ULONG *nPin) { Debug unimplemented("CInputPin_QueryInternalConnections", This); return E_NOTIMPL; @@ -339,7 +339,7 @@ } static long STDCALL CBaseFilter_GetState(IBaseFilter* This, - /* [in] */ unsigned long dwMilliSecsTimeout, + /* [in] */ ULONG dwMilliSecsTimeout, // /* [out] */ FILTER_STATE *State) void* State) { @@ -500,7 +500,7 @@ static long STDCALL CBaseFilter2_GetState(IBaseFilter* This, - /* [in] */ unsigned long dwMilliSecsTimeout, + /* [in] */ ULONG dwMilliSecsTimeout, // /* [out] */ FILTER_STATE *State) void* State) { diff -ur --exclude-from dontdiff vanilla/main/loader/dshow/interfaces.h main/loader/dshow/interfaces.h --- vanilla/main/loader/dshow/interfaces.h 2002-09-19 18:45:02.000000000 +0200 +++ main/loader/dshow/interfaces.h 2002-10-28 15:14:21.000000000 +0100 @@ -44,11 +44,11 @@ INHERIT_IUNKNOWN(); HRESULT STDCALL ( *Next )(IEnumMediaTypes* This, - /* [in] */ unsigned long cMediaTypes, + /* [in] */ unsigned int cMediaTypes, /* [size_is][out] */ AM_MEDIA_TYPE** ppMediaTypes, - /* [out] */ unsigned long* pcFetched); + /* [out] */ unsigned int* pcFetched); HRESULT STDCALL ( *Skip )(IEnumMediaTypes* This, - /* [in] */ unsigned long cMediaTypes); + /* [in] */ unsigned int cMediaTypes); HRESULT STDCALL ( *Reset )(IEnumMediaTypes* This); HRESULT STDCALL ( *Clone )(IEnumMediaTypes* This, /* [out] */ IEnumMediaTypes** ppEnum); @@ -82,7 +82,7 @@ /* [out] */ IEnumMediaTypes **ppEnum); HRESULT STDCALL ( *QueryInternalConnections )(IPin * This, /* [out] */ IPin **apPin, - /* [out][in] */ unsigned long *nPin); + /* [out][in] */ unsigned int *nPin); HRESULT STDCALL ( *EndOfStream )(IPin * This); HRESULT STDCALL ( *BeginFlush )(IPin * This); HRESULT STDCALL ( *EndFlush )(IPin * This); @@ -101,12 +101,12 @@ // retrieves a specified number of pins in the enumeration sequence.. HRESULT STDCALL ( *Next )(IEnumPins* This, - /* [in] */ unsigned long cPins, + /* [in] */ unsigned int cPins, /* [size_is][out] */ IPin** ppPins, - /* [out] */ unsigned long* pcFetched); + /* [out] */ unsigned int* pcFetched); // skips over a specified number of pins. HRESULT STDCALL ( *Skip )(IEnumPins* This, - /* [in] */ unsigned long cPins); + /* [in] */ unsigned int cPins); // resets the enumeration sequence to the beginning. HRESULT STDCALL ( *Reset )(IEnumPins* This); // makes a copy of the enumerator with the same enumeration state. @@ -190,7 +190,7 @@ HRESULT STDCALL ( *Run )(IBaseFilter * This, REFERENCE_TIME tStart); HRESULT STDCALL ( *GetState )(IBaseFilter * This, - /* [in] */ unsigned long dwMilliSecsTimeout, + /* [in] */ unsigned int dwMilliSecsTimeout, ///* [out] */ FILTER_STATE *State); void* State); HRESULT STDCALL ( *SetSyncSource )(IBaseFilter* This, @@ -236,7 +236,7 @@ /* [out] */ IMediaSample** ppBuffer, /* [in] */ REFERENCE_TIME* pStartTime, /* [in] */ REFERENCE_TIME* pEndTime, - /* [in] */ unsigned long dwFlags); + /* [in] */ unsigned int dwFlags); // releases a media sample. HRESULT STDCALL ( *ReleaseBuffer )(IMemAllocator* This, /* [in] */ IMediaSample* pBuffer); diff -ur --exclude-from dontdiff vanilla/main/loader/elfdll.c main/loader/elfdll.c --- vanilla/main/loader/elfdll.c 2002-09-19 18:44:31.000000000 +0200 +++ main/loader/elfdll.c 2002-10-28 14:49:00.000000000 +0100 @@ -52,7 +52,7 @@ void *ELFDLL_dlopen(const char *libname, int flags) { char buffer[256]; - int namelen; + unsigned int namelen; void *handle; char *ldpath; @@ -66,7 +66,7 @@ ldpath = def_path; while(ldpath && *ldpath) { - int len; + unsigned int len; char *cptr; char *from; @@ -166,10 +166,10 @@ static WINE_MODREF *ELFDLL_CreateModref(HMODULE hModule, LPCSTR path) { // IMAGE_NT_HEADERS *nt = PE_HEADER(hModule); - IMAGE_DATA_DIRECTORY *dir; - IMAGE_IMPORT_DESCRIPTOR *pe_import = NULL; +// IMAGE_DATA_DIRECTORY *dir; +// IMAGE_IMPORT_DESCRIPTOR *pe_import = NULL; WINE_MODREF *wm; - int len; +// int len; HANDLE procheap = GetProcessHeap(); wm = (WINE_MODREF *)HeapAlloc(procheap, HEAP_ZERO_MEMORY, sizeof(*wm)); @@ -236,7 +236,7 @@ WINE_MODREF *ELFDLL_LoadLibraryExA(LPCSTR path, DWORD flags) { LPVOID dlhandle; - struct elfdll_image *image; +// struct elfdll_image *image; char name[129]; char soname[129]; WINE_MODREF *wm; diff -ur --exclude-from dontdiff vanilla/main/loader/ext.c main/loader/ext.c --- vanilla/main/loader/ext.c 2002-09-19 18:44:32.000000000 +0200 +++ main/loader/ext.c 2002-10-28 14:31:33.000000000 +0100 @@ -327,7 +327,6 @@ printf("offsets larger than 4Gb not supported\n"); return munmap( start, size_low ); } -static int mapping_size=0; struct file_mapping_s; typedef struct file_mapping_s @@ -505,7 +504,7 @@ if(answer==(void*)-1) { printf("Error no %d\n", errno); - printf("VirtualAlloc(0x%p, %ld) failed\n", address, size); + printf("VirtualAlloc(0x%p, %u) failed\n", address, size); return NULL; } else diff -ur --exclude-from dontdiff vanilla/main/loader/module.c main/loader/module.c --- vanilla/main/loader/module.c 2002-09-19 18:44:35.000000000 +0200 +++ main/loader/module.c 2002-10-28 14:30:22.000000000 +0100 @@ -184,7 +184,6 @@ static WIN_BOOL MODULE_DllProcessAttach( WINE_MODREF *wm, LPVOID lpReserved ) { WIN_BOOL retv = TRUE; - int i; assert( wm ); /* prevent infinite recursion in case of cyclical dependencies */ @@ -245,7 +244,7 @@ static void MODULE_DllProcessDetach( WINE_MODREF* wm, WIN_BOOL bForceDetach, LPVOID lpReserved ) { // WINE_MODREF *wm=local_wm; - modref_list* l = local_wm; + // modref_list* l = local_wm; wm->flags &= ~WINE_MODREF_PROCESS_ATTACHED; MODULE_InitDll( wm, DLL_PROCESS_DETACH, lpReserved ); /* while (l) @@ -272,7 +271,7 @@ { DWORD err = GetLastError(); WINE_MODREF *pwm; - int i; +// int i; // module_loadorder_t *plo; SetLastError( ERROR_FILE_NOT_FOUND ); @@ -300,7 +299,7 @@ } - WARN("Failed to load module '%s'; error=0x%08lx, \n", libname, GetLastError()); + WARN("Failed to load module '%s'; error=0x%08x, \n", libname, GetLastError()); return NULL; } @@ -485,9 +484,9 @@ FARPROC retproc; if (HIWORD(function)) - TRACE_(win32)("(%08lx,%s)\n",(DWORD)hModule,function); + TRACE_(win32)("(%08x,%s)\n",(DWORD)hModule,function); else - TRACE_(win32)("(%08lx,%p)\n",(DWORD)hModule,function); + TRACE_(win32)("(%08x,%p)\n",(DWORD)hModule,function); if (!wm) { SetLastError(ERROR_INVALID_HANDLE); return (FARPROC)0; diff -ur --exclude-from dontdiff vanilla/main/loader/pe_image.c main/loader/pe_image.c --- vanilla/main/loader/pe_image.c 2002-09-19 18:44:38.000000000 +0200 +++ main/loader/pe_image.c 2002-10-28 14:28:32.000000000 +0100 @@ -81,7 +81,7 @@ Module = (char*)RVA(pe_exports->Name); TRACE("*******EXPORT DATA*******\n"); - TRACE("Module name is %s, %ld functions, %ld names\n", + TRACE("Module name is %s, %u functions, %u names\n", Module, pe_exports->NumberOfFunctions, pe_exports->NumberOfNames); ordinal=(u_short*) RVA(pe_exports->AddressOfNameOrdinals); @@ -94,7 +94,7 @@ if (!*function) continue; if (TRACE_ON(win32)) { - DPRINTF( "%4ld %08lx %p", i + pe_exports->Base, *function, RVA(*function) ); + DPRINTF( "%4u %08lx %p", i + pe_exports->Base, *function, RVA(*function) ); for (j = 0; j < pe_exports->NumberOfNames; j++) if (ordinal[j] == i) @@ -126,7 +126,7 @@ u_long * function; u_char ** name; const char *ename = NULL; - int i, ordinal; + unsigned int i, ordinal; PE_MODREF *pem = &(wm->binfmt.pe); IMAGE_EXPORT_DIRECTORY *exports = pem->pe_export; unsigned int load_addr = wm->module; @@ -200,7 +200,7 @@ found: if (ordinal >= exports->NumberOfFunctions) { - TRACE(" ordinal %ld out of range!\n", ordinal + exports->Base ); + TRACE(" ordinal %u out of range!\n", ordinal + exports->Base ); return NULL; } addr = function[ordinal]; @@ -225,7 +225,7 @@ char *end = strchr(forward, '.'); if (!end) return NULL; - if (end - forward >= sizeof(module)) return NULL; + if (end - forward >= (int)sizeof(module)) return NULL; memcpy( module, forward, end - forward ); module[end-forward] = 0; if (!(wm = MODULE_FindModule( module ))) @@ -281,7 +281,6 @@ */ for (i = 0, pe_imp = pem->pe_import; pe_imp->Name ; pe_imp++) { - WINE_MODREF *wmImp; IMAGE_IMPORT_BY_NAME *pe_name; PIMAGE_THUNK_DATA import_list,thunk_list; char *name = (char *) RVA(pe_imp->Name); @@ -339,14 +338,14 @@ static int calc_vma_size( HMODULE hModule ) { - int i,vma_size = 0; + unsigned int i,vma_size = 0; IMAGE_SECTION_HEADER *pe_seg = PE_SECTIONS(hModule); TRACE("Dump of segment table\n"); TRACE(" Name VSz Vaddr SzRaw Fileadr *Reloc *Lineum #Reloc #Linum Char\n"); for (i = 0; i< PE_HEADER(hModule)->FileHeader.NumberOfSections; i++) { - TRACE("%8s: %4.4lx %8.8lx %8.8lx %8.8lx %8.8lx %8.8lx %4.4x %4.4x %8.8lx\n", + TRACE("%8s: %4.4x %8.8x %8.8x %8.8x %8.8x %8.8x %4.4x %4.4x %8.8x\n", pe_seg->Name, pe_seg->Misc.VirtualSize, pe_seg->VirtualAddress, @@ -378,7 +377,7 @@ char *page = (char*) RVA(r->VirtualAddress); int count = (r->SizeOfBlock - 8)/2; int i; - TRACE_(fixup)("%x relocations for page %lx\n", + TRACE_(fixup)("%x relocations for page %x\n", count, r->VirtualAddress); for(i=0;iSignature != IMAGE_NT_SIGNATURE ) { - WARN("%s image doesn't have PE signature, but 0x%08lx\n", filename, nt->Signature ); + WARN("%s image doesn't have PE signature, but 0x%08x\n", filename, nt->Signature ); goto error; } @@ -524,7 +522,7 @@ aoep = nt->OptionalHeader.AddressOfEntryPoint; if (aoep && (aoep < lowest_va)) - FIXME("VIRUS WARNING: '%s' has an invalid entrypoint (0x%08lx) " + FIXME("VIRUS WARNING: '%s' has an invalid entrypoint (0x%08x) " "below the first virtual address (0x%08x) " "(possibly infected by Tchernobyl/SpaceFiller virus)!\n", filename, aoep, lowest_va ); @@ -599,9 +597,9 @@ } } - TRACE("Load addr is %lx (base %lx), range %x\n", + TRACE("Load addr is %x (base %x), range %x\n", load_addr, nt->OptionalHeader.ImageBase, vma_size ); - TRACE_(segment)("Loading %s at %lx, range %x\n", + TRACE_(segment)("Loading %s at %x, range %x\n", filename, load_addr, vma_size ); #if 0 @@ -628,7 +626,7 @@ for (i = 0; i < nt->FileHeader.NumberOfSections; i++, pe_sec++) { if (!pe_sec->SizeOfRawData || !pe_sec->PointerToRawData) continue; - TRACE("%s: mmaping section %s at %p off %lx size %lx/%lx\n", + TRACE("%s: mmaping section %s at %p off %x size %x/%x\n", filename, pe_sec->Name, (void*)RVA(pe_sec->VirtualAddress), pe_sec->PointerToRawData, pe_sec->SizeOfRawData, pe_sec->Misc.VirtualSize ); if ((void*)FILE_dommap( unix_handle, (void*)RVA(pe_sec->VirtualAddress), @@ -696,10 +694,6 @@ IMAGE_EXPORT_DIRECTORY *pe_export = NULL; IMAGE_RESOURCE_DIRECTORY *pe_resource = NULL; WINE_MODREF *wm; - int result; - - - dir = nt->OptionalHeader.DataDirectory+IMAGE_DIRECTORY_ENTRY_EXPORT; if (dir->Size) @@ -923,7 +917,7 @@ if(entry==NULL) entry = (void*)RVA_PTR( wm->module,OptionalHeader.AddressOfEntryPoint ); - TRACE_(relay)("CallTo32(entryproc=%p,module=%08x,type=%ld,res=%p)\n", + TRACE_(relay)("CallTo32(entryproc=%p,module=%08x,type=%u,res=%p)\n", entry, wm->module, type, lpReserved ); @@ -951,6 +945,7 @@ return retv; } +/* static LPVOID _fixup_address(PIMAGE_OPTIONAL_HEADER opt,int delta,LPVOID addr) { if ( ((DWORD)addr>opt->ImageBase) && @@ -962,3 +957,4 @@ return addr; } +*/ diff -ur --exclude-from dontdiff vanilla/main/loader/registry.c main/loader/registry.c --- vanilla/main/loader/registry.c 2002-09-19 18:44:40.000000000 +0200 +++ main/loader/registry.c 2002-10-28 14:45:52.000000000 +0100 @@ -175,7 +175,7 @@ localregpathname = 0; } - +/* static reg_handle_t* find_handle_by_name(const char* name) { reg_handle_t* t; @@ -188,6 +188,8 @@ } return 0; } +*/ + static struct reg_value* find_value_by_name(const char* name) { int i; @@ -256,7 +258,6 @@ } static struct reg_value* insert_reg_value(int handle, const char* name, int type, const void* value, int len) { - reg_handle_t* t; struct reg_value* v; char* fullname; if((fullname=build_keyname(handle, name))==NULL) @@ -330,6 +331,7 @@ insert_handle(HKEY_CURRENT_USER, "HKCU"); } +/* static reg_handle_t* find_handle_2(long key, const char* subkey) { char* full_name; @@ -349,6 +351,7 @@ free(full_name); return t; } +*/ long RegOpenKeyExA(long key, const char* subkey, long reserved, long access, int* newkey) { @@ -490,9 +493,9 @@ struct reg_value* v=find_value_by_name(t->name); if (v) { - memcpy(data, v->value, (v->len < *count) ? v->len : *count); - if(*count < v->len) - *count = v->len; + memcpy(data, v->value, ((unsigned int)v->len < *count) ? (unsigned int)v->len : *count); + if(*count < (unsigned int)v->len) + *count = (unsigned int)v->len; if (type) *type = v->type; //printf("Found handle %s\n", v->name); diff -ur --exclude-from dontdiff vanilla/main/loader/resource.c main/loader/resource.c --- vanilla/main/loader/resource.c 2002-09-19 18:44:42.000000000 +0200 +++ main/loader/resource.c 2002-10-28 14:42:19.000000000 +0100 @@ -102,13 +102,13 @@ static DWORD RES_SizeofResource( HMODULE hModule, HRSRC hRsrc) { DWORD size = 0; - HRSRC hRsrc32; +// HRSRC hRsrc32; // HMODULE16 hMod16 = MapHModuleLS( hModule ); // NE_MODULE *pModule = NE_GetPtr( hMod16 ); // WINE_MODREF *wm = pModule && pModule->module32? // MODULE32_LookupHMODULE( pModule->module32 ) : NULL; - WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); +// WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); if ( !hModule || !hRsrc ) return 0; @@ -131,7 +131,7 @@ { HFILE hFile = HFILE_ERROR; - WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); +// WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); if ( !hModule || !hRsrc ) return HFILE_ERROR; @@ -148,7 +148,7 @@ static HGLOBAL RES_LoadResource( HMODULE hModule, HRSRC hRsrc) { HGLOBAL hMem = 0; - HRSRC hRsrc32; +// HRSRC hRsrc32; WINE_MODREF *wm = MODULE32_LookupHMODULE( hModule ); @@ -397,7 +397,7 @@ PMESSAGE_RESOURCE_ENTRY mre; int i,slen; - TRACE("instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen); + TRACE("instance = %08x, id = %08x, buffer = %p, length = %d\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen); /*FIXME: I am not sure about the '1' ... But I've only seen those entries*/ hrsrc = FindResourceExW(instance,RT_MESSAGELISTW,(LPWSTR)1,lang); diff -ur --exclude-from dontdiff vanilla/main/loader/win32.c main/loader/win32.c --- vanilla/main/loader/win32.c 2002-10-13 15:50:00.000000000 +0200 +++ main/loader/win32.c 2002-10-28 14:40:06.000000000 +0100 @@ -222,11 +222,10 @@ // have to be cleared by GARBAGE COLLECTOR -static unsigned char* heap=NULL; -static int heap_counter=0; static tls_t* g_tls=NULL; static th_list* list=NULL; +/* static void test_heap(void) { int offset=0; @@ -247,10 +246,14 @@ printf("Free heap corruption at address %d\n", offset); } } +*/ #undef MEMORY_DEBUG #ifdef MEMORY_DEBUG +static unsigned char* heap=NULL; +static int heap_counter=0; + static void* my_mreq(int size, int to_zero) { static int test=0; @@ -310,8 +313,8 @@ // let's keep allocated data 16 byte aligned alloc_header* prev; alloc_header* next; - long deadbeef; - long size; + unsigned long deadbeef; + unsigned long size; long type; long reserved1; long reserved2; @@ -335,7 +338,7 @@ pthread_t id; pthread_mutex_t mutex; int locked; - long deadbeef; + unsigned long deadbeef; }; void* mreq_private(int size, int to_zero, int type); @@ -383,7 +386,7 @@ if (memory == 0) return 0; - if (header->deadbeef != (long) 0xdeadbeef) + if (header->deadbeef != 0xdeadbeef) { printf("FATAL releasing corrupted memory! %p 0x%lx (%d)\n", header, header->deadbeef, alccnt); return 0; @@ -946,7 +949,7 @@ } } /* set the CPU type of the current processor */ - sprintf(buf,"CPU %ld",cachedsi.dwProcessorType); + sprintf(buf,"CPU %u",cachedsi.dwProcessorType); continue; } /* old 2.0 method */ @@ -973,7 +976,7 @@ } } /* set the CPU type of the current processor */ - sprintf(buf,"CPU %ld",cachedsi.dwProcessorType); + sprintf(buf,"CPU %u",cachedsi.dwProcessorType); continue; } if (!lstrncmpiA(line,"fdiv_bug",strlen("fdiv_bug"))) { @@ -1256,7 +1259,7 @@ #else struct CRITSECT* cs = (*(struct CRITSECT**)c); #endif - dbgprintf("EnterCriticalSection(0x%x) %p maso:0x%x\n",c, cs, (cs)?cs->deadbeef:NULL); + dbgprintf("EnterCriticalSection(0x%x) %p maso:0x%x\n",c, cs, (cs)?cs->deadbeef:0); if (!cs) { dbgprintf("entered uninitialized critisec!\n"); @@ -1628,7 +1631,7 @@ { pthread_mutex_t *pm; pthread_cond_t *pc; - mutex_list* pp; +// mutex_list* pp; /* printf("CreateSemaphoreA(%p = %s)\n", name, (name ? name : "")); pp=mlist; @@ -2044,7 +2047,7 @@ static int WINAPI expGetStartupInfoA(STARTUPINFOA *s) { - int i; +// int i; dbgprintf("GetStartupInfoA(0x%x) => 1\n"); memset(s, 0, sizeof(*s)); s->cb=sizeof(*s); @@ -2133,7 +2136,7 @@ { int result = 0; char* lastbc; - int i; +// int i; if (!name) return -1; // we skip to the last backslash @@ -2371,7 +2374,7 @@ const char* filename) { int result; - int size; + unsigned int size; char* fullname; dbgprintf("GetPrivateProfileStringA('%s', '%s', def_val '%s', 0x%x, 0x%x, '%s')", appname, keyname, def_val, dest, len, filename ); if(!(appname && keyname && filename) ) return 0; @@ -3169,7 +3172,7 @@ static LONG WINAPI explstrcpynA(char* str1, const char* str2,int len) { int result; - if (strlen(str2)>len) + if (strlen(str2)>(unsigned int)len) result = (int) strncpy(str1, str2,len); else result = (int) strcpy(str1,str2); @@ -3560,11 +3563,12 @@ } /* doens't work */ +/* static long exp_ftol_wrong(double x) { return (long) x; } - +*/ #else static void explog10(void) @@ -4273,7 +4277,7 @@ printf("External func %s:%d\n", library, ordinal); - for(i=0; i #include +#include #include "sub_cc.h" diff -ur --exclude-from dontdiff vanilla/main/subreader.c main/subreader.c --- vanilla/main/subreader.c 2002-10-17 09:26:04.000000000 +0200 +++ main/subreader.c 2002-10-28 14:08:04.000000000 +0100 @@ -239,11 +239,11 @@ len=0; for (p=line; *p!='\n' && *p!='\r' && *p; p++,len++); if (len) { - int j=0,skip=0; + int j,skip=0; char *curptr=current->text[i]=(char *)malloc (len+1); if (!current->text[i]) return ERR; //strncpy (current->text[i], line, len); current->text[i][len]='\0'; - for(j; j') { skip=0; @@ -865,7 +865,7 @@ char * sub_name1; char * sub_name2; char * aviptr1, * aviptr2, * tmp; - int i,j; + unsigned int i,j; FILE * f; int pos=0; char * sub_exts[] = diff -ur --exclude-from dontdiff vanilla/main/subreader.h main/subreader.h --- vanilla/main/subreader.h 2002-09-22 20:19:55.000000000 +0200 +++ main/subreader.h 2002-10-28 14:12:57.000000000 +0100 @@ -42,5 +42,5 @@ void dump_mpsub(subtitle* subs, float fps); void dump_microdvd(subtitle* subs, float fps); void sub_free( subtitle * subs ); -void find_sub(subtitle* subtitles,int key); +void find_sub(subtitle* subtitles,unsigned int key); #endif diff -ur --exclude-from dontdiff vanilla/main/unrarlib.c main/unrarlib.c --- vanilla/main/unrarlib.c 2002-09-20 03:26:39.000000000 +0200 +++ main/unrarlib.c 2002-10-28 14:20:17.000000000 +0100 @@ -319,7 +319,7 @@ long CurBlockPos,NextBlockPos; unsigned long CurUnpRead, CurUnpWrite; -long UnpPackedSize; +unsigned long UnpPackedSize; long DestUnpSize; UDWORD HeaderCRC; @@ -1676,7 +1676,10 @@ UnpReadBuf(0); DecodeNumber((struct Decode *)&BD); if (Number<16) - Table[I++]=(Number+UnpOldTable[I]) & 0xf; + { + Table[I]=(Number+UnpOldTable[I]) & 0xf; + I++; + } else if (Number==16) { Only in main: warnings Only in main: warnings2 Only in main: warnings3 Only in main: warnings4