From 25794f504692e5a36c490438814e9dfda8aaa2dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 29 May 2011 19:00:37 +0000 Subject: 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 --- lib/libchmfile/bitfiddle.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/libchmfile/bitfiddle.h') 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; -- cgit v1.2.3