Made upx_adler32() an overloaded function.

committer: mfx <mfx> 979849112 +0000
This commit is contained in:
Markus F.X.J. Oberhumer
2001-01-18 20:18:32 +00:00
parent 6447666284
commit e982426885
2 changed files with 27 additions and 2 deletions
+24
View File
@@ -83,6 +83,30 @@
#endif
/*************************************************************************
//
**************************************************************************/
unsigned upx_adler32(unsigned adler, const void *buf, unsigned len)
{
#if defined(WITH_NRV)
return nrv_adler32(adler, (const nrv_byte *)buf, len);
#elif defined(WITH_UCL)
return ucl_adler32(adler, (const ucl_byte *)buf, len);
#endif
}
unsigned upx_adler32(const void *buf, unsigned len)
{
//unsigned adler = upx_adler32(0, NULL, 0);
unsigned adler = 1;
assert(buf != NULL);
adler = upx_adler32(adler, buf, len);
return adler;
}
/*************************************************************************
//
**************************************************************************/