#ifndef __MACROS__ #define __MACROS__ #if DEBUG == 0 #define DEBUG_MODE 0 #else #define DEBUG_MODE 1 #endif /*debug*/ #define log(fmt, ...) \ do { if (DEBUG_MODE) fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \ __LINE__, __func__, __VA_ARGS__); } while (0) #endif //macros