annotate loader/wine/debugtools.h @ 27449:5723b671a0f6

Handle AOPLAY_FINAL_CHUNK
author ranma
date Sun, 24 Aug 2008 13:36:04 +0000
parents a8ea87c71d18
children 9e739bdb049c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26045
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25870
diff changeset
1 #ifndef MPLAYER_DEBUGTOOLS_H
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25870
diff changeset
2 #define MPLAYER_DEBUGTOOLS_H
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 #include <stdarg.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 #include "config.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 #include "windef.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
8 struct GUID;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 /* Internal definitions (do not use these directly) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
12 enum DEBUG_CLASS { DBCL_FIXME, DBCL_ERR, DBCL_WARN, DBCL_TRACE, DBCL_COUNT };
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 #ifndef NO_TRACE_MSGS
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
15 # define GET_DEBUGGING_trace(dbch) ((dbch)[0] & (1 << DBCL_TRACE))
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 #else
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
17 # define GET_DEBUGGING_trace(dbch) 0
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 #ifndef NO_DEBUG_MSGS
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
21 # define GET_DEBUGGING_warn(dbch) ((dbch)[0] & (1 << DBCL_WARN))
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
22 # define GET_DEBUGGING_fixme(dbch) ((dbch)[0] & (1 << DBCL_FIXME))
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 #else
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
24 # define GET_DEBUGGING_warn(dbch) 0
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
25 # define GET_DEBUGGING_fixme(dbch) 0
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 /* define error macro regardless of what is configured */
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
29 #define GET_DEBUGGING_err(dbch) ((dbch)[0] & (1 << DBCL_ERR))
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
31 #define GET_DEBUGGING(dbcl,dbch) GET_DEBUGGING_##dbcl(dbch)
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
32 #define SET_DEBUGGING(dbcl,dbch,on) \
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 ((on) ? ((dbch)[0] |= 1 << (dbcl)) : ((dbch)[0] &= ~(1 << (dbcl))))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 /* Exported definitions and macros */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 /* These function return a printable version of a string, including
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 quotes. The string will be valid for some time, but not indefinitely
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 as strings are re-used. */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 extern LPCSTR debugstr_an (LPCSTR s, int n);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 extern LPCSTR debugstr_wn (LPCWSTR s, int n);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 extern LPCSTR debugres_a (LPCSTR res);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 extern LPCSTR debugres_w (LPCWSTR res);
25794
2c8cdb9123b8 Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents: 24422
diff changeset
44 extern LPCSTR debugstr_guid( const struct GUID *id );
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 extern LPCSTR debugstr_hex_dump (const void *ptr, int len);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 extern int dbg_header_err( const char *dbg_channel, const char *func );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 extern int dbg_header_warn( const char *dbg_channel, const char *func );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 extern int dbg_header_fixme( const char *dbg_channel, const char *func );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 extern int dbg_header_trace( const char *dbg_channel, const char *func );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 extern int dbg_vprintf( const char *format, va_list args );
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 static inline LPCSTR debugstr_a( LPCSTR s ) { return debugstr_an( s, 80 ); }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 static inline LPCSTR debugstr_w( LPCWSTR s ) { return debugstr_wn( s, 80 ); }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 #define TRACE_(X) TRACE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 #define WARN_(X) TRACE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 #define WARN TRACE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 #define ERR_(X) printf
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 #define ERR printf
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 #define FIXME_(X) TRACE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 #define FIXME TRACE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 #define TRACE_ON(X) 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 #define ERR_ON(X) 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 #define DECLARE_DEBUG_CHANNEL(ch) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 extern char dbch_##ch[];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 #define DEFAULT_DEBUG_CHANNEL(ch) \
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 extern char dbch_##ch[]; static char * const __dbch_default = dbch_##ch;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70
26045
a8ea87c71d18 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25870
diff changeset
71 #endif /* MPLAYER_DEBUGTOOLS_H */