mycrypt_argchk.h

来自「NIST推荐的素域上的椭圆曲线」· C头文件 代码 · 共 42 行

H
42
字号
/* Defines the _ARGCHK macro used within the library *//* ARGTYPE is defined in mycrypt_cfg.h */#if ARGTYPE == 0#include <signal.h>/* this is the default LibTomCrypt macro  * * On embedded platforms you can change the fprintf() to be a routine that would display a message * somehow  */#ifndef SONY_PS2#define _ARGCHK(x) \    if (!(x)) { \        fprintf(stderr, "_ARGCHK '%s' failure on line %d of file %s\n", #x, __LINE__, __FILE__); \        raise(SIGABRT); \    }#else#define _ARGCHK(x) \    if (!(x)) { \        printf("_ARGCHK '%s' failure on line %d of file %s\n", #x, __LINE__, __FILE__); \        raise(SIGABRT); \    }#endif  /* SONY_PS2 */#elif ARGTYPE == 1/* fatal type of error */#define _ARGCHK(x) assert((x))#elif ARGTYPE == 2#define _ARGCHK(x) #endif

⌨️ 快捷键说明

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