1
0

rardefs.hpp 758 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _RAR_DEFS_
  2. #define _RAR_DEFS_
  3. #define Min(x,y) (((x)<(y)) ? (x):(y))
  4. #define Max(x,y) (((x)>(y)) ? (x):(y))
  5. // Universal replacement of abs function.
  6. #define Abs(x) (((x)<0) ? -(x):(x))
  7. #define ASIZE(x) (sizeof(x)/sizeof(x[0]))
  8. // MAXPASSWORD is expected to be multiple of CRYPTPROTECTMEMORY_BLOCK_SIZE (16)
  9. // for CryptProtectMemory in SecPassword.
  10. #define MAXPASSWORD 128
  11. #define MAXSFXSIZE 0x200000
  12. #define MAXCMTSIZE 0x40000
  13. #define DefSFXName L"default.sfx"
  14. #define DefSortListName L"rarfiles.lst"
  15. #ifndef SFX_MODULE
  16. #define USE_QOPEN
  17. #endif
  18. // Produce the value, which is equal or larger than 'v' and aligned to 'a'.
  19. #define ALIGN_VALUE(v,a) (size_t(v) + ( (~size_t(v) + 1) & (a - 1) ) )
  20. #endif