#include <time.h>
#include <stdio.h>
#ifndef __DEBUG_H
#define __DEBUG_H
#ifdef __DEBUG_H
#define debug(format,...) \
do{ \
time_t timep; \
time (&timep);\
struct tm *tm_now = localtime(&timep);\
printf("[%d/%d/%d %d:%d:%d",tm_now->tm_year+1900,tm_now->tm_mon+1, tm_now->tm_mday, tm_now->tm_hour, tm_now->tm_min,tm_now->tm_sec);\
printf(" "__FILE__":%d]:"format"", __LINE__, ##__VA_ARGS__); \
}while(0)
#else
#define debug(format,...)
#endif
#endif
#include <stdio.h>
#ifndef __DEBUG_H
#define __DEBUG_H
#ifdef __DEBUG_H
#define debug(format,...) \
do{ \
time_t timep; \
time (&timep);\
struct tm *tm_now = localtime(&timep);\
printf("[%d/%d/%d %d:%d:%d",tm_now->tm_year+1900,tm_now->tm_mon+1, tm_now->tm_mday, tm_now->tm_hour, tm_now->tm_min,tm_now->tm_sec);\
printf(" "__FILE__":%d]:"format"", __LINE__, ##__VA_ARGS__); \
}while(0)
#else
#define debug(format,...)
#endif
#endif