Automated leading tab to spaces conversion.
This commit is contained in:
@ -20,17 +20,17 @@ typedef struct aes_key_st AES_KEY;
|
||||
#endif
|
||||
|
||||
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
AES_KEY *key);
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
AES_KEY *key);
|
||||
|
||||
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key);
|
||||
const AES_KEY *key);
|
||||
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key);
|
||||
const AES_KEY *key);
|
||||
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc);
|
||||
const unsigned long length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc);
|
||||
|
||||
extern const uint8_t AES_sbox[256];
|
||||
extern const uint8_t AES_isbox[256];
|
||||
|
@ -32,10 +32,10 @@
|
||||
*/
|
||||
static inline void set_bit(long nr, unsigned long *addr)
|
||||
{
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long *p = addr + BIT_WORD(nr);
|
||||
|
||||
*p |= mask;
|
||||
*p |= mask;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -45,10 +45,10 @@ static inline void set_bit(long nr, unsigned long *addr)
|
||||
*/
|
||||
static inline void clear_bit(long nr, unsigned long *addr)
|
||||
{
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long *p = addr + BIT_WORD(nr);
|
||||
|
||||
*p &= ~mask;
|
||||
*p &= ~mask;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -58,10 +58,10 @@ static inline void clear_bit(long nr, unsigned long *addr)
|
||||
*/
|
||||
static inline void change_bit(long nr, unsigned long *addr)
|
||||
{
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long *p = addr + BIT_WORD(nr);
|
||||
|
||||
*p ^= mask;
|
||||
*p ^= mask;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,12 +71,12 @@ static inline void change_bit(long nr, unsigned long *addr)
|
||||
*/
|
||||
static inline int test_and_set_bit(long nr, unsigned long *addr)
|
||||
{
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long *p = addr + BIT_WORD(nr);
|
||||
unsigned long old = *p;
|
||||
unsigned long old = *p;
|
||||
|
||||
*p = old | mask;
|
||||
return (old & mask) != 0;
|
||||
*p = old | mask;
|
||||
return (old & mask) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,12 +86,12 @@ static inline int test_and_set_bit(long nr, unsigned long *addr)
|
||||
*/
|
||||
static inline int test_and_clear_bit(long nr, unsigned long *addr)
|
||||
{
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long *p = addr + BIT_WORD(nr);
|
||||
unsigned long old = *p;
|
||||
unsigned long old = *p;
|
||||
|
||||
*p = old & ~mask;
|
||||
return (old & mask) != 0;
|
||||
*p = old & ~mask;
|
||||
return (old & mask) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -101,12 +101,12 @@ static inline int test_and_clear_bit(long nr, unsigned long *addr)
|
||||
*/
|
||||
static inline int test_and_change_bit(long nr, unsigned long *addr)
|
||||
{
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long mask = BIT_MASK(nr);
|
||||
unsigned long *p = addr + BIT_WORD(nr);
|
||||
unsigned long old = *p;
|
||||
unsigned long old = *p;
|
||||
|
||||
*p = old ^ mask;
|
||||
return (old & mask) != 0;
|
||||
*p = old ^ mask;
|
||||
return (old & mask) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -116,7 +116,7 @@ static inline int test_and_change_bit(long nr, unsigned long *addr)
|
||||
*/
|
||||
static inline int test_bit(long nr, const unsigned long *addr)
|
||||
{
|
||||
return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
|
||||
return 1UL & (addr[BIT_WORD(nr)] >> (nr & (BITS_PER_LONG-1)));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -126,7 +126,7 @@ static inline int test_bit(long nr, const unsigned long *addr)
|
||||
* @size: The bitmap size in bits
|
||||
*/
|
||||
unsigned long find_next_bit(const unsigned long *addr,
|
||||
unsigned long size, unsigned long offset);
|
||||
unsigned long size, unsigned long offset);
|
||||
|
||||
/**
|
||||
* find_next_zero_bit - find the next cleared bit in a memory region
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
static double rint( double x )
|
||||
{
|
||||
return floor(x < 0 ? x - 0.5 : x + 0.5);
|
||||
return floor(x < 0 ? x - 0.5 : x + 0.5);
|
||||
}
|
||||
|
||||
union MSVC_FLOAT_HACK
|
||||
|
@ -13,7 +13,7 @@ struct Int128 {
|
||||
|
||||
static inline Int128 int128_make64(uint64_t a)
|
||||
{
|
||||
Int128 i128 = { a, 0 };
|
||||
Int128 i128 = { a, 0 };
|
||||
return i128;
|
||||
}
|
||||
|
||||
@ -35,19 +35,19 @@ static inline Int128 int128_one(void)
|
||||
|
||||
static inline Int128 int128_2_64(void)
|
||||
{
|
||||
Int128 i128 = { 0, 1 };
|
||||
Int128 i128 = { 0, 1 };
|
||||
return i128;
|
||||
}
|
||||
|
||||
static inline Int128 int128_exts64(int64_t a)
|
||||
{
|
||||
Int128 i128 = { a, (a < 0) ? -1 : 0 };
|
||||
Int128 i128 = { a, (a < 0) ? -1 : 0 };
|
||||
return i128;
|
||||
}
|
||||
|
||||
static inline Int128 int128_and(Int128 a, Int128 b)
|
||||
{
|
||||
Int128 i128 = { a.lo & b.lo, a.hi & b.hi };
|
||||
Int128 i128 = { a.lo & b.lo, a.hi & b.hi };
|
||||
return i128;
|
||||
}
|
||||
|
||||
@ -59,11 +59,11 @@ static inline Int128 int128_rshift(Int128 a, int n)
|
||||
}
|
||||
h = a.hi >> (n & 63);
|
||||
if (n >= 64) {
|
||||
Int128 i128 = { h, h >> 63 };
|
||||
return i128;
|
||||
Int128 i128 = { h, h >> 63 };
|
||||
return i128;
|
||||
} else {
|
||||
Int128 i128 = { (a.lo >> n) | ((uint64_t)a.hi << (64 - n)), h };
|
||||
return i128;
|
||||
Int128 i128 = { (a.lo >> n) | ((uint64_t)a.hi << (64 - n)), h };
|
||||
return i128;
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,21 +77,21 @@ static inline Int128 int128_add(Int128 a, Int128 b)
|
||||
*
|
||||
* So the carry is lo < a.lo.
|
||||
*/
|
||||
Int128 i128 = { lo, (uint64_t)a.hi + b.hi + (lo < a.lo) };
|
||||
return i128;
|
||||
Int128 i128 = { lo, (uint64_t)a.hi + b.hi + (lo < a.lo) };
|
||||
return i128;
|
||||
}
|
||||
|
||||
static inline Int128 int128_neg(Int128 a)
|
||||
{
|
||||
uint64_t lo = 0-a.lo;
|
||||
Int128 i128 = { lo, ~(uint64_t)a.hi + !lo };
|
||||
return i128;
|
||||
Int128 i128 = { lo, ~(uint64_t)a.hi + !lo };
|
||||
return i128;
|
||||
}
|
||||
|
||||
static inline Int128 int128_sub(Int128 a, Int128 b)
|
||||
{
|
||||
Int128 i128 = { a.lo - b.lo, (uint64_t)a.hi - b.hi - (a.lo < b.lo) };
|
||||
return i128;
|
||||
Int128 i128 = { a.lo - b.lo, (uint64_t)a.hi - b.hi - (a.lo < b.lo) };
|
||||
return i128;
|
||||
}
|
||||
|
||||
static inline bool int128_nonneg(Int128 a)
|
||||
|
@ -229,7 +229,7 @@ static inline int64_t cpu_get_real_ticks(void)
|
||||
static inline int64_t cpu_get_real_ticks(void)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
return __rdtsc();
|
||||
return __rdtsc();
|
||||
#else
|
||||
int64_t val;
|
||||
asm volatile ("rdtsc" : "=A" (val));
|
||||
@ -242,7 +242,7 @@ static inline int64_t cpu_get_real_ticks(void)
|
||||
static inline int64_t cpu_get_real_ticks(void)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
return __rdtsc();
|
||||
return __rdtsc();
|
||||
#else
|
||||
uint32_t low,high;
|
||||
int64_t val;
|
||||
|
Reference in New Issue
Block a user