Skip to content

Commit

Permalink
TONY: Remove unused function declaration in lzo
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Mar 1, 2014
1 parent 3ace561 commit 8d8bf74
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
19 changes: 14 additions & 5 deletions engines/tony/mpal/lzo.cpp
Expand Up @@ -209,8 +209,11 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len)
NEED_OP(t + 3 - 1);
{
copy_match:
*op++ = *m_pos++; *op++ = *m_pos++;
do *op++ = *m_pos++; while (--t > 0);
*op++ = *m_pos++;
*op++ = *m_pos++;
do
*op++ = *m_pos++;
while (--t > 0);
}

match_done:
Expand All @@ -219,9 +222,16 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len)
break;

match_next:
assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1);
assert(t > 0);
assert(t < 4);
NEED_OP(t);
NEED_IP(t + 1);
*op++ = *ip++;
if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } }
if (t > 1) {
*op++ = *ip++;
if (t > 2)
*op++ = *ip++;
}
t = *ip++;
} while (TEST_IP && TEST_OP);
}
Expand All @@ -235,5 +245,4 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len)
}

} // end of namespace MPAL

} // end of namespace Tony
13 changes: 0 additions & 13 deletions engines/tony/mpal/lzo.h
Expand Up @@ -86,25 +86,12 @@ namespace MPAL {
#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */
#define LZO_E_INVALID_ARGUMENT (-10)

#define LZO1X_999_MEM_COMPRESS ((uint32) (14 * 16384L * sizeof(uint16)))

/**
* Decompresses an LZO compressed resource
*/
int lzo1x_decompress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len);

/**
* Comrpess a data block into an LZO stream
*/
int lzo1x_1_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem);

/**
* better compression ratio at the cost of more memory and time
*/
int lzo1x_999_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem);

} // end of namespace MPAL

} // end of namespace Tony

#endif /* already included */

0 comments on commit 8d8bf74

Please sign in to comment.