summaryrefslogtreecommitdiffstats
path: root/parts/documentation/protocols/chm/decompress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/documentation/protocols/chm/decompress.cpp')
-rw-r--r--parts/documentation/protocols/chm/decompress.cpp32
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)