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