mycrypt_argchk.h 426 B

123456789101112131415161718192021
  1. /* Defines the _ARGCHK macro used within the library */
  2. /* ARGTYPE is defined in mycrypt_cfg.h */
  3. #if ARGTYPE == 0
  4. #include <signal.h>
  5. /* this is the default LibTomCrypt macro */
  6. void crypt_argchk(char *v, char *s, int d);
  7. #define _ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); }
  8. #elif ARGTYPE == 1
  9. /* fatal type of error */
  10. #define _ARGCHK(x) assert((x))
  11. #elif ARGTYPE == 2
  12. #define _ARGCHK(x)
  13. #endif