do not declare OF() in header. use __P().
maybe we could have ansified it, but did not for possible feedback to the original zlib distribution
This commit is contained in:
parent
584dc984d3
commit
60a6af6e96
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: crc32.c,v 1.6 1999/07/03 12:30:53 simonb Exp $ */
|
||||
/* $NetBSD: crc32.c,v 1.7 2001/01/08 14:48:19 itojun Exp $ */
|
||||
|
||||
/* crc32.c -- compute the CRC-32 of a data stream
|
||||
* Copyright (C) 1995-1998 Mark Adler
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
local int crc_table_empty = 1;
|
||||
local uLongf crc_table[256];
|
||||
local void make_crc_table OF((void));
|
||||
local void make_crc_table __P((void));
|
||||
|
||||
/*
|
||||
Generate a table for a byte-wise 32-bit CRC calculation on the polynomial:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: deflate.c,v 1.6 1999/07/03 12:30:53 simonb Exp $ */
|
||||
/* $NetBSD: deflate.c,v 1.7 2001/01/08 14:48:19 itojun Exp $ */
|
||||
|
||||
/* deflate.c -- compress data using the deflation algorithm
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly.
|
||||
|
@ -72,26 +72,26 @@ typedef enum {
|
|||
finish_done /* finish done, accept no more input or output */
|
||||
} block_state;
|
||||
|
||||
typedef block_state (*compress_func) OF((deflate_state *s, int flush));
|
||||
typedef block_state (*compress_func) __P((deflate_state *s, int flush));
|
||||
/* Compression function. Returns the block state after the call. */
|
||||
|
||||
local void fill_window OF((deflate_state *s));
|
||||
local block_state deflate_stored OF((deflate_state *s, int flush));
|
||||
local block_state deflate_fast OF((deflate_state *s, int flush));
|
||||
local block_state deflate_slow OF((deflate_state *s, int flush));
|
||||
local void lm_init OF((deflate_state *s));
|
||||
local void putShortMSB OF((deflate_state *s, uInt b));
|
||||
local void flush_pending OF((z_streamp strm));
|
||||
local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
|
||||
local void fill_window __P((deflate_state *s));
|
||||
local block_state deflate_stored __P((deflate_state *s, int flush));
|
||||
local block_state deflate_fast __P((deflate_state *s, int flush));
|
||||
local block_state deflate_slow __P((deflate_state *s, int flush));
|
||||
local void lm_init __P((deflate_state *s));
|
||||
local void putShortMSB __P((deflate_state *s, uInt b));
|
||||
local void flush_pending __P((z_streamp strm));
|
||||
local int read_buf __P((z_streamp strm, Bytef *buf, unsigned size));
|
||||
#ifdef ASMV
|
||||
void match_init OF((void)); /* asm code initialization */
|
||||
uInt longest_match OF((deflate_state *s, IPos cur_match));
|
||||
void match_init __P((void)); /* asm code initialization */
|
||||
uInt longest_match __P((deflate_state *s, IPos cur_match));
|
||||
#else
|
||||
local uInt longest_match OF((deflate_state *s, IPos cur_match));
|
||||
local uInt longest_match __P((deflate_state *s, IPos cur_match));
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
local void check_match OF((deflate_state *s, IPos start, IPos match,
|
||||
local void check_match __P((deflate_state *s, IPos start, IPos match,
|
||||
int length));
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: deflate.h,v 1.6 1999/07/03 12:30:53 simonb Exp $ */
|
||||
/* $NetBSD: deflate.h,v 1.7 2001/01/08 14:48:19 itojun Exp $ */
|
||||
|
||||
/* deflate.h -- internal compression state
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly
|
||||
|
@ -268,12 +268,12 @@ typedef struct internal_state {
|
|||
*/
|
||||
|
||||
/* in trees.c */
|
||||
void _tr_init OF((deflate_state *s));
|
||||
int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
|
||||
void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
|
||||
void _tr_init __P((deflate_state *s));
|
||||
int _tr_tally __P((deflate_state *s, unsigned dist, unsigned lc));
|
||||
void _tr_flush_block __P((deflate_state *s, charf *buf, ulg stored_len,
|
||||
int eof));
|
||||
void _tr_align OF((deflate_state *s));
|
||||
void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
|
||||
void _tr_align __P((deflate_state *s));
|
||||
void _tr_stored_block __P((deflate_state *s, charf *buf, ulg stored_len,
|
||||
int eof));
|
||||
|
||||
#define d_code(dist) \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: example.c,v 1.7 1999/07/03 12:30:53 simonb Exp $ */
|
||||
/* $NetBSD: example.c,v 1.8 2001/01/08 14:48:20 itojun Exp $ */
|
||||
|
||||
/* example.c -- usage example of the zlib compression library
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly.
|
||||
|
@ -14,7 +14,7 @@
|
|||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
extern void exit OF((int));
|
||||
extern void exit __P((int));
|
||||
#endif
|
||||
|
||||
#if defined(VMS) || defined(RISCOS)
|
||||
|
@ -38,24 +38,24 @@ const char hello[] = "hello, hello!";
|
|||
const char dictionary[] = "hello";
|
||||
uLong dictId; /* Adler32 value of the dictionary */
|
||||
|
||||
void test_compress OF((Byte *compr, uLong comprLen,
|
||||
void test_compress __P((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_gzio OF((const char *out, const char *in,
|
||||
void test_gzio __P((const char *out, const char *in,
|
||||
Byte *uncompr, int uncomprLen));
|
||||
void test_deflate OF((Byte *compr, uLong comprLen));
|
||||
void test_inflate OF((Byte *compr, uLong comprLen,
|
||||
void test_deflate __P((Byte *compr, uLong comprLen));
|
||||
void test_inflate __P((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_large_deflate OF((Byte *compr, uLong comprLen,
|
||||
void test_large_deflate __P((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_large_inflate OF((Byte *compr, uLong comprLen,
|
||||
void test_large_inflate __P((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_flush OF((Byte *compr, uLong *comprLen));
|
||||
void test_sync OF((Byte *compr, uLong comprLen,
|
||||
void test_flush __P((Byte *compr, uLong *comprLen));
|
||||
void test_sync __P((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_dict_deflate OF((Byte *compr, uLong comprLen));
|
||||
void test_dict_inflate OF((Byte *compr, uLong comprLen,
|
||||
void test_dict_deflate __P((Byte *compr, uLong comprLen));
|
||||
void test_dict_inflate __P((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
int main OF((int argc, char *argv[]));
|
||||
int main __P((int argc, char *argv[]));
|
||||
|
||||
/* ===========================================================================
|
||||
* Test compress() and uncompress()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: gzio.c,v 1.9 1999/07/03 12:30:53 simonb Exp $ */
|
||||
/* $NetBSD: gzio.c,v 1.10 2001/01/08 14:48:20 itojun Exp $ */
|
||||
|
||||
/* gzio.c -- IO on .gz files
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly.
|
||||
|
@ -55,13 +55,13 @@ typedef struct gz_stream {
|
|||
} gz_stream;
|
||||
|
||||
|
||||
local gzFile gz_open OF((const char *path, const char *mode, int fd));
|
||||
local int do_flush OF((gzFile file, int flush));
|
||||
local int get_byte OF((gz_stream *s));
|
||||
local void check_header OF((gz_stream *s));
|
||||
local int destroy OF((gz_stream *s));
|
||||
local void putLong OF((FILE *file, uLong x));
|
||||
local uLong getLong OF((gz_stream *s));
|
||||
local gzFile gz_open __P((const char *path, const char *mode, int fd));
|
||||
local int do_flush __P((gzFile file, int flush));
|
||||
local int get_byte __P((gz_stream *s));
|
||||
local void check_header __P((gz_stream *s));
|
||||
local int destroy __P((gz_stream *s));
|
||||
local void putLong __P((FILE *file, uLong x));
|
||||
local uLong getLong __P((gz_stream *s));
|
||||
|
||||
/* ===========================================================================
|
||||
Opens a gzip (.gz) file for reading or writing. The mode parameter
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: infblock.h,v 1.5 1999/07/03 12:30:55 simonb Exp $ */
|
||||
/* $NetBSD: infblock.h,v 1.6 2001/01/08 14:48:20 itojun Exp $ */
|
||||
|
||||
/* infblock.h -- header to use infblock.c
|
||||
* Copyright (C) 1995-1998 Mark Adler
|
||||
|
@ -13,29 +13,29 @@
|
|||
struct inflate_blocks_state;
|
||||
typedef struct inflate_blocks_state FAR inflate_blocks_statef;
|
||||
|
||||
extern inflate_blocks_statef * inflate_blocks_new OF((
|
||||
extern inflate_blocks_statef * inflate_blocks_new __P((
|
||||
z_streamp z,
|
||||
check_func c, /* check function */
|
||||
uInt w)); /* window size */
|
||||
|
||||
extern int inflate_blocks OF((
|
||||
extern int inflate_blocks __P((
|
||||
inflate_blocks_statef *,
|
||||
z_streamp ,
|
||||
int)); /* initial return code */
|
||||
|
||||
extern void inflate_blocks_reset OF((
|
||||
extern void inflate_blocks_reset __P((
|
||||
inflate_blocks_statef *,
|
||||
z_streamp ,
|
||||
uLongf *)); /* check value on output */
|
||||
|
||||
extern int inflate_blocks_free OF((
|
||||
extern int inflate_blocks_free __P((
|
||||
inflate_blocks_statef *,
|
||||
z_streamp));
|
||||
|
||||
extern void inflate_set_dictionary OF((
|
||||
extern void inflate_set_dictionary __P((
|
||||
inflate_blocks_statef *s,
|
||||
const Bytef *d, /* dictionary */
|
||||
uInt n)); /* dictionary length */
|
||||
|
||||
extern int inflate_blocks_sync_point OF((
|
||||
extern int inflate_blocks_sync_point __P((
|
||||
inflate_blocks_statef *s));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: infcodes.h,v 1.5 1999/07/03 12:30:56 simonb Exp $ */
|
||||
/* $NetBSD: infcodes.h,v 1.6 2001/01/08 14:48:20 itojun Exp $ */
|
||||
|
||||
/* infcodes.h -- header to use infcodes.c
|
||||
* Copyright (C) 1995-1998 Mark Adler
|
||||
|
@ -13,17 +13,17 @@
|
|||
struct inflate_codes_state;
|
||||
typedef struct inflate_codes_state FAR inflate_codes_statef;
|
||||
|
||||
extern inflate_codes_statef *inflate_codes_new OF((
|
||||
extern inflate_codes_statef *inflate_codes_new __P((
|
||||
uInt, uInt,
|
||||
inflate_huft *, inflate_huft *,
|
||||
z_streamp ));
|
||||
|
||||
extern int inflate_codes OF((
|
||||
extern int inflate_codes __P((
|
||||
inflate_blocks_statef *,
|
||||
z_streamp ,
|
||||
int));
|
||||
|
||||
extern void inflate_codes_free OF((
|
||||
extern void inflate_codes_free __P((
|
||||
inflate_codes_statef *,
|
||||
z_streamp ));
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inffast.h,v 1.5 1999/07/03 12:30:56 simonb Exp $ */
|
||||
/* $NetBSD: inffast.h,v 1.6 2001/01/08 14:48:20 itojun Exp $ */
|
||||
|
||||
/* inffast.h -- header to use inffast.c
|
||||
* Copyright (C) 1995-1998 Mark Adler
|
||||
|
@ -10,7 +10,7 @@
|
|||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
extern int inflate_fast OF((
|
||||
extern int inflate_fast __P((
|
||||
uInt,
|
||||
uInt,
|
||||
inflate_huft *,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inftrees.c,v 1.5 1999/07/03 12:30:56 simonb Exp $ */
|
||||
/* $NetBSD: inftrees.c,v 1.6 2001/01/08 14:48:20 itojun Exp $ */
|
||||
|
||||
/* inftrees.c -- generate Huffman trees for efficient decoding
|
||||
* Copyright (C) 1995-1998 Mark Adler
|
||||
|
@ -27,7 +27,7 @@ struct internal_state {int dummy;}; /* for buggy compilers */
|
|||
#define bits word.what.Bits
|
||||
|
||||
|
||||
local int huft_build OF((
|
||||
local int huft_build __P((
|
||||
uIntf *, /* code lengths in bits */
|
||||
uInt, /* number of codes */
|
||||
uInt, /* number of "simple" codes */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: inftrees.h,v 1.5 1999/07/03 12:30:57 simonb Exp $ */
|
||||
/* $NetBSD: inftrees.h,v 1.6 2001/01/08 14:48:21 itojun Exp $ */
|
||||
|
||||
/* inftrees.h -- header to use inftrees.c
|
||||
* Copyright (C) 1995-1998 Mark Adler
|
||||
|
@ -34,14 +34,14 @@ struct inflate_huft_s {
|
|||
value below is more than safe. */
|
||||
#define MANY 1440
|
||||
|
||||
extern int inflate_trees_bits OF((
|
||||
extern int inflate_trees_bits __P((
|
||||
uIntf *, /* 19 code lengths */
|
||||
uIntf *, /* bits tree desired/actual depth */
|
||||
inflate_huft * FAR *, /* bits tree result */
|
||||
inflate_huft *, /* space for trees */
|
||||
z_streamp)); /* for messages */
|
||||
|
||||
extern int inflate_trees_dynamic OF((
|
||||
extern int inflate_trees_dynamic __P((
|
||||
uInt, /* number of literal/length codes */
|
||||
uInt, /* number of distance codes */
|
||||
uIntf *, /* that many (total) code lengths */
|
||||
|
@ -52,7 +52,7 @@ extern int inflate_trees_dynamic OF((
|
|||
inflate_huft *, /* space for trees */
|
||||
z_streamp)); /* for messages */
|
||||
|
||||
extern int inflate_trees_fixed OF((
|
||||
extern int inflate_trees_fixed __P((
|
||||
uIntf *, /* literal desired/actual bit depth */
|
||||
uIntf *, /* distance desired/actual bit depth */
|
||||
inflate_huft * FAR *, /* literal/length tree result */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: infutil.h,v 1.5 1999/07/03 12:30:57 simonb Exp $ */
|
||||
/* $NetBSD: infutil.h,v 1.6 2001/01/08 14:48:21 itojun Exp $ */
|
||||
|
||||
/* infutil.h -- types and macros common to blocks and codes
|
||||
* Copyright (C) 1995-1998 Mark Adler
|
||||
|
@ -90,7 +90,7 @@ struct inflate_blocks_state {
|
|||
extern uInt inflate_mask[17];
|
||||
|
||||
/* copy as much as possible from the sliding window to the output area */
|
||||
extern int inflate_flush OF((
|
||||
extern int inflate_flush __P((
|
||||
inflate_blocks_statef *,
|
||||
z_streamp ,
|
||||
int));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: minigzip.c,v 1.9 1999/07/03 12:30:57 simonb Exp $ */
|
||||
/* $NetBSD: minigzip.c,v 1.10 2001/01/08 14:48:21 itojun Exp $ */
|
||||
|
||||
/* minigzip.c -- simulate gzip using the zlib compression library
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly.
|
||||
|
@ -27,7 +27,7 @@
|
|||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
extern void exit OF((int));
|
||||
extern void exit __P((int));
|
||||
#endif
|
||||
|
||||
#ifdef USE_MMAP
|
||||
|
@ -58,7 +58,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
|
||||
extern int unlink OF((const char *));
|
||||
extern int unlink __P((const char *));
|
||||
#endif
|
||||
|
||||
#ifndef GZ_SUFFIX
|
||||
|
@ -78,15 +78,15 @@
|
|||
|
||||
char *prog;
|
||||
|
||||
void error OF((const char *msg));
|
||||
void gz_compress OF((FILE *in, gzFile out));
|
||||
void error __P((const char *msg));
|
||||
void gz_compress __P((FILE *in, gzFile out));
|
||||
#ifdef USE_MMAP
|
||||
int gz_compress_mmap OF((FILE *in, gzFile out));
|
||||
int gz_compress_mmap __P((FILE *in, gzFile out));
|
||||
#endif
|
||||
void gz_uncompress OF((gzFile in, FILE *out));
|
||||
void file_compress OF((char *file, char *mode));
|
||||
void file_uncompress OF((char *file));
|
||||
int main OF((int argc, char *argv[]));
|
||||
void gz_uncompress __P((gzFile in, FILE *out));
|
||||
void file_compress __P((char *file, char *mode));
|
||||
void file_uncompress __P((char *file));
|
||||
int main __P((int argc, char *argv[]));
|
||||
|
||||
/* ===========================================================================
|
||||
* Display error message and exit
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: trees.c,v 1.6 1999/07/03 12:30:57 simonb Exp $ */
|
||||
/* $NetBSD: trees.c,v 1.7 2001/01/08 14:48:22 itojun Exp $ */
|
||||
|
||||
/* trees.c -- output deflated data using Huffman coding
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly
|
||||
|
@ -141,28 +141,28 @@ local static_tree_desc static_bl_desc =
|
|||
* Local (static) routines in this file.
|
||||
*/
|
||||
|
||||
local void tr_static_init OF((void));
|
||||
local void init_block OF((deflate_state *s));
|
||||
local void pqdownheap OF((deflate_state *s, ct_data *tree, int k));
|
||||
local void gen_bitlen OF((deflate_state *s, tree_desc *desc));
|
||||
local void gen_codes OF((ct_data *tree, int max_code, ushf *bl_count));
|
||||
local void build_tree OF((deflate_state *s, tree_desc *desc));
|
||||
local void scan_tree OF((deflate_state *s, ct_data *tree, int max_code));
|
||||
local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
|
||||
local int build_bl_tree OF((deflate_state *s));
|
||||
local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
|
||||
local void tr_static_init __P((void));
|
||||
local void init_block __P((deflate_state *s));
|
||||
local void pqdownheap __P((deflate_state *s, ct_data *tree, int k));
|
||||
local void gen_bitlen __P((deflate_state *s, tree_desc *desc));
|
||||
local void gen_codes __P((ct_data *tree, int max_code, ushf *bl_count));
|
||||
local void build_tree __P((deflate_state *s, tree_desc *desc));
|
||||
local void scan_tree __P((deflate_state *s, ct_data *tree, int max_code));
|
||||
local void send_tree __P((deflate_state *s, ct_data *tree, int max_code));
|
||||
local int build_bl_tree __P((deflate_state *s));
|
||||
local void send_all_trees __P((deflate_state *s, int lcodes, int dcodes,
|
||||
int blcodes));
|
||||
local void compress_block OF((deflate_state *s, ct_data *ltree,
|
||||
local void compress_block __P((deflate_state *s, ct_data *ltree,
|
||||
ct_data *dtree));
|
||||
local void set_data_type OF((deflate_state *s));
|
||||
local unsigned bi_reverse OF((unsigned value, int length));
|
||||
local void bi_windup OF((deflate_state *s));
|
||||
local void bi_flush OF((deflate_state *s));
|
||||
local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
|
||||
local void set_data_type __P((deflate_state *s));
|
||||
local unsigned bi_reverse __P((unsigned value, int length));
|
||||
local void bi_windup __P((deflate_state *s));
|
||||
local void bi_flush __P((deflate_state *s));
|
||||
local void copy_block __P((deflate_state *s, charf *buf, unsigned len,
|
||||
int header));
|
||||
|
||||
#ifdef GEN_TREES_H
|
||||
local void gen_trees_header OF((void));
|
||||
local void gen_trees_header __P((void));
|
||||
#endif
|
||||
|
||||
#ifndef DEBUG
|
||||
|
@ -189,7 +189,7 @@ local void gen_trees_header OF((void));
|
|||
* IN assertion: length <= 16 and value fits in length bits.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
local void send_bits OF((deflate_state *s, int value, int length));
|
||||
local void send_bits __P((deflate_state *s, int value, int length));
|
||||
|
||||
local void send_bits(s, value, length)
|
||||
deflate_state *s;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zconf.h,v 1.8 1999/10/26 03:42:58 itojun Exp $ */
|
||||
/* $NetBSD: zconf.h,v 1.9 2001/01/08 14:48:22 itojun Exp $ */
|
||||
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly.
|
||||
|
@ -137,6 +137,7 @@
|
|||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef __NetBSD__
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
|
@ -144,6 +145,7 @@
|
|||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
|
|
104
lib/libz/zlib.h
104
lib/libz/zlib.h
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zlib.h,v 1.10 2000/10/04 17:12:01 sommerfeld Exp $ */
|
||||
/* $NetBSD: zlib.h,v 1.11 2001/01/08 14:48:22 itojun Exp $ */
|
||||
|
||||
/* zlib.h -- interface of the 'zlib' general purpose compression library
|
||||
version 1.1.3, July 9th, 1998
|
||||
|
@ -66,8 +66,8 @@ extern "C" {
|
|||
crash 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) __P((voidpf opaque, uInt items, uInt size));
|
||||
typedef void (*free_func) __P((voidpf opaque, voidpf address));
|
||||
|
||||
struct internal_state;
|
||||
|
||||
|
@ -174,7 +174,7 @@ typedef z_stream FAR *z_streamp;
|
|||
|
||||
/* basic functions */
|
||||
|
||||
ZEXTERN const char * ZEXPORT zlibVersion OF((void));
|
||||
ZEXTERN const char * ZEXPORT zlibVersion __P((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.
|
||||
|
@ -182,7 +182,7 @@ ZEXTERN const char * ZEXPORT zlibVersion OF((void));
|
|||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
|
||||
ZEXTERN int ZEXPORT deflateInit __P((z_streamp strm, int level));
|
||||
|
||||
Initializes the internal stream state for compression. The fields
|
||||
zalloc, zfree and opaque must be initialized before by the caller.
|
||||
|
@ -204,7 +204,7 @@ ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
|
|||
*/
|
||||
|
||||
|
||||
ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
||||
ZEXTERN int ZEXPORT deflate __P((z_streamp strm, int flush));
|
||||
/*
|
||||
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
|
||||
|
@ -282,7 +282,7 @@ ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
|
|||
*/
|
||||
|
||||
|
||||
ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
|
||||
ZEXTERN int ZEXPORT deflateEnd __P((z_streamp strm));
|
||||
/*
|
||||
All dynamically allocated data structures for this stream are freed.
|
||||
This function discards any unprocessed input and does not flush any
|
||||
|
@ -297,7 +297,7 @@ ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
|
|||
|
||||
|
||||
/*
|
||||
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
|
||||
ZEXTERN int ZEXPORT inflateInit __P((z_streamp strm));
|
||||
|
||||
Initializes the internal stream state for decompression. The fields
|
||||
next_in, avail_in, zalloc, zfree and opaque must be initialized before by
|
||||
|
@ -317,7 +317,7 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
|
|||
*/
|
||||
|
||||
|
||||
ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
||||
ZEXTERN int ZEXPORT inflate __P((z_streamp strm, int flush));
|
||||
/*
|
||||
inflate decompresses as much data as possible, and stops when the input
|
||||
buffer becomes empty or the output buffer becomes full. It may some
|
||||
|
@ -386,7 +386,7 @@ ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
|
|||
*/
|
||||
|
||||
|
||||
ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
|
||||
ZEXTERN int ZEXPORT inflateEnd __P((z_streamp strm));
|
||||
/*
|
||||
All dynamically allocated data structures for this stream are freed.
|
||||
This function discards any unprocessed input and does not flush any
|
||||
|
@ -404,7 +404,7 @@ ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
|
|||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
||||
ZEXTERN int ZEXPORT deflateInit2 __P((z_streamp strm,
|
||||
int level,
|
||||
int method,
|
||||
int windowBits,
|
||||
|
@ -447,7 +447,7 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
|
|||
not perform any compression: this will be done by deflate().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
|
||||
ZEXTERN int ZEXPORT deflateSetDictionary __P((z_streamp strm,
|
||||
const Bytef *dictionary,
|
||||
uInt dictLength));
|
||||
/*
|
||||
|
@ -483,7 +483,7 @@ ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
|
|||
perform any compression: this will be done by deflate().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
|
||||
ZEXTERN int ZEXPORT deflateCopy __P((z_streamp dest,
|
||||
z_streamp source));
|
||||
/*
|
||||
Sets the destination stream as a complete copy of the source stream.
|
||||
|
@ -501,7 +501,7 @@ ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
|
|||
destination.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
|
||||
ZEXTERN int ZEXPORT deflateReset __P((z_streamp strm));
|
||||
/*
|
||||
This function is equivalent to deflateEnd followed by deflateInit,
|
||||
but does not free and reallocate all the internal compression state.
|
||||
|
@ -512,7 +512,7 @@ ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
|
|||
stream state was inconsistent (such as zalloc or state being NULL).
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
|
||||
ZEXTERN int ZEXPORT deflateParams __P((z_streamp strm,
|
||||
int level,
|
||||
int strategy));
|
||||
/*
|
||||
|
@ -534,7 +534,7 @@ ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
|
|||
*/
|
||||
|
||||
/*
|
||||
ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
||||
ZEXTERN int ZEXPORT inflateInit2 __P((z_streamp strm,
|
||||
int windowBits));
|
||||
|
||||
This is another version of inflateInit with an extra parameter. The
|
||||
|
@ -556,7 +556,7 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
|
|||
modified, but next_out and avail_out are unchanged.)
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
||||
ZEXTERN int ZEXPORT inflateSetDictionary __P((z_streamp strm,
|
||||
const Bytef *dictionary,
|
||||
uInt dictLength));
|
||||
/*
|
||||
|
@ -575,7 +575,7 @@ ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
|
|||
inflate().
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
|
||||
ZEXTERN int ZEXPORT inflateSync __P((z_streamp strm));
|
||||
/*
|
||||
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
|
||||
|
@ -590,7 +590,7 @@ ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
|
|||
until success or end of the input data.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
||||
ZEXTERN int ZEXPORT inflateReset __P((z_streamp strm));
|
||||
/*
|
||||
This function is equivalent to inflateEnd followed by inflateInit,
|
||||
but does not free and reallocate all the internal decompression state.
|
||||
|
@ -611,7 +611,7 @@ ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
|
|||
utility functions can easily be modified if you need special options.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
|
||||
ZEXTERN int ZEXPORT compress __P((Bytef *dest, uLongf *destLen,
|
||||
const Bytef *source, uLong sourceLen));
|
||||
/*
|
||||
Compresses the source buffer into the destination buffer. sourceLen is
|
||||
|
@ -626,7 +626,7 @@ ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
|
|||
buffer.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
|
||||
ZEXTERN int ZEXPORT compress2 __P((Bytef *dest, uLongf *destLen,
|
||||
const Bytef *source, uLong sourceLen,
|
||||
int level));
|
||||
/*
|
||||
|
@ -641,7 +641,7 @@ ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
|
|||
Z_STREAM_ERROR if the level parameter is invalid.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
|
||||
ZEXTERN int ZEXPORT uncompress __P((Bytef *dest, uLongf *destLen,
|
||||
const Bytef *source, uLong sourceLen));
|
||||
/*
|
||||
Decompresses the source buffer into the destination buffer. sourceLen is
|
||||
|
@ -662,7 +662,7 @@ ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
|
|||
|
||||
typedef voidp gzFile;
|
||||
|
||||
ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
|
||||
ZEXTERN gzFile ZEXPORT gzopen __P((const char *path, const char *mode));
|
||||
/*
|
||||
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
|
||||
|
@ -678,7 +678,7 @@ ZEXTERN gzFile ZEXPORT gzopen OF((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 OF((int fd, const char *mode));
|
||||
ZEXTERN gzFile ZEXPORT gzdopen __P((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
|
||||
|
@ -691,7 +691,7 @@ ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
|
|||
the (de)compression state.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
||||
ZEXTERN int ZEXPORT gzsetparams __P((gzFile file, int level, int strategy));
|
||||
/*
|
||||
Dynamically update the compression level or strategy. See the description
|
||||
of deflateInit2 for the meaning of these parameters.
|
||||
|
@ -699,7 +699,7 @@ ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
|
|||
opened for writing.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
|
||||
ZEXTERN int ZEXPORT gzread __P((gzFile file, voidp buf, unsigned len));
|
||||
/*
|
||||
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
|
||||
|
@ -707,7 +707,7 @@ ZEXTERN int ZEXPORT gzread OF((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 OF((gzFile file,
|
||||
ZEXTERN int ZEXPORT gzwrite __P((gzFile file,
|
||||
const voidp buf, unsigned len));
|
||||
/*
|
||||
Writes the given number of uncompressed bytes into the compressed file.
|
||||
|
@ -715,7 +715,7 @@ ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
|
|||
(0 in case of error).
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...))
|
||||
ZEXTERN int ZEXPORTVA gzprintf __P((gzFile file, const char *format, ...))
|
||||
__attribute__((__format__(__printf__, 2, 3)));
|
||||
/*
|
||||
Converts, formats, and writes the args to the compressed file under
|
||||
|
@ -723,14 +723,14 @@ ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...))
|
|||
uncompressed bytes actually written (0 in case of error).
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
|
||||
ZEXTERN int ZEXPORT gzputs __P((gzFile file, const char *s));
|
||||
/*
|
||||
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 OF((gzFile file, char *buf, int len));
|
||||
ZEXTERN char * ZEXPORT gzgets __P((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
|
||||
|
@ -739,19 +739,19 @@ ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
|
|||
gzgets returns buf, or Z_NULL in case of error.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
|
||||
ZEXTERN int ZEXPORT gzputc __P((gzFile file, int c));
|
||||
/*
|
||||
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 OF((gzFile file));
|
||||
ZEXTERN int ZEXPORT gzgetc __P((gzFile file));
|
||||
/*
|
||||
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 OF((gzFile file, int flush));
|
||||
ZEXTERN int ZEXPORT gzflush __P((gzFile file, int flush));
|
||||
/*
|
||||
Flushes all pending output into the compressed file. The parameter
|
||||
flush is as in the deflate() function. The return value is the zlib
|
||||
|
@ -767,12 +767,12 @@ ZEXTERN int ZEXPORT gzflush OF((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 OF((gzFile file,
|
||||
ZEXTERN long ZEXPORT gzseek __P((gzFile file,
|
||||
long offset, int whence));
|
||||
ZEXTERN z_off_t ZEXPORT __gzseek1 OF((gzFile file,
|
||||
ZEXTERN z_off_t ZEXPORT __gzseek1 __P((gzFile file,
|
||||
z_off_t offset, int whence));
|
||||
#else
|
||||
ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
|
||||
ZEXTERN z_off_t ZEXPORT gzseek __P((gzFile file,
|
||||
z_off_t offset, int whence))
|
||||
__RENAME(__gzseek1);
|
||||
#endif
|
||||
|
@ -792,7 +792,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 __P((gzFile file));
|
||||
/*
|
||||
Rewinds the given file. This function is supported only for reading.
|
||||
|
||||
|
@ -804,10 +804,10 @@ ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
|
|||
* "long" gztell has been there till Oct 1999 (1.4L), which was wrong.
|
||||
*/
|
||||
#ifdef __ZLIB_BACKWARD_COMPAT
|
||||
ZEXTERN long ZEXPORT gztell OF((gzFile file));
|
||||
ZEXTERN z_off_t ZEXPORT __gztell1 OF((gzFile file));
|
||||
ZEXTERN long ZEXPORT gztell __P((gzFile file));
|
||||
ZEXTERN z_off_t ZEXPORT __gztell1 __P((gzFile file));
|
||||
#else
|
||||
ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)) __RENAME(__gztell1);
|
||||
ZEXTERN z_off_t ZEXPORT gztell __P((gzFile file)) __RENAME(__gztell1);
|
||||
#endif
|
||||
/*
|
||||
Returns the starting position for the next gzread or gzwrite on the
|
||||
|
@ -817,20 +817,20 @@ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)) __RENAME(__gztell1);
|
|||
gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzeof OF((gzFile file));
|
||||
ZEXTERN int ZEXPORT gzeof __P((gzFile file));
|
||||
/*
|
||||
Returns 1 when EOF has previously been detected reading the given
|
||||
input stream, otherwise zero.
|
||||
*/
|
||||
|
||||
ZEXTERN int ZEXPORT gzclose OF((gzFile file));
|
||||
ZEXTERN int ZEXPORT gzclose __P((gzFile file));
|
||||
/*
|
||||
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 OF((gzFile file, int *errnum));
|
||||
ZEXTERN const char * ZEXPORT gzerror __P((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
|
||||
|
@ -847,7 +847,7 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
|
|||
compression library.
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
||||
ZEXTERN uLong ZEXPORT adler32 __P((uLong adler, const Bytef *buf, uInt len));
|
||||
|
||||
/*
|
||||
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
|
||||
|
@ -864,7 +864,7 @@ ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
|
|||
if (adler != original_adler) error();
|
||||
*/
|
||||
|
||||
ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
|
||||
ZEXTERN uLong ZEXPORT crc32 __P((uLong crc, const Bytef *buf, uInt len));
|
||||
/*
|
||||
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
|
||||
|
@ -886,15 +886,15 @@ ZEXTERN uLong ZEXPORT crc32 OF((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_ OF((z_streamp strm, int level,
|
||||
ZEXTERN int ZEXPORT deflateInit_ __P((z_streamp strm, int level,
|
||||
const char *version, int stream_size));
|
||||
ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
|
||||
ZEXTERN int ZEXPORT inflateInit_ __P((z_streamp strm,
|
||||
const char *version, int stream_size));
|
||||
ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
|
||||
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_ OF((z_streamp strm, int windowBits,
|
||||
ZEXTERN int ZEXPORT inflateInit2_ __P((z_streamp strm, int windowBits,
|
||||
const char *version, int stream_size));
|
||||
#define deflateInit(strm, level) \
|
||||
deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
|
||||
|
@ -911,9 +911,9 @@ ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
|
|||
struct internal_state {int dummy;}; /* hack for buggy compilers */
|
||||
#endif
|
||||
|
||||
ZEXTERN const char * ZEXPORT zError OF((int err));
|
||||
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
|
||||
ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
|
||||
ZEXTERN const char * ZEXPORT zError __P((int err));
|
||||
ZEXTERN int ZEXPORT inflateSyncPoint __P((z_streamp z));
|
||||
ZEXTERN const uLongf * ZEXPORT get_crc_table __P((void));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zutil.c,v 1.6 1999/07/03 12:30:58 simonb Exp $ */
|
||||
/* $NetBSD: zutil.c,v 1.7 2001/01/08 14:48:22 itojun Exp $ */
|
||||
|
||||
/* zutil.c -- target dependent utility functions for the compression library
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly.
|
||||
|
@ -14,7 +14,7 @@
|
|||
struct internal_state {int dummy;}; /* for buggy compilers */
|
||||
|
||||
#ifndef STDC
|
||||
extern void exit OF((int));
|
||||
extern void exit __P((int));
|
||||
#endif
|
||||
|
||||
const char *z_errmsg[10] = {
|
||||
|
@ -205,8 +205,8 @@ void zcfree (voidpf opaque, voidpf ptr)
|
|||
#ifndef MY_ZCALLOC /* Any system without a special alloc function */
|
||||
|
||||
#ifndef STDC
|
||||
extern voidp calloc OF((uInt items, uInt size));
|
||||
extern void free OF((voidpf ptr));
|
||||
extern voidp calloc __P((uInt items, uInt size));
|
||||
extern void free __P((voidpf ptr));
|
||||
#endif
|
||||
|
||||
voidpf zcalloc (opaque, items, size)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zutil.h,v 1.9 1999/11/13 21:35:49 thorpej Exp $ */
|
||||
/* $NetBSD: zutil.h,v 1.10 2001/01/08 14:48:23 itojun Exp $ */
|
||||
|
||||
/* zutil.h -- internal interface and configuration of the compression library
|
||||
* Copyright (C) 1995-1998 Jean-loup Gailly.
|
||||
|
@ -160,7 +160,7 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||
/* functions */
|
||||
|
||||
#ifdef HAVE_STRERROR
|
||||
extern char *strerror OF((int));
|
||||
extern char *strerror __P((int));
|
||||
# define zstrerror(errnum) strerror(errnum)
|
||||
#else
|
||||
# define zstrerror(errnum) ""
|
||||
|
@ -190,16 +190,16 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||
# define zmemzero(dest, len) memset(dest, 0, len)
|
||||
# endif
|
||||
#else
|
||||
extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
|
||||
extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
|
||||
extern void zmemzero OF((Bytef* dest, uInt len));
|
||||
extern void zmemcpy __P((Bytef* dest, const Bytef* source, uInt len));
|
||||
extern int zmemcmp __P((const Bytef* s1, const Bytef* s2, uInt len));
|
||||
extern void zmemzero __P((Bytef* dest, uInt len));
|
||||
#endif
|
||||
|
||||
/* Diagnostic functions */
|
||||
#if defined(DEBUG) && !defined(_KERNEL) && !defined(_STANDALONE)
|
||||
# include <stdio.h>
|
||||
extern int z_verbose;
|
||||
extern void z_error OF((char *m));
|
||||
extern void z_error __P((char *m));
|
||||
# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
|
||||
# define Trace(x) {if (z_verbose>=0) fprintf x ;}
|
||||
# define Tracev(x) {if (z_verbose>0) fprintf x ;}
|
||||
|
@ -216,10 +216,10 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
|
|||
#endif
|
||||
|
||||
|
||||
typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf,
|
||||
typedef uLong (ZEXPORT *check_func) __P((uLong check, const Bytef *buf,
|
||||
uInt len));
|
||||
voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
|
||||
void zcfree OF((voidpf opaque, voidpf ptr));
|
||||
voidpf zcalloc __P((voidpf opaque, unsigned items, unsigned size));
|
||||
void zcfree __P((voidpf opaque, voidpf ptr));
|
||||
|
||||
#define ZALLOC(strm, items, size) \
|
||||
(*((strm)->zalloc))((strm)->opaque, (items), (size))
|
||||
|
|
Loading…
Reference in New Issue