Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rardefs.hpp « unrar « thirdparty « src - github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 93276233b679e21c4f1694d4d86911016abeba3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef _RAR_DEFS_
#define _RAR_DEFS_

#define  Min(x,y) (((x)<(y)) ? (x):(y))
#define  Max(x,y) (((x)>(y)) ? (x):(y))

// Universal replacement of abs function for non-int arguments.
#define  Abs(x) (((x)<0) ? -(x):(x))

#define  ASIZE(x) (sizeof(x)/sizeof(x[0]))

// MAXPASSWORD is expected to be multiple of CRYPTPROTECTMEMORY_BLOCK_SIZE (16)
// for CryptProtectMemory in SecPassword.
#define  MAXPASSWORD       128

#define  MAXSFXSIZE        0x100000

#define  DefSFXName        L"default.sfx"
#define  DefSortListName   L"rarfiles.lst"


#ifndef SFX_MODULE
#define USE_QOPEN
#endif

// Suppress GCC warn_unused_result warning in -O2 mode
// for those function calls where we do not need it.
#define ignore_result(x) if (x)

// 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) ) )

#endif