1 /*******************************************\ 2 | * Ce programme est sous licence GNU GPL * | 3 | * This software is under GNU/GPL licence * | 4 | * * * * * * * * * * * * * * * * * * * * * * | 5 | * http://www.gnu.org/copyleft/gpl.html * | 6 \*******************************************/ 7 8 /* Par Laurent Coustet <ed@zehome.com> 9 * http://ed.zehome.com/ 10 * Made by Laurent Coustet <ed@zehome.com> 11 */ 12 13 #ifndef _H_DEBUG 14 #define _H_DEBUG 15 16 #include <stdio.h> 17 18 #define DEBUGLEVEL 3 19 20 #define DEBUG_ERR 1 21 #define DEBUG_MSG 2 22 #define DEBUG_ALL 3 23 24 #define DEBUG(priority, ...) _DEBUG(__LINE__, __FILE__, priority, __VA_ARGS__) 25 26 #define _ERROR(...) DEBUG(DEBUG_ERR, __VA_ARGS__) 27 #define MESSAGE(...) DEBUG(DEBUG_MSG, __VA_ARGS__) 28 #define VERBOSE(...) DEBUG(DEBUG_ALL, __VA_ARGS__) 29 30 void _DEBUG(int _debug_line, char *_debug_filename, 31 int _debug_priority, const char *_debug_message, ...); 32 33 void SetDebugFile(FILE *file); 34 35 #endif 36