📄 debug.h
字号:
/** Copyright (c) 1998-2001 by NETsilicon Inc.** This software is copyrighted by and is the sole property of* NETsilicon. All rights, title, ownership, or other interests* in the software remain the property of NETsilicon. This* software may only be used in accordance with the corresponding* license agreement. Any unauthorized use, duplication, transmission,* distribution, or disclosure of this software is expressly forbidden.** This Copyright notice may not be removed or modified without prior* written consent of NETsilicon.** NETsilicon, reserves the right to modify this software* without notice.** NETsilicon* 411 Waverley Oaks Road USA 781.647.1234* Suite 227 http://www.netsilicon.com* Waltham, MA 02452 AmericaSales@netsilicon.com*************************************************************************** $Name: Fusion 6.52 Fusion 6.51 $* $Date: 2001/09/20 10:19:17 $* $Source: M:/psisrc/stack/incl/rcs/debug.h $* $Revision: 1.6 $*************************************************************************** File Description: DEBUG routine definitions***************************************************************************/#ifndef _DEBUG_#define _DEBUG_#define _p0(m,c,f) if(c) {os_printf(#m __FILE__ ", %d: ", __LINE__); os_printf(f);} else#define _p1(m,c,f,z) if(c) {os_printf(#m __FILE__ ", %d: ", __LINE__); os_printf(f, z);} else#define _p2(m,c,f,z,y) if(c) {os_printf(#m __FILE__ ", %d: ", __LINE__); os_printf(f, z, y);} else#define _p3(m,c,f,z,y,x) if(c) {os_printf(#m __FILE__ ", %d: ", __LINE__); os_printf(f, z, y, x);} else#define _p4(m,c,f,z,y,x,w) if(c) {os_printf(#m __FILE__ ", %d: ", __LINE__); os_printf(f, z, y, x, w);} else#define _p5(m,c,f,z,y,x,w,v) if(c) {os_printf(#m __FILE__ ", %d: ", __LINE__); os_printf(f, z, y, x, w, v);} else#ifdef DEBUG#define debug0(c,f) _p0(debug,(c),(f))#define debug1(c,f,z) _p1(debug,(c),(f),(z))#define debug2(c,f,z,y) _p2(debug,(c),(f),(z),(y))#define debug3(c,f,z,y,x) _p3(debug,(c),(f),(z),(y),(x))#define debug4(c,f,z,y,x,w) _p4(debug,(c),(f),(z),(y),(x),(w))#define debug5(c,f,z,y,x,w,v) _p5(debug,(c),(f),(z),(y),(x),(w),(v))#else#define debug0(c,f)#define debug1(c,f,z)#define debug2(c,f,z,y)#define debug3(c,f,z,y,x)#define debug4(c,f,z,y,x,w)#define debug5(c,f,z,y,x,w,v)#endif /*DEBUG*/#ifdef TRACE#define trace0(c,f) _p0(trace,(c),(f))#define trace1(c,f,z) _p1(trace,(c),(f),(z))#define trace2(c,f,z,y) _p2(trace,(c),(f),(z),(y))#define trace3(c,f,z,y,x) _p3(trace,(c),(f),(z),(y),(x))#define trace4(c,f,z,y,x,w) _p4(trace,(c),(f),(z),(y),(x),(w))#define trace5(c,f,z,y,x,w,v) _p5(trace,(c),(f),(z),(y),(x),(w),(v))#else#define trace0(c,f)#define trace1(c,f,z)#define trace2(c,f,z,y)#define trace3(c,f,z,y,x)#define trace4(c,f,z,y,x,w)#define trace5(c,f,z,y,x,w,v)#endif /*TRACE*/#ifdef SKEPTIC#define assert(c,m) if (!(c)) os_printf(m); else#define verify(c,f,act) if (!(c)) {os_printf(f); act;} else#else#define assert(c,m)#define verify(c,f,act)#endif#ifdef DEBUG #define OS_PANIC0(s) os_printf(s) #define OS_PANIC1(s,x) os_printf(s,x) #define OS_PANIC2(s,x,y) os_printf(s,x,y) #define OS_PANIC3(s,x,y,z) os_printf(s,x,y,z) #define OS_PANIC4(s,w,x,y,z) os_printf(s,w,x,y,z) #define OS_PANIC5(s,v,w,x,y,z) os_printf(s,v,w,x,y,z) #define OS_PANIC6(s,u,v,w,x,y,z) os_printf(s,u,v,w,x,y,z) #define OS_WARN0(s) os_printf(s) #define OS_WARN1(s,x) os_printf(s,x) #define OS_WARN2(s,x,y) os_printf(s,x,y) #define OS_WARN3(s,x,y,z) os_printf(s,x,y,z) #define OS_WARN4(s,w,x,y,z) os_printf(s,w,x,y,z) #define OS_WARN5(s,v,w,x,y,z) os_printf(s,v,w,x,y,z) #define OS_WARN6(s,u,v,w,x,y,z) os_printf(s,u,v,w,x,y,z)#else #define OS_PANIC0(s) #define OS_PANIC1(s,x) #define OS_PANIC2(s,x,y) #define OS_PANIC3(s,x,y,z) #define OS_PANIC4(s,w,x,y,z) #define OS_PANIC5(s,v,w,x,y,z) #define OS_PANIC6(s,u,v,w,x,y,z) #define OS_WARN0(s) #define OS_WARN1(s,x) #define OS_WARN2(s,x,y) #define OS_WARN3(s,x,y,z) #define OS_WARN4(s,w,x,y,z) #define OS_WARN5(s,v,w,x,y,z) #define OS_WARN6(s,u,v,w,x,y,z) #endif#endif /*_DEBUG_*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -