aboutsummaryrefslogtreecommitdiff
path: root/iemnet.h
diff options
context:
space:
mode:
authorIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2010-09-20 13:14:16 +0000
committerIOhannes m zmölnig <zmoelnig@users.sourceforge.net>2010-09-20 13:14:16 +0000
commitdb1b76de7229926515ceba67fb9f5543883bd3e8 (patch)
tree38d55475c8669fcd8bf2eb4ec157144b5d312bb7 /iemnet.h
parentb027b933a923bdd0baf1847f9884b2b551f5a611 (diff)
debugging levels
svn path=/trunk/externals/iem/iemnet/; revision=14160
Diffstat (limited to 'iemnet.h')
-rw-r--r--iemnet.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/iemnet.h b/iemnet.h
index bc04840..7e3d76c 100644
--- a/iemnet.h
+++ b/iemnet.h
@@ -238,9 +238,13 @@ int iemnet__register(const char*name);
#ifdef IEMNET_HAVE_DEBUG
# undef IEMNET_HAVE_DEBUG
#endif
+int debuglevel;
+void iemnet_debuglevel(void*,t_float);
+#define DEBUGMETHOD(c) class_addmethod(c, (t_method)iemnet_debuglevel, gensym("debug"), A_FLOAT, 0)
+
#ifdef DEBUG
# undef DEBUG
-# define DEBUG startpost("[%s:%d]", __FUNCTION__, __LINE__); post
+# define DEBUG if(debuglevel&DEBUGLEVEL)startpost("[%s:%d]", __FUNCTION__, __LINE__); if(debuglevel&DEBUGLEVEL)post
# define IEMNET_HAVE_DEBUG 1
#else
static void debug_dummy(const char *format, ...) {;}