--- np2/x11/trace.h 2004/03/02 16:33:27 1.4 +++ np2/x11/trace.h 2011/01/15 19:16:58 1.7 @@ -1,12 +1,14 @@ #ifndef NP2_X11_TRACE_H__ #define NP2_X11_TRACE_H__ -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS extern int trace_flag; +void trace_init(void); +void trace_term(void); +void trace_fmt(const char *str, ...) G_GNUC_PRINTF(1, 2); + #ifndef TRACE #define TRACEINIT() @@ -18,10 +20,6 @@ extern int trace_flag; #else /* TRACE */ -void trace_init(void); -void trace_term(void); -void trace_fmt(const char *str, ...); - #define TRACEINIT() trace_init() #define TRACETERM() trace_term() #define TRACEOUT(arg) trace_fmt arg @@ -31,8 +29,6 @@ void trace_fmt(const char *str, ...); #endif /* !TRACE */ -#ifdef __cplusplus -}; -#endif +G_END_DECLS #endif /* NP2_X11_TRACE_H__ */