printf调试宏

来源:互联网 发布:ubuntu可以做什么 编辑:程序博客网 时间:2024/06/06 02:42
//**************    add by houtian start    *****************//

#if 1
    #define __DEBUG_PRINTF__
#endif



#ifdef __DEBUG_PRINTF__
    #define DebugPos()   printf("file:%s(%d),function:%s\n",__FILE__,__LINE__,__FUNCTION__);
    #define DebugPrint(strFormat, ...)   printf(strFormat, __VA_ARGS__);

#else
    #define DebugPos()
    #define DebugPrint(strFormat, ...)

#endif


//**************    add by houtian end    *****************//
0 0
原创粉丝点击