summaryrefslogtreecommitdiffstats
path: root/lib/libchmfile/bitfiddle.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 19:00:37 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-29 19:00:37 +0000
commit25794f504692e5a36c490438814e9dfda8aaa2dd (patch)
tree8061e6d27b5bc9042afdff177872779c4e8c9015 /lib/libchmfile/bitfiddle.h
parent35ff2a942f63b5201c04f41c3097e61cdd7817e9 (diff)
downloadkchmviewer-25794f504692e5a36c490438814e9dfda8aaa2dd.tar.gz
kchmviewer-25794f504692e5a36c490438814e9dfda8aaa2dd.zip
TQt4 port kchmviewer
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kchmviewer@1234150 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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;