assert.h

来自「[拉普兰德]TSL1401线性CCD模块资料包」· C头文件 代码 · 共 26 行

H
26
字号
/*
 * File:        assert.h
 * Purpose:     Provide macro for software assertions
 *
 * Notes:       assert_failed() defined in assert.c
 */

#ifndef _ASSERT_H_
#define _ASSERT_H_

/********************************************************************/

void assert_failed(char *, int);

#ifdef DEBUG_PRINT
#define ASSERT(expr) \
    if (!(expr)) \
        assert_failed(__FILE__, __LINE__)
#else
#define ASSERT(expr)
#endif

/********************************************************************/
#endif /* _ASSERT_H_ */

⌨️ 快捷键说明

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