equal
deleted
inserted
replaced
31 int _debug_freetype_level; |
31 int _debug_freetype_level; |
32 int _debug_sl_level; |
32 int _debug_sl_level; |
33 int _debug_station_level; |
33 int _debug_station_level; |
34 |
34 |
35 |
35 |
36 typedef struct DebugLevel { |
36 struct DebugLevel { |
37 const char *name; |
37 const char *name; |
38 int *level; |
38 int *level; |
39 } DebugLevel; |
39 }; |
40 |
40 |
41 #define DEBUG_LEVEL(x) { #x, &_debug_##x##_level } |
41 #define DEBUG_LEVEL(x) { #x, &_debug_##x##_level } |
42 static const DebugLevel debug_level[] = { |
42 static const DebugLevel debug_level[] = { |
43 DEBUG_LEVEL(ai), |
43 DEBUG_LEVEL(ai), |
44 DEBUG_LEVEL(driver), |
44 DEBUG_LEVEL(driver), |
151 |
151 |
152 /** Print out the current debug-level |
152 /** Print out the current debug-level |
153 * Just return a string with the values of all the debug categorites |
153 * Just return a string with the values of all the debug categorites |
154 * @return string with debug-levels |
154 * @return string with debug-levels |
155 */ |
155 */ |
156 const char *GetDebugString(void) |
156 const char *GetDebugString() |
157 { |
157 { |
158 const DebugLevel *i; |
158 const DebugLevel *i; |
159 static char dbgstr[100]; |
159 static char dbgstr[100]; |
160 char dbgval[20]; |
160 char dbgval[20]; |
161 |
161 |