2009-11-10 16:48:42 +01:00
|
|
|
#ifndef _RAR_DEFS_
|
|
|
|
#define _RAR_DEFS_
|
|
|
|
|
|
|
|
#define Min(x,y) (((x)<(y)) ? (x):(y))
|
|
|
|
#define Max(x,y) (((x)>(y)) ? (x):(y))
|
|
|
|
|
2020-07-15 00:40:26 +02:00
|
|
|
// Universal replacement of abs function.
|
|
|
|
#define Abs(x) (((x)<0) ? -(x):(x))
|
|
|
|
|
2009-11-10 16:48:42 +01:00
|
|
|
#define ASIZE(x) (sizeof(x)/sizeof(x[0]))
|
|
|
|
|
2020-07-15 00:40:26 +02:00
|
|
|
// MAXPASSWORD is expected to be multiple of CRYPTPROTECTMEMORY_BLOCK_SIZE (16)
|
|
|
|
// for CryptProtectMemory in SecPassword.
|
2009-11-10 16:48:42 +01:00
|
|
|
#define MAXPASSWORD 128
|
2020-07-15 00:40:26 +02:00
|
|
|
|
|
|
|
#define MAXSFXSIZE 0x200000
|
|
|
|
|
|
|
|
#define MAXCMTSIZE 0x40000
|
|
|
|
|
|
|
|
#define DefSFXName L"default.sfx"
|
|
|
|
#define DefSortListName L"rarfiles.lst"
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SFX_MODULE
|
|
|
|
#define USE_QOPEN
|
2009-11-10 16:48:42 +01:00
|
|
|
#endif
|
|
|
|
|
2020-07-15 00:40:26 +02:00
|
|
|
// Produce the value, which is equal or larger than 'v' and aligned to 'a'.
|
|
|
|
#define ALIGN_VALUE(v,a) (size_t(v) + ( (~size_t(v) + 1) & (a - 1) ) )
|
|
|
|
|
2009-11-10 16:48:42 +01:00
|
|
|
#endif
|