2 /* a file of debug printing stuff for conversation-related things,
3 * although really anything can use this so long as it includes this
5 * define DEBUG_CONVERSATION before including this file to turn on printing
6 * and also define it in conversation.c (because it has the indent variable)
9 #ifndef _CONVERSATION_DEBUG_H
10 #define _CONVERSATION_DEBUG_H
12 #ifdef DEBUG_CONVERSATION
17 extern int _debug_conversation_indent; /* the instance is in conversation.c */
19 #define DINDENT() _debug_conversation_indent += 4
20 #define DENDENT() _debug_conversation_indent -= 4
23 g_printerr("%*.*s%s: ", \
24 _debug_conversation_indent,_debug_conversation_indent," ", \
29 #define DPRINT2(arg) \
31 _debug_conversation_indent,_debug_conversation_indent," "); \
35 #else /* !DEBUG_CONVERSATION */
37 /* a hack to let these defines be used with trailing semi-colon and not
38 * cause gcc extra-check pedantic warnings for extra colons
40 #define DINDENT() (void)0
41 #define DENDENT() (void)0
42 #define DPRINT(arg) (void)0
43 #define DPRINT2(arg) (void)0
45 #endif /* DEBUG_CONVERSATION */
47 #endif /* _CONVERSATION_DEBUG_H */