From ae46674dd69cc4e65f595dc364a8c35c8d6aee30 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 17 Jul 2010 17:05:21 +0200 Subject: --debug-level → --debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/debug.h | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'src/debug.h') diff --git a/src/debug.h b/src/debug.h index 156bf1c..93cb6bf 100644 --- a/src/debug.h +++ b/src/debug.h @@ -39,28 +39,26 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifdef DEBUG #ifdef __GNUC__ -#define D(i, a) \ +#define D(a) \ { \ - if(i <= opt.debug_level) \ - { \ - printf("%-12s +%-4u %-20s : ",__FILE__,__LINE__,__FUNCTION__); \ - printf a; \ - fflush(stdout); \ - } \ + if (opt.debug) { \ + printf("%-12s +%-4u %-20s : ",__FILE__,__LINE__,__FUNCTION__); \ + printf a; \ + fflush(stdout); \ + } \ } #else /* __GNUC__ */ -#define D(i, a) \ +#define D(a) \ { \ - if(i <= opt.debug_level) \ - { \ - printf("%-12s +%-4u : ",__FILE__,__LINE__); \ - printf a; \ - } \ - fflush(stdout); \ - } + if (opt.debug) { \ + printf("%-12s +%-4u : ",__FILE__,__LINE__); \ + printf a; \ + fflush(stdout); \ + } \ +} #endif /* __GNUC__ */ #else /* DEBUG */ -#define D(i,a) +#define D(a) #endif /* DEBUG */ #endif /* DEBUG_H */ -- cgit v1.2.3