From b91b2c1b2d1e18e0728a835224aa66fcdd529c43 Mon Sep 17 00:00:00 2001 From: nvt-se Date: Sun, 1 Mar 2009 12:49:43 +0000 Subject: [PATCH] moved debug macros from header to source. --- apps/deluge/deluge.c | 16 +++++++++++++--- apps/deluge/deluge.h | 13 +------------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/apps/deluge/deluge.c b/apps/deluge/deluge.c index 305cbb899..0fe67f4de 100644 --- a/apps/deluge/deluge.c +++ b/apps/deluge/deluge.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: deluge.c,v 1.3 2009/02/27 14:28:02 nvt-se Exp $ + * $Id: deluge.c,v 1.4 2009/03/01 12:49:43 nvt-se Exp $ */ /** @@ -41,8 +41,6 @@ * Nicolas Tsiftes */ -#define DEBUG 0 - #include "contiki.h" #include "net/rime.h" #include "net/rime/ctimer.h" @@ -62,6 +60,18 @@ #include #include +#define DEBUG 1 +#if DEBUG +#include +#define PRINTF(...) \ + do { \ + printf("[Node %02u] ", (unsigned) node_id); \ + printf(__VA_ARGS__); \ + } while (0) +#else +#define PRINTF(...) +#endif + PROCESS(deluge_process, "Deluge process"); static void broadcast_recv(struct broadcast_conn *, rimeaddr_t *); diff --git a/apps/deluge/deluge.h b/apps/deluge/deluge.h index 4f3adcff2..1c2fc2ef5 100644 --- a/apps/deluge/deluge.h +++ b/apps/deluge/deluge.h @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: deluge.h,v 1.2 2009/02/25 17:09:55 nvt-se Exp $ + * $Id: deluge.h,v 1.3 2009/03/01 12:49:43 nvt-se Exp $ */ /** @@ -45,17 +45,6 @@ PROCESS_NAME(deluge_process); -#if DEBUG -#include -#define PRINTF(...) \ - do { \ - printf("[Node %02u] ", (unsigned) node_id); \ - printf(__VA_ARGS__); \ - } while (0) -#else -#define PRINTF(...) -#endif - #define LONG_TIMER(et, counter, time) \ do { \ for (counter = 0; counter < time; counter++) { \