~ubuntu-branches/ubuntu/vivid/unrar-nonfree/vivid

« back to all changes in this revision

Viewing changes to rardefs.hpp

  • Committer: Package Import Robot
  • Author(s): Martin Meredith
  • Date: 2015-02-03 12:58:01 UTC
  • mfrom: (1.1.18) (5.1.18 sid)
  • Revision ID: package-import@ubuntu.com-20150203125801-od6ev8cqy1er51vz
Tags: 1:5.2.5-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#define  Min(x,y) (((x)<(y)) ? (x):(y))
5
5
#define  Max(x,y) (((x)>(y)) ? (x):(y))
6
6
 
 
7
// Universal replacement of abs function for non-int arguments.
 
8
#define  Abs(x) (((x)<0) ? -(x):(x))
 
9
 
7
10
#define  ASIZE(x) (sizeof(x)/sizeof(x[0]))
8
11
 
9
12
// MAXPASSWORD is expected to be multiple of CRYPTPROTECTMEMORY_BLOCK_SIZE (16)
24
27
// for those function calls where we do not need it.
25
28
#define ignore_result(x) if (x)
26
29
 
27
 
// Produce the value, which is larger than 'v' and aligned to 'a'.
 
30
// Produce the value, which is equal or larger than 'v' and aligned to 'a'.
28
31
#define ALIGN_VALUE(v,a) (size_t(v) + ( (~size_t(v) + 1) & (a - 1) ) )
29
32
 
30
33
#endif