diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/documentation/protocols/chm/decompress.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/documentation/protocols/chm/decompress.cpp')
-rw-r--r-- | parts/documentation/protocols/chm/decompress.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/parts/documentation/protocols/chm/decompress.cpp b/parts/documentation/protocols/chm/decompress.cpp index b8f45ae2..212eb244 100644 --- a/parts/documentation/protocols/chm/decompress.cpp +++ b/parts/documentation/protocols/chm/decompress.cpp @@ -121,7 +121,7 @@ struct * The LZX document does not state the uncompressed block has an * uncompressed length field. Where does this length field come from, so * we can know how large the block is? The implementation has it as the 24 - * bits following after the 3 blocktype bits, before the alignment + * bits following after the 3 blocktype bits, before the tqalignment * padding. * * The LZX document states that aligned offset blocks have their aligned @@ -228,7 +228,7 @@ int LZXinit(int window) { * REMOVE_BITS(n) removes N bits from the bit buffer * * These bit access routines work by using the area beyond the MSB and the - * LSB as a free source of zeroes. This avoids having to mask any bits. + * LSB as a free source of zeroes. This avoids having to tqmask any bits. * So we have to know the bit width of the bitbuffer variable. This is * sizeof(ULONG) * 8, also defined as ULONG_BITS */ @@ -328,9 +328,9 @@ int make_decode_table(ULONG nsyms, ULONG nbits, UBYTE *length, UWORD *table) { register UBYTE bit_num = 1; ULONG fill; ULONG pos = 0; /* the current position in the decode table */ - ULONG table_mask = 1 << nbits; - ULONG bit_mask = table_mask >> 1; /* don't do 0 length codes */ - ULONG next_symbol = bit_mask; /* base of allocation for long codes */ + ULONG table_tqmask = 1 << nbits; + ULONG bit_tqmask = table_tqmask >> 1; /* don't do 0 length codes */ + ULONG next_symbol = bit_tqmask; /* base of allocation for long codes */ /* fill entries for codes short enough for a direct mapping */ while (bit_num <= nbits) @@ -341,27 +341,27 @@ int make_decode_table(ULONG nsyms, ULONG nbits, UBYTE *length, UWORD *table) { { leaf = pos; - if ((pos += bit_mask) > table_mask) return 1; /* table overrun */ + if ((pos += bit_tqmask) > table_tqmask) return 1; /* table overrun */ /* fill all possible lookups of this symbol with the symbol itself */ - fill = bit_mask; + fill = bit_tqmask; while (fill-- > 0) table[leaf++] = sym; } } - bit_mask >>= 1; + bit_tqmask >>= 1; bit_num++; } /* if there are any codes longer than nbits */ - if (pos != table_mask) + if (pos != table_tqmask) { /* clear the remainder of the table */ - for (sym = pos; sym < table_mask; sym++) table[sym] = 0; + for (sym = pos; sym < table_tqmask; sym++) table[sym] = 0; /* give ourselves room for codes to grow by up to 16 more bits */ pos <<= 16; - table_mask <<= 16; - bit_mask = 1 << 15; + table_tqmask <<= 16; + bit_tqmask = 1 << 15; while (bit_num <= 16) { @@ -385,16 +385,16 @@ int make_decode_table(ULONG nsyms, ULONG nbits, UBYTE *length, UWORD *table) { } table[leaf] = sym; - if ((pos += bit_mask) > table_mask) return 1; /* table overflow */ + if ((pos += bit_tqmask) > table_tqmask) return 1; /* table overflow */ } } - bit_mask >>= 1; + bit_tqmask >>= 1; bit_num++; } } /* full table? */ - if (pos == table_mask) return 0; + if (pos == table_tqmask) return 0; /* either erroneous table, or all elements are 0 - let's find out. */ for (sym = 0; sym < nsyms; sym++) if (length[sym]) return 1; @@ -555,7 +555,7 @@ int LZXdecompress(UBYTE* inpos, int inlen, UBYTE* outpos, int outlen) { togo -= this_run; LZX(block_remaining) -= this_run; - /* apply 2^x-1 mask */ + /* apply 2^x-1 tqmask */ window_posn &= window_size - 1; /* runs can't straddle the window wraparound */ if ((window_posn + this_run) > window_size) |