equal
deleted
inserted
replaced
115 } else { |
115 } else { |
116 return value & (KILL_FIRST_BIT(GB(value, 0, 6)) | 0x3F00); |
116 return value & (KILL_FIRST_BIT(GB(value, 0, 6)) | 0x3F00); |
117 } |
117 } |
118 } |
118 } |
119 |
119 |
|
120 /** returns true if value a has only one bit set to 1 */ |
|
121 #define HAS_SINGLE_BIT(a) ( ((a) & ((a) - 1)) == 0) |
|
122 |
120 /* [min,max), strictly less than */ |
123 /* [min,max), strictly less than */ |
121 #define IS_BYTE_INSIDE(a,min,max) ((byte)((a)-(min)) < (byte)((max)-(min))) |
124 #define IS_BYTE_INSIDE(a,min,max) ((byte)((a)-(min)) < (byte)((max)-(min))) |
122 #define IS_INT_INSIDE(a,min,max) ((uint)((a)-(min)) < (uint)((max)-(min))) |
125 #define IS_INT_INSIDE(a,min,max) ((uint)((a)-(min)) < (uint)((max)-(min))) |
123 |
126 |
124 |
127 |