⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 assert.h.svn-base

📁 wince c++ 下 开发的 rss 阅读器源代码
💻 SVN-BASE
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/****
*
* assert.h - define the assert macro
*
* Purpose:
*	Defines the assert(exp) macro.
*	If the DEBUG compiler directive is set, assert(exp) where exp
*	evaluates to a false condition will result in a debug message
*	being printed to the debug console, followed by a DebugBreak().
*	The debug message will be in the form:
*
*	*** ASSERTION FAILED in <file>(<line>):
*	<expression>
*
* Note:
* 	If the DEBUG directive is set, winbase.h will be included
* 	by this file.
*
****/

#ifndef _INC_ASSERT
#define _INC_ASSERT

#ifndef _CRTIMP
#ifdef CRTDLL
#define _CRTIMP __declspec(dllexport)
#else  /* CRTDLL */
#ifdef _DLL
#define _CRTIMP __declspec(dllimport)
#else  /* _DLL */
#define _CRTIMP
#endif  /* _DLL */
#endif  /* CRTDLL */
#endif  /* _CRTIMP */

/* Define __cdecl for non-Microsoft compilers */

#if (!defined (_MSC_VER) && !defined (__cdecl))
#define __cdecl
#endif  /* (!defined (_MSC_VER) && !defined (__cdecl)) */

/* If DEBUG is not defined, make sure NDEBUG is defined */
#ifndef DEBUG
#ifndef NDEBUG
#define NDEBUG
#endif /* NDEBUG */
#endif /* DEBUG */

#ifdef NDEBUG

#define assert(exp)	((void)0)

#else /* NDEBUG */

#include <windef.h>
#include <types.h>
#include <winbase.h>
/* Multi-level macro needed to launder __LINE__ */
#define ASSERT_PRINT(exp,file,line) OutputDebugStringW(TEXT("\r\n*** ASSERTION FAILED in ") TEXT(file) TEXT("(") TEXT(#line) TEXT("):\r\n") TEXT(#exp) TEXT("\r\n"))
#define ASSERT_AT(exp,file,line) (void)( (exp) || (ASSERT_PRINT(exp,file,line), DebugBreak(), 0 ) )
#define assert(exp) ASSERT_AT(exp,__FILE__,__LINE__)

#endif /* NDEBUG */

#endif /* _INC_ASSERT */

⌨️ 快捷键说明

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