mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 21:10:15 +00:00
dmscript: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com> Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
33041701dc
commit
223d76cdb7
|
@ -1,4 +1,3 @@
|
|||
EXTRADEFS = -DWINE_NO_LONG_TYPES
|
||||
MODULE = dmscript.dll
|
||||
IMPORTS = dxguid uuid ole32 advapi32
|
||||
|
||||
|
|
|
@ -226,10 +226,10 @@ void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *desc)
|
|||
return;
|
||||
|
||||
TRACE_(dmfile)("DMUS_OBJECTDESC (%p):", desc);
|
||||
TRACE_(dmfile)(" - dwSize = %u\n", desc->dwSize);
|
||||
TRACE_(dmfile)(" - dwSize = %lu\n", desc->dwSize);
|
||||
|
||||
#define X(flag) if (desc->dwValidData & flag) TRACE_(dmfile)(#flag " ")
|
||||
TRACE_(dmfile)(" - dwValidData = %#08x ( ", desc->dwValidData);
|
||||
TRACE_(dmfile)(" - dwValidData = %#08lx ( ", desc->dwValidData);
|
||||
X(DMUS_OBJ_OBJECT);
|
||||
X(DMUS_OBJ_CLASS);
|
||||
X(DMUS_OBJ_NAME);
|
||||
|
@ -285,7 +285,7 @@ const char *debugstr_chunk(const struct chunk_entry *chunk)
|
|||
return "(null)";
|
||||
if (chunk->id == FOURCC_RIFF || chunk->id == FOURCC_LIST)
|
||||
type = wine_dbg_sprintf("type %s, ", debugstr_fourcc(chunk->type));
|
||||
return wine_dbg_sprintf("%s chunk, %ssize %u", debugstr_fourcc(chunk->id), type, chunk->size);
|
||||
return wine_dbg_sprintf("%s chunk, %ssize %lu", debugstr_fourcc(chunk->id), type, chunk->size);
|
||||
}
|
||||
|
||||
static HRESULT stream_read(IStream *stream, void *data, ULONG size)
|
||||
|
@ -295,10 +295,10 @@ static HRESULT stream_read(IStream *stream, void *data, ULONG size)
|
|||
|
||||
hr = IStream_Read(stream, data, size, &read);
|
||||
if (FAILED(hr))
|
||||
TRACE_(dmfile)("IStream_Read failed: %08x\n", hr);
|
||||
TRACE_(dmfile)("IStream_Read failed: %08lx\n", hr);
|
||||
else if (!read && read < size) {
|
||||
/* All or nothing: Handle a partial read due to end of stream as an error */
|
||||
TRACE_(dmfile)("Short read: %u < %u\n", read, size);
|
||||
TRACE_(dmfile)("Short read: %lu < %lu\n", read, size);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
@ -393,7 +393,7 @@ HRESULT stream_chunk_get_array(IStream *stream, const struct chunk_entry *chunk,
|
|||
if (FAILED(hr = stream_read(stream, &size, sizeof(DWORD))))
|
||||
return hr;
|
||||
if (size != elem_size) {
|
||||
WARN_(dmfile)("%s: Array element size mismatch: got %u, expected %u\n",
|
||||
WARN_(dmfile)("%s: Array element size mismatch: got %lu, expected %lu\n",
|
||||
debugstr_chunk(chunk), size, elem_size);
|
||||
return DMUS_E_UNSUPPORTED_STREAM;
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ HRESULT stream_chunk_get_data(IStream *stream, const struct chunk_entry *chunk,
|
|||
ULONG size)
|
||||
{
|
||||
if (chunk->size != size) {
|
||||
WARN_(dmfile)("Chunk %s (size %u, offset %s) doesn't contains the expected data size %u\n",
|
||||
WARN_(dmfile)("Chunk %s (size %lu, offset %s) doesn't contains the expected data size %lu\n",
|
||||
debugstr_fourcc(chunk->id), chunk->size,
|
||||
wine_dbgstr_longlong(chunk->offset.QuadPart), size);
|
||||
return E_FAIL;
|
||||
|
@ -567,7 +567,7 @@ HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff,
|
|||
struct chunk_entry chunk = {.parent = riff};
|
||||
HRESULT hr;
|
||||
|
||||
TRACE("Looking for %#x in %p: %s\n", supported, stream, debugstr_chunk(riff));
|
||||
TRACE("Looking for %#lx in %p: %s\n", supported, stream, debugstr_chunk(riff));
|
||||
|
||||
desc->dwValidData = 0;
|
||||
desc->dwSize = sizeof(*desc);
|
||||
|
@ -612,7 +612,7 @@ HRESULT dmobj_parsedescriptor(IStream *stream, const struct chunk_entry *riff,
|
|||
break;
|
||||
}
|
||||
}
|
||||
TRACE("Found %#x\n", desc->dwValidData);
|
||||
TRACE("Found %#lx\n", desc->dwValidData);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
@ -636,7 +636,7 @@ HRESULT dmobj_parsereference(IStream *stream, const struct chunk_entry *list,
|
|||
WARN("Failed to read data of %s\n", debugstr_chunk(&chunk));
|
||||
return hr;
|
||||
}
|
||||
TRACE("REFERENCE guidClassID %s, dwValidData %#x\n", debugstr_dmguid(&reference.guidClassID),
|
||||
TRACE("REFERENCE guidClassID %s, dwValidData %#lx\n", debugstr_dmguid(&reference.guidClassID),
|
||||
reference.dwValidData);
|
||||
|
||||
if (FAILED(hr = dmobj_parsedescriptor(stream, list, &desc, reference.dwValidData)))
|
||||
|
|
|
@ -76,7 +76,7 @@ static ULONG WINAPI IDirectMusicScriptImpl_AddRef(IDirectMusicScript *iface)
|
|||
IDirectMusicScriptImpl *This = impl_from_IDirectMusicScript(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ static ULONG WINAPI IDirectMusicScriptImpl_Release(IDirectMusicScript *iface)
|
|||
IDirectMusicScriptImpl *This = impl_from_IDirectMusicScript(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if (!ref) {
|
||||
HeapFree(GetProcessHeap(), 0, This->pHeader);
|
||||
|
@ -139,7 +139,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_SetVariableNumber(IDirectMusicScrip
|
|||
WCHAR *pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo)
|
||||
{
|
||||
IDirectMusicScriptImpl *This = impl_from_IDirectMusicScript(iface);
|
||||
FIXME("(%p, %s, %i, %p): stub\n", This, debugstr_w(pwszVariableName), lValue, pErrorInfo);
|
||||
FIXME("(%p, %s, %li, %p): stub\n", This, debugstr_w(pwszVariableName), lValue, pErrorInfo);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine(IDirectMusicScript *ifa
|
|||
WCHAR *pwszName)
|
||||
{
|
||||
IDirectMusicScriptImpl *This = impl_from_IDirectMusicScript(iface);
|
||||
FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName);
|
||||
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ static HRESULT WINAPI IDirectMusicScriptImpl_EnumVariable(IDirectMusicScript *if
|
|||
WCHAR *pwszName)
|
||||
{
|
||||
IDirectMusicScriptImpl *This = impl_from_IDirectMusicScript(iface);
|
||||
FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName);
|
||||
FIXME("(%p, %ld, %p): stub\n", This, dwIndex, pwszName);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
|
|||
|
||||
FIXME("(%p, %p): Loading not implemented yet\n", This, pStm);
|
||||
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
|
||||
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
|
||||
TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
|
||||
switch (Chunk.fccID) {
|
||||
case FOURCC_RIFF: {
|
||||
IStream_Read (pStm, &Chunk.fccID, sizeof(FOURCC), NULL);
|
||||
|
@ -272,7 +272,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
|
|||
do {
|
||||
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
|
||||
StreamCount += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
|
||||
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
|
||||
TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
|
||||
switch (Chunk.fccID) {
|
||||
case DMUS_FOURCC_SCRIPT_CHUNK: {
|
||||
TRACE_(dmfile)(": script header chunk\n");
|
||||
|
@ -284,7 +284,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
|
|||
TRACE_(dmfile)(": script version chunk\n");
|
||||
This->pVersion = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, Chunk.dwSize);
|
||||
IStream_Read (pStm, This->pVersion, Chunk.dwSize, NULL);
|
||||
TRACE_(dmfile)("version: 0x%08x.0x%08x\n", This->pVersion->dwVersionMS, This->pVersion->dwVersionLS);
|
||||
TRACE_(dmfile)("version: 0x%08lx.0x%08lx\n", This->pVersion->dwVersionMS, This->pVersion->dwVersionLS);
|
||||
break;
|
||||
}
|
||||
case DMUS_FOURCC_SCRIPTLANGUAGE_CHUNK: {
|
||||
|
@ -385,7 +385,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
|
|||
do {
|
||||
IStream_Read (pStm, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL);
|
||||
ListCount[0] += sizeof(FOURCC) + sizeof(DWORD) + Chunk.dwSize;
|
||||
TRACE_(dmfile)(": %s chunk (size = %d)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
|
||||
TRACE_(dmfile)(": %s chunk (size = %ld)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize);
|
||||
switch (Chunk.fccID) {
|
||||
/* don't ask me why, but M$ puts INFO elements in UNFO list sometimes
|
||||
(though strings seem to be valid unicode) */
|
||||
|
@ -431,7 +431,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
|
|||
break;
|
||||
}
|
||||
}
|
||||
TRACE_(dmfile)(": ListCount[0] = %d < ListSize[0] = %d\n", ListCount[0], ListSize[0]);
|
||||
TRACE_(dmfile)(": ListCount[0] = %ld < ListSize[0] = %ld\n", ListCount[0], ListSize[0]);
|
||||
} while (ListCount[0] < ListSize[0]);
|
||||
break;
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ static HRESULT WINAPI IPersistStreamImpl_Load(IPersistStream *iface, IStream *pS
|
|||
break;
|
||||
}
|
||||
}
|
||||
TRACE_(dmfile)(": StreamCount[0] = %d < StreamSize[0] = %d\n", StreamCount, StreamSize);
|
||||
TRACE_(dmfile)(": StreamCount[0] = %ld < StreamSize[0] = %ld\n", StreamCount, StreamSize);
|
||||
} while (StreamCount < StreamSize);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ static ULONG WINAPI script_track_AddRef(IDirectMusicTrack8 *iface)
|
|||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
LONG ref = InterlockedIncrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ static ULONG WINAPI script_track_Release(IDirectMusicTrack8 *iface)
|
|||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
LONG ref = InterlockedDecrement(&This->ref);
|
||||
|
||||
TRACE("(%p) ref=%d\n", This, ref);
|
||||
TRACE("(%p) ref=%ld\n", This, ref);
|
||||
|
||||
if (!ref) {
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
@ -104,7 +104,7 @@ static HRESULT WINAPI script_track_InitPlay(IDirectMusicTrack8 *iface,
|
|||
void **ppStateData, DWORD dwVirtualTrack8ID, DWORD dwFlags)
|
||||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
FIXME("(%p, %p, %p, %p, %d, %d): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
|
||||
FIXME("(%p, %p, %p, %p, %ld, %ld): stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ static HRESULT WINAPI script_track_Play(IDirectMusicTrack8 *iface, void *pStateD
|
|||
IDirectMusicPerformance *pPerf, IDirectMusicSegmentState *pSegSt, DWORD dwVirtualID)
|
||||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
FIXME("(%p, %p, %d, %d, %d, %d, %p, %p, %d): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
||||
FIXME("(%p, %p, %ld, %ld, %ld, %ld, %p, %p, %ld): stub\n", This, pStateData, mtStart, mtEnd, mtOffset, dwFlags, pPerf, pSegSt, dwVirtualID);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ static HRESULT WINAPI script_track_GetParam(IDirectMusicTrack8 *iface, REFGUID t
|
|||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
|
||||
TRACE("(%p, %s, %d, %p, %p): not supported\n", This, debugstr_dmguid(type), time, next, param);
|
||||
TRACE("(%p, %s, %ld, %p, %p): not supported\n", This, debugstr_dmguid(type), time, next, param);
|
||||
|
||||
return DMUS_E_GET_UNSUPPORTED;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ static HRESULT WINAPI script_track_SetParam(IDirectMusicTrack8 *iface, REFGUID t
|
|||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
|
||||
TRACE("(%p, %s, %d, %p): not supported\n", This, debugstr_dmguid(type), time, param);
|
||||
TRACE("(%p, %s, %ld, %p): not supported\n", This, debugstr_dmguid(type), time, param);
|
||||
|
||||
return DMUS_E_SET_UNSUPPORTED;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ static HRESULT WINAPI script_track_Clone(IDirectMusicTrack8 *iface, MUSIC_TIME m
|
|||
MUSIC_TIME mtEnd, IDirectMusicTrack **ppTrack)
|
||||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
FIXME("(%p, %d, %d, %p): stub\n", This, mtStart, mtEnd, ppTrack);
|
||||
FIXME("(%p, %ld, %ld, %p): stub\n", This, mtStart, mtEnd, ppTrack);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ static HRESULT WINAPI script_track_PlayEx(IDirectMusicTrack8 *iface, void *pStat
|
|||
IDirectMusicPerformance *pPerf, IDirectMusicSegmentState *pSegSt, DWORD dwVirtualID)
|
||||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
FIXME("(%p, %p, 0x%s, 0x%s, 0x%s, %d, %p, %p, %d): stub\n", This, pStateData, wine_dbgstr_longlong(rtStart),
|
||||
FIXME("(%p, %p, 0x%s, 0x%s, 0x%s, %ld, %p, %p, %ld): stub\n", This, pStateData, wine_dbgstr_longlong(rtStart),
|
||||
wine_dbgstr_longlong(rtEnd), wine_dbgstr_longlong(rtOffset), dwFlags, pPerf, pSegSt, dwVirtualID);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ static HRESULT WINAPI script_track_GetParamEx(IDirectMusicTrack8 *iface, REFGUID
|
|||
DWORD dwFlags)
|
||||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
FIXME("(%p, %s, 0x%s, %p, %p, %p, %d): stub\n", This, debugstr_dmguid(rguidType),
|
||||
FIXME("(%p, %s, 0x%s, %p, %p, %p, %ld): stub\n", This, debugstr_dmguid(rguidType),
|
||||
wine_dbgstr_longlong(rtTime), prtNext, pParam, pStateData, dwFlags);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ static HRESULT WINAPI script_track_SetParamEx(IDirectMusicTrack8 *iface, REFGUID
|
|||
REFERENCE_TIME rtTime, void *pParam, void *pStateData, DWORD dwFlags)
|
||||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
FIXME("(%p, %s, 0x%s, %p, %p, %d): stub\n", This, debugstr_dmguid(rguidType),
|
||||
FIXME("(%p, %s, 0x%s, %p, %p, %ld): stub\n", This, debugstr_dmguid(rguidType),
|
||||
wine_dbgstr_longlong(rtTime), pParam, pStateData, dwFlags);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ static HRESULT WINAPI script_track_Compose(IDirectMusicTrack8 *iface, IUnknown *
|
|||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
|
||||
TRACE("(%p, %p, %d, %p): method not implemented\n", This, context, group, res_track);
|
||||
TRACE("(%p, %p, %ld, %p): method not implemented\n", This, context, group, res_track);
|
||||
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ static HRESULT WINAPI script_track_Join(IDirectMusicTrack8 *iface, IDirectMusicT
|
|||
{
|
||||
DirectMusicScriptTrack *This = impl_from_IDirectMusicTrack8(iface);
|
||||
|
||||
TRACE("(%p, %p, %d, %p, %d, %p): method not implemented\n", This, track2, join, context,
|
||||
TRACE("(%p, %p, %ld, %p, %ld, %p): method not implemented\n", This, track2, join, context,
|
||||
group, res_track);
|
||||
|
||||
return E_NOTIMPL;
|
||||
|
|
Loading…
Reference in a new issue