Filter parameters should be called "ft" instead of "fp".

committer: mfx <mfx> 1142301730 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2006-03-14 02:02:10 +00:00
parent c43c484a62
commit df04e8183d
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -295,7 +295,7 @@ bool Packer::checkFinalCompressionRatio(const OutputFile *fo) const
**************************************************************************/ **************************************************************************/
void Packer::decompress(const upx_bytep in, upx_bytep out, void Packer::decompress(const upx_bytep in, upx_bytep out,
bool verify_checksum, Filter *fp) bool verify_checksum, Filter *ft)
{ {
unsigned adler; unsigned adler;
@@ -316,8 +316,8 @@ void Packer::decompress(const upx_bytep in, upx_bytep out,
// verify checksum of decompressed data // verify checksum of decompressed data
if (verify_checksum) if (verify_checksum)
{ {
if (fp) { if (ft) {
fp->unfilter(out, ph.u_len); ft->unfilter(out, ph.u_len);
} }
adler = upx_adler32(out, ph.u_len, ph.saved_u_adler); adler = upx_adler32(out, ph.u_len, ph.saved_u_adler);
if (adler != ph.u_adler) if (adler != ph.u_adler)
@@ -358,7 +358,7 @@ bool Packer::testOverlappingDecompression(const upx_bytep buf,
} }
void Packer::verifyOverlappingDecompression(Filter *fp) void Packer::verifyOverlappingDecompression(Filter *ft)
{ {
assert(ph.c_len < ph.u_len); assert(ph.c_len < ph.u_len);
assert((int)ph.overlap_overhead > 0); assert((int)ph.overlap_overhead > 0);
@@ -384,7 +384,7 @@ void Packer::verifyOverlappingDecompression(Filter *fp)
if (offset + ph.c_len > obuf.getSize()) if (offset + ph.c_len > obuf.getSize())
return; return;
memmove(obuf + offset, obuf, ph.c_len); memmove(obuf + offset, obuf, ph.c_len);
decompress(obuf + offset, obuf, true, fp); decompress(obuf + offset, obuf, true, ft);
obuf.checkState(); obuf.checkState();
#endif /* !UNUPX */ #endif /* !UNUPX */
} }
+2 -2
View File
@@ -161,7 +161,7 @@ protected:
virtual bool compress(upx_bytep in, upx_bytep out, virtual bool compress(upx_bytep in, upx_bytep out,
unsigned max_offset = 0, unsigned max_match = 0); unsigned max_offset = 0, unsigned max_match = 0);
virtual void decompress(const upx_bytep in, upx_bytep out, virtual void decompress(const upx_bytep in, upx_bytep out,
bool verify_checksum = true, Filter *fp = 0); bool verify_checksum = true, Filter *ft = NULL);
virtual bool checkCompressionRatio(unsigned u_len, unsigned c_len) const; virtual bool checkCompressionRatio(unsigned u_len, unsigned c_len) const;
virtual bool checkFinalCompressionRatio(const OutputFile *fo) const; virtual bool checkFinalCompressionRatio(const OutputFile *fo) const;
@@ -185,7 +185,7 @@ protected:
unsigned range = 0, unsigned range = 0,
unsigned upper_limit = ~0u) const; unsigned upper_limit = ~0u) const;
// destructive decompress + verify // destructive decompress + verify
virtual void verifyOverlappingDecompression(Filter *fp = 0); virtual void verifyOverlappingDecompression(Filter *ft = NULL);
// packheader handling // packheader handling