82 void CDECL debug(const char *dbg, ...); |
82 void CDECL debug(const char *dbg, ...); |
83 #endif /* NO_VARARG_MACRO */ |
83 #endif /* NO_VARARG_MACRO */ |
84 #endif /* NO_DEBUG_MESSAGES */ |
84 #endif /* NO_DEBUG_MESSAGES */ |
85 |
85 |
86 void SetDebugString(const char *s); |
86 void SetDebugString(const char *s); |
87 const char *GetDebugString(void); |
87 const char *GetDebugString(); |
88 |
88 |
89 /* MSVCRT of course has to have a different syntax for long long *sigh* */ |
89 /* MSVCRT of course has to have a different syntax for long long *sigh* */ |
90 #if defined(_MSC_VER) || defined(__MINGW32__) |
90 #if defined(_MSC_VER) || defined(__MINGW32__) |
91 #define OTTD_PRINTF64 "I64" |
91 #define OTTD_PRINTF64 "I64" |
92 #else |
92 #else |
93 #define OTTD_PRINTF64 "ll" |
93 #define OTTD_PRINTF64 "ll" |
94 #endif |
94 #endif |
95 |
95 |
96 /* Used for profiling */ |
96 /* Used for profiling */ |
97 #define TIC() {\ |
97 #define TIC() {\ |
98 extern uint64 _rdtsc(void);\ |
98 extern uint64 _rdtsc();\ |
99 uint64 _xxx_ = _rdtsc();\ |
99 uint64 _xxx_ = _rdtsc();\ |
100 static uint64 __sum__ = 0;\ |
100 static uint64 __sum__ = 0;\ |
101 static uint32 __i__ = 0; |
101 static uint32 __i__ = 0; |
102 |
102 |
103 #define TOC(str, count)\ |
103 #define TOC(str, count)\ |