summaryrefslogtreecommitdiff
path: root/json-c/debug.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-06-18 09:25:58 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-06-18 09:25:58 +0000
commit10dc14dacffbb8a3882b0840c0643da4f437ac45 (patch)
treeb36dfe5f81a628418ad26aae910199fe81e6e85e /json-c/debug.h
parent147aa0d423987fd6da7ee75f0e2cb5def94e6054 (diff)
downloadjson-c-10dc14dacffbb8a3882b0840c0643da4f437ac45.tar.gz
json-c-10dc14dacffbb8a3882b0840c0643da4f437ac45.tar.bz2
Clone upstream for working copy
svn path=/trunk/json-c/; revision=4382
Diffstat (limited to 'json-c/debug.h')
-rw-r--r--json-c/debug.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/json-c/debug.h b/json-c/debug.h
new file mode 100644
index 0000000..951e994
--- /dev/null
+++ b/json-c/debug.h
@@ -0,0 +1,42 @@
+/*
+ * $Id: debug.h,v 1.5 2006/01/30 23:07:57 mclark Exp $
+ *
+ * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
+ * Michael Clark <michael@metaparadigm.com>
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the MIT license. See COPYING for details.
+ *
+ */
+
+#ifndef _DEBUG_H_
+#define _DEBUG_H_
+
+extern void mc_set_debug(int debug);
+extern int mc_get_debug(void);
+
+extern void mc_set_syslog(int syslog);
+extern void mc_abort(const char *msg, ...);
+extern void mc_debug(const char *msg, ...);
+extern void mc_error(const char *msg, ...);
+extern void mc_info(const char *msg, ...);
+
+#ifdef MC_MAINTAINER_MODE
+#define MC_SET_DEBUG(x) mc_set_debug(x)
+#define MC_GET_DEBUG() mc_get_debug()
+#define MC_SET_SYSLOG(x) mc_set_syslog(x)
+#define MC_ABORT(x, ...) mc_abort(x, ##__VA_ARGS__)
+#define MC_DEBUG(x, ...) mc_debug(x, ##__VA_ARGS__)
+#define MC_ERROR(x, ...) mc_error(x, ##__VA_ARGS__)
+#define MC_INFO(x, ...) mc_info(x, ##__VA_ARGS__)
+#else
+#define MC_SET_DEBUG(x) if (0) mc_set_debug(x)
+#define MC_GET_DEBUG() (0)
+#define MC_SET_SYSLOG(x) if (0) mc_set_syslog(x)
+#define MC_ABORT(x, ...) if (0) mc_abort(x, ##__VA_ARGS__)
+#define MC_DEBUG(x, ...) if (0) mc_debug(x, ##__VA_ARGS__)
+#define MC_ERROR(x, ...) if (0) mc_error(x, ##__VA_ARGS__)
+#define MC_INFO(x, ...) if (0) mc_info(x, ##__VA_ARGS__)
+#endif
+
+#endif