rtworkq: Add RtwqJoinWorkQueue()/RtwqUnjoinWorkQueue() stubs.
[wine.git] / dlls / dmloader / debug.c
blob1be92e72af4711cac7bf29bde466b31c7e9fb9c5
1 /* Debug and Helper Functions
3 * Copyright (C) 2004 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "dmloader_private.h"
23 /* figures out whether given FOURCC is valid DirectMusic form ID */
24 BOOL IS_VALID_DMFORM (FOURCC chunkID) {
25 if ((chunkID == DMUS_FOURCC_AUDIOPATH_FORM) || (chunkID == DMUS_FOURCC_BAND_FORM) || (chunkID == DMUS_FOURCC_CHORDMAP_FORM)
26 || (chunkID == DMUS_FOURCC_CONTAINER_FORM) || (chunkID == FOURCC_DLS) || (chunkID == DMUS_FOURCC_SCRIPT_FORM)
27 || (chunkID == DMUS_FOURCC_SEGMENT_FORM) || (chunkID == DMUS_FOURCC_STYLE_FORM) || (chunkID == DMUS_FOURCC_TOOLGRAPH_FORM)
28 || (chunkID == DMUS_FOURCC_TRACK_FORM) || (chunkID == mmioFOURCC('W','A','V','E'))) return TRUE;
29 else return FALSE;
32 /* translate STREAM_SEEK flag to string */
33 const char *resolve_STREAM_SEEK (DWORD flag) {
34 switch (flag) {
35 case STREAM_SEEK_SET:
36 return wine_dbg_sprintf ("STREAM_SEEK_SET");
37 case STREAM_SEEK_CUR:
38 return wine_dbg_sprintf ("STREAM_SEEK_CUR");
39 case STREAM_SEEK_END:
40 return wine_dbg_sprintf ("STREAM_SEEK_END");
41 default:
42 return wine_dbg_sprintf ("()");
46 const char *debugstr_DMUS_IO_CONTAINER_HEADER (LPDMUS_IO_CONTAINER_HEADER pHeader) {
47 if (pHeader) {
48 char buffer[1024], *ptr = buffer;
50 ptr += sprintf(ptr, "DMUS_IO_CONTAINER_HEADER (%p):", pHeader);
51 ptr += sprintf(ptr, "\n - dwFlags = %#x%s", pHeader->dwFlags,
52 pHeader->dwFlags & DMUS_CONTAINER_NOLOADS ? " (DMUS_CONTAINER_NOLOADS)" : "");
54 return wine_dbg_sprintf("%s", buffer);
55 } else {
56 return wine_dbg_sprintf("(NULL)");
60 const char *debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER (LPDMUS_IO_CONTAINED_OBJECT_HEADER pHeader) {
61 if (pHeader) {
62 char buffer[1024], *ptr = buffer;
64 ptr += sprintf(ptr, "DMUS_IO_CONTAINED_OBJECT_HEADER (%p):", pHeader);
65 ptr += sprintf(ptr, "\n - guidClassID = %s", debugstr_dmguid(&pHeader->guidClassID));
66 ptr += sprintf(ptr, "\n - dwFlags = %#x%s", pHeader->dwFlags,
67 pHeader->dwFlags & DMUS_CONTAINED_OBJF_KEEP ? " (DMUS_CONTAINED_OBJF_KEEP)" : "");
68 ptr += sprintf(ptr, "\n - ckid = %s", debugstr_fourcc (pHeader->ckid));
69 ptr += sprintf(ptr, "\n - fccType = %s", debugstr_fourcc (pHeader->fccType));
71 return wine_dbg_sprintf("%s", buffer);
72 } else {
73 return wine_dbg_sprintf("(NULL)");