3
|
1 /* Defines the _ARGCHK macro used within the library */ |
|
2 |
|
3 /* ch1-01-1 */ |
|
4 /* ARGTYPE is defined in mycrypt_cfg.h */ |
|
5 #if ARGTYPE == 0 |
|
6 |
|
7 #include <signal.h> |
|
8 |
|
9 /* this is the default LibTomCrypt macro */ |
|
10 extern void crypt_argchk(char *v, char *s, int d); |
|
11 #define _ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } |
|
12 |
|
13 #elif ARGTYPE == 1 |
|
14 |
|
15 /* fatal type of error */ |
|
16 #define _ARGCHK(x) assert((x)) |
|
17 |
|
18 #elif ARGTYPE == 2 |
|
19 |
|
20 #define _ARGCHK(x) |
|
21 |
|
22 #endif |
|
23 /* ch1-01-1 */ |
|
24 |