debug.h

来自「linux下的多线程调试工具」· C头文件 代码 · 共 56 行

H
56
字号
/* Copyright (C) 2004,2005,2006  Bull S.A. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *//* PTT internals trace mechanism macros * PTT_DBG = trace level of ptt internals * if not defined, ifdef PTT_TRACE_INFO, PTT_DBG = PTT_DBG_ALL *                 else                  PTT_DBG = PTT_DBG_NONE */ #ifndef DEBUG_H #define DEBUG_H #define PTT_DBG_MAIN    0x1#define PTT_DBG_ERROR   0x2#define PTT_DBG_STAT    0x4#define PTT_DBG_WRITE   0x8/* don't trace ptt internals */#define PTT_DBG_NONE 0/* trace whole ptt internals */#define PTT_DBG_ALL (PTT_DBG_MAIN)/* default debug level */#ifndef PTT_DBG#ifdef PTT_TRACE_INFO#define PTT_DBG PTT_DBG_ALL#else /* ifndef PTT_TRACE_INFO */#define PTT_DBG PTT_DBG_NONE#endif /* PTT_TRACE_INFO */#endif /* PTT_DBG *//* define PTT_TRACE_INTERNALS */#if (PTT_DBG == PTT_DBG_NONE)#define PTT_TRACE_INTERNALS(x,...)#else /* PTT_DBG != PTT_DBG_NONE */#define PTT_TRACE_INTERNALS(level,...)  \    if (level & PTT_DBG) fprintf (stderr, __VA_ARGS__)#endif /* PTT_DBG != PTT_DBG_NONE */#endif /* DEBUG_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?