summaryrefslogtreecommitdiff
path: root/cpan/Compress-Raw-Zlib/zlib-src/crc32.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-07-01 16:54:10 +0100
committerNicholas Clark <nick@ccl4.org>2010-07-01 16:54:10 +0100
commitd67e36ac79680884a7b6bab94b81afc77cd80044 (patch)
tree00997d93f3cdf91318ae71933d66090b38c91751 /cpan/Compress-Raw-Zlib/zlib-src/crc32.c
parent6fc551a0cffc7d4ec07e3aca01af8d12a0a63e1b (diff)
downloadperl-d67e36ac79680884a7b6bab94b81afc77cd80044.tar.gz
Convert zlib src from K&R functions declarations to ANSI C.
K&R declarations aren't valid C++, hence C++ builds choke. zlib defaults to K&R (I infer for maximum portability), but helpfully the zlib distribution provides a zlib2ansi script to convert the declarations.
Diffstat (limited to 'cpan/Compress-Raw-Zlib/zlib-src/crc32.c')
-rw-r--r--cpan/Compress-Raw-Zlib/zlib-src/crc32.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/cpan/Compress-Raw-Zlib/zlib-src/crc32.c b/cpan/Compress-Raw-Zlib/zlib-src/crc32.c
index 91be372d22..d2198516b1 100644
--- a/cpan/Compress-Raw-Zlib/zlib-src/crc32.c
+++ b/cpan/Compress-Raw-Zlib/zlib-src/crc32.c
@@ -182,9 +182,9 @@ local void make_crc_table()
}
#ifdef MAKECRCH
-local void write_table(out, table)
- FILE *out;
- const unsigned long FAR *table;
+local void write_table(
+ FILE *out,
+ const unsigned long FAR *table)
{
int n;
@@ -218,10 +218,10 @@ const unsigned long FAR * ZEXPORT get_crc_table()
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
/* ========================================================================= */
-unsigned long ZEXPORT crc32(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- uInt len;
+unsigned long ZEXPORT crc32(
+ unsigned long crc,
+ const unsigned char FAR *buf,
+ uInt len)
{
if (buf == Z_NULL) return 0UL;
@@ -261,10 +261,10 @@ unsigned long ZEXPORT crc32(crc, buf, len)
#define DOLIT32 DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4; DOLIT4
/* ========================================================================= */
-local unsigned long crc32_little(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
+local unsigned long crc32_little(
+ unsigned long crc,
+ const unsigned char FAR *buf,
+ unsigned len)
{
register u4 c;
register const u4 FAR *buf4;
@@ -301,10 +301,10 @@ local unsigned long crc32_little(crc, buf, len)
#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
/* ========================================================================= */
-local unsigned long crc32_big(crc, buf, len)
- unsigned long crc;
- const unsigned char FAR *buf;
- unsigned len;
+local unsigned long crc32_big(
+ unsigned long crc,
+ const unsigned char FAR *buf,
+ unsigned len)
{
register u4 c;
register const u4 FAR *buf4;
@@ -341,9 +341,9 @@ local unsigned long crc32_big(crc, buf, len)
#define GF2_DIM 32 /* dimension of GF(2) vectors (length of CRC) */
/* ========================================================================= */
-local unsigned long gf2_matrix_times(mat, vec)
- unsigned long *mat;
- unsigned long vec;
+local unsigned long gf2_matrix_times(
+ unsigned long *mat,
+ unsigned long vec)
{
unsigned long sum;
@@ -358,9 +358,9 @@ local unsigned long gf2_matrix_times(mat, vec)
}
/* ========================================================================= */
-local void gf2_matrix_square(square, mat)
- unsigned long *square;
- unsigned long *mat;
+local void gf2_matrix_square(
+ unsigned long *square,
+ unsigned long *mat)
{
int n;
@@ -369,10 +369,10 @@ local void gf2_matrix_square(square, mat)
}
/* ========================================================================= */
-local uLong crc32_combine_(crc1, crc2, len2)
- uLong crc1;
- uLong crc2;
- z_off64_t len2;
+local uLong crc32_combine_(
+ uLong crc1,
+ uLong crc2,
+ z_off64_t len2)
{
int n;
unsigned long row;
@@ -425,18 +425,18 @@ local uLong crc32_combine_(crc1, crc2, len2)
}
/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
- uLong crc1;
- uLong crc2;
- z_off_t len2;
+uLong ZEXPORT crc32_combine(
+ uLong crc1,
+ uLong crc2,
+ z_off_t len2)
{
return crc32_combine_(crc1, crc2, len2);
}
-uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
- uLong crc1;
- uLong crc2;
- z_off64_t len2;
+uLong ZEXPORT crc32_combine64(
+ uLong crc1,
+ uLong crc2,
+ z_off64_t len2)
{
return crc32_combine_(crc1, crc2, len2);
}