|
|
| version 1.3, 2004/01/13 16:29:11 | version 1.5, 2004/08/07 19:06:01 |
|---|---|
| Line 1 | Line 1 |
| #ifndef NP2_X11_TRACE_H__ | #ifndef NP2_X11_TRACE_H__ |
| #define NP2_X11_TRACE_H__ | #define NP2_X11_TRACE_H__ |
| #ifdef __cplusplus | |
| extern "C" { | |
| #endif | |
| extern int trace_flag; | |
| void trace_init(void); | |
| void trace_term(void); | |
| void trace_fmt(const char *str, ...); | |
| #ifndef TRACE | #ifndef TRACE |
| #define TRACEINIT() | #define TRACEINIT() |
| Line 10 | Line 20 |
| #define VERBOSE(s) | #define VERBOSE(s) |
| #endif | #endif |
| #else | #else /* TRACE */ |
| #ifdef __cplusplus | |
| extern "C" { | |
| #endif | |
| void trace_init(void); | |
| void trace_term(void); | |
| void trace_fmt(const char *str, ...); | |
| #define TRACEINIT() trace_init() | #define TRACEINIT() trace_init() |
| #define TRACETERM() trace_term() | #define TRACETERM() trace_term() |
| #define TRACEOUT(arg) trace_fmt arg | #define TRACEOUT(arg) trace_fmt arg |
| #ifndef VERBOSE | #ifndef VERBOSE |
| #define VERBOSE(arg) trace_fmt arg | #define VERBOSE(arg) if (trace_flag) trace_fmt arg |
| #endif | #endif |
| #endif /* !TRACE */ | |
| #ifdef __cplusplus | #ifdef __cplusplus |
| }; | }; |
| #endif | #endif |
| #endif | |
| #endif /* NP2_X11_TRACE_H__ */ | #endif /* NP2_X11_TRACE_H__ */ |