32 #include "../my_config.h"
43 typedef unsigned char int_tools_bitfield[8];
45 extern void int_tools_swap_bytes(
unsigned char &a,
unsigned char &b);
46 extern void int_tools_swap_bytes(
unsigned char *a, U_I size);
47 extern void int_tools_expand_byte(
unsigned char a, int_tools_bitfield &bit);
48 extern void int_tools_contract_byte(
const int_tools_bitfield &b,
unsigned char & a);
52 template <
class T>
extern T int_tools_rotate_right_one_bit(T v)
54 bool retenue = (v & 1) != 0;
58 v |= T(1) << (
sizeof(v)*8 - 1);
63 template <
class T>
extern T int_tools_maxof_agregate(T unused) { unused = 0; unused = ~unused; unused = unused > 0 ? unused : ~int_tools_rotate_right_one_bit(T(1));
return unused; }
65 template <
class B>
static B int_tools_higher_power_of_2(B val)