summaryrefslogtreecommitdiffstats
path: root/lib/libchmfile/bitfiddle.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libchmfile/bitfiddle.h')
-rw-r--r--lib/libchmfile/bitfiddle.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/libchmfile/bitfiddle.h b/lib/libchmfile/bitfiddle.h
index cd97b8e..14a4bdc 100644
--- a/lib/libchmfile/bitfiddle.h
+++ b/lib/libchmfile/bitfiddle.h
@@ -84,7 +84,7 @@ inline u_int64_t sr_int(unsigned char* byte, int* bit,
unsigned char s, unsigned char r, size_t& length)
{
u_int64_t ret;
- unsigned char mask;
+ unsigned char tqmask;
int n, n_bits, num_bits, base, count;
length = 0;
size_t fflen;
@@ -105,37 +105,37 @@ inline u_int64_t sr_int(unsigned char* byte, int* bit,
switch(num_bits){
case 0:
- mask = 1;
+ tqmask = 1;
break;
case 1:
- mask = 3;
+ tqmask = 3;
break;
case 2:
- mask = 7;
+ tqmask = 7;
break;
case 3:
- mask = 0xf;
+ tqmask = 0xf;
break;
case 4:
- mask = 0x1f;
+ tqmask = 0x1f;
break;
case 5:
- mask = 0x3f;
+ tqmask = 0x3f;
break;
case 6:
- mask = 0x7f;
+ tqmask = 0x7f;
break;
case 7:
- mask = 0xff;
+ tqmask = 0xff;
break;
default:
- mask = 0xff;
+ tqmask = 0xff;
break;
}
- mask <<= base;
+ tqmask <<= base;
ret = (ret << (num_bits+1)) |
- (u_int64_t)((*byte & mask) >> base);
+ (u_int64_t)((*byte & tqmask) >> base);
if( n > *bit ){
++byte;