📄 assert_unix.h
字号:
/*************************************************************************** * * Oxford Semiconductor Proprietary and Confidential Information * * * File: assert_unix.h * * Description: ASSERT and VERIFY macro definitions * Do not include this file directly, it is pulled in by * Utils/assert.h * * Date: 01 April 2003 * * Copyright: Oxford Semiconductor Ltd, 2003 * * $Log: assert_unix.h,v $ * Revision 1.4 2004/11/24 15:28:51 parker * added host-based builds * * Revision 1.3 2004/04/08 11:13:05 mazic * Added production build. New we have debug, profile, and production (release) builds. * * Revision 1.2 2003/09/23 08:00:21 paul * *** empty log message *** * * Revision 1.1 2003/04/01 13:20:12 andy * added here to get assert low in dependency hierarchy * ***************************************************************************/#ifndef INC_OXSEMI_Libs_Utils_assert_unix_h#define INC_OXSEMI_Libs_Utils_assert_unix_h#include <errno.h>#include <stdio.h>#include <string.h>#include <assert.h>#ifndef assert#define assert(f) if (!f) { while (true) { continue; } }#endif#define ASSERT(f) \do { \ bool __bOK__ = !!(f); \ if(!__bOK__) \ { \ printf("ASSERT: 0x%X: %s\n", errno, strerror(errno)); \ assert(f); \ } \} while(false)#define VERIFY(f) \do { \ bool __bOK__ = !!(f); \ if(!__bOK__) \ { \ printf("VERIFY: 0x%X: %s\n", errno, strerror(errno)); \ assert(f); \ } \} while(false)#endif // INC_OXSEMI_Libs_Utils_xdbg_unix_h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -