Mercurial > mplayer.hg
annotate loader/wine/debugtools.h @ 25885:fa24feceb3f9
Allow for larger fragment programs.
author | reimar |
---|---|
date | Tue, 29 Jan 2008 18:00:20 +0000 |
parents | b6fb25907033 |
children | a8ea87c71d18 |
rev | line source |
---|---|
1 | 1 |
24422
c98c9e7f3bd0
Remove leading underscores from multiple inclusion guards,
diego
parents:
23430
diff
changeset
|
2 #ifndef WINE_DEBUGTOOLS_H |
c98c9e7f3bd0
Remove leading underscores from multiple inclusion guards,
diego
parents:
23430
diff
changeset
|
3 #define WINE_DEBUGTOOLS_H |
1 | 4 |
5 #include <stdarg.h> | |
6 #include "config.h" | |
7 #include "windef.h" | |
8 | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
9 struct GUID; |
1 | 10 |
11 /* Internal definitions (do not use these directly) */ | |
12 | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
13 enum DEBUG_CLASS { DBCL_FIXME, DBCL_ERR, DBCL_WARN, DBCL_TRACE, DBCL_COUNT }; |
1 | 14 |
15 #ifndef NO_TRACE_MSGS | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
16 # define GET_DEBUGGING_trace(dbch) ((dbch)[0] & (1 << DBCL_TRACE)) |
1 | 17 #else |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
18 # define GET_DEBUGGING_trace(dbch) 0 |
1 | 19 #endif |
20 | |
21 #ifndef NO_DEBUG_MSGS | |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
22 # 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
|
23 # define GET_DEBUGGING_fixme(dbch) ((dbch)[0] & (1 << DBCL_FIXME)) |
1 | 24 #else |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
25 # define GET_DEBUGGING_warn(dbch) 0 |
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
26 # define GET_DEBUGGING_fixme(dbch) 0 |
1 | 27 #endif |
28 | |
29 /* 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
|
30 #define GET_DEBUGGING_err(dbch) ((dbch)[0] & (1 << DBCL_ERR)) |
1 | 31 |
25794
2c8cdb9123b8
Fix a ton of illegal identifiers. Identifiers starting with __ or _ and a
diego
parents:
24422
diff
changeset
|
32 #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
|
33 #define SET_DEBUGGING(dbcl,dbch,on) \ |
1 | 34 ((on) ? ((dbch)[0] |= 1 << (dbcl)) : ((dbch)[0] &= ~(1 << (dbcl)))) |
35 | |
36 /* Exported definitions and macros */ | |
37 | |
38 /* These function return a printable version of a string, including | |
39 quotes. The string will be valid for some time, but not indefinitely | |
40 as strings are re-used. */ | |
41 extern LPCSTR debugstr_an (LPCSTR s, int n); | |
42 extern LPCSTR debugstr_wn (LPCWSTR s, int n); | |
43 extern LPCSTR debugres_a (LPCSTR res); | |
44 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
|
45 extern LPCSTR debugstr_guid( const struct GUID *id ); |
1 | 46 extern LPCSTR debugstr_hex_dump (const void *ptr, int len); |
47 extern int dbg_header_err( const char *dbg_channel, const char *func ); | |
48 extern int dbg_header_warn( const char *dbg_channel, const char *func ); | |
49 extern int dbg_header_fixme( const char *dbg_channel, const char *func ); | |
50 extern int dbg_header_trace( const char *dbg_channel, const char *func ); | |
51 extern int dbg_vprintf( const char *format, va_list args ); | |
52 | |
53 static inline LPCSTR debugstr_a( LPCSTR s ) { return debugstr_an( s, 80 ); } | |
54 static inline LPCSTR debugstr_w( LPCWSTR s ) { return debugstr_wn( s, 80 ); } | |
55 | |
56 #define TRACE_(X) TRACE | |
57 #define WARN_(X) TRACE | |
58 #define WARN TRACE | |
59 #define ERR_(X) printf | |
60 #define ERR printf | |
61 #define FIXME_(X) TRACE | |
62 #define FIXME TRACE | |
63 | |
64 #define TRACE_ON(X) 1 | |
65 #define ERR_ON(X) 1 | |
66 | |
67 #define DECLARE_DEBUG_CHANNEL(ch) \ | |
68 extern char dbch_##ch[]; | |
69 #define DEFAULT_DEBUG_CHANNEL(ch) \ | |
70 extern char dbch_##ch[]; static char * const __dbch_default = dbch_##ch; | |
71 | |
24422
c98c9e7f3bd0
Remove leading underscores from multiple inclusion guards,
diego
parents:
23430
diff
changeset
|
72 #endif /* WINE_DEBUGTOOLS_H */ |