|
|
|
@ -36,9 +36,9 @@ |
|
|
|
|
#endif |
|
|
|
|
#ifdef BYFOUR |
|
|
|
|
local unsigned long crc32_little OF((unsigned long, |
|
|
|
|
const unsigned char FAR *, unsigned)); |
|
|
|
|
const unsigned char FAR *, z_size_t)); |
|
|
|
|
local unsigned long crc32_big OF((unsigned long, |
|
|
|
|
const unsigned char FAR *, unsigned)); |
|
|
|
|
const unsigned char FAR *, z_size_t)); |
|
|
|
|
# define TBLS 8 |
|
|
|
|
#else |
|
|
|
|
# define TBLS 1 |
|
|
|
@ -199,10 +199,10 @@ const z_crc_t FAR * ZEXPORT get_crc_table() |
|
|
|
|
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1 |
|
|
|
|
|
|
|
|
|
/* ========================================================================= */ |
|
|
|
|
unsigned long ZEXPORT crc32(crc, buf, len) |
|
|
|
|
unsigned long ZEXPORT crc32_z(crc, buf, len) |
|
|
|
|
unsigned long crc; |
|
|
|
|
const unsigned char FAR *buf; |
|
|
|
|
uInt len; |
|
|
|
|
z_size_t len; |
|
|
|
|
{ |
|
|
|
|
if (buf == Z_NULL) return 0UL; |
|
|
|
|
|
|
|
|
@ -233,6 +233,15 @@ unsigned long ZEXPORT crc32(crc, buf, len) |
|
|
|
|
return crc ^ 0xffffffffUL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* ========================================================================= */ |
|
|
|
|
unsigned long ZEXPORT crc32(crc, buf, len) |
|
|
|
|
unsigned long crc; |
|
|
|
|
const unsigned char FAR *buf; |
|
|
|
|
uInt len; |
|
|
|
|
{ |
|
|
|
|
return crc32_z(crc, buf, len); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#ifdef BYFOUR |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
@ -257,7 +266,7 @@ unsigned long ZEXPORT crc32(crc, buf, len) |
|
|
|
|
local unsigned long crc32_little(crc, buf, len) |
|
|
|
|
unsigned long crc; |
|
|
|
|
const unsigned char FAR *buf; |
|
|
|
|
unsigned len; |
|
|
|
|
z_size_t len; |
|
|
|
|
{ |
|
|
|
|
register z_crc_t c; |
|
|
|
|
register const z_crc_t FAR *buf4; |
|
|
|
@ -297,7 +306,7 @@ local unsigned long crc32_little(crc, buf, len) |
|
|
|
|
local unsigned long crc32_big(crc, buf, len) |
|
|
|
|
unsigned long crc; |
|
|
|
|
const unsigned char FAR *buf; |
|
|
|
|
unsigned len; |
|
|
|
|
z_size_t len; |
|
|
|
|
{ |
|
|
|
|
register z_crc_t c; |
|
|
|
|
register const z_crc_t FAR *buf4; |
|
|
|
|