Index: core/include/thirdparties/zlib/zlib.h |
diff --git a/core/include/thirdparties/zlib/zlib.h b/core/include/thirdparties/zlib/zlib.h |
index bb721cfb3207f164a1e9b3f6e97350109c50f8d5..d569bf4975beb3df59d1776266a3ac0db620e71d 100644 |
--- a/core/include/thirdparties/zlib/zlib.h |
+++ b/core/include/thirdparties/zlib/zlib.h |
@@ -96,7 +96,7 @@ |
#include "zconf.h" |
/* Sunliang.Liu 20100908 sync the config to the old revision. NO_GZIP */ |
-#define NO_GZIP /* XYQ */ |
+#define NO_GZIP /* XYQ */ |
#ifdef __cplusplus |
extern "C" { |
@@ -142,56 +142,56 @@ extern "C" { |
even in case of corrupted input. |
*/ |
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); |
-typedef void (*free_func) OF((voidpf opaque, voidpf address)); |
+typedef voidpf(*alloc_func) OF((voidpf opaque, uInt items, uInt size)); |
+typedef void(*free_func) OF((voidpf opaque, voidpf address)); |
struct internal_state; |
typedef struct z_stream_s { |
- z_const Bytef *next_in; /* next input byte */ |
- uInt avail_in; /* number of bytes available at next_in */ |
- uLong total_in; /* total number of input bytes read so far */ |
+ z_const Bytef* next_in; /* next input byte */ |
+ uInt avail_in; /* number of bytes available at next_in */ |
+ uLong total_in; /* total number of input bytes read so far */ |
- Bytef *next_out; /* next output byte should be put there */ |
- uInt avail_out; /* remaining free space at next_out */ |
- uLong total_out; /* total number of bytes output so far */ |
+ Bytef* next_out; /* next output byte should be put there */ |
+ uInt avail_out; /* remaining free space at next_out */ |
+ uLong total_out; /* total number of bytes output so far */ |
- z_const char *msg; /* last error message, NULL if no error */ |
- struct internal_state FAR *state; /* not visible by applications */ |
+ z_const char* msg; /* last error message, NULL if no error */ |
+ struct internal_state FAR* state; /* not visible by applications */ |
- alloc_func zalloc; /* used to allocate the internal state */ |
- free_func zfree; /* used to free the internal state */ |
- voidpf opaque; /* private data object passed to zalloc and zfree */ |
+ alloc_func zalloc; /* used to allocate the internal state */ |
+ free_func zfree; /* used to free the internal state */ |
+ voidpf opaque; /* private data object passed to zalloc and zfree */ |
- int data_type; /* best guess about the data type: binary or text */ |
- uLong adler; /* adler32 value of the uncompressed data */ |
- uLong reserved; /* reserved for future use */ |
+ int data_type; /* best guess about the data type: binary or text */ |
+ uLong adler; /* adler32 value of the uncompressed data */ |
+ uLong reserved; /* reserved for future use */ |
} z_stream; |
-typedef z_stream FAR *z_streamp; |
+typedef z_stream FAR* z_streamp; |
/* |
gzip header information passed to and from zlib routines. See RFC 1952 |
for more details on the meanings of these fields. |
*/ |
typedef struct gz_header_s { |
- int text; /* true if compressed data believed to be text */ |
- uLong time; /* modification time */ |
- int xflags; /* extra flags (not used when writing a gzip file) */ |
- int os; /* operating system */ |
- Bytef *extra; /* pointer to extra field or Z_NULL if none */ |
- uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ |
- uInt extra_max; /* space at extra (only when reading header) */ |
- Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ |
- uInt name_max; /* space at name (only when reading header) */ |
- Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ |
- uInt comm_max; /* space at comment (only when reading header) */ |
- int hcrc; /* true if there was or will be a header crc */ |
- int done; /* true when done reading gzip header (not used |
- when writing a gzip file) */ |
+ int text; /* true if compressed data believed to be text */ |
+ uLong time; /* modification time */ |
+ int xflags; /* extra flags (not used when writing a gzip file) */ |
+ int os; /* operating system */ |
+ Bytef* extra; /* pointer to extra field or Z_NULL if none */ |
+ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ |
+ uInt extra_max; /* space at extra (only when reading header) */ |
+ Bytef* name; /* pointer to zero-terminated file name or Z_NULL */ |
+ uInt name_max; /* space at name (only when reading header) */ |
+ Bytef* comment; /* pointer to zero-terminated comment or Z_NULL */ |
+ uInt comm_max; /* space at comment (only when reading header) */ |
+ int hcrc; /* true if there was or will be a header crc */ |
+ int done; /* true when done reading gzip header (not used |
+ when writing a gzip file) */ |
} gz_header; |
-typedef gz_header FAR *gz_headerp; |
+typedef gz_header FAR* gz_headerp; |
/* |
The application must update next_in and avail_in when avail_in has dropped |
@@ -224,61 +224,60 @@ typedef gz_header FAR *gz_headerp; |
if the decompressor wants to decompress everything in a single step). |
*/ |
- /* constants */ |
+/* constants */ |
-#define Z_NO_FLUSH 0 |
+#define Z_NO_FLUSH 0 |
#define Z_PARTIAL_FLUSH 1 |
-#define Z_SYNC_FLUSH 2 |
-#define Z_FULL_FLUSH 3 |
-#define Z_FINISH 4 |
-#define Z_BLOCK 5 |
-#define Z_TREES 6 |
+#define Z_SYNC_FLUSH 2 |
+#define Z_FULL_FLUSH 3 |
+#define Z_FINISH 4 |
+#define Z_BLOCK 5 |
+#define Z_TREES 6 |
/* Allowed flush values; see deflate() and inflate() below for details */ |
-#define Z_OK 0 |
-#define Z_STREAM_END 1 |
-#define Z_NEED_DICT 2 |
-#define Z_ERRNO (-1) |
+#define Z_OK 0 |
+#define Z_STREAM_END 1 |
+#define Z_NEED_DICT 2 |
+#define Z_ERRNO (-1) |
#define Z_STREAM_ERROR (-2) |
-#define Z_DATA_ERROR (-3) |
-#define Z_MEM_ERROR (-4) |
-#define Z_BUF_ERROR (-5) |
+#define Z_DATA_ERROR (-3) |
+#define Z_MEM_ERROR (-4) |
+#define Z_BUF_ERROR (-5) |
#define Z_VERSION_ERROR (-6) |
/* Return codes for the compression/decompression functions. Negative values |
* are errors, positive values are used for special but normal events. |
*/ |
-#define Z_NO_COMPRESSION 0 |
-#define Z_BEST_SPEED 1 |
-#define Z_BEST_COMPRESSION 9 |
-#define Z_DEFAULT_COMPRESSION (-1) |
+#define Z_NO_COMPRESSION 0 |
+#define Z_BEST_SPEED 1 |
+#define Z_BEST_COMPRESSION 9 |
+#define Z_DEFAULT_COMPRESSION (-1) |
/* compression levels */ |
-#define Z_FILTERED 1 |
-#define Z_HUFFMAN_ONLY 2 |
-#define Z_RLE 3 |
-#define Z_FIXED 4 |
-#define Z_DEFAULT_STRATEGY 0 |
+#define Z_FILTERED 1 |
+#define Z_HUFFMAN_ONLY 2 |
+#define Z_RLE 3 |
+#define Z_FIXED 4 |
+#define Z_DEFAULT_STRATEGY 0 |
/* compression strategy; see deflateInit2() below for details */ |
-#define Z_BINARY 0 |
-#define Z_TEXT 1 |
-#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ |
-#define Z_UNKNOWN 2 |
+#define Z_BINARY 0 |
+#define Z_TEXT 1 |
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ |
+#define Z_UNKNOWN 2 |
/* Possible values of the data_type field (though see inflate()) */ |
-#define Z_DEFLATED 8 |
+#define Z_DEFLATED 8 |
/* The deflate compression method (the only one supported in this version) */ |
-#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ |
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ |
#define zlib_version zlibVersion() |
/* for compatibility with versions < 1.0.2 */ |
+/* basic functions */ |
- /* basic functions */ |
- |
-ZEXTERN const char * ZEXPORT zlibVersion OF((void)); |
+ZEXTERN const char* ZEXPORT zlibVersion OF((void)); |
/* The application can compare zlibVersion and ZLIB_VERSION for consistency. |
If the first character differs, the library code actually used is not |
compatible with the zlib.h header file used by the application. This check |
@@ -307,7 +306,6 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); |
this will be done by deflate(). |
*/ |
- |
ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); |
/* |
deflate compresses as much data as possible, and stops when the input |
@@ -414,7 +412,6 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); |
space to continue compressing. |
*/ |
- |
ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); |
/* |
All dynamically allocated data structures for this stream are freed. |
@@ -428,7 +425,6 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); |
deallocated). |
*/ |
- |
/* |
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); |
@@ -453,7 +449,6 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); |
until inflate() is called. |
*/ |
- |
ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); |
/* |
inflate decompresses as much data as possible, and stops when the input |
@@ -569,7 +564,6 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); |
recovery of the data is desired. |
*/ |
- |
ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); |
/* |
All dynamically allocated data structures for this stream are freed. |
@@ -581,8 +575,7 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); |
static string (which must not be deallocated). |
*/ |
- |
- /* Advanced functions */ |
+/* Advanced functions */ |
/* |
The following functions are needed only in some special applications. |
@@ -650,8 +643,8 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, |
*/ |
ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, |
- const Bytef *dictionary, |
- uInt dictLength)); |
+ const Bytef* dictionary, |
+ uInt dictLength)); |
/* |
Initializes the compression dictionary from the given byte sequence |
without producing any compressed output. When using the zlib format, this |
@@ -693,8 +686,7 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, |
not perform any compression: this will be done by deflate(). |
*/ |
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, |
- z_streamp source)); |
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, z_streamp source)); |
/* |
Sets the destination stream as a complete copy of the source stream. |
@@ -722,9 +714,7 @@ ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); |
stream state was inconsistent (such as zalloc or state being Z_NULL). |
*/ |
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, |
- int level, |
- int strategy)); |
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, int level, int strategy)); |
/* |
Dynamically update the compression level and compression strategy. The |
interpretation of level and strategy is as in deflateInit2. This can be |
@@ -760,8 +750,7 @@ ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, |
returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. |
*/ |
-ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, |
- uLong sourceLen)); |
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, uLong sourceLen)); |
/* |
deflateBound() returns an upper bound on the compressed size after |
deflation of sourceLen bytes. It must be called after deflateInit() or |
@@ -776,8 +765,8 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, |
*/ |
ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, |
- unsigned *pending, |
- int *bits)); |
+ unsigned* pending, |
+ int* bits)); |
/* |
deflatePending() returns the number of bytes and bits of output that have |
been generated, but not yet provided in the available output. The bytes not |
@@ -790,9 +779,7 @@ ZEXTERN int ZEXPORT deflatePending OF((z_streamp strm, |
stream state was inconsistent. |
*/ |
-ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, |
- int bits, |
- int value)); |
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, int bits, int value)); |
/* |
deflatePrime() inserts bits in the deflate output stream. The intent |
is that this function is used to start off the deflate output with the bits |
@@ -807,8 +794,7 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, |
source stream state was inconsistent. |
*/ |
-ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, |
- gz_headerp head)); |
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, gz_headerp head)); |
/* |
deflateSetHeader() provides gzip header information for when a gzip |
stream is requested by deflateInit2(). deflateSetHeader() may be called |
@@ -882,8 +868,8 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, |
*/ |
ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, |
- const Bytef *dictionary, |
- uInt dictLength)); |
+ const Bytef* dictionary, |
+ uInt dictLength)); |
/* |
Initializes the decompression dictionary from the given uncompressed byte |
sequence. This function must be called immediately after a call of inflate, |
@@ -905,8 +891,8 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, |
*/ |
ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, |
- Bytef *dictionary, |
- uInt *dictLength)); |
+ Bytef* dictionary, |
+ uInt* dictLength)); |
/* |
Returns the sliding dictionary being maintained by inflate. dictLength is |
set to the number of bytes in the dictionary, and that many bytes are copied |
@@ -938,8 +924,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); |
input each time, until success or end of the input data. |
*/ |
-ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, |
- z_streamp source)); |
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, z_streamp source)); |
/* |
Sets the destination stream as a complete copy of the source stream. |
@@ -964,8 +949,7 @@ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); |
stream state was inconsistent (such as zalloc or state being Z_NULL). |
*/ |
-ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, |
- int windowBits)); |
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, int windowBits)); |
/* |
This function is the same as inflateReset, but it also permits changing |
the wrap and window size requests. The windowBits parameter is interpreted |
@@ -976,9 +960,7 @@ ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm, |
the windowBits parameter is invalid. |
*/ |
-ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, |
- int bits, |
- int value)); |
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, int bits, int value)); |
/* |
This function inserts bits in the inflate input stream. The intent is |
that this function is used to start inflating at a bit position in the |
@@ -1025,8 +1007,7 @@ ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm)); |
source stream state was inconsistent. |
*/ |
-ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, |
- gz_headerp head)); |
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, gz_headerp head)); |
/* |
inflateGetHeader() requests that gzip header information be stored in the |
provided gz_header structure. inflateGetHeader() may be called after |
@@ -1087,13 +1068,14 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, |
the version of the header file. |
*/ |
-typedef unsigned (*in_func) OF((void FAR *, |
- z_const unsigned char FAR * FAR *)); |
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); |
+typedef unsigned(*in_func) OF((void FAR*, z_const unsigned char FAR* FAR*)); |
+typedef int(*out_func) OF((void FAR*, unsigned char FAR*, unsigned)); |
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, |
- in_func in, void FAR *in_desc, |
- out_func out, void FAR *out_desc)); |
+ in_func in, |
+ void FAR* in_desc, |
+ out_func out, |
+ void FAR* out_desc)); |
/* |
inflateBack() does a raw inflate with a single call using a call-back |
interface for input and output. This is potentially more efficient than |
@@ -1212,7 +1194,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); |
#ifndef Z_SOLO |
- /* utility functions */ |
+/* utility functions */ |
/* |
The following utility functions are implemented on top of the basic |
@@ -1222,8 +1204,8 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); |
you need special options. |
*/ |
-ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, |
- const Bytef *source, uLong sourceLen)); |
+ZEXTERN int ZEXPORT compress |
+OF((Bytef * dest, uLongf* destLen, const Bytef* source, uLong sourceLen)); |
/* |
Compresses the source buffer into the destination buffer. sourceLen is |
the byte length of the source buffer. Upon entry, destLen is the total size |
@@ -1236,8 +1218,10 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, |
buffer. |
*/ |
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, |
- const Bytef *source, uLong sourceLen, |
+ZEXTERN int ZEXPORT compress2 OF((Bytef * dest, |
+ uLongf* destLen, |
+ const Bytef* source, |
+ uLong sourceLen, |
int level)); |
/* |
Compresses the source buffer into the destination buffer. The level |
@@ -1259,8 +1243,8 @@ ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); |
compress() or compress2() call to allocate the destination buffer. |
*/ |
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, |
- const Bytef *source, uLong sourceLen)); |
+ZEXTERN int ZEXPORT uncompress |
+OF((Bytef * dest, uLongf* destLen, const Bytef* source, uLong sourceLen)); |
/* |
Decompresses the source buffer into the destination buffer. sourceLen is |
the byte length of the source buffer. Upon entry, destLen is the total size |
@@ -1277,7 +1261,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, |
buffer with the uncompressed data up to that point. |
*/ |
- /* gzip file access functions */ |
+/* gzip file access functions */ |
/* |
This library supports reading and writing files in gzip (.gz) format with |
@@ -1286,7 +1270,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, |
wrapper, documented in RFC 1952, wrapped around a deflate stream. |
*/ |
-typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ |
+typedef struct gzFile_s* gzFile; /* semi-opaque gzip file descriptor */ |
/* |
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); |
@@ -1326,7 +1310,7 @@ ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); |
file could not be opened. |
*/ |
-ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); |
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char* mode)); |
/* |
gzdopen associates a gzFile with the file descriptor fd. File descriptors |
are obtained from calls like open, dup, creat, pipe or fileno (if the file |
@@ -1403,15 +1387,14 @@ ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); |
len for end of file, or -1 for error. |
*/ |
-ZEXTERN int ZEXPORT gzwrite OF((gzFile file, |
- voidpc buf, unsigned len)); |
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file, voidpc buf, unsigned len)); |
/* |
Writes the given number of uncompressed bytes into the compressed file. |
gzwrite returns the number of uncompressed bytes written or 0 in case of |
error. |
*/ |
-ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); |
+ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char* format, ...)); |
/* |
Converts, formats, and writes the arguments to the compressed file under |
control of the format string, as in fprintf. gzprintf returns the number of |
@@ -1426,7 +1409,7 @@ ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); |
zlibCompileFlags(). |
*/ |
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); |
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char* s)); |
/* |
Writes the given null-terminated string to the compressed file, excluding |
the terminating null character. |
@@ -1434,7 +1417,7 @@ ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); |
gzputs returns the number of characters written, or -1 in case of error. |
*/ |
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); |
+ZEXTERN char* ZEXPORT gzgets OF((gzFile file, char* buf, int len)); |
/* |
Reads bytes from the compressed file until len-1 characters are read, or a |
newline character is read and transferred to buf, or an end-of-file |
@@ -1509,7 +1492,7 @@ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, |
would be before the current position. |
*/ |
-ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); |
+ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); |
/* |
Rewinds the given file. This function is supported only for reading. |
@@ -1573,7 +1556,7 @@ ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); |
gzip file reading and decompression, which may not be desired.) |
*/ |
-ZEXTERN int ZEXPORT gzclose OF((gzFile file)); |
+ZEXTERN int ZEXPORT gzclose OF((gzFile file)); |
/* |
Flushes all pending output if necessary, closes the compressed file and |
deallocates the (de)compression state. Note that once file is closed, you |
@@ -1598,7 +1581,7 @@ ZEXTERN int ZEXPORT gzclose_w OF((gzFile file)); |
zlib library. |
*/ |
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); |
+ZEXTERN const char* ZEXPORT gzerror OF((gzFile file, int* errnum)); |
/* |
Returns the error message for the last error which occurred on the given |
compressed file. errnum is set to zlib error number. If an error occurred |
@@ -1623,7 +1606,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); |
#endif /* !Z_SOLO */ |
- /* checksum functions */ |
+/* checksum functions */ |
/* |
These functions are not related to compression but are exported |
@@ -1631,7 +1614,7 @@ ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); |
library. |
*/ |
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); |
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef* buf, uInt len)); |
/* |
Update a running Adler-32 checksum with the bytes buf[0..len-1] and |
return the updated checksum. If buf is Z_NULL, this function returns the |
@@ -1662,7 +1645,7 @@ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, |
negative, the result has no meaning or utility. |
*/ |
-ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); |
+ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef* buf, uInt len)); |
/* |
Update a running CRC-32 with the bytes buf[0..len-1] and return the |
updated CRC-32. If buf is Z_NULL, this function returns the required |
@@ -1689,39 +1672,43 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); |
len2. |
*/ |
- |
- /* various hacks, don't look :) */ |
+/* various hacks, don't look :) */ |
/* deflateInit and inflateInit are macros to allow checking the zlib version |
* and the compiler's view of z_stream: |
*/ |
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, |
- const char *version, int stream_size)); |
+ZEXTERN int ZEXPORT deflateInit_ |
+OF((z_streamp strm, int level, const char* version, int stream_size)); |
ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, |
- const char *version, int stream_size)); |
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, |
- int windowBits, int memLevel, |
- int strategy, const char *version, |
+ const char* version, |
+ int stream_size)); |
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, |
+ int level, |
+ int method, |
+ int windowBits, |
+ int memLevel, |
+ int strategy, |
+ const char* version, |
int stream_size)); |
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, |
- const char *version, int stream_size)); |
-ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, |
- unsigned char FAR *window, |
- const char *version, |
+ZEXTERN int ZEXPORT inflateInit2_ |
+OF((z_streamp strm, int windowBits, const char* version, int stream_size)); |
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, |
+ int windowBits, |
+ unsigned char FAR* window, |
+ const char* version, |
int stream_size)); |
#define deflateInit(strm, level) \ |
- deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) |
+ deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) |
#define inflateInit(strm) \ |
- inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) |
+ inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) |
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ |
- deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ |
- (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) |
+ deflateInit2_((strm), (level), (method), (windowBits), (memLevel), \ |
+ (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) |
#define inflateInit2(strm, windowBits) \ |
- inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ |
- (int)sizeof(z_stream)) |
-#define inflateBackInit(strm, windowBits, window) \ |
- inflateBackInit_((strm), (windowBits), (window), \ |
- ZLIB_VERSION, (int)sizeof(z_stream)) |
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, (int)sizeof(z_stream)) |
+#define inflateBackInit(strm, windowBits, window) \ |
+ inflateBackInit_((strm), (windowBits), (window), ZLIB_VERSION, \ |
+ (int)sizeof(z_stream)) |
#ifndef Z_SOLO |
@@ -1733,18 +1720,18 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, |
* only be used by the gzgetc() macro. You have been warned. |
*/ |
struct gzFile_s { |
- unsigned have; |
- unsigned char *next; |
- z_off64_t pos; |
+ unsigned have; |
+ unsigned char* next; |
+ z_off64_t pos; |
}; |
-ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ |
+ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ |
#ifdef Z_PREFIX_SET |
-# undef z_gzgetc |
-# define z_gzgetc(g) \ |
- ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) |
+#undef z_gzgetc |
+#define z_gzgetc(g) \ |
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) |
#else |
-# define gzgetc(g) \ |
- ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) |
+#define gzgetc(g) \ |
+ ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : gzgetc(g)) |
#endif |
/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or |
@@ -1754,76 +1741,77 @@ ZEXTERN int ZEXPORT gzgetc_ OF((gzFile file)); /* backward compatibility */ |
* without large file support, _LFS64_LARGEFILE must also be true |
*/ |
#ifdef Z_LARGE64 |
- ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); |
- ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); |
- ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); |
- ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); |
- ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); |
- ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); |
+ZEXTERN gzFile ZEXPORT gzopen64 OF((const char*, const char*)); |
+ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int)); |
+ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile)); |
+ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); |
+ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t)); |
+ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t)); |
#endif |
#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) |
-# ifdef Z_PREFIX_SET |
-# define z_gzopen z_gzopen64 |
-# define z_gzseek z_gzseek64 |
-# define z_gztell z_gztell64 |
-# define z_gzoffset z_gzoffset64 |
-# define z_adler32_combine z_adler32_combine64 |
-# define z_crc32_combine z_crc32_combine64 |
-# else |
-# define gzopen gzopen64 |
-# define gzseek gzseek64 |
-# define gztell gztell64 |
-# define gzoffset gzoffset64 |
-# define adler32_combine adler32_combine64 |
-# define crc32_combine crc32_combine64 |
-# endif |
-# ifndef Z_LARGE64 |
- ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); |
- ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); |
- ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); |
- ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); |
- ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); |
- ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); |
-# endif |
+#ifdef Z_PREFIX_SET |
+#define z_gzopen z_gzopen64 |
+#define z_gzseek z_gzseek64 |
+#define z_gztell z_gztell64 |
+#define z_gzoffset z_gzoffset64 |
+#define z_adler32_combine z_adler32_combine64 |
+#define z_crc32_combine z_crc32_combine64 |
+#else |
+#define gzopen gzopen64 |
+#define gzseek gzseek64 |
+#define gztell gztell64 |
+#define gzoffset gzoffset64 |
+#define adler32_combine adler32_combine64 |
+#define crc32_combine crc32_combine64 |
+#endif |
+#ifndef Z_LARGE64 |
+ZEXTERN gzFile ZEXPORT gzopen64 OF((const char*, const char*)); |
+ZEXTERN off64_t ZEXPORT gzseek64 OF((gzFile, off64_t, int)); |
+ZEXTERN off64_t ZEXPORT gztell64 OF((gzFile)); |
+ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile)); |
+ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, off64_t)); |
+ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, off64_t)); |
+#endif |
#else |
- ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *)); |
- ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); |
- ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); |
- ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); |
- ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); |
- ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); |
+ZEXTERN gzFile ZEXPORT gzopen OF((const char*, const char*)); |
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int)); |
+ZEXTERN z_off_t ZEXPORT gztell OF((gzFile)); |
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile)); |
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); |
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); |
#endif |
#else /* Z_SOLO */ |
- ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); |
- ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); |
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t)); |
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t)); |
#endif /* !Z_SOLO */ |
/* hack for buggy compilers */ |
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) |
- struct internal_state {int dummy;}; |
+struct internal_state { |
+ int dummy; |
+}; |
#endif |
/* undocumented functions */ |
-ZEXTERN const char * ZEXPORT zError OF((int)); |
-ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); |
-ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); |
-ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); |
-ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); |
-ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); |
+ZEXTERN const char* ZEXPORT zError OF((int)); |
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); |
+ZEXTERN const z_crc_t FAR* ZEXPORT get_crc_table OF((void)); |
+ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); |
+ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); |
+ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); |
#if defined(_WIN32) && !defined(Z_SOLO) |
-ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, |
- const char *mode)); |
+ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t* path, const char* mode)); |
#endif |
#if defined(STDC) || defined(Z_HAVE_STDARG_H) |
-# ifndef Z_SOLO |
-ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, |
- const char *format, |
- va_list va)); |
-# endif |
+#ifndef Z_SOLO |
+ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, |
+ const char* format, |
+ va_list va)); |
+#endif |
#endif |
#ifdef __cplusplus |