wassert.h

来自「一个学习SNMP项目:tmoerlan.」· C头文件 代码 · 共 33 行

H
33
字号
/* $Id: wassert.h,v 1.2 2003/09/17 11:26:10 tmoerlan Exp $ */#ifndef _SNAP_WASSERT_H_#define _SNAP_WASSERT_H_#include <assert.h>/* Defines a special kind of assert that prints a warning but allows   execution to continue.  Used to signal problems with the packet,   but does not halt execution (i.e., packet is ill-formed, but this   does not constitute an internal error). */#ifndef __KERNEL__#ifndef NDEBUG#define wassert(e)							\  if (e); 								\  else { 								\    fprintf(stderr,"%s:%d: soft-assertion failed in %s\n",		\	    __FILE__,__LINE__,__STRING(e));				\  }#else#define wassert(e) ((void) 0)#endif#else#define wassert(e) ((void) 0)#endif /* !__KERNEL__ */#endif /* _SNAP_WASSERT_H_ */

⌨️ 快捷键说明

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