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

📄 assert.h

📁 汇编源代码大全
💻 H
字号:
/* @(#) assert.h 2.1 87/12/25 12:21:32 */

/*
The contents of this file are hereby released to the public domain.

                           -- Rahul Dhesi 1991/07/04

Defines a macro assert() that causes an assertion error if the assertion
fails.

Conditional compilation:

   If NDEBUG is defined then
      assert() is defined as null so all assertions vanish
   else
		if __FILE__ and __LINE__ are defined then
         assertions print message including filename and line number
      else
         assertions print a message but not the filename and line number
      endif
   endif
*/

#ifdef NDEBUG
# define assert(E)
#else

#undef LINE_FILE

#ifdef __LINE__
# ifdef __FILE__
#  define LINE_FILE
# endif
#endif

#ifdef LINE_FILE
# undef LINE_FILE
# define assert(E) \
   { if (!(E)) \
      prterror ('w',"Assertion error in %s:%d.\n", __FILE__, __LINE__); \
   }
#else
# define assert(E) \
   { if (!(E)) \
      prterror ('w', "Assertion error.\n"); \
   }
#endif
#endif /* NDEBUG */

⌨️ 快捷键说明

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