aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2012-01-15 20:46:53 -0800
committerMark Adler <madler@alumni.caltech.edu>2012-01-16 16:44:40 -0800
commitc3799a24809a5b335710a101ef975e90c52743bb (patch)
tree805df5bd508d3f50e82bff290336ed84e5627857
parent0ddfbd2346cc23ffbcea9a0c491e5da39cf743d2 (diff)
downloadzlib-c3799a24809a5b335710a101ef975e90c52743bb.tar.gz
zlib-c3799a24809a5b335710a101ef975e90c52743bb.tar.bz2
zlib-c3799a24809a5b335710a101ef975e90c52743bb.zip
Update the Pascal interface in contrib/pascal.
-rw-r--r--contrib/pascal/zlibpas.pas38
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
12const 12const
13 ZLIB_VERSION = '1.2.6'; 13 ZLIB_VERSION = '1.2.6';
14 ZLIB_VERNUM = $1260;
14 15
15type 16type
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 *)
49const 67const
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;
96function deflateCopy(var dest, source: z_stream): Integer; 118function deflateCopy(var dest, source: z_stream): Integer;
97function deflateReset(var strm: z_stream): Integer; 119function deflateReset(var strm: z_stream): Integer;
98function deflateParams(var strm: z_stream; level, strategy: Integer): Integer; 120function deflateParams(var strm: z_stream; level, strategy: Integer): Integer;
121function deflateTune(var strm: z_stream; good_length, max_lazy, nice_length, max_chain: Integer): Integer;
99function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt; 122function deflateBound(var strm: z_stream; sourceLen: LongInt): LongInt;
100function deflatePending(var strm: z_stream; var pending: Integer; var bits: Integer): Integer; 123function deflatePending(var strm: z_stream; var pending: Integer; var bits: Integer): Integer;
101function deflatePrime(var strm: z_stream; bits, value: Integer): Integer; 124function deflatePrime(var strm: z_stream; bits, value: Integer): Integer;
125function deflateSetHeader(var strm: z_stream; head: gz_header): Integer;
102function inflateInit2(var strm: z_stream; windowBits: Integer): Integer; 126function inflateInit2(var strm: z_stream; windowBits: Integer): Integer;
103function inflateSetDictionary(var strm: z_stream; const dictionary: PChar; 127function inflateSetDictionary(var strm: z_stream; const dictionary: PChar;
104 dictLength: Integer): Integer; 128 dictLength: Integer): Integer;
105function inflateSync(var strm: z_stream): Integer; 129function inflateSync(var strm: z_stream): Integer;
106function inflateCopy(var dest, source: z_stream): Integer; 130function inflateCopy(var dest, source: z_stream): Integer;
107function inflateReset(var strm: z_stream): Integer; 131function inflateReset(var strm: z_stream): Integer;
132function inflateReset2(var strm: z_stream; windowBits: Integer): Integer;
133function inflatePrime(var strm: z_stream; bits, value: Integer): Integer;
134function inflateMark(var strm: z_stream): LongInt;
135function inflateGetHeader(var strm: z_stream; var head: gz_header): Integer;
108function inflateBackInit(var strm: z_stream; 136function inflateBackInit(var strm: z_stream;
109 windowBits: Integer; window: PChar): Integer; 137 windowBits: Integer; window: PChar): Integer;
110function inflateBack(var strm: z_stream; in_fn: in_func; in_desc: Pointer; 138function 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 *)
126function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt; 154function adler32(adler: LongInt; const buf: PChar; len: Integer): LongInt;
155function adler32_combine(adler1, adler2, len2: LongInt): LongInt;
127function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt; 156function crc32(crc: LongInt; const buf: PChar; len: Integer): LongInt;
157function crc32_combine(crc1, crc2, len2: LongInt): LongInt;
128 158
129(* various hacks, don't look :) *) 159(* various hacks, don't look :) *)
130function deflateInit_(var strm: z_stream; level: Integer; 160function deflateInit_(var strm: z_stream; level: Integer;
@@ -156,10 +186,12 @@ implementation
156{$L zutil.obj} 186{$L zutil.obj}
157 187
158function adler32; external; 188function adler32; external;
189function adler32_combine; external;
159function compress; external; 190function compress; external;
160function compress2; external; 191function compress2; external;
161function compressBound; external; 192function compressBound; external;
162function crc32; external; 193function crc32; external;
194function crc32_combine; external;
163function deflate; external; 195function deflate; external;
164function deflateBound; external; 196function deflateBound; external;
165function deflateCopy; external; 197function deflateCopy; external;
@@ -171,15 +203,21 @@ function deflatePending; external;
171function deflatePrime; external; 203function deflatePrime; external;
172function deflateReset; external; 204function deflateReset; external;
173function deflateSetDictionary; external; 205function deflateSetDictionary; external;
206function deflateSetHeader; external;
207function deflateTune; external;
174function inflate; external; 208function inflate; external;
175function inflateBack; external; 209function inflateBack; external;
176function inflateBackEnd; external; 210function inflateBackEnd; external;
177function inflateBackInit_; external; 211function inflateBackInit_; external;
178function inflateCopy; external; 212function inflateCopy; external;
179function inflateEnd; external; 213function inflateEnd; external;
214function inflateGetHeader; external;
180function inflateInit_; external; 215function inflateInit_; external;
181function inflateInit2_; external; 216function inflateInit2_; external;
217function inflateMark; external;
218function inflatePrime; external;
182function inflateReset; external; 219function inflateReset; external;
220function inflateReset2; external;
183function inflateSetDictionary; external; 221function inflateSetDictionary; external;
184function inflateSync; external; 222function inflateSync; external;
185function uncompress; external; 223function uncompress; external;