diff options
| author | christos <christos@NetBSD.org> | 2003-03-22 17:23:09 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2003-03-22 17:23:09 +0000 |
| commit | 19fe9b6b27cdc4f21ff85ef734056e6bd0d56590 (patch) | |
| tree | 493ce58cbcd71ce5eb5b07537fbec364e2cd1fad | |
| parent | 2c30441d134dbcfd503af1578f14fd20f1fa1703 (diff) | |
remove parameter names to avoid shadowing of globals.
| -rw-r--r-- | lib/libz/zlib.h | 131 |
1 files changed, 53 insertions, 78 deletions
diff --git a/lib/libz/zlib.h b/lib/libz/zlib.h index 590f12f67ff..cadcac59a9c 100644 --- a/lib/libz/zlib.h +++ b/lib/libz/zlib.h @@ -1,4 +1,4 @@ -/* $NetBSD: zlib.h,v 1.13 2002/05/29 18:15:18 christos Exp $ */ +/* $NetBSD: zlib.h,v 1.14 2003/03/22 17:23:09 christos Exp $ */ /* zlib.h -- interface of the 'zlib' general purpose compression library version 1.1.4, March 11th, 2002 @@ -66,8 +66,8 @@ extern "C" { crash even in case of corrupted input. */ -typedef voidpf (*alloc_func) __P((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) __P((voidpf opaque, voidpf address)); +typedef voidpf (*alloc_func) __P((voidpf, uInt, uInt)); +typedef void (*free_func) __P((voidpf, voidpf)); struct internal_state; @@ -183,7 +183,7 @@ ZEXTERN const char * ZEXPORT zlibVersion __P((void)); */ /* -ZEXTERN int ZEXPORT deflateInit __P((z_streamp strm, int level)); +ZEXTERN int ZEXPORT deflateInit __P((z_streamp, int)); Initializes the internal stream state for compression. The fields zalloc, zfree and opaque must be initialized before by the caller. @@ -205,7 +205,7 @@ ZEXTERN int ZEXPORT deflateInit __P((z_streamp strm, int level)); */ -ZEXTERN int ZEXPORT deflate __P((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT deflate __P((z_streamp, int)); /* deflate compresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may introduce some @@ -289,7 +289,7 @@ ZEXTERN int ZEXPORT deflate __P((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT deflateEnd __P((z_streamp strm)); +ZEXTERN int ZEXPORT deflateEnd __P((z_streamp)); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any @@ -304,7 +304,7 @@ ZEXTERN int ZEXPORT deflateEnd __P((z_streamp strm)); /* -ZEXTERN int ZEXPORT inflateInit __P((z_streamp strm)); +ZEXTERN int ZEXPORT inflateInit __P((z_streamp)); Initializes the internal stream state for decompression. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized before by @@ -324,7 +324,7 @@ ZEXTERN int ZEXPORT inflateInit __P((z_streamp strm)); */ -ZEXTERN int ZEXPORT inflate __P((z_streamp strm, int flush)); +ZEXTERN int ZEXPORT inflate __P((z_streamp, int)); /* inflate decompresses as much data as possible, and stops when the input buffer becomes empty or the output buffer becomes full. It may some @@ -393,7 +393,7 @@ ZEXTERN int ZEXPORT inflate __P((z_streamp strm, int flush)); */ -ZEXTERN int ZEXPORT inflateEnd __P((z_streamp strm)); +ZEXTERN int ZEXPORT inflateEnd __P((z_streamp)); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any @@ -411,12 +411,7 @@ ZEXTERN int ZEXPORT inflateEnd __P((z_streamp strm)); */ /* -ZEXTERN int ZEXPORT deflateInit2 __P((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); +ZEXTERN int ZEXPORT deflateInit2 __P((z_streamp, int, int, int, int, int)); This is another version of deflateInit with more compression options. The fields next_in, zalloc, zfree and opaque must be initialized before by @@ -454,9 +449,7 @@ ZEXTERN int ZEXPORT deflateInit2 __P((z_streamp strm, not perform any compression: this will be done by deflate(). */ -ZEXTERN int ZEXPORT deflateSetDictionary __P((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); +ZEXTERN int ZEXPORT deflateSetDictionary __P((z_streamp, const Bytef *, uInt)); /* Initializes the compression dictionary from the given byte sequence without producing any compressed output. This function must be called @@ -490,8 +483,7 @@ ZEXTERN int ZEXPORT deflateSetDictionary __P((z_streamp strm, perform any compression: this will be done by deflate(). */ -ZEXTERN int ZEXPORT deflateCopy __P((z_streamp dest, - z_streamp source)); +ZEXTERN int ZEXPORT deflateCopy __P((z_streamp, z_streamp)); /* Sets the destination stream as a complete copy of the source stream. @@ -508,7 +500,7 @@ ZEXTERN int ZEXPORT deflateCopy __P((z_streamp dest, destination. */ -ZEXTERN int ZEXPORT deflateReset __P((z_streamp strm)); +ZEXTERN int ZEXPORT deflateReset __P((z_streamp)); /* This function is equivalent to deflateEnd followed by deflateInit, but does not free and reallocate all the internal compression state. @@ -519,9 +511,7 @@ ZEXTERN int ZEXPORT deflateReset __P((z_streamp strm)); stream state was inconsistent (such as zalloc or state being NULL). */ -ZEXTERN int ZEXPORT deflateParams __P((z_streamp strm, - int level, - int strategy)); +ZEXTERN int ZEXPORT deflateParams __P((z_streamp, int, int)); /* Dynamically update the compression level and compression strategy. The interpretation of level and strategy is as in deflateInit2. This can be @@ -541,8 +531,7 @@ ZEXTERN int ZEXPORT deflateParams __P((z_streamp strm, */ /* -ZEXTERN int ZEXPORT inflateInit2 __P((z_streamp strm, - int windowBits)); +ZEXTERN int ZEXPORT inflateInit2 __P((z_streamp, int)); This is another version of inflateInit with an extra parameter. The fields next_in, avail_in, zalloc, zfree and opaque must be initialized @@ -563,9 +552,7 @@ ZEXTERN int ZEXPORT inflateInit2 __P((z_streamp strm, modified, but next_out and avail_out are unchanged.) */ -ZEXTERN int ZEXPORT inflateSetDictionary __P((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); +ZEXTERN int ZEXPORT inflateSetDictionary __P((z_streamp, const Bytef *, uInt)); /* Initializes the decompression dictionary from the given uncompressed byte sequence. This function must be called immediately after a call of inflate @@ -582,7 +569,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary __P((z_streamp strm, inflate(). */ -ZEXTERN int ZEXPORT inflateSync __P((z_streamp strm)); +ZEXTERN int ZEXPORT inflateSync __P((z_streamp)); /* Skips invalid compressed data until a full flush point (see above the description of deflate with Z_FULL_FLUSH) can be found, or until all @@ -597,7 +584,7 @@ ZEXTERN int ZEXPORT inflateSync __P((z_streamp strm)); until success or end of the input data. */ -ZEXTERN int ZEXPORT inflateReset __P((z_streamp strm)); +ZEXTERN int ZEXPORT inflateReset __P((z_streamp)); /* This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate all the internal decompression state. @@ -607,7 +594,7 @@ ZEXTERN int ZEXPORT inflateReset __P((z_streamp strm)); stream state was inconsistent (such as zalloc or state being NULL). */ -ZEXTERN int ZEXPORT inflateIncomp __P((z_streamp strm)); +ZEXTERN int ZEXPORT inflateIncomp __P((z_streamp)); /* utility functions */ @@ -619,8 +606,7 @@ ZEXTERN int ZEXPORT inflateIncomp __P((z_streamp strm)); utility functions can easily be modified if you need special options. */ -ZEXTERN int ZEXPORT compress __P((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); +ZEXTERN int ZEXPORT compress __P((Bytef *, uLongf *, const Bytef *, uLong)); /* Compresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total @@ -634,9 +620,8 @@ ZEXTERN int ZEXPORT compress __P((Bytef *dest, uLongf *destLen, buffer. */ -ZEXTERN int ZEXPORT compress2 __P((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); +ZEXTERN int ZEXPORT compress2 __P((Bytef *, uLongf *, const Bytef *, uLong, + int)); /* Compresses the source buffer into the destination buffer. The level parameter has the same meaning as in deflateInit. sourceLen is the byte @@ -649,8 +634,7 @@ ZEXTERN int ZEXPORT compress2 __P((Bytef *dest, uLongf *destLen, Z_STREAM_ERROR if the level parameter is invalid. */ -ZEXTERN int ZEXPORT uncompress __P((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); +ZEXTERN int ZEXPORT uncompress __P((Bytef *, uLongf *, const Bytef *, uLong)); /* Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total @@ -670,7 +654,7 @@ ZEXTERN int ZEXPORT uncompress __P((Bytef *dest, uLongf *destLen, typedef voidp gzFile; -ZEXTERN gzFile ZEXPORT gzopen __P((const char *path, const char *mode)); +ZEXTERN gzFile ZEXPORT gzopen __P((const char *, const char *)); /* Opens a gzip (.gz) file for reading or writing. The mode parameter is as in fopen ("rb" or "wb") but can also include a compression level @@ -686,7 +670,7 @@ ZEXTERN gzFile ZEXPORT gzopen __P((const char *path, const char *mode)); can be checked to distinguish the two cases (if errno is zero, the zlib error is Z_MEM_ERROR). */ -ZEXTERN gzFile ZEXPORT gzdopen __P((int fd, const char *mode)); +ZEXTERN gzFile ZEXPORT gzdopen __P((int, const char *)); /* gzdopen() associates a gzFile with the file descriptor fd. File descriptors are obtained from calls like open, dup, creat, pipe or @@ -699,7 +683,7 @@ ZEXTERN gzFile ZEXPORT gzdopen __P((int fd, const char *mode)); the (de)compression state. */ -ZEXTERN int ZEXPORT gzsetparams __P((gzFile file, int level, int strategy)); +ZEXTERN int ZEXPORT gzsetparams __P((gzFile, int, int)); /* Dynamically update the compression level or strategy. See the description of deflateInit2 for the meaning of these parameters. @@ -707,7 +691,7 @@ ZEXTERN int ZEXPORT gzsetparams __P((gzFile file, int level, int strategy)); opened for writing. */ -ZEXTERN int ZEXPORT gzread __P((gzFile file, voidp buf, unsigned len)); +ZEXTERN int ZEXPORT gzread __P((gzFile, voidp, unsigned)); /* Reads the given number of uncompressed bytes from the compressed file. If the input file was not in gzip format, gzread copies the given number @@ -715,15 +699,14 @@ ZEXTERN int ZEXPORT gzread __P((gzFile file, voidp buf, unsigned len)); gzread returns the number of uncompressed bytes actually read (0 for end of file, -1 for error). */ -ZEXTERN int ZEXPORT gzwrite __P((gzFile file, - const voidp buf, unsigned len)); +ZEXTERN int ZEXPORT gzwrite __P((gzFile, const voidp, unsigned)); /* Writes the given number of uncompressed bytes into the compressed file. gzwrite returns the number of uncompressed bytes actually written (0 in case of error). */ -ZEXTERN int ZEXPORTVA gzprintf __P((gzFile file, const char *format, ...)) +ZEXTERN int ZEXPORTVA gzprintf __P((gzFile, const char *, ...)) __attribute__((__format__(__printf__, 2, 3))); /* Converts, formats, and writes the args to the compressed file under @@ -731,14 +714,14 @@ ZEXTERN int ZEXPORTVA gzprintf __P((gzFile file, const char *format, ...)) uncompressed bytes actually written (0 in case of error). */ -ZEXTERN int ZEXPORT gzputs __P((gzFile file, const char *s)); +ZEXTERN int ZEXPORT gzputs __P((gzFile, const char *)); /* Writes the given null-terminated string to the compressed file, excluding the terminating null character. gzputs returns the number of characters written, or -1 in case of error. */ -ZEXTERN char * ZEXPORT gzgets __P((gzFile file, char *buf, int len)); +ZEXTERN char * ZEXPORT gzgets __P((gzFile, char *, int)); /* 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 @@ -747,19 +730,19 @@ ZEXTERN char * ZEXPORT gzgets __P((gzFile file, char *buf, int len)); gzgets returns buf, or Z_NULL in case of error. */ -ZEXTERN int ZEXPORT gzputc __P((gzFile file, int c)); +ZEXTERN int ZEXPORT gzputc __P((gzFile, int)); /* Writes c, converted to an unsigned char, into the compressed file. gzputc returns the value that was written, or -1 in case of error. */ -ZEXTERN int ZEXPORT gzgetc __P((gzFile file)); +ZEXTERN int ZEXPORT gzgetc __P((gzFile)); /* Reads one byte from the compressed file. gzgetc returns this byte or -1 in case of end of file or error. */ -ZEXTERN int ZEXPORT gzflush __P((gzFile file, int flush)); +ZEXTERN int ZEXPORT gzflush __P((gzFile, int)); /* Flushes all pending output into the compressed file. The parameter flush is as in the deflate() function. The return value is the zlib @@ -775,13 +758,10 @@ ZEXTERN int ZEXPORT gzflush __P((gzFile file, int flush)); * "long" gzseek has been there till Oct 1999 (1.4L), which was wrong. */ #ifdef __ZLIB_BACKWARD_COMPAT -ZEXTERN long ZEXPORT gzseek __P((gzFile file, - long offset, int whence)); -ZEXTERN z_off_t ZEXPORT __gzseek1 __P((gzFile file, - z_off_t offset, int whence)); +ZEXTERN long ZEXPORT gzseek __P((gzFile, long, int)); +ZEXTERN z_off_t ZEXPORT __gzseek1 __P((gzFile, z_off_t, int)); #else -ZEXTERN z_off_t ZEXPORT gzseek __P((gzFile file, - z_off_t offset, int whence)) +ZEXTERN z_off_t ZEXPORT gzseek __P((gzFile, z_off_t, int)) __RENAME(__gzseek1); #endif /* @@ -800,7 +780,7 @@ ZEXTERN z_off_t ZEXPORT gzseek __P((gzFile file, would be before the current position. */ -ZEXTERN int ZEXPORT gzrewind __P((gzFile file)); +ZEXTERN int ZEXPORT gzrewind __P((gzFile)); /* Rewinds the given file. This function is supported only for reading. @@ -812,10 +792,10 @@ ZEXTERN int ZEXPORT gzrewind __P((gzFile file)); * "long" gztell has been there till Oct 1999 (1.4L), which was wrong. */ #ifdef __ZLIB_BACKWARD_COMPAT -ZEXTERN long ZEXPORT gztell __P((gzFile file)); -ZEXTERN z_off_t ZEXPORT __gztell1 __P((gzFile file)); +ZEXTERN long ZEXPORT gztell __P((gzFile)); +ZEXTERN z_off_t ZEXPORT __gztell1 __P((gzFile)); #else -ZEXTERN z_off_t ZEXPORT gztell __P((gzFile file)) __RENAME(__gztell1); +ZEXTERN z_off_t ZEXPORT gztell __P((gzFile)) __RENAME(__gztell1); #endif /* Returns the starting position for the next gzread or gzwrite on the @@ -825,20 +805,20 @@ ZEXTERN z_off_t ZEXPORT gztell __P((gzFile file)) __RENAME(__gztell1); gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) */ -ZEXTERN int ZEXPORT gzeof __P((gzFile file)); +ZEXTERN int ZEXPORT gzeof __P((gzFile)); /* Returns 1 when EOF has previously been detected reading the given input stream, otherwise zero. */ -ZEXTERN int ZEXPORT gzclose __P((gzFile file)); +ZEXTERN int ZEXPORT gzclose __P((gzFile)); /* Flushes all pending output if necessary, closes the compressed file and deallocates all the (de)compression state. The return value is the zlib error number (see function gzerror below). */ -ZEXTERN const char * ZEXPORT gzerror __P((gzFile file, int *errnum)); +ZEXTERN const char * ZEXPORT gzerror __P((gzFile, int *)); /* Returns the error message for the last error which occurred on the given compressed file. errnum is set to zlib error number. If an @@ -855,7 +835,7 @@ ZEXTERN const char * ZEXPORT gzerror __P((gzFile file, int *errnum)); compression library. */ -ZEXTERN uLong ZEXPORT adler32 __P((uLong adler, const Bytef *buf, uInt len)); +ZEXTERN uLong ZEXPORT adler32 __P((uLong, const Bytef *, uInt)); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and @@ -872,7 +852,7 @@ ZEXTERN uLong ZEXPORT adler32 __P((uLong adler, const Bytef *buf, uInt len)); if (adler != original_adler) error(); */ -ZEXTERN uLong ZEXPORT crc32 __P((uLong crc, const Bytef *buf, uInt len)); +ZEXTERN uLong ZEXPORT crc32 __P((uLong, const Bytef *, uInt)); /* Update a running crc with the bytes buf[0..len-1] and return the updated crc. If buf is NULL, this function returns the required initial value @@ -894,16 +874,11 @@ ZEXTERN uLong ZEXPORT crc32 __P((uLong crc, const Bytef *buf, uInt len)); /* deflateInit and inflateInit are macros to allow checking the zlib version * and the compiler's view of z_stream: */ -ZEXTERN int ZEXPORT deflateInit_ __P((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ __P((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ __P((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ __P((z_streamp strm, int windowBits, - const char *version, int stream_size)); +ZEXTERN int ZEXPORT deflateInit_ __P((z_streamp, int, const char *, int)); +ZEXTERN int ZEXPORT inflateInit_ __P((z_streamp, const char *, int)); +ZEXTERN int ZEXPORT deflateInit2_ __P((z_streamp, int, int, int, int, int, + const char *, int)); +ZEXTERN int ZEXPORT inflateInit2_ __P((z_streamp, int, const char *, int)); #define deflateInit(strm, level) \ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) #define inflateInit(strm) \ @@ -919,8 +894,8 @@ ZEXTERN int ZEXPORT inflateInit2_ __P((z_streamp strm, int windowBits, struct internal_state {int dummy;}; /* hack for buggy compilers */ #endif -ZEXTERN const char * ZEXPORT zError __P((int err)); -ZEXTERN int ZEXPORT inflateSyncPoint __P((z_streamp z)); +ZEXTERN const char * ZEXPORT zError __P((int)); +ZEXTERN int ZEXPORT inflateSyncPoint __P((z_streamp)); ZEXTERN const uLongf * ZEXPORT get_crc_table __P((void)); #ifdef __cplusplus |
