]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/zlib/inflate.c
xnu-4570.20.62.tar.gz
[apple/xnu.git] / libkern / zlib / inflate.c
index fe12d168412909cad49f4823382487b4cd6590f5..e5d688d3acbd84aea7f41e8a957b4e2939558dfc 100644 (file)
@@ -127,8 +127,8 @@ local int updatewindow OF((z_streamp strm, unsigned out));
 local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
                               unsigned len));
 
 local unsigned syncsearch OF((unsigned FAR *have, unsigned char FAR *buf,
                               unsigned len));
 
-int ZEXPORT inflateReset(strm)
-z_streamp strm;
+int ZEXPORT
+inflateReset(z_streamp strm)
 {
     struct inflate_state FAR *state;
 
 {
     struct inflate_state FAR *state;
 
@@ -152,10 +152,8 @@ z_streamp strm;
     return Z_OK;
 }
 
     return Z_OK;
 }
 
-int ZEXPORT inflatePrime(strm, bits, value)
-z_streamp strm;
-int bits;
-int value;
+int ZEXPORT
+inflatePrime(z_streamp strm, int bits, int value)
 {
     struct inflate_state FAR *state;
 
 {
     struct inflate_state FAR *state;
 
@@ -168,11 +166,9 @@ int value;
     return Z_OK;
 }
 
     return Z_OK;
 }
 
-int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
-z_streamp strm;
-int windowBits;
-const char *version;
-int stream_size;
+int ZEXPORT
+inflateInit2_(z_streamp strm, int windowBits, const char *version,
+             int stream_size)
 {
     struct inflate_state FAR *state;
 
 {
     struct inflate_state FAR *state;
 
@@ -213,10 +209,8 @@ int stream_size;
     return inflateReset(strm);
 }
 
     return inflateReset(strm);
 }
 
-int ZEXPORT inflateInit_(strm, version, stream_size)
-z_streamp strm;
-const char *version;
-int stream_size;
+int ZEXPORT
+inflateInit_(z_streamp strm, const char *version, int stream_size)
 {
     return inflateInit2_(strm, DEF_WBITS, version, stream_size);
 }
 {
     return inflateInit2_(strm, DEF_WBITS, version, stream_size);
 }
@@ -231,8 +225,8 @@ int stream_size;
    used for threaded applications, since the rewriting of the tables and virgin
    may not be thread-safe.
  */
    used for threaded applications, since the rewriting of the tables and virgin
    may not be thread-safe.
  */
-local void fixedtables(state)
-struct inflate_state FAR *state;
+local void
+fixedtables(struct inflate_state FAR *state)
 {
 #ifdef BUILDFIXED
     static int virgin = 1;
 {
 #ifdef BUILDFIXED
     static int virgin = 1;
@@ -295,7 +289,8 @@ struct inflate_state FAR *state;
 
     a.out > inffixed.h
  */
 
     a.out > inffixed.h
  */
-void makefixed()
+void
+makefixed(void)
 {
     unsigned low, size;
     struct inflate_state state;
 {
     unsigned low, size;
     struct inflate_state state;
@@ -349,9 +344,8 @@ void makefixed()
    output will fall in the output data, making match copies simpler and faster.
    The advantage may be dependent on the size of the processor's data caches.
  */
    output will fall in the output data, making match copies simpler and faster.
    The advantage may be dependent on the size of the processor's data caches.
  */
-local int updatewindow(strm, out)
-z_streamp strm;
-unsigned out;
+local int
+updatewindow(z_streamp strm, unsigned out)
 {
     struct inflate_state FAR *state;
     unsigned copy, dist;
 {
     struct inflate_state FAR *state;
     unsigned copy, dist;
@@ -580,9 +574,8 @@ unsigned out;
    will return Z_BUF_ERROR if it has not reached the end of the stream.
  */
 
    will return Z_BUF_ERROR if it has not reached the end of the stream.
  */
 
-int ZEXPORT inflate(strm, flush)
-z_streamp strm;
-int flush;
+int ZEXPORT
+inflate(z_streamp strm, int flush)
 {
     struct inflate_state FAR *state;
     unsigned char FAR *next;    /* next input */
 {
     struct inflate_state FAR *state;
     unsigned char FAR *next;    /* next input */
@@ -1181,8 +1174,8 @@ int flush;
     return ret;
 }
 
     return ret;
 }
 
-int ZEXPORT inflateEnd(strm)
-z_streamp strm;
+int ZEXPORT
+inflateEnd(z_streamp strm)
 {
     struct inflate_state FAR *state;
     if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
 {
     struct inflate_state FAR *state;
     if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
@@ -1195,10 +1188,8 @@ z_streamp strm;
     return Z_OK;
 }
 
     return Z_OK;
 }
 
-int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
-z_streamp strm;
-const Bytef *dictionary;
-uInt dictLength;
+int ZEXPORT
+inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength)
 {
     struct inflate_state FAR *state;
     unsigned long id;
 {
     struct inflate_state FAR *state;
     unsigned long id;
@@ -1237,9 +1228,8 @@ uInt dictLength;
     return Z_OK;
 }
 
     return Z_OK;
 }
 
-int ZEXPORT inflateGetHeader(strm, head)
-z_streamp strm;
-gz_headerp head;
+int ZEXPORT
+inflateGetHeader(z_streamp strm, gz_headerp head)
 {
     struct inflate_state FAR *state;
 
 {
     struct inflate_state FAR *state;
 
@@ -1265,10 +1255,8 @@ gz_headerp head;
    called again with more data and the *have state.  *have is initialized to
    zero for the first call.
  */
    called again with more data and the *have state.  *have is initialized to
    zero for the first call.
  */
-local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-unsigned char FAR *buf;
-unsigned len;
+local unsigned
+syncsearch(unsigned FAR *have, unsigned char FAR *buf, unsigned len)
 {
     unsigned got;
     unsigned next;
 {
     unsigned got;
     unsigned next;
@@ -1288,8 +1276,8 @@ unsigned len;
     return next;
 }
 
     return next;
 }
 
-int ZEXPORT inflateSync(strm)
-z_streamp strm;
+int ZEXPORT
+inflateSync(z_streamp strm)
 {
     unsigned len;               /* number of bytes to look at or looked at */
     unsigned long in, out;      /* temporary to save total_in and total_out */
 {
     unsigned len;               /* number of bytes to look at or looked at */
     unsigned long in, out;      /* temporary to save total_in and total_out */
@@ -1339,8 +1327,8 @@ z_streamp strm;
    block. When decompressing, PPP checks that at the end of input packet,
    inflate is waiting for these length bytes.
  */
    block. When decompressing, PPP checks that at the end of input packet,
    inflate is waiting for these length bytes.
  */
-int ZEXPORT inflateSyncPoint(strm)
-z_streamp strm;
+int ZEXPORT
+inflateSyncPoint(z_streamp strm)
 {
     struct inflate_state FAR *state;
 
 {
     struct inflate_state FAR *state;
 
@@ -1349,9 +1337,8 @@ z_streamp strm;
     return state->mode == STORED && state->bits == 0;
 }
 
     return state->mode == STORED && state->bits == 0;
 }
 
-int ZEXPORT inflateCopy(dest, source)
-z_streamp dest;
-z_streamp source;
+int ZEXPORT
+inflateCopy(z_streamp dest, z_streamp source)
 {
     struct inflate_state FAR *state;
     struct inflate_state FAR *copy;
 {
     struct inflate_state FAR *state;
     struct inflate_state FAR *copy;