summaryrefslogtreecommitdiffstats
path: root/parts/documentation/protocols/chm/decompress.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit32b67ac0690de411b26b1d5e715b188c27442248 (patch)
tree43167816a3df6b3a877d71c9a7963ed270dcc8c9 /parts/documentation/protocols/chm/decompress.cpp
parent330c33ab6f97b279737bf9527c9add7bb1475450 (diff)
downloadtdevelop-32b67ac0690de411b26b1d5e715b188c27442248.tar.gz
tdevelop-32b67ac0690de411b26b1d5e715b188c27442248.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/documentation/protocols/chm/decompress.cpp')
-rw-r--r--parts/documentation/protocols/chm/decompress.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/parts/documentation/protocols/chm/decompress.cpp b/parts/documentation/protocols/chm/decompress.cpp
index 212eb244..f411e8ec 100644
--- a/parts/documentation/protocols/chm/decompress.cpp
+++ b/parts/documentation/protocols/chm/decompress.cpp
@@ -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 tqmask any bits.
+ * LSB as a free source of zeroes. This avoids having to mask 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_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 */
+ 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 */
/* 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_tqmask) > table_tqmask) return 1; /* table overrun */
+ if ((pos += bit_mask) > table_mask) return 1; /* table overrun */
/* fill all possible lookups of this symbol with the symbol itself */
- fill = bit_tqmask;
+ fill = bit_mask;
while (fill-- > 0) table[leaf++] = sym;
}
}
- bit_tqmask >>= 1;
+ bit_mask >>= 1;
bit_num++;
}
/* if there are any codes longer than nbits */
- if (pos != table_tqmask)
+ if (pos != table_mask)
{
/* clear the remainder of the table */
- for (sym = pos; sym < table_tqmask; sym++) table[sym] = 0;
+ for (sym = pos; sym < table_mask; sym++) table[sym] = 0;
/* give ourselves room for codes to grow by up to 16 more bits */
pos <<= 16;
- table_tqmask <<= 16;
- bit_tqmask = 1 << 15;
+ table_mask <<= 16;
+ bit_mask = 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_tqmask) > table_tqmask) return 1; /* table overflow */
+ if ((pos += bit_mask) > table_mask) return 1; /* table overflow */
}
}
- bit_tqmask >>= 1;
+ bit_mask >>= 1;
bit_num++;
}
}
/* full table? */
- if (pos == table_tqmask) return 0;
+ if (pos == table_mask) 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 tqmask */
+ /* apply 2^x-1 mask */
window_posn &= window_size - 1;
/* runs can't straddle the window wraparound */
if ((window_posn + this_run) > window_size)