X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-lib%2Fdebug.h;fp=lib-lib%2Fdebug.h;h=0000000000000000000000000000000000000000;hp=bdb9d8fd7dd4669b23e300d4dcc2cd0b75386a76;hb=23e6291cb5d5b4cd2008403d8b628007fd75ff23;hpb=56025510c87ad388a257fcbd8b369b0edcf97c34 diff --git a/lib-lib/debug.h b/lib-lib/debug.h deleted file mode 100644 index bdb9d8f..0000000 --- a/lib-lib/debug.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301, USA. - * - * Copyright © 2006 Pierre Habouzit - */ -/* - * written for mutt-ng by: - * Rocco Rutte - * - * This file is part of mutt-ng, see http://www.muttng.org/. - * It's licensed under the GNU General Public License, - * please see the file GPL in the top level source directory. - */ - -/* generic interface for debug messages */ - -#ifndef MUTT_LIB_LIB_DEBUG_H -#define MUTT_LIB_LIB_DEBUG_H - -#include - -#define DEBUG_MIN_LEVEL 1 -#define DEBUG_MIN_LEVEL_S "1" -#define DEBUG_MAX_LEVEL 5 -#define DEBUG_MAX_LEVEL_S "5" - -#ifdef DEBUG - -extern short DebugLevel; -extern FILE* DebugFile; - -void debug_setlevel (short); -void debug_start (const char*); - -void _debug_print_intro (const char*, int, const char*, int); -void _debug_print_msg (const char*, ...); - -/* - * the debug_print() macro will (in the end) print debug messages of the - * following format: - * - * (file:line:function:level): message - * - * for GCC and: - * - * (file:line:level): message - * - * otherwise - */ -#ifdef __GNUC__ - -#define debug_print(level,msg) \ - do { \ - if (DebugLevel >= level) { \ - _debug_print_intro (__FILE__,__LINE__,__func__,level); \ - _debug_print_msg msg; \ - } \ - } while(0) - -#else /* __GNUC__ */ - -#define debug_print(level,msg) \ - do { \ - if (DebugLevel >= level) { \ - _debug_print_intro (__FILE__,__LINE__,NULL,level); \ - _debug_print_msg msg; \ - } \ - } while(0) - -#endif /* !__GNUC__ */ - -#else /* DEBUG */ - -/* - * without debug support, we don't need these - * (this also kills the dozens of #ifdef for debug... - */ -#define debug_start(basedir) -#define debug_setlevel(level) -#define debug_print(level,msg) - -#endif /* !DEBUG */ - -#endif /* MUTT_LIB_LIB_DEBUG_H */