From ba35b2aa8ecf6cb4c91922c7e412e0bdbff478aa Mon Sep 17 00:00:00 2001 From: The Wine Synchronizer Date: Fri, 4 Apr 2008 12:03:12 +0000 Subject: [PATCH] Autosyncing with Wine HEAD svn path=/trunk/; revision=32835 --- reactos/dll/win32/avifil32/acmstream.c | 2 +- reactos/dll/win32/avifil32/api.c | 11 ++++++----- reactos/dll/win32/avifil32/avifil32.rbuild | 20 ++++++++++---------- reactos/dll/win32/avifil32/avifile.c | 20 ++++++++++---------- reactos/dll/win32/avifil32/avifile_Ko.rc | 6 +++--- reactos/dll/win32/avifil32/editstream.c | 4 ++-- reactos/dll/win32/avifil32/factory.c | 9 ++++----- reactos/dll/win32/avifil32/getframe.c | 2 +- reactos/dll/win32/avifil32/icmstream.c | 2 +- reactos/dll/win32/avifil32/wavfile.c | 8 ++++---- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/reactos/dll/win32/avifil32/acmstream.c b/reactos/dll/win32/avifil32/acmstream.c index 47013ef7de5..378ff7f7885 100644 --- a/reactos/dll/win32/avifil32/acmstream.c +++ b/reactos/dll/win32/avifil32/acmstream.c @@ -467,7 +467,7 @@ static HRESULT WINAPI ACMStream_fnRead(IAVIStream *iface, LONG start, if (This->acmStreamHdr.pbSrc == NULL) This->acmStreamHdr.pbSrc = HeapAlloc(GetProcessHeap(), 0, size); else - This->acmStreamHdr.pbDst = HeapReAlloc(GetProcessHeap(), 0, This->acmStreamHdr.pbSrc, size); + This->acmStreamHdr.pbSrc = HeapReAlloc(GetProcessHeap(), 0, This->acmStreamHdr.pbSrc, size); if (This->acmStreamHdr.pbSrc == NULL) return AVIERR_MEMORY; This->acmStreamHdr.dwSrcUser = size; diff --git a/reactos/dll/win32/avifil32/api.c b/reactos/dll/win32/avifil32/api.c index 465164aa030..b7b21b93de4 100644 --- a/reactos/dll/win32/avifil32/api.c +++ b/reactos/dll/win32/avifil32/api.c @@ -249,7 +249,7 @@ HRESULT WINAPI AVIFileOpenW(PAVIFILE *ppfile, LPCWSTR szFile, UINT uMode, if (! AVIFILE_GetFileHandlerByExtension(szFile, &clsidHandler)) return AVIERR_UNSUPPORTED; } else - memcpy(&clsidHandler, lpHandler, sizeof(clsidHandler)); + clsidHandler = *lpHandler; /* create instance of handler */ hr = CoCreateInstance(&clsidHandler, NULL, CLSCTX_INPROC, &IID_IAVIFile, (LPVOID*)ppfile); @@ -746,7 +746,7 @@ HRESULT WINAPI AVIMakeCompressedStream(PAVISTREAM *ppsCompressed, if (AVIFILE_CLSIDFromString(szValue, &clsidHandler) != S_OK) return AVIERR_UNSUPPORTED; } else - memcpy(&clsidHandler, pclsidHandler, sizeof(clsidHandler)); + clsidHandler = *pclsidHandler; hr = CoCreateInstance(&clsidHandler, NULL, CLSCTX_INPROC, &IID_IAVIStream, (LPVOID*)ppsCompressed); if (FAILED(hr) || *ppsCompressed == NULL) @@ -1077,7 +1077,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving) break; /* a new one */ } - if (count - i == -1U) { + if (i == count + 1) { /* it's a new CLSID */ /* FIXME: How do we get info's about read/write capabilities? */ @@ -1148,7 +1148,7 @@ HRESULT WINAPI AVIBuildFilterW(LPWSTR szFilter, LONG cbFilter, BOOL fSaving) /* add "All files" "*.*" filter if enough space left */ size = LoadStringW(AVIFILE_hModule, IDS_ALLFILES, - szAllFiles, sizeof(szAllFiles)) + 1; + szAllFiles, sizeof(szAllFiles)/sizeof(szAllFiles[0])) + 1; if (cbFilter > size) { int i; @@ -1336,7 +1336,8 @@ static void AVISaveOptionsUpdate(HWND hWnd) } } else { LoadStringW(AVIFILE_hModule, IDS_UNCOMPRESSED, - icinfo.szDescription, sizeof(icinfo.szDescription)); + icinfo.szDescription, + sizeof(icinfo.szDescription)/sizeof(icinfo.szDescription[0])); lstrcatW(szFormat, icinfo.szDescription); } } else if (sInfo.fccType == streamtypeAUDIO) { diff --git a/reactos/dll/win32/avifil32/avifil32.rbuild b/reactos/dll/win32/avifil32/avifil32.rbuild index fc17645da54..cf9e0a40b0a 100644 --- a/reactos/dll/win32/avifil32/avifil32.rbuild +++ b/reactos/dll/win32/avifil32/avifil32.rbuild @@ -9,16 +9,6 @@ 0x600 0x600 - wine - msacm32 - msvfw32 - winmm - ole32 - user32 - advapi32 - kernel32 - uuid - ntdll acmstream.c api.c avifile.c @@ -32,5 +22,15 @@ wavfile.c rsrc.rc avifil32.spec + wine + msacm32 + msvfw32 + winmm + ole32 + user32 + advapi32 + kernel32 + uuid + ntdll diff --git a/reactos/dll/win32/avifil32/avifile.c b/reactos/dll/win32/avifil32/avifile.c index b97fd783bd5..b0ef1cb769a 100644 --- a/reactos/dll/win32/avifil32/avifile.c +++ b/reactos/dll/win32/avifil32/avifile.c @@ -590,7 +590,7 @@ static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile *iface, if (pClassID == NULL) return AVIERR_BADPARAM; - memcpy(pClassID, &CLSID_AVIFile, sizeof(CLSID_AVIFile)); + *pClassID = CLSID_AVIFile; return AVIERR_OK; } @@ -623,7 +623,7 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, if (This->paf->hmmio != NULL) return AVIERR_ERROR; /* No reuse of this object for another file! */ - /* remeber mode and name */ + /* remember mode and name */ This->paf->uMode = dwMode; len = lstrlenW(pszFileName) + 1; @@ -951,7 +951,7 @@ static HRESULT WINAPI IAVIStream_fnSetFormat(IAVIStream *iface, LONG pos, if (This->lpFormat == NULL) { /* initial format */ if (This->paf->dwMoviChunkPos != 0) - return AVIERR_ERROR; /* user has used API in wrong sequnece! */ + return AVIERR_ERROR; /* user has used API in wrong sequence! */ This->lpFormat = HeapAlloc(GetProcessHeap(), 0, formatsize); if (This->lpFormat == NULL) @@ -1413,7 +1413,7 @@ static HRESULT AVIFILE_AddFrame(IAVIStreamImpl *This, DWORD ckid, DWORD size, DW break; }; - /* first frame is alwasy a keyframe */ + /* first frame is always a keyframe */ if (This->lLastFrame == -1) flags |= AVIIF_KEYFRAME; @@ -1656,7 +1656,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) This->fInfo.dwWidth = MainAVIHdr.dwWidth; This->fInfo.dwHeight = MainAVIHdr.dwHeight; LoadStringW(AVIFILE_hModule, IDS_AVIFILETYPE, This->fInfo.szFileType, - sizeof(This->fInfo.szFileType)); + sizeof(This->fInfo.szFileType)/sizeof(This->fInfo.szFileType[0])); /* go back to into header list */ if (mmioAscend(This->hmmio, &ck, 0) != S_OK) @@ -1767,9 +1767,9 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) /* generate description for stream like "filename.avi Type #n" */ if (streamHdr.fccType == streamtypeVIDEO) - LoadStringW(AVIFILE_hModule, IDS_VIDEO, szType, sizeof(szType)); + LoadStringW(AVIFILE_hModule, IDS_VIDEO, szType, sizeof(szType)/sizeof(szType[0])); else if (streamHdr.fccType == streamtypeAUDIO) - LoadStringW(AVIFILE_hModule, IDS_AUDIO, szType, sizeof(szType)); + LoadStringW(AVIFILE_hModule, IDS_AUDIO, szType, sizeof(szType)/sizeof(szType[0])); else wsprintfW(szType, streamTypeFmt, (char*)&streamHdr.fccType); @@ -1782,7 +1782,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFileImpl *This) memset(pStream->sInfo.szName, 0, sizeof(pStream->sInfo.szName)); - LoadStringW(AVIFILE_hModule, IDS_AVISTREAMFORMAT, streamNameFmt, sizeof(streamNameFmt)); + LoadStringW(AVIFILE_hModule, IDS_AVISTREAMFORMAT, streamNameFmt, sizeof(streamNameFmt)/sizeof(streamNameFmt[0])); /* FIXME: avoid overflow -- better use wsnprintfW, which doesn't exists ! */ wsprintfW(pStream->sInfo.szName, streamNameFmt, @@ -2226,7 +2226,7 @@ static HRESULT AVIFILE_SaveFile(IAVIFileImpl *This) /* ... some optional additional extra chunk for this stream ... */ if (pStream->extra.lp != NULL && pStream->extra.cb > 0) { - /* the chunk header(s) are already in the strucuture */ + /* the chunk header(s) are already in the structure */ if (mmioWrite(This->hmmio, (HPSTR)pStream->extra.lp, pStream->extra.cb) != pStream->extra.cb) return AVIERR_FILEWRITE; } @@ -2332,7 +2332,7 @@ static HRESULT AVIFILE_SaveIndex(const IAVIFileImpl *This) return AVIERR_FILEWRITE; if (This->fInfo.dwFlags & AVIFILEINFO_ISINTERLEAVED) { - /* is interleaved -- write block of coresponding frames */ + /* is interleaved -- write block of corresponding frames */ LONG lInitialFrames = 0; LONG stepsize; LONG i; diff --git a/reactos/dll/win32/avifil32/avifile_Ko.rc b/reactos/dll/win32/avifil32/avifile_Ko.rc index 035888cc1be..4bf60041992 100644 --- a/reactos/dll/win32/avifil32/avifile_Ko.rc +++ b/reactos/dll/win32/avifil32/avifile_Ko.rc @@ -31,8 +31,8 @@ BEGIN AUTOCHECKBOX "Ç×»ó »óÈ£¹èÄ¡(&I)",IDC_INTERLEAVE,3,42,60,11,WS_TABSTOP EDITTEXT IDC_INTERLEAVEEVERY,66,41,32,12,ES_AUTOHSCROLL LTEXT "ÇÁ·¹ÀÓ",-1,104,43,36,9 - LTEXT "ÇöÀç Æ÷¸Ë:",-1,3,56,53,9 - LTEXT "»ç¿ëÀ» ¸ñÀûÀ¸·Î ÇÏ´Â °ø",IDC_FORMATTEXT,55,56,90,26 + LTEXT "ÇöÀç Çü½Ä:",-1,3,56,53,9 + LTEXT "ÇÊ¿äÇÑ °ø°£",IDC_FORMATTEXT,55,56,90,26 DEFPUSHBUTTON "È®ÀÎ",IDOK,145,42,45,14 PUSHBUTTON "Ãë¼Ò",IDCANCEL,145,61,45,14 END @@ -46,6 +46,6 @@ STRINGTABLE DISCARDABLE IDS_VIDEO "ºñµð¿À" IDS_AUDIO "¿Àµð¿À" IDS_AVISTREAMFORMAT "%s %s #%d" - IDS_AVIFILETYPE "Wine AVI-±âº»-ÆÄÀÏÇڵ鷯r" + IDS_AVIFILETYPE "Wine AVI-±âº»-ÆÄÀÏÇڵ鷯" IDS_UNCOMPRESSED "ºñ¾ÐÃà" } diff --git a/reactos/dll/win32/avifil32/editstream.c b/reactos/dll/win32/avifil32/editstream.c index 14d361e2a32..8b9eb552f2b 100644 --- a/reactos/dll/win32/avifil32/editstream.c +++ b/reactos/dll/win32/avifil32/editstream.c @@ -424,7 +424,7 @@ static HRESULT WINAPI IAVIEditStream_fnCut(IAVIEditStream*iface,LONG*plStart, if (plStart == NULL || plLength == NULL || *plStart < 0) return AVIERR_BADPARAM; - /* if asked for cutted part copy it before deleting */ + /* if asked for cut part copy it before deleting */ if (ppResult != NULL) { hr = IAVIEditStream_Copy(iface, plStart, plLength, ppResult); if (FAILED(hr)) @@ -620,7 +620,7 @@ static HRESULT WINAPI IAVIEditStream_fnPaste(IAVIEditStream*iface,LONG*plStart, AVIFILE_ReadFrame(This, This->pStreams[0].pStream, This->pStreams[0].dwStart); - /* Check if we could convert the source streams to the disired format... */ + /* Check if we could convert the source streams to the desired format... */ if (pEdit != NULL) { if (FAILED(AVIFILE_FindStreamInTable(pEdit, lStart, &pStream, &startPos, &streamNr, TRUE))) diff --git a/reactos/dll/win32/avifil32/factory.c b/reactos/dll/win32/avifil32/factory.c index 40e4c68d571..6d9afa31a59 100644 --- a/reactos/dll/win32/avifil32/factory.c +++ b/reactos/dll/win32/avifil32/factory.c @@ -25,17 +25,16 @@ #include "wingdi.h" #include "winuser.h" #include "winerror.h" - #include "ole2.h" + +#include "initguid.h" #include "vfw.h" +#include "avifile_private.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(avifile); -#include "initguid.h" -#include "avifile_private.h" - HMODULE AVIFILE_hModule = NULL; static BOOL AVIFILE_bLocked; @@ -78,7 +77,7 @@ static HRESULT AVIFILE_CreateClassFactory(const CLSID *pclsid, const IID *riid, pClassFactory->lpVtbl = &iclassfact; pClassFactory->dwRef = 0; - memcpy(&pClassFactory->clsid, pclsid, sizeof(pClassFactory->clsid)); + pClassFactory->clsid = *pclsid; hr = IClassFactory_QueryInterface((IClassFactory*)pClassFactory, riid, ppv); if (FAILED(hr)) { diff --git a/reactos/dll/win32/avifil32/getframe.c b/reactos/dll/win32/avifil32/getframe.c index d342b1255ae..fd3ec561a95 100644 --- a/reactos/dll/win32/avifil32/getframe.c +++ b/reactos/dll/win32/avifil32/getframe.c @@ -212,7 +212,7 @@ static LPVOID WINAPI IGetFrame_fnGetFrame(IGetFrame *iface, LONG lPos) if (This->lpOutFormat != NULL) { BITMAPINFOHEADER bi; - memcpy(&bi, This->lpOutFormat, sizeof(bi)); + bi = *This->lpOutFormat; AVIFILE_CloseCompressor(This); if (FAILED(IGetFrame_SetFormat(iface, &bi, NULL, 0, 0, -1, -1))) { diff --git a/reactos/dll/win32/avifil32/icmstream.c b/reactos/dll/win32/avifil32/icmstream.c index 82536052d15..8ac2e33682f 100644 --- a/reactos/dll/win32/avifil32/icmstream.c +++ b/reactos/dll/win32/avifil32/icmstream.c @@ -558,7 +558,7 @@ static HRESULT WINAPI ICMStream_fnSetFormat(IAVIStream *iface, LONG pos, if (ICCompressBegin(This->hic, lpbi, This->lpbiOutput) != S_OK) return AVIERR_COMPRESSOR; - /* check if we need to restart decompresion also */ + /* check if we need to restart decompression also */ if (This->lKeyFrameEvery != 1 && (This->dwICMFlags & VIDCF_FASTTEMPORALC) == 0) { ICDecompressEnd(This->hic); diff --git a/reactos/dll/win32/avifil32/wavfile.c b/reactos/dll/win32/avifil32/wavfile.c index d3048d60318..b9779e366c8 100644 --- a/reactos/dll/win32/avifil32/wavfile.c +++ b/reactos/dll/win32/avifil32/wavfile.c @@ -540,7 +540,7 @@ static HRESULT WINAPI IPersistFile_fnGetClassID(IPersistFile *iface, if (pClassID == NULL) return AVIERR_BADPARAM; - memcpy(pClassID, &CLSID_WAVFile, sizeof(CLSID_WAVFile)); + *pClassID = CLSID_WAVFile; return AVIERR_OK; } @@ -574,7 +574,7 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, if (This->hmmio != NULL) return AVIERR_ERROR; /* No reuse of this object for another file! */ - /* remeber mode and name */ + /* remember mode and name */ This->uMode = dwMode; len = lstrlenW(pszFileName) + 1; @@ -607,9 +607,9 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile *iface, memset(& This->sInfo, 0, sizeof(This->sInfo)); LoadStringW(AVIFILE_hModule, IDS_WAVEFILETYPE, This->fInfo.szFileType, - sizeof(This->fInfo.szFileType)); + sizeof(This->fInfo.szFileType)/sizeof(This->fInfo.szFileType[0])); if (LoadStringW(AVIFILE_hModule, IDS_WAVESTREAMFORMAT, - wszStreamFmt, sizeof(wszStreamFmt)) > 0) { + wszStreamFmt, sizeof(wszStreamFmt)/sizeof(wszStreamFmt[0])) > 0) { wsprintfW(This->sInfo.szName, wszStreamFmt, AVIFILE_BasenameW(This->szFileName)); }