1 /* Debug and Helper Functions
3 * Copyright (C) 2003-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
20 #ifndef __WINE_DMLOADER_DEBUG_H
21 #define __WINE_DMLOADER_DEBUG_H
23 /* used for generic dumping (copied from ddraw) */
34 /* used for initialising structs */
35 #define DM_STRUCT_INIT(x) \
37 memset((x), 0, sizeof(*(x))); \
38 (x)->dwSize = sizeof(*x); \
41 #define FE(x) { x, #x }
42 #define GE(x) { &x, #x }
44 /* check whether the given DWORD is even (return 0) or odd (return 1) */
45 extern int even_or_odd (DWORD number
);
46 /* check whether chunkID is valid dmobject form chunk */
47 extern BOOL
IS_VALID_DMFORM (FOURCC chunkID
);
48 /* translate STREAM_SEEK flag to string */
49 extern const char *resolve_STREAM_SEEK (DWORD flag
);
50 /* FOURCC to string conversion for debug messages */
51 extern const char *debugstr_fourcc (DWORD fourcc
);
52 /* DMUS_VERSION struct to string conversion for debug messages */
53 extern const char *debugstr_dmversion (const DMUS_VERSION
*version
);
54 /* FILETIME struct to string conversion for debug messages */
55 extern const char *debugstr_filetime (const FILETIME
*time
);
56 /* returns name of given GUID */
57 extern const char *debugstr_dmguid (const GUID
*id
);
58 /* returns name of given error code */
59 extern const char *debugstr_dmreturn (DWORD code
);
61 /* dump whole DMUS_OBJECTDESC struct */
62 extern const char *debugstr_DMUS_OBJECTDESC (LPDMUS_OBJECTDESC pDesc
);
63 extern const char *debugstr_DMUS_IO_CONTAINER_HEADER (LPDMUS_IO_CONTAINER_HEADER pHeader
);
64 extern const char *debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER (LPDMUS_IO_CONTAINED_OBJECT_HEADER pHeader
);
66 #endif /* __WINE_DMLOADER_DEBUG_H */