嵌入式 不定参数printf
#define DbgPrintf(fmt,args...) printf(fmt, ##args)
#define eric_print(...) {print_current_time();printf(__VA_ARGS__);}
eric_print("%s %d the content of sending is :%s ",__FILE__,__LINE__,buf_tmp);
#ifdef __DEBUG #define __D(fmt, args...) fprintf(stderr, "Font Debug: " fmt, ##args) #else #define __D(fmt, args...) #endif #define __E(fmt, args...) fprintf(stderr, "Font Error: " fmt, ##args)
- #ifdef MSG_DEBUG
- #define msg_print(...) {print_current_time();printf(__VA_ARGS__);}
- #else
- #define msg_print(...) ;
- #endif
不定参数宏打印信息
#define DbgPrintf(fmt,args...) printf(fmt, ##args) #define eric_print(...) {print_current_time();printf(__VA_ARGS__);} eric_print("%s %d the content of sending is :%s ",__FILE__,__LINE__,buf_tmp); #ifdef __DEBUG #define __D(fmt, args...) fprintf(stderr, "Font Debug: " fmt, ##args) #else #define __D(fmt, args...) #endif #define __E(fmt, args...) fprintf(stderr, "Font Error: " fmt, ##args) #ifdef MSG_DEBUG #define msg_print(...) {print_current_time();printf(__VA_ARGS__);} #else #define msg_print(...) ; #endif 不定参数宏打印信息