dmloader: Modify the debugstr_DMUS_* functions to return strings that never end with a '\n'.
This commit is contained in:
parent
dd28d5be08
commit
5d6ab30c58
|
@ -500,7 +500,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
|
|||
case DMUS_FOURCC_CONTAINER_CHUNK: {
|
||||
TRACE_(dmfile)(": container header chunk\n");
|
||||
IStream_Read (pStm, &This->Header, Chunk.dwSize, NULL);
|
||||
TRACE_(dmdump)(": container header chunk:\n%s", debugstr_DMUS_IO_CONTAINER_HEADER(&This->Header));
|
||||
TRACE_(dmdump)(": container header chunk:\n%s\n", debugstr_DMUS_IO_CONTAINER_HEADER(&This->Header));
|
||||
break;
|
||||
}
|
||||
case DMUS_FOURCC_GUID_CHUNK: {
|
||||
|
@ -615,7 +615,7 @@ static HRESULT WINAPI IDirectMusicContainerImpl_IPersistStream_Load (LPPERSISTST
|
|||
DMUS_IO_CONTAINED_OBJECT_HEADER tmpObjectHeader;
|
||||
TRACE_(dmfile)(": contained object header chunk\n");
|
||||
IStream_Read (pStm, &tmpObjectHeader, Chunk.dwSize, NULL);
|
||||
TRACE_(dmdump)(": contained object header: \n%s", debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER(&tmpObjectHeader));
|
||||
TRACE_(dmdump)(": contained object header: \n%s\n", debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER(&tmpObjectHeader));
|
||||
/* copy guidClass */
|
||||
pNewEntry->Desc.dwValidData |= DMUS_OBJ_CLASS;
|
||||
memcpy (&pNewEntry->Desc.guidClass, &tmpObjectHeader.guidClassID, sizeof(GUID));
|
||||
|
|
|
@ -484,19 +484,19 @@ const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc) {
|
|||
if (pDesc) {
|
||||
char buffer[1024] = "", *ptr = &buffer[0];
|
||||
|
||||
ptr += sprintf(ptr, "DMUS_OBJECTDESC (%p):\n", pDesc);
|
||||
ptr += sprintf(ptr, " - dwSize = 0x%08lX\n", pDesc->dwSize);
|
||||
ptr += sprintf(ptr, " - dwValidData = 0x%08lX ( %s)\n", pDesc->dwValidData, debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_CLASS) ptr += sprintf(ptr, " - guidClass = %s\n", debugstr_dmguid(&pDesc->guidClass));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_OBJECT) ptr += sprintf(ptr, " - guidObject = %s\n", debugstr_guid(&pDesc->guidObject));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_DATE) ptr += sprintf(ptr, " - ftDate = %s\n", debugstr_filetime (&pDesc->ftDate));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_VERSION) ptr += sprintf(ptr, " - vVersion = %s\n", debugstr_dmversion(&pDesc->vVersion));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_NAME) ptr += sprintf(ptr, " - wszName = %s\n", debugstr_w(pDesc->wszName));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) ptr += sprintf(ptr, " - wszCategory = %s\n", debugstr_w(pDesc->wszCategory));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_FILENAME) ptr += sprintf(ptr, " - wszFileName = %s\n", debugstr_w(pDesc->wszFileName));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) ptr += sprintf(ptr, " - llMemLength = 0x%s\n - pbMemData = %p\n",
|
||||
ptr += sprintf(ptr, "DMUS_OBJECTDESC (%p):", pDesc);
|
||||
ptr += sprintf(ptr, "\n - dwSize = 0x%08lX", pDesc->dwSize);
|
||||
ptr += sprintf(ptr, "\n - dwValidData = 0x%08lX (%s)", pDesc->dwValidData, debugstr_DMUS_OBJ_FLAGS (pDesc->dwValidData));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_CLASS) ptr += sprintf(ptr, "\n - guidClass = %s", debugstr_dmguid(&pDesc->guidClass));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_OBJECT) ptr += sprintf(ptr, "\n - guidObject = %s", debugstr_guid(&pDesc->guidObject));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_DATE) ptr += sprintf(ptr, "\n - ftDate = %s", debugstr_filetime (&pDesc->ftDate));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_VERSION) ptr += sprintf(ptr, " - vVersion = %s", debugstr_dmversion(&pDesc->vVersion));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_NAME) ptr += sprintf(ptr, "\n - wszName = %s", debugstr_w(pDesc->wszName));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_CATEGORY) ptr += sprintf(ptr, "\n - wszCategory = %s", debugstr_w(pDesc->wszCategory));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_FILENAME) ptr += sprintf(ptr, "\n - wszFileName = %s", debugstr_w(pDesc->wszFileName));
|
||||
if (pDesc->dwValidData & DMUS_OBJ_MEMORY) ptr += sprintf(ptr, "\n - llMemLength = 0x%s\n - pbMemData = %p",
|
||||
wine_dbgstr_longlong(pDesc->llMemLength), pDesc->pbMemData);
|
||||
if (pDesc->dwValidData & DMUS_OBJ_STREAM) ptr += sprintf(ptr, " - pStream = %p\n", pDesc->pStream);
|
||||
if (pDesc->dwValidData & DMUS_OBJ_STREAM) ptr += sprintf(ptr, "\n - pStream = %p", pDesc->pStream);
|
||||
|
||||
ptr = &buffer[0];
|
||||
return ptr;
|
||||
|
@ -509,8 +509,8 @@ const char *debugstr_DMUS_IO_CONTAINER_HEADER (LPDMUS_IO_CONTAINER_HEADER pHeade
|
|||
if (pHeader) {
|
||||
char buffer[1024] = "", *ptr = &buffer[0];
|
||||
|
||||
ptr += sprintf(ptr, "DMUS_IO_CONTAINER_HEADER (%p):\n", pHeader);
|
||||
ptr += sprintf(ptr, " - dwFlags = %s\n", debugstr_DMUS_CONTAINER_FLAGS(pHeader->dwFlags));
|
||||
ptr += sprintf(ptr, "DMUS_IO_CONTAINER_HEADER (%p):", pHeader);
|
||||
ptr += sprintf(ptr, "\n - dwFlags = %s", debugstr_DMUS_CONTAINER_FLAGS(pHeader->dwFlags));
|
||||
|
||||
ptr = &buffer[0];
|
||||
return ptr;
|
||||
|
@ -523,11 +523,11 @@ const char *debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER (LPDMUS_IO_CONTAINED_OBJECT
|
|||
if (pHeader) {
|
||||
char buffer[1024] = "", *ptr = &buffer[0];
|
||||
|
||||
ptr += sprintf(ptr, "DMUS_IO_CONTAINED_OBJECT_HEADER (%p):\n", pHeader);
|
||||
ptr += sprintf(ptr, " - guidClassID = %s\n", debugstr_dmguid(&pHeader->guidClassID));
|
||||
ptr += sprintf(ptr, " - dwFlags = %s\n", debugstr_DMUS_CONTAINED_OBJF_FLAGS (pHeader->dwFlags));
|
||||
ptr += sprintf(ptr, " - ckid = %s\n", debugstr_fourcc (pHeader->ckid));
|
||||
ptr += sprintf(ptr, " - fccType = %s\n", debugstr_fourcc (pHeader->fccType));
|
||||
ptr += sprintf(ptr, "DMUS_IO_CONTAINED_OBJECT_HEADER (%p):", pHeader);
|
||||
ptr += sprintf(ptr, "\n - guidClassID = %s", debugstr_dmguid(&pHeader->guidClassID));
|
||||
ptr += sprintf(ptr, "\n - dwFlags = %s", debugstr_DMUS_CONTAINED_OBJF_FLAGS (pHeader->dwFlags));
|
||||
ptr += sprintf(ptr, "\n - ckid = %s", debugstr_fourcc (pHeader->ckid));
|
||||
ptr += sprintf(ptr, "\n - fccType = %s", debugstr_fourcc (pHeader->fccType));
|
||||
|
||||
ptr = &buffer[0];
|
||||
return ptr;
|
||||
|
|
|
@ -78,7 +78,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_GetObject (LPDIR
|
|||
DMUS_OBJECTDESC GotDesc;
|
||||
BOOL bCache;
|
||||
|
||||
TRACE("(%p, %p, %s, %p): pDesc:\n%s", This, pDesc, debugstr_dmguid(riid), ppv, debugstr_DMUS_OBJECTDESC(pDesc));
|
||||
TRACE("(%p, %p, %s, %p): pDesc:\n%s\n", This, pDesc, debugstr_dmguid(riid), ppv, debugstr_DMUS_OBJECTDESC(pDesc));
|
||||
|
||||
/* sometimes it happens that guidClass is missing... which is a BadThingTM */
|
||||
if (!(pDesc->dwValidData & DMUS_OBJ_CLASS)) {
|
||||
|
@ -308,7 +308,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_GetObject (LPDIR
|
|||
LIST_FOR_EACH (pEntry, This->pObjects) {
|
||||
i++;
|
||||
pObjectEntry = LIST_ENTRY(pEntry, WINE_LOADER_ENTRY, entry);
|
||||
TRACE(": entry nr. %i:\n%s - bInvalidDefaultDLS = %i\n - pObject = %p\n", i, debugstr_DMUS_OBJECTDESC(&pObjectEntry->Desc), pObjectEntry->bInvalidDefaultDLS, pObjectEntry->pObject);
|
||||
TRACE(": entry nr. %i:\n%s\n - bInvalidDefaultDLS = %i\n - pObject = %p\n", i, debugstr_DMUS_OBJECTDESC(&pObjectEntry->Desc), pObjectEntry->bInvalidDefaultDLS, pObjectEntry->pObject);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -611,7 +611,7 @@ static HRESULT WINAPI IDirectMusicLoaderImpl_IDirectMusicLoader_ReleaseObject (L
|
|||
if ((Desc.dwValidData & DMUS_OBJ_OBJECT) &&
|
||||
(pObjectEntry->Desc.dwValidData & (DMUS_OBJ_OBJECT | DMUS_OBJ_LOADED)) &&
|
||||
IsEqualGUID (&Desc.guidObject, &pObjectEntry->Desc.guidObject)) {
|
||||
TRACE(": found it by object GUID\n%s", debugstr_DMUS_OBJECTDESC(&pObjectEntry->Desc));
|
||||
TRACE(": found it by object GUID\n%s\n", debugstr_DMUS_OBJECTDESC(&pObjectEntry->Desc));
|
||||
result = S_OK;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue