You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
695 B
31 lines
695 B
#ifndef _TRACE_H
|
|
#define _TRACE_H
|
|
|
|
#ifdef ENABLE_TRACING
|
|
extern void INIT_TRACE(void);
|
|
extern void SHOW_TRACE(void);
|
|
extern void DUMP_TRACE(const char *file);
|
|
|
|
/*
|
|
* Lets admit it, shall we. C macros are sometimes are so much cooler than
|
|
* C++ static inlines ;)
|
|
* WARNING: fmt has to be a static string
|
|
*/
|
|
#define TRACE(fmt,args...) \
|
|
do { tqDebug("~%s - \t" fmt, __PRETTY_FUNCTION__, ##args); } while (0)
|
|
|
|
#define SHOW_TRACE_TEXT "Show Trace"
|
|
|
|
#else // !ENABLE_TRACING
|
|
|
|
#define INIT_TRACE()
|
|
#define TRACE(fmt, ...)
|
|
#define SHOW_TRACE()
|
|
#define SHOW_TRACE_TEXT TQString::null
|
|
#define DUMP_TRACE(file)
|
|
|
|
#endif // ENABLE_TRACING
|
|
|
|
#endif // _TRACE_H
|
|
|