2010年7月17日
摘要: #define DEBUG 1#define debug(format, ...) do{if(DEBUG)fprintf (stdout, format, ## __VA_ARGS__);}while(0)通用版:#define DEBUG#include <stdarg.h>int debug(const char *fmt, ...){ #ifdef DEBUG char printf_buf[1024]; va_list args; int printed; va_start(args, fmt); printed = vsprintf(printf_buf, fmt, a 阅读全文
posted @ 2010-07-17 01:50 yangyh 阅读(1100) 评论(0) 推荐(0) 编辑