#endif
/* ========================================================================= */
-uint32_t ZEXPORT adler32(adler, buf, len)
- uint32_t adler;
- const Byte *buf;
- uInt len;
+uint32_t ZEXPORT adler32(uint32_t adler, const Byte *buf, uInt len)
{
uint32_t sum2;
unsigned n;
}
/* ========================================================================= */
-uint32_t ZEXPORT adler32_combine(adler1, adler2, len2)
- uint32_t adler1;
- uint32_t adler2;
- z_off_t len2;
+uint32_t ZEXPORT adler32_combine(uint32_t adler1, uint32_t adler2, z_off_t len2)
{
return adler32_combine_(adler1, adler2, len2);
}
-uint32_t ZEXPORT adler32_combine64(adler1, adler2, len2)
- uint32_t adler1;
- uint32_t adler2;
- z_off64_t len2;
+uint32_t ZEXPORT adler32_combine64(uint32_t adler1, uint32_t adler2, z_off64_t len2)
{
return adler32_combine_(adler1, adler2, len2);
}
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
*/
-int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
- Byte *dest;
- uLong *destLen;
- const Byte *source;
- uLong sourceLen;
- int level;
+int ZEXPORT compress2 (Byte *dest, uLong *destLen, const Byte *source,
+ uLong sourceLen, int level)
{
z_stream stream;
int err;
/* ===========================================================================
*/
-int ZEXPORT compress (dest, destLen, source, sourceLen)
- Byte *dest;
- uLong *destLen;
- const Byte *source;
- uLong sourceLen;
+int ZEXPORT compress (Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen)
{
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
}
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
-uLong ZEXPORT compressBound (sourceLen)
- uLong sourceLen;
+uLong ZEXPORT compressBound (uLong sourceLen)
{
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
(sourceLen >> 25) + 13;
#define DO4 DO1; DO1; DO1; DO1
/* ========================================================================= */
-uint32_t ZEXPORT crc32(crc, buf, len)
- uint32_t crc;
- const unsigned char *buf;
- uInt len;
+uint32_t ZEXPORT crc32(uint32_t crc, const unsigned char *buf, uInt len)
{
if (buf == Z_NULL) return 0;
}
/* ========================================================================= */
-uint32_t ZEXPORT crc32_combine(crc1, crc2, len2)
- uint32_t crc1;
- uint32_t crc2;
- z_off_t len2;
+uint32_t ZEXPORT crc32_combine(uint32_t crc1, uint32_t crc2, z_off_t len2)
{
return crc32_combine_(crc1, crc2, len2);
}
-uint32_t ZEXPORT crc32_combine64(crc1, crc2, len2)
- uint32_t crc1;
- uint32_t crc2;
- z_off64_t len2;
+uint32_t ZEXPORT crc32_combine64(uint32_t crc1, uint32_t crc2, z_off64_t len2)
{
return crc32_combine_(crc1, crc2, len2);
}
memset((Byte *)s->head, 0, (unsigned)(s->hash_size-1)*sizeof(*s->head));
/* ========================================================================= */
-int ZEXPORT deflateInit_(strm, level, version, stream_size)
- z_stream *strm;
- int level;
- const char *version;
- int stream_size;
+int ZEXPORT deflateInit_(z_stream *strm, int level, const char *version, int stream_size)
{
return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
Z_DEFAULT_STRATEGY, version, stream_size);
}
/* ========================================================================= */
-int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
- version, stream_size)
- z_stream *strm;
- int level;
- int method;
- int windowBits;
- int memLevel;
- int strategy;
- const char *version;
- int stream_size;
+int ZEXPORT deflateInit2_(z_stream *strm, int level, int method, int windowBits,
+ int memLevel, int strategy, const char *version, int stream_size)
{
unsigned window_padding = 0;
deflate_state *s;
}
/* ========================================================================= */
-int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
- z_stream *strm;
- const Byte *dictionary;
- uInt dictLength;
+int ZEXPORT deflateSetDictionary (z_stream *strm, const Byte *dictionary, uInt dictLength)
{
deflate_state *s;
uInt str, n;
}
/* ========================================================================= */
-int ZEXPORT deflateResetKeep (strm)
- z_stream *strm;
+int ZEXPORT deflateResetKeep (z_stream *strm)
{
deflate_state *s;
}
/* ========================================================================= */
-int ZEXPORT deflateReset (strm)
- z_stream *strm;
+int ZEXPORT deflateReset (z_stream *strm)
{
int ret;
}
/* ========================================================================= */
-int ZEXPORT deflateSetHeader (strm, head)
- z_stream *strm;
- gz_headerp head;
+int ZEXPORT deflateSetHeader (z_stream *strm, gz_headerp head)
{
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
if (strm->state->wrap != 2) return Z_STREAM_ERROR;
}
/* ========================================================================= */
-int ZEXPORT deflatePending (strm, pending, bits)
- unsigned *pending;
- int *bits;
- z_stream *strm;
+int ZEXPORT deflatePending (z_stream *strm, unsigned *pending, int *bits)
{
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
if (pending != Z_NULL)
}
/* ========================================================================= */
-int ZEXPORT deflatePrime (strm, bits, value)
- z_stream *strm;
- int bits;
- int value;
+int ZEXPORT deflatePrime (z_stream *strm, int bits, int value)
{
deflate_state *s;
int put;
}
/* ========================================================================= */
-int ZEXPORT deflateParams(strm, level, strategy)
- z_stream *strm;
- int level;
- int strategy;
+int ZEXPORT deflateParams(z_stream *strm, int level, int strategy)
{
deflate_state *s;
compress_func func;
}
/* ========================================================================= */
-int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
- z_stream *strm;
- int good_length;
- int max_lazy;
- int nice_length;
- int max_chain;
+int ZEXPORT deflateTune(z_stream *strm, int good_length, int max_lazy,
+ int nice_length, int max_chain)
{
deflate_state *s;
* upper bound of about 14% expansion does not seem onerous for output buffer
* allocation.
*/
-uLong ZEXPORT deflateBound(strm, sourceLen)
- z_stream *strm;
- uLong sourceLen;
+uLong ZEXPORT deflateBound(z_stream *strm, uLong sourceLen)
{
deflate_state *s;
uLong complen, wraplen;
}
/* ========================================================================= */
-int ZEXPORT deflate (strm, flush)
- z_stream *strm;
- int flush;
+int ZEXPORT deflate (z_stream *strm, int flush)
{
int old_flush; /* value of flush param for previous deflate call */
deflate_state *s;
}
/* ========================================================================= */
-int ZEXPORT deflateEnd (strm)
- z_stream *strm;
+int ZEXPORT deflateEnd (z_stream *strm)
{
int status;
/* =========================================================================
* Copy the source state to the destination state.
*/
-int ZEXPORT deflateCopy (dest, source)
- z_stream *dest;
- z_stream *source;
+int ZEXPORT deflateCopy (z_stream *dest, z_stream *source)
{
deflate_state *ds;
deflate_state *ss;
/* gzclose() is in a separate file so that it is linked in only if it is used.
That way the other gzclose functions can be used instead to avoid linking in
unneeded compression or decompression routines. */
-int ZEXPORT gzclose(file)
- gzFile file;
+int ZEXPORT gzclose(gzFile file)
{
#ifndef NO_GZCOMPRESS
gz_statep state;
}
/* -- see zlib.h -- */
-gzFile ZEXPORT gzopen(path, mode)
- const char *path;
- const char *mode;
+gzFile ZEXPORT gzopen(const char *path, const char *mode)
{
return gz_open(path, -1, mode);
}
/* -- see zlib.h -- */
-gzFile ZEXPORT gzopen64(path, mode)
- const char *path;
- const char *mode;
+gzFile ZEXPORT gzopen64(const char *path, const char *mode)
{
return gz_open(path, -1, mode);
}
/* -- see zlib.h -- */
-gzFile ZEXPORT gzdopen(fd, mode)
- int fd;
- const char *mode;
+gzFile ZEXPORT gzdopen(int fd, const char *mode)
{
char *path; /* identifier for error messages */
gzFile gz;
/* -- see zlib.h -- */
#if defined(_WIN32) || defined(__CYGWIN__)
-gzFile ZEXPORT gzopen_w(path, mode)
- const wchar_t *path;
- const char *mode;
+gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode)
{
return gz_open(path, -2, mode);
}
#endif
/* -- see zlib.h -- */
-int ZEXPORT gzbuffer(file, size)
- gzFile file;
- unsigned size;
+int ZEXPORT gzbuffer(gzFile file, unsigned size)
{
gz_statep state;
}
/* -- see zlib.h -- */
-int ZEXPORT gzrewind(file)
- gzFile file;
+int ZEXPORT gzrewind(gzFile file)
{
gz_statep state;
}
/* -- see zlib.h -- */
-z_off64_t ZEXPORT gzseek64(file, offset, whence)
- gzFile file;
- z_off64_t offset;
- int whence;
+z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence)
{
unsigned n;
z_off64_t ret;
}
/* -- see zlib.h -- */
-z_off_t ZEXPORT gzseek(file, offset, whence)
- gzFile file;
- z_off_t offset;
- int whence;
+z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence)
{
z_off64_t ret;
}
/* -- see zlib.h -- */
-z_off64_t ZEXPORT gztell64(file)
- gzFile file;
+z_off64_t ZEXPORT gztell64(gzFile file)
{
gz_statep state;
}
/* -- see zlib.h -- */
-z_off_t ZEXPORT gztell(file)
- gzFile file;
+z_off_t ZEXPORT gztell(gzFile file)
{
z_off64_t ret;
}
/* -- see zlib.h -- */
-z_off64_t ZEXPORT gzoffset64(file)
- gzFile file;
+z_off64_t ZEXPORT gzoffset64(gzFile file)
{
z_off64_t offset;
gz_statep state;
}
/* -- see zlib.h -- */
-z_off_t ZEXPORT gzoffset(file)
- gzFile file;
+z_off_t ZEXPORT gzoffset(gzFile file)
{
z_off64_t ret;
}
/* -- see zlib.h -- */
-int ZEXPORT gzeof(file)
- gzFile file;
+int ZEXPORT gzeof(gzFile file)
{
gz_statep state;
}
/* -- see zlib.h -- */
-const char * ZEXPORT gzerror(file, errnum)
- gzFile file;
- int *errnum;
+const char * ZEXPORT gzerror(gzFile file, int *errnum)
{
gz_statep state;
}
/* -- see zlib.h -- */
-void ZEXPORT gzclearerr(file)
- gzFile file;
+void ZEXPORT gzclearerr(gzFile file)
{
gz_statep state;
}
/* -- see zlib.h -- */
-int ZEXPORT gzread(file, buf, len)
- gzFile file;
- void *buf;
- unsigned len;
+int ZEXPORT gzread(gzFile file, void *buf, unsigned len)
{
unsigned got, n;
gz_statep state;
#else
# undef gzgetc
#endif
-int ZEXPORT gzgetc(file)
- gzFile file;
+int ZEXPORT gzgetc(gzFile file)
{
int ret;
unsigned char buf[1];
return ret < 1 ? -1 : buf[0];
}
-int ZEXPORT gzgetc_(file)
-gzFile file;
+int ZEXPORT gzgetc_(gzFile file)
{
return gzgetc(file);
}
/* -- see zlib.h -- */
-int ZEXPORT gzungetc(c, file)
- int c;
- gzFile file;
+int ZEXPORT gzungetc(int c, gzFile file)
{
gz_statep state;
}
/* -- see zlib.h -- */
-char * ZEXPORT gzgets(file, buf, len)
- gzFile file;
- char *buf;
- int len;
+char * ZEXPORT gzgets(gzFile file, char *buf, int len)
{
unsigned left, n;
char *str;
}
/* -- see zlib.h -- */
-int ZEXPORT gzdirect(file)
- gzFile file;
+int ZEXPORT gzdirect(gzFile file)
{
gz_statep state;
}
/* -- see zlib.h -- */
-int ZEXPORT gzclose_r(file)
- gzFile file;
+int ZEXPORT gzclose_r(gzFile file)
{
int ret, err;
gz_statep state;
}
/* -- see zlib.h -- */
-int ZEXPORT gzwrite(file, buf, len)
- gzFile file;
- void const *buf;
- unsigned len;
+int ZEXPORT gzwrite(gzFile file, void const *buf, unsigned len)
{
unsigned put = len;
gz_statep state;
}
/* -- see zlib.h -- */
-int ZEXPORT gzputc(file, c)
- gzFile file;
- int c;
+int ZEXPORT gzputc(gzFile file, int c)
{
unsigned have;
unsigned char buf[1];
}
/* -- see zlib.h -- */
-int ZEXPORT gzputs(file, str)
- gzFile file;
- const char *str;
+int ZEXPORT gzputs(gzFile file, const char *str)
{
int ret;
unsigned len;
}
/* -- see zlib.h -- */
-int ZEXPORT gzflush(file, flush)
- gzFile file;
- int flush;
+int ZEXPORT gzflush(gzFile file, int flush)
{
gz_statep state;
}
/* -- see zlib.h -- */
-int ZEXPORT gzsetparams(file, level, strategy)
- gzFile file;
- int level;
- int strategy;
+int ZEXPORT gzsetparams(gzFile file, int level, int strategy)
{
gz_statep state;
z_stream *strm;
}
/* -- see zlib.h -- */
-int ZEXPORT gzclose_w(file)
- gzFile file;
+int ZEXPORT gzclose_w(gzFile file)
{
int ret = Z_OK;
gz_statep state;
windowBits is in the range 8..15, and window is a user-supplied
window and output buffer that is 2**windowBits bytes.
*/
-int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
-z_stream *strm;
-int windowBits;
-unsigned char *window;
-const char *version;
-int stream_size;
+int ZEXPORT inflateBackInit_(z_stream *strm, int windowBits, unsigned char *window,
+ const char *version, int stream_size)
{
struct inflate_state *state;
inflateBack() can also return Z_STREAM_ERROR if the input parameters
are not correct, i.e. strm is Z_NULL or the state was not initialized.
*/
-int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
-z_stream *strm;
-in_func in;
-void *in_desc;
-out_func out;
-void *out_desc;
+int ZEXPORT inflateBack(z_stream *strm, in_func in, void *in_desc,
+ out_func out, void *out_desc)
{
struct inflate_state *state;
z_const unsigned char *next; /* next input */
return ret;
}
-int ZEXPORT inflateBackEnd(strm)
-z_stream *strm;
+int ZEXPORT inflateBackEnd(z_stream *strm)
{
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
return Z_STREAM_ERROR;
#endif
local unsigned syncsearch (unsigned *have, const unsigned char *buf, unsigned len);
-int ZEXPORT inflateResetKeep(strm)
-z_stream *strm;
+int ZEXPORT inflateResetKeep(z_stream *strm)
{
struct inflate_state *state;
return Z_OK;
}
-int ZEXPORT inflateReset(strm)
-z_stream *strm;
+int ZEXPORT inflateReset(z_stream *strm)
{
struct inflate_state *state;
return inflateResetKeep(strm);
}
-int ZEXPORT inflateReset2(strm, windowBits)
-z_stream *strm;
-int windowBits;
+int ZEXPORT inflateReset2(z_stream *strm, int windowBits)
{
int wrap;
struct inflate_state *state;
return inflateReset(strm);
}
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_stream *strm;
-int windowBits;
-const char *version;
-int stream_size;
+int ZEXPORT inflateInit2_(z_stream *strm, int windowBits, const char *version,
+ int stream_size)
{
int ret;
struct inflate_state *state;
return ret;
}
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_stream *strm;
-const char *version;
-int stream_size;
+int ZEXPORT inflateInit_(z_stream *strm, const char *version, int stream_size)
{
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
}
-int ZEXPORT inflatePrime(strm, bits, value)
-z_stream *strm;
-int bits;
-int value;
+int ZEXPORT inflatePrime(z_stream *strm, int bits, int value)
{
struct inflate_state *state;
will return Z_BUF_ERROR if it has not reached the end of the stream.
*/
-int ZEXPORT inflate(strm, flush)
-z_stream *strm;
-int flush;
+int ZEXPORT inflate(z_stream *strm, int flush)
{
struct inflate_state *state;
z_const unsigned char *next; /* next input */
return ret;
}
-int ZEXPORT inflateEnd(strm)
-z_stream *strm;
+int ZEXPORT inflateEnd(z_stream *strm)
{
struct inflate_state *state;
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
return Z_OK;
}
-int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
-z_stream *strm;
-Byte *dictionary;
-uInt *dictLength;
+int ZEXPORT inflateGetDictionary(z_stream *strm, Byte *dictionary, uInt *dictLength)
{
struct inflate_state *state;
return Z_OK;
}
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_stream *strm;
-const Byte *dictionary;
-uInt dictLength;
+int ZEXPORT inflateSetDictionary(z_stream *strm, const Byte *dictionary, uInt dictLength)
{
struct inflate_state *state;
unsigned long dictid;
return Z_OK;
}
-int ZEXPORT inflateGetHeader(strm, head)
-z_stream *strm;
-gz_headerp head;
+int ZEXPORT inflateGetHeader(z_stream *strm, gz_headerp head)
{
struct inflate_state *state;
return next;
}
-int ZEXPORT inflateSync(strm)
-z_stream *strm;
+int ZEXPORT inflateSync(z_stream *strm)
{
unsigned len; /* number of bytes to look at or looked at */
unsigned long in, out; /* temporary to save total_in and total_out */
block. When decompressing, PPP checks that at the end of input packet,
inflate is waiting for these length bytes.
*/
-int ZEXPORT inflateSyncPoint(strm)
-z_stream *strm;
+int ZEXPORT inflateSyncPoint(z_stream *strm)
{
struct inflate_state *state;
return state->mode == STORED && state->bits == 0;
}
-int ZEXPORT inflateCopy(dest, source)
-z_stream *dest;
-z_stream *source;
+int ZEXPORT inflateCopy(z_stream *dest, z_stream *source)
{
struct inflate_state *state;
struct inflate_state *copy;
return Z_OK;
}
-int ZEXPORT inflateUndermine(strm, subvert)
-z_stream *strm;
-int subvert;
+int ZEXPORT inflateUndermine(z_stream *strm, int subvert)
{
struct inflate_state *state;
#endif
}
-long ZEXPORT inflateMark(strm)
-z_stream *strm;
+long ZEXPORT inflateMark(z_stream *strm)
{
struct inflate_state *state;
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted.
*/
-int ZEXPORT uncompress (dest, destLen, source, sourceLen)
- Byte *dest;
- uLong *destLen;
- const Byte *source;
- uLong sourceLen;
+int ZEXPORT uncompress (Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen)
{
z_stream stream;
int err;
/* exported to allow conversion of error code to string for compress() and
* uncompress()
*/
-const char * ZEXPORT zError(err)
- int err;
+const char * ZEXPORT zError(int err)
{
return ERR_MSG(err);
}