tomcrypt/src/headers/tomcrypt_argchk.h

22 lines
437 B
C
Raw Normal View History

2004-12-30 23:55:53 +00:00
/* Defines the LTC_ARGCHK macro used within the library */
2003-03-03 00:59:24 +00:00
/* ARGTYPE is defined in mycrypt_cfg.h */
#if ARGTYPE == 0
#include <signal.h>
2003-03-03 01:02:10 +00:00
/* this is the default LibTomCrypt macro */
2004-10-30 03:00:26 +00:00
void crypt_argchk(char *v, char *s, int d);
2004-12-30 23:55:53 +00:00
#define LTC_ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); }
2003-03-03 00:59:24 +00:00
#elif ARGTYPE == 1
/* fatal type of error */
2004-12-30 23:55:53 +00:00
#define LTC_ARGCHK(x) assert((x))
2003-03-03 00:59:24 +00:00
#elif ARGTYPE == 2
2004-12-30 23:55:53 +00:00
#define LTC_ARGCHK(x)
2003-03-03 00:59:24 +00:00
#endif