summaryrefslogtreecommitdiffstats
path: root/lib/qtimers.h
diff options
context:
space:
mode:
authorChris Hall <chris.hall@highwayman.com>2011-03-21 01:16:05 +0000
committerChris Hall <chris.hall@highwayman.com>2011-03-21 01:16:05 +0000
commit9470cb2c32eab220f796b1438b787528272cbe84 (patch)
treeb9b2cc12446173436d2bc7a32e82cc3378ec721e /lib/qtimers.h
parent5cae7eea451f2b7d65b5892e2c1dafc70f8b836e (diff)
downloadquagga-9470cb2c32eab220f796b1438b787528272cbe84.tar.bz2
quagga-9470cb2c32eab220f796b1438b787528272cbe84.tar.xz
Upgrade of "pipework" -- including piping to/from shell commandsex11p
Version 0.99.15ex11p A major overhaul.
Diffstat (limited to 'lib/qtimers.h')
-rw-r--r--lib/qtimers.h35
1 files changed, 26 insertions, 9 deletions
diff --git a/lib/qtimers.h b/lib/qtimers.h
index 2af81819..16808f1b 100644
--- a/lib/qtimers.h
+++ b/lib/qtimers.h
@@ -35,16 +35,33 @@
* each with an action to be executed when the timer expires.
*/
-#ifdef QTIMERS_DEBUG /* Can be forced from outside */
-# if QTIMERS_DEBUG
-# define QTIMERS_DEBUG 1 /* Force 1 or 0 */
-#else
-# define QTIMERS_DEBUG 0
+/*------------------------------------------------------------------------------
+ * Sort out QTIMERS_DEBUG.
+ *
+ * Set to 1 if defined, but blank.
+ * Set to QDEBUG if not defined.
+ *
+ * Force to 0 if QTIMERS_NO_DEBUG is defined and not zero.
+ *
+ * So: defaults to same as QDEBUG, but no matter what QDEBUG is set to:
+ *
+ * * can set QTIMERS_DEBUG == 0 to turn off debug
+ * * or set QTIMERS_DEBUG != 0 to turn on debug
+ * * or set QTIMERS_NO_DEBUG != 0 to force debug off
+ */
+
+#ifdef QTIMERS_DEBUG /* If defined, make it 1 or 0 */
+# if IS_BLANK_OPTION(QTIMERS_DEBUG)
+# undef QTIMERS_DEBUG
+# define QTIMERS_DEBUG 1
# endif
-#else
-# ifdef QDEBUG
-# define QTIMERS_DEBUG 1 /* Follow QDEBUG */
-#else
+#else /* If not defined, follow QDEBUG */
+# define QTIMERS_DEBUG QDEBUG
+#endif
+
+#ifdef QTIMERS_NO_DEBUG /* Override, if defined */
+# if IS_NOT_ZERO_OPTION(QTIMERS_NO_DEBUG)
+# undef QTIMERS_DEBUG
# define QTIMERS_DEBUG 0
# endif
#endif