diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2012-01-15 20:46:53 -0800 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2012-01-16 16:44:40 -0800 |
commit | c3799a24809a5b335710a101ef975e90c52743bb (patch) | |
tree | 805df5bd508d3f50e82bff290336ed84e5627857 | |
parent | 0ddfbd2346cc23ffbcea9a0c491e5da39cf743d2 (diff) | |
download | zlib-c3799a24809a5b335710a101ef975e90c52743bb.tar.gz zlib-c3799a24809a5b335710a101ef975e90c52743bb.tar.bz2 zlib-c3799a24809a5b335710a101ef975e90c52743bb.zip |
Update the Pascal interface in contrib/pascal.
-rw-r--r-- | contrib/pascal/zlibpas.pas | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/contrib/pascal/zlibpas.pas b/contrib/pascal/zlibpas.pas index bd13df6..5c9875c 100644 --- a/contrib/pascal/zlibpas.pas +++ b/contrib/pascal/zlibpas.pas | |||
@@ -11,6 +11,7 @@ interface | |||
11 | 11 | ||
12 | const | 12 | const |
13 | ZLIB_VERSION = '1.2.6'; | 13 | ZLIB_VERSION = '1.2.6'; |
14 | ZLIB_VERNUM = $1260; | ||
14 | 15 | ||
15 | type | 16 | type |
16 | alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; | 17 | alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; |
@@ -45,6 +46,23 @@ type | |||
45 | reserved: LongInt; (* reserved for future use *) | 46 | reserved: LongInt; (* reserved for future use *) |
46 | end; | 47 | end; |
47 | 48 | ||
49 | gz_headerp = ^gz_header; | ||
50 | gz_header = packed record | ||
51 | text: Integer; (* true if compressed data believed to be text *) | ||
52 | time: LongInt; (* modification time *) | ||
53 | xflags: Integer; (* extra flags (not used when writing a gzip file) *) | ||
54 | os: Integer; (* operating system *) | ||
55 | extra: PChar; (* pointer to extra field or Z_NULL if none *) | ||
56 | extra_len: Integer; (* extra field length (valid if extra != Z_NULL) *) | ||
57 | extra_max: Integer; (* space at extra (only when reading header) *) | ||
58 | name: PChar; (* pointer to zero-terminated file name or Z_NULL *) | ||
59 | name_max: Integer; (* space at name (only when reading header) *) | ||
60 | comment: PChar; (* pointer to zero-terminated comment or Z_NULL *) | ||
61 | comm_max: Integer; (* space at comment (only when reading header) *) | ||
62 | hcrc: Integer; (* true if there was or will be a header crc *) | ||
63 | done: Integer; (* true when done reading gzip header *) | ||
64 | end; | ||
65 | |||
48 | (* constants *) | 66 | (* constants *) |
49 | const | 67 | const |
50 | Z_NO_FLUSH = 0; | 68 | Z_NO_FLUSH = 0; |
@@ -52,6 +70,8 @@ const | |||
52 | Z_SYNC_FLUSH = 2; | 70 | Z_SYNC_FLUSH = 2; |
53 | Z_FULL_FLUSH = 3; | 71 | Z_FULL_FLUSH = 3; |
54 | Z_FINISH = 4; | 72 | Z_FINISH = 4; |
73 | Z_BLOCK = 5; | ||
74 | Z_TREES = 6; | ||
55 | 75 | ||
56 | Z_OK = 0; | 76 | Z_OK = 0; |
57 | Z_STREAM_END = 1; | 77 | Z_STREAM_END = 1; |
@@ -71,9 +91,11 @@ const | |||
71 | Z_FILTERED = 1; | 91 | Z_FILTERED = 1; |
72 | Z_HUFFMAN_ONLY = 2; | 92 | Z_HUFFMAN_ONLY = 2; |
73 | Z_RLE = 3; | 93 | Z_RLE = 3; |
94 | Z_FIXED = 4; | ||
74 | Z_DEFAULT_STRATEGY = 0; | 95 | Z_DEFAULT_STRATEGY = 0; |
75 | 96 | ||
76 | Z_BINARY = 0; | 97 | Z_BINARY = 0; |
98 | Z_TEXT = 1; | ||
77 | Z_ASCII = 1; | 99 | Z_ASCII = 1; |
78 | Z_UNKNOWN = 2; | 100 | Z_UNKNOWN = 2; |
79 | 101 | ||
@@ -96,15 +118,21 @@ function deflateSetDictionary(var strm: z_stream; const dictionary: PChar; | |||
96 | function deflateCopy(var dest, source: z_stream): Integer; | 118 | function deflateCopy(var dest, source: z_stream): Integer; |
97 | function deflateReset(var strm: z_stream): Integer; | 119 | function deflateReset(var strm: z_stream): Integer; |
98 | function deflateParams(var strm: z_stream; level, strategy: Integer): Integer; | 120 | function deflateParams(var strm: z_stream; level, strategy: Integer): Integer; |
121 | function deflateTune(var strm: z_stream; good_length, max_lazy, nice_length, max_chain: Integer): Integer; | ||
99 | function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt; | 122 | function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt; |
100 | function deflatePending(var strm: z_stream; var pending: Integer; var bits: Integer): Integer; | 123 | function deflatePending(var strm: z_stream; var pending: Integer; var bits: Integer): Integer; |
101 | function deflatePrime(var strm: z_stream; bits, value: Integer): Integer; | 124 | function deflatePrime(var strm: z_stream; bits, value: Integer): Integer; |
125 | function deflateSetHeader(var strm: z_stream; head: gz_header): Integer; | ||
102 | function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; | 126 | function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; |
103 | function inflateSetDictionary(var strm: z_stream; const dictionary: PChar; | 127 | function inflateSetDictionary(var strm: z_stream; const dictionary: PChar; |
104 | dictLength: Integer): Integer; | 128 | dictLength: Integer): Integer; |
105 | function inflateSync(var strm: z_stream): Integer; | 129 | function inflateSync(var strm: z_stream): Integer; |
106 | function inflateCopy(var dest, source: z_stream): Integer; | 130 | function inflateCopy(var dest, source: z_stream): Integer; |
107 | function inflateReset(var strm: z_stream): Integer; | 131 | function inflateReset(var strm: z_stream): Integer; |
132 | function inflateReset2(var strm: z_stream; windowBits: Integer): Integer; | ||
133 | function inflatePrime(var strm: z_stream; bits, value: Integer): Integer; | ||
134 | function inflateMark(var strm: z_stream): LongInt; | ||
135 | function inflateGetHeader(var strm: z_stream; var head: gz_header): Integer; | ||
108 | function inflateBackInit(var strm: z_stream; | 136 | function inflateBackInit(var strm: z_stream; |
109 | windowBits: Integer; window: PChar): Integer; | 137 | windowBits: Integer; window: PChar): Integer; |
110 | function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer; | 138 | function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer; |
@@ -124,7 +152,9 @@ function uncompress(dest: PChar; var destLen: LongInt; | |||
124 | 152 | ||
125 | (* checksum functions *) | 153 | (* checksum functions *) |
126 | function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt; | 154 | function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt; |
155 | function adler32_combine(adler1, adler2, len2: LongInt): LongInt; | ||
127 | function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt; | 156 | function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt; |
157 | function crc32_combine(crc1, crc2, len2: LongInt): LongInt; | ||
128 | 158 | ||
129 | (* various hacks, don't look :) *) | 159 | (* various hacks, don't look :) *) |
130 | function deflateInit_(var strm: z_stream; level: Integer; | 160 | function deflateInit_(var strm: z_stream; level: Integer; |
@@ -156,10 +186,12 @@ implementation | |||
156 | {$L zutil.obj} | 186 | {$L zutil.obj} |
157 | 187 | ||
158 | function adler32; external; | 188 | function adler32; external; |
189 | function adler32_combine; external; | ||
159 | function compress; external; | 190 | function compress; external; |
160 | function compress2; external; | 191 | function compress2; external; |
161 | function compressBound; external; | 192 | function compressBound; external; |
162 | function crc32; external; | 193 | function crc32; external; |
194 | function crc32_combine; external; | ||
163 | function deflate; external; | 195 | function deflate; external; |
164 | function deflateBound; external; | 196 | function deflateBound; external; |
165 | function deflateCopy; external; | 197 | function deflateCopy; external; |
@@ -171,15 +203,21 @@ function deflatePending; external; | |||
171 | function deflatePrime; external; | 203 | function deflatePrime; external; |
172 | function deflateReset; external; | 204 | function deflateReset; external; |
173 | function deflateSetDictionary; external; | 205 | function deflateSetDictionary; external; |
206 | function deflateSetHeader; external; | ||
207 | function deflateTune; external; | ||
174 | function inflate; external; | 208 | function inflate; external; |
175 | function inflateBack; external; | 209 | function inflateBack; external; |
176 | function inflateBackEnd; external; | 210 | function inflateBackEnd; external; |
177 | function inflateBackInit_; external; | 211 | function inflateBackInit_; external; |
178 | function inflateCopy; external; | 212 | function inflateCopy; external; |
179 | function inflateEnd; external; | 213 | function inflateEnd; external; |
214 | function inflateGetHeader; external; | ||
180 | function inflateInit_; external; | 215 | function inflateInit_; external; |
181 | function inflateInit2_; external; | 216 | function inflateInit2_; external; |
217 | function inflateMark; external; | ||
218 | function inflatePrime; external; | ||
182 | function inflateReset; external; | 219 | function inflateReset; external; |
220 | function inflateReset2; external; | ||
183 | function inflateSetDictionary; external; | 221 | function inflateSetDictionary; external; |
184 | function inflateSync; external; | 222 | function inflateSync; external; |
185 | function uncompress; external; | 223 | function uncompress; external; |