diff options
| -rw-r--r-- | os400/zlibfree.inc | 582 |
1 files changed, 582 insertions, 0 deletions
diff --git a/os400/zlibfree.inc b/os400/zlibfree.inc new file mode 100644 index 00000000..5ae31baf --- /dev/null +++ b/os400/zlibfree.inc | |||
| @@ -0,0 +1,582 @@ | |||
| 1 | **free | ||
| 2 | // ZLIB.INC - Interface to the general purpose compression library | ||
| 3 | |||
| 4 | // ILE RPG400 version by Patrick Monnerat, DATASPHERE. | ||
| 5 | // Version 1.3.1.1 | ||
| 6 | |||
| 7 | |||
| 8 | // WARNING: | ||
| 9 | // Procedures inflateInit(), inflateInit2(), deflateInit(), | ||
| 10 | // deflateInit2() and inflateBackInit() need to be called with | ||
| 11 | // two additional arguments: | ||
| 12 | // the package version string and the stream control structure. | ||
| 13 | // size. This is needed because RPG lacks some macro feature. | ||
| 14 | // Call these procedures as: | ||
| 15 | // inflateInit(...: ZLIB_VERSION: %size(z_stream)) | ||
| 16 | |||
| 17 | /if not defined(ZLIB_H_) | ||
| 18 | /define ZLIB_H_ | ||
| 19 | |||
| 20 | //************************************************************************* | ||
| 21 | // Constants | ||
| 22 | //************************************************************************* | ||
| 23 | |||
| 24 | // Versioning information. | ||
| 25 | |||
| 26 | Dcl-C ZLIB_VERSION '1.3.1.1'; | ||
| 27 | Dcl-C ZLIB_VERNUM X'12A0'; | ||
| 28 | Dcl-C ZLIB_VER_MAJOR 1; | ||
| 29 | Dcl-C ZLIB_VER_MINOR 3; | ||
| 30 | Dcl-C ZLIB_VER_REVISION 1; | ||
| 31 | Dcl-C ZLIB_VER_SUBREVISION 1; | ||
| 32 | |||
| 33 | // Other equates. | ||
| 34 | |||
| 35 | Dcl-C Z_NO_FLUSH 0; | ||
| 36 | Dcl-C Z_PARTIAL_FLUSH 1; | ||
| 37 | Dcl-C Z_SYNC_FLUSH 2; | ||
| 38 | Dcl-C Z_FULL_FLUSH 3; | ||
| 39 | Dcl-C Z_FINISH 4; | ||
| 40 | Dcl-C Z_BLOCK 5; | ||
| 41 | Dcl-C Z_TREES 6; | ||
| 42 | |||
| 43 | Dcl-C Z_OK 0; | ||
| 44 | Dcl-C Z_STREAM_END 1; | ||
| 45 | Dcl-C Z_NEED_DICT 2; | ||
| 46 | Dcl-C Z_ERRNO -1; | ||
| 47 | Dcl-C Z_STREAM_ERROR -2; | ||
| 48 | Dcl-C Z_DATA_ERROR -3; | ||
| 49 | Dcl-C Z_MEM_ERROR -4; | ||
| 50 | Dcl-C Z_BUF_ERROR -5; | ||
| 51 | Dcl-C Z_VERSION_ERROR -6; | ||
| 52 | |||
| 53 | Dcl-C Z_NO_COMPRESSION 0; | ||
| 54 | Dcl-C Z_BEST_SPEED 1; | ||
| 55 | Dcl-C Z_BEST_COMPRESSION 9; | ||
| 56 | Dcl-C Z_DEFAULT_COMPRESSION -1; | ||
| 57 | |||
| 58 | Dcl-C Z_FILTERED 1; | ||
| 59 | Dcl-C Z_HUFFMAN_ONLY 2; | ||
| 60 | Dcl-C Z_RLE 3; | ||
| 61 | Dcl-C Z_DEFAULT_STRATEGY 0; | ||
| 62 | |||
| 63 | Dcl-C Z_BINARY 0; | ||
| 64 | Dcl-C Z_ASCII 1; | ||
| 65 | Dcl-C Z_UNKNOWN 2; | ||
| 66 | |||
| 67 | Dcl-C Z_DEFLATED 8; | ||
| 68 | |||
| 69 | Dcl-C Z_NULL 0; | ||
| 70 | |||
| 71 | //************************************************************************* | ||
| 72 | // Types | ||
| 73 | //************************************************************************* | ||
| 74 | |||
| 75 | Dcl-S z_streamp Pointer; // Stream struct ptr | ||
| 76 | Dcl-S gzFile Pointer; // File pointer | ||
| 77 | Dcl-S gz_headerp Pointer; | ||
| 78 | Dcl-S z_off_t Int(10); // Stream offsets | ||
| 79 | Dcl-S z_off64_t Int(20); // Stream offsets | ||
| 80 | |||
| 81 | //************************************************************************* | ||
| 82 | // Structures | ||
| 83 | //************************************************************************* | ||
| 84 | |||
| 85 | // The GZIP encode/decode stream support structure. | ||
| 86 | |||
| 87 | Dcl-Ds z_stream Align Based(z_streamp); | ||
| 88 | zs_next_in Pointer; // Next input byte | ||
| 89 | zs_avail_in Uns(10); // Byte cnt at next_in | ||
| 90 | zs_total_in Uns(10); // Total bytes read | ||
| 91 | zs_next_out Pointer; // Output buffer ptr | ||
| 92 | zs_avail_out Uns(10); // Room left @ next_out | ||
| 93 | zs_total_out Uns(10); // Total bytes written | ||
| 94 | zs_msg Pointer; // Last errmsg or null | ||
| 95 | zs_state Pointer; // Internal state | ||
| 96 | zs_zalloc Pointer(*PROC); // Int. state allocator | ||
| 97 | zs_free Pointer(*PROC); // Int. state dealloc. | ||
| 98 | zs_opaque Pointer; // Private alloc. data | ||
| 99 | zs_data_type Int(10); // ASC/BIN best guess | ||
| 100 | zs_adler Uns(10); // Uncompr. adler32 val | ||
| 101 | *N Uns(10); // Reserved | ||
| 102 | *N Uns(10); // Ptr. alignment | ||
| 103 | End-Ds; | ||
| 104 | |||
| 105 | //************************************************************************* | ||
| 106 | // Utility function prototypes | ||
| 107 | //************************************************************************* | ||
| 108 | |||
| 109 | Dcl-Pr compress Int(10) Extproc('compress'); | ||
| 110 | dest Char(65535) Options(*VARSIZE); // Destination buffer | ||
| 111 | destLen Uns(10); // Destination length | ||
| 112 | source Char(65535) Const Options(*VARSIZE); // Source buffer | ||
| 113 | sourceLen Uns(10) Value; // Source length | ||
| 114 | End-Pr; | ||
| 115 | |||
| 116 | Dcl-Pr compress2 Int(10) Extproc('compress2'); | ||
| 117 | dest Char(65535) Options(*VARSIZE); // Destination buffer | ||
| 118 | destLen Uns(10); // Destination length | ||
| 119 | source Char(65535) Const Options(*VARSIZE); // Source buffer | ||
| 120 | sourceLen Uns(10) Value; // Source length | ||
| 121 | level Int(10) Value; // Compression level | ||
| 122 | End-Pr; | ||
| 123 | |||
| 124 | Dcl-Pr compressBound Uns(10) Extproc('compressBound'); | ||
| 125 | sourceLen Uns(10) Value; | ||
| 126 | End-Pr; | ||
| 127 | |||
| 128 | Dcl-Pr uncompress Int(10) Extproc('uncompress'); | ||
| 129 | dest Char(65535) Options(*VARSIZE); // Destination buffer | ||
| 130 | destLen Uns(10); // Destination length | ||
| 131 | source Char(65535) Const Options(*VARSIZE); // Source buffer | ||
| 132 | sourceLen Uns(10) Value; // Source length | ||
| 133 | End-Pr; | ||
| 134 | |||
| 135 | Dcl-Pr uncompress2 Int(10) Extproc('uncompress2'); | ||
| 136 | dest Char(65535) Options(*VARSIZE); // Destination buffer | ||
| 137 | destLen Uns(10); // Destination length | ||
| 138 | source Char(65535) Const Options(*VARSIZE); // Source buffer | ||
| 139 | sourceLen Uns(10); // Source length | ||
| 140 | End-Pr; | ||
| 141 | |||
| 142 | /if not defined(LARGE_FILES) | ||
| 143 | Dcl-Pr gzopen Extproc('gzopen') Like(gzFile); | ||
| 144 | path Pointer Value Options(*STRING); // File pathname | ||
| 145 | mode Pointer Value Options(*STRING); // Open mode | ||
| 146 | End-Pr; | ||
| 147 | /else | ||
| 148 | Dcl-Pr gzopen Extproc('gzopen64') Like(gzFile); | ||
| 149 | path Pointer Value Options(*STRING); // File pathname | ||
| 150 | mode Pointer Value Options(*STRING); // Open mode | ||
| 151 | End-Pr; | ||
| 152 | |||
| 153 | Dcl-Pr gzopen64 Extproc('gzopen64') Like(gzFile); | ||
| 154 | path Pointer Value Options(*STRING); // File pathname | ||
| 155 | mode Pointer Value Options(*STRING); // Open mode | ||
| 156 | End-Pr; | ||
| 157 | /endif | ||
| 158 | |||
| 159 | Dcl-Pr gzdopen Extproc('gzdopen') Like(gzFile); | ||
| 160 | fd Int(10) Value; // File descriptor | ||
| 161 | mode Pointer Value Options(*STRING); // Open mode | ||
| 162 | End-Pr; | ||
| 163 | |||
| 164 | Dcl-Pr gzbuffer Int(10) Extproc('gzbuffer'); | ||
| 165 | file Value Like(gzFile); // File pointer | ||
| 166 | size Uns(10) Value; | ||
| 167 | End-Pr; | ||
| 168 | |||
| 169 | Dcl-Pr gzsetparams Int(10) Extproc('gzsetparams'); | ||
| 170 | file Value Like(gzFile); // File pointer | ||
| 171 | level Int(10) Value; | ||
| 172 | strategy Int(10) Value; | ||
| 173 | End-Pr; | ||
| 174 | |||
| 175 | Dcl-Pr gzread Int(10) Extproc('gzread'); | ||
| 176 | file Value Like(gzFile); // File pointer | ||
| 177 | buf Char(65535) Options(*VARSIZE); // Buffer | ||
| 178 | len Uns(10) Value; // Buffer length | ||
| 179 | End-Pr; | ||
| 180 | |||
| 181 | Dcl-Pr gzfread Int(20) Extproc('gzfread'); | ||
| 182 | buf Char(65535) Options(*VARSIZE); // Buffer | ||
| 183 | size Uns(20) Value; // Buffer length | ||
| 184 | nitems Uns(20) Value; // Buffer length | ||
| 185 | file Value Like(gzFile); // File pointer | ||
| 186 | End-Pr; | ||
| 187 | |||
| 188 | Dcl-Pr gzwrite Int(10) Extproc('gzwrite'); | ||
| 189 | file Value Like(gzFile); // File pointer | ||
| 190 | buf Char(65535) Const Options(*VARSIZE); // Buffer | ||
| 191 | len Uns(10) Value; // Buffer length | ||
| 192 | End-Pr; | ||
| 193 | |||
| 194 | Dcl-Pr gzfwrite Int(20) Extproc('gzfwrite'); | ||
| 195 | buf Char(65535) Options(*VARSIZE); // Buffer | ||
| 196 | size Uns(20) Value; // Buffer length | ||
| 197 | nitems Uns(20) Value; // Buffer length | ||
| 198 | file Value Like(gzFile); // File pointer | ||
| 199 | End-Pr; | ||
| 200 | |||
| 201 | Dcl-Pr gzputs Int(10) Extproc('gzputs'); | ||
| 202 | file Value Like(gzFile); // File pointer | ||
| 203 | s Pointer Value Options(*STRING); // String to output | ||
| 204 | End-Pr; | ||
| 205 | |||
| 206 | Dcl-Pr gzgets Pointer Extproc('gzgets'); | ||
| 207 | file Value Like(gzFile); // File pointer | ||
| 208 | buf Char(65535) Options(*VARSIZE); // Read buffer | ||
| 209 | len Int(10) Value; // Buffer length | ||
| 210 | End-Pr; | ||
| 211 | |||
| 212 | Dcl-Pr gzputc Int(10) Extproc('gzputc'); | ||
| 213 | file Value Like(gzFile); // File pointer | ||
| 214 | c Int(10) Value; // Character to write | ||
| 215 | End-Pr; | ||
| 216 | |||
| 217 | Dcl-Pr gzgetc Int(10) Extproc('gzgetc'); | ||
| 218 | file Value Like(gzFile); // File pointer | ||
| 219 | End-Pr; | ||
| 220 | |||
| 221 | Dcl-Pr gzgetc_ Int(10) Extproc('gzgetc_'); | ||
| 222 | file Value Like(gzFile); // File pointer | ||
| 223 | End-Pr; | ||
| 224 | |||
| 225 | Dcl-Pr gzungetc Int(10) Extproc('gzungetc'); | ||
| 226 | c Int(10) Value; // Character to push | ||
| 227 | file Value Like(gzFile); // File pointer | ||
| 228 | End-Pr; | ||
| 229 | |||
| 230 | Dcl-Pr gzflush Int(10) Extproc('gzflush'); | ||
| 231 | file Value Like(gzFile); // File pointer | ||
| 232 | flush Int(10) Value; // Type of flush | ||
| 233 | End-Pr; | ||
| 234 | |||
| 235 | /if not defined(LARGE_FILES) | ||
| 236 | Dcl-Pr gzseek Extproc('gzseek') Like(z_off_t); | ||
| 237 | file Value Like(gzFile); // File pointer | ||
| 238 | offset Value Like(z_off_t); // Offset | ||
| 239 | whence Int(10) Value; // Origin | ||
| 240 | End-Pr; | ||
| 241 | /else | ||
| 242 | Dcl-Pr gzseek Extproc('gzseek64') Like(z_off_t); | ||
| 243 | file Value Like(gzFile); // File pointer | ||
| 244 | offset Value Like(z_off_t); // Offset | ||
| 245 | whence Int(10) Value; // Origin | ||
| 246 | End-Pr; | ||
| 247 | |||
| 248 | Dcl-Pr gzseek64 Extproc('gzseek64') Like(z_off64_t); | ||
| 249 | file Value Like(gzFile); // File pointer | ||
| 250 | offset Value Like(z_off64_t); // Offset | ||
| 251 | whence Int(10) Value; // Origin | ||
| 252 | End-Pr; | ||
| 253 | /endif | ||
| 254 | |||
| 255 | Dcl-Pr gzrewind Int(10) Extproc('gzrewind'); | ||
| 256 | file Value Like(gzFile); // File pointer | ||
| 257 | End-Pr; | ||
| 258 | |||
| 259 | /if not defined(LARGE_FILES) | ||
| 260 | Dcl-Pr gztell Extproc('gztell') Like(z_off_t); | ||
| 261 | file Value Like(gzFile); // File pointer | ||
| 262 | End-Pr; | ||
| 263 | /else | ||
| 264 | Dcl-Pr gztell Extproc('gztell64') Like(z_off_t); | ||
| 265 | file Value Like(gzFile); // File pointer | ||
| 266 | End-Pr; | ||
| 267 | |||
| 268 | Dcl-Pr gztell64 Extproc('gztell64') Like(z_off64_t); | ||
| 269 | file Value Like(gzFile); // File pointer | ||
| 270 | End-Pr; | ||
| 271 | /endif | ||
| 272 | |||
| 273 | /if not defined(LARGE_FILES) | ||
| 274 | Dcl-Pr gzoffset Extproc('gzoffset') Like(z_off_t); | ||
| 275 | file Value Like(gzFile); // File pointer | ||
| 276 | End-Pr; | ||
| 277 | /else | ||
| 278 | Dcl-Pr gzoffset Extproc('gzoffset64') Like(z_off_t); | ||
| 279 | file Value Like(gzFile); // File pointer | ||
| 280 | End-Pr; | ||
| 281 | |||
| 282 | Dcl-Pr gzoffset64 Extproc('gzoffset64') Like(z_off64_t); | ||
| 283 | file Value Like(gzFile); // File pointer | ||
| 284 | End-Pr; | ||
| 285 | /endif | ||
| 286 | |||
| 287 | Dcl-Pr gzeof Int(10) Extproc('gzeof'); | ||
| 288 | file Value Like(gzFile); // File pointer | ||
| 289 | End-Pr; | ||
| 290 | |||
| 291 | Dcl-Pr gzdirect Int(10) Extproc('gzdirect'); | ||
| 292 | file Value Like(gzFile); // File pointer | ||
| 293 | End-Pr; | ||
| 294 | |||
| 295 | Dcl-Pr gzclose_r Int(10) Extproc('gzclose_r'); | ||
| 296 | file Value Like(gzFile); // File pointer | ||
| 297 | End-Pr; | ||
| 298 | |||
| 299 | Dcl-Pr gzclose_w Int(10) Extproc('gzclose_w'); | ||
| 300 | file Value Like(gzFile); // File pointer | ||
| 301 | End-Pr; | ||
| 302 | |||
| 303 | Dcl-Pr gzclose Int(10) Extproc('gzclose'); | ||
| 304 | file Value Like(gzFile); // File pointer | ||
| 305 | End-Pr; | ||
| 306 | |||
| 307 | Dcl-Pr gzerror Pointer Extproc('gzerror'); // Error string | ||
| 308 | file Value Like(gzFile); // File pointer | ||
| 309 | errnum Int(10); // Error code | ||
| 310 | End-Pr; | ||
| 311 | |||
| 312 | Dcl-Pr gzclearerr Extproc('gzclearerr'); | ||
| 313 | file Value Like(gzFile); // File pointer | ||
| 314 | End-Pr; | ||
| 315 | |||
| 316 | //************************************************************************* | ||
| 317 | // Basic function prototypes | ||
| 318 | //************************************************************************* | ||
| 319 | |||
| 320 | Dcl-Pr zlibVersion Pointer Extproc('zlibVersion'); // Version string | ||
| 321 | End-Pr; | ||
| 322 | |||
| 323 | Dcl-Pr deflateInit Int(10) Extproc('deflateInit_'); // Init. compression | ||
| 324 | strm Like(z_stream); // Compression stream | ||
| 325 | level Int(10) Value; // Compression level | ||
| 326 | version Pointer Value Options(*STRING); // Version string | ||
| 327 | stream_size Int(10) Value; // Stream struct. size | ||
| 328 | End-Pr; | ||
| 329 | |||
| 330 | Dcl-Pr deflate Int(10) Extproc('deflate'); // Compress data | ||
| 331 | strm Like(z_stream); // Compression stream | ||
| 332 | flush Int(10) Value; // Flush type required | ||
| 333 | End-Pr; | ||
| 334 | |||
| 335 | Dcl-Pr deflateEnd Int(10) Extproc('deflateEnd'); // Termin. compression | ||
| 336 | strm Like(z_stream); // Compression stream | ||
| 337 | End-Pr; | ||
| 338 | |||
| 339 | Dcl-Pr inflateInit Int(10) Extproc('inflateInit_'); // Init. expansion | ||
| 340 | strm Like(z_stream); // Expansion stream | ||
| 341 | version Pointer Value Options(*STRING); // Version string | ||
| 342 | stream_size Int(10) Value; // Stream struct. size | ||
| 343 | End-Pr; | ||
| 344 | |||
| 345 | Dcl-Pr inflate Int(10) Extproc('inflate'); // Expand data | ||
| 346 | strm Like(z_stream); // Expansion stream | ||
| 347 | flush Int(10) Value; // Flush type required | ||
| 348 | End-Pr; | ||
| 349 | |||
| 350 | Dcl-Pr inflateEnd Int(10) Extproc('inflateEnd'); // Termin. expansion | ||
| 351 | strm Like(z_stream); // Expansion stream | ||
| 352 | End-Pr; | ||
| 353 | |||
| 354 | //************************************************************************* | ||
| 355 | // Advanced function prototypes | ||
| 356 | //************************************************************************* | ||
| 357 | |||
| 358 | Dcl-Pr deflateInit2 Int(10) Extproc('deflateInit2_'); // Init. compression | ||
| 359 | strm Like(z_stream); // Compression stream | ||
| 360 | level Int(10) Value; // Compression level | ||
| 361 | method Int(10) Value; // Compression method | ||
| 362 | windowBits Int(10) Value; // log2(window size) | ||
| 363 | memLevel Int(10) Value; // Mem/cmpress tradeoff | ||
| 364 | strategy Int(10) Value; // Compression strategy | ||
| 365 | version Pointer Value Options(*STRING); // Version string | ||
| 366 | stream_size Int(10) Value; // Stream struct. size | ||
| 367 | End-Pr; | ||
| 368 | |||
| 369 | Dcl-Pr deflateSetDictionary Int(10) Extproc('deflateSetDictionary'); // Init. dictionary | ||
| 370 | strm Like(z_stream); // Compression stream | ||
| 371 | dictionary Char(65535) Const Options(*VARSIZE); // Dictionary bytes | ||
| 372 | dictLength Uns(10) Value; // Dictionary length | ||
| 373 | End-Pr; | ||
| 374 | |||
| 375 | Dcl-Pr deflateCopy Int(10) Extproc('deflateCopy'); // Compress strm 2 strm | ||
| 376 | dest Like(z_stream); // Destination stream | ||
| 377 | source Like(z_stream); // Source stream | ||
| 378 | End-Pr; | ||
| 379 | |||
| 380 | Dcl-Pr deflateReset Int(10) Extproc('deflateReset'); // End and init. stream | ||
| 381 | strm Like(z_stream); // Compression stream | ||
| 382 | End-Pr; | ||
| 383 | |||
| 384 | Dcl-Pr deflateParams Int(10) Extproc('deflateParams'); // Change level & strat | ||
| 385 | strm Like(z_stream); // Compression stream | ||
| 386 | level Int(10) Value; // Compression level | ||
| 387 | strategy Int(10) Value; // Compression strategy | ||
| 388 | End-Pr; | ||
| 389 | |||
| 390 | Dcl-Pr deflateTune Int(10) Extproc('deflateTune'); | ||
| 391 | strm Like(z_stream); // Compression stream | ||
| 392 | good Int(10) Value; | ||
| 393 | lazy Int(10) Value; | ||
| 394 | nice Int(10) Value; | ||
| 395 | chain_ Int(10) Value; | ||
| 396 | End-Pr; | ||
| 397 | |||
| 398 | Dcl-Pr deflateBound Uns(10) Extproc('deflateBound'); // Change level & strat | ||
| 399 | strm Like(z_stream); // Compression stream | ||
| 400 | sourcelen Uns(10) Value; // Compression level | ||
| 401 | End-Pr; | ||
| 402 | |||
| 403 | Dcl-Pr deflatePending Int(10) Extproc('deflatePending'); // Change level & strat | ||
| 404 | strm Like(z_stream); // Compression stream | ||
| 405 | pending Uns(10); // Pending bytes | ||
| 406 | bits Int(10); // Pending bits | ||
| 407 | End-Pr; | ||
| 408 | |||
| 409 | Dcl-Pr deflateUsed Int(10) Extproc('deflateUsed'); // Get used bits | ||
| 410 | strm Like(z_stream); // Compression stream | ||
| 411 | bits Int(10); // Used bits | ||
| 412 | End-Pr; | ||
| 413 | |||
| 414 | Dcl-Pr deflatePrime Int(10) Extproc('deflatePrime'); // Change level & strat | ||
| 415 | strm Like(z_stream); // Compression stream | ||
| 416 | bits Int(10) Value; // # of bits to insert | ||
| 417 | value Int(10) Value; // Bits to insert | ||
| 418 | End-Pr; | ||
| 419 | |||
| 420 | Dcl-Pr inflateInit2 Int(10) Extproc('inflateInit2_'); // Init. expansion | ||
| 421 | strm Like(z_stream); // Expansion stream | ||
| 422 | windowBits Int(10) Value; // log2(window size) | ||
| 423 | version Pointer Value Options(*STRING); // Version string | ||
| 424 | stream_size Int(10) Value; // Stream struct. size | ||
| 425 | End-Pr; | ||
| 426 | |||
| 427 | Dcl-Pr inflateSetDictionary Int(10) Extproc('inflateSetDictionary'); // Init. dictionary | ||
| 428 | strm Like(z_stream); // Expansion stream | ||
| 429 | dictionary Char(65535) Const Options(*VARSIZE); // Dictionary bytes | ||
| 430 | dictLength Uns(10) Value; // Dictionary length | ||
| 431 | End-Pr; | ||
| 432 | |||
| 433 | Dcl-Pr inflateGetDictionary Int(10) Extproc('inflateGetDictionary'); // Get dictionary | ||
| 434 | strm Like(z_stream); // Expansion stream | ||
| 435 | dictionary Char(65535) Options(*VARSIZE); // Dictionary bytes | ||
| 436 | dictLength Uns(10); // Dictionary length | ||
| 437 | End-Pr; | ||
| 438 | |||
| 439 | Dcl-Pr deflateGetDictionary Int(10) Extproc('deflateGetDictionary'); // Get dictionary | ||
| 440 | strm Like(z_stream); // Expansion stream | ||
| 441 | dictionary Char(65535) Options(*VARSIZE); // Dictionary bytes | ||
| 442 | dictLength Uns(10); // Dictionary length | ||
| 443 | End-Pr; | ||
| 444 | |||
| 445 | Dcl-Pr inflateSync Int(10) Extproc('inflateSync'); // Sync. expansion | ||
| 446 | strm Like(z_stream); // Expansion stream | ||
| 447 | End-Pr; | ||
| 448 | |||
| 449 | Dcl-Pr inflateCopy Int(10) Extproc('inflateCopy'); | ||
| 450 | dest Like(z_stream); // Destination stream | ||
| 451 | source Like(z_stream); // Source stream | ||
| 452 | End-Pr; | ||
| 453 | |||
| 454 | Dcl-Pr inflateReset Int(10) Extproc('inflateReset'); // End and init. stream | ||
| 455 | strm Like(z_stream); // Expansion stream | ||
| 456 | End-Pr; | ||
| 457 | |||
| 458 | Dcl-Pr inflateReset2 Int(10) Extproc('inflateReset2'); // End and init. stream | ||
| 459 | strm Like(z_stream); // Expansion stream | ||
| 460 | windowBits Int(10) Value; // Log2(buffer size) | ||
| 461 | End-Pr; | ||
| 462 | |||
| 463 | Dcl-Pr inflatePrime Int(10) Extproc('inflatePrime'); // Insert bits | ||
| 464 | strm Like(z_stream); // Expansion stream | ||
| 465 | bits Int(10) Value; // Bit count | ||
| 466 | value Int(10) Value; // Bits to insert | ||
| 467 | End-Pr; | ||
| 468 | |||
| 469 | Dcl-Pr inflateMark Int(10) Extproc('inflateMark'); // Get inflate info | ||
| 470 | strm Like(z_stream); // Expansion stream | ||
| 471 | End-Pr; | ||
| 472 | |||
| 473 | Dcl-Pr inflateCodesUsed Uns(20) Extproc('inflateCodesUsed'); | ||
| 474 | strm Like(z_stream); // Expansion stream | ||
| 475 | End-Pr; | ||
| 476 | |||
| 477 | Dcl-Pr inflateValidate Uns(20) Extproc('inflateValidate'); | ||
| 478 | strm Like(z_stream); // Expansion stream | ||
| 479 | check Int(10) Value; | ||
| 480 | End-Pr; | ||
| 481 | |||
| 482 | Dcl-Pr inflateGetHeader Uns(10) Extproc('inflateGetHeader'); | ||
| 483 | strm Like(z_stream); // Expansion stream | ||
| 484 | head Like(GZ_HEADERP); | ||
| 485 | End-Pr; | ||
| 486 | |||
| 487 | Dcl-Pr deflateSetHeader Uns(10) Extproc('deflateSetHeader'); | ||
| 488 | strm Like(z_stream); // Expansion stream | ||
| 489 | head Like(GZ_HEADERP); | ||
| 490 | End-Pr; | ||
| 491 | |||
| 492 | Dcl-Pr inflateBackInit Int(10) Extproc('inflateBackInit_'); | ||
| 493 | strm Like(z_stream); // Expansion stream | ||
| 494 | windowBits Int(10) Value; // Log2(buffer size) | ||
| 495 | window Char(65535) Options(*VARSIZE); // Buffer | ||
| 496 | version Pointer Value Options(*STRING); // Version string | ||
| 497 | stream_size Int(10) Value; // Stream struct. size | ||
| 498 | End-Pr; | ||
| 499 | |||
| 500 | Dcl-Pr inflateBack Int(10) Extproc('inflateBack'); | ||
| 501 | strm Like(z_stream); // Expansion stream | ||
| 502 | in_ Pointer(*PROC) Value; // Input function | ||
| 503 | in_desc Pointer Value; // Input descriptor | ||
| 504 | out_ Pointer(*PROC) Value; // Output function | ||
| 505 | out_desc Pointer Value; // Output descriptor | ||
| 506 | End-Pr; | ||
| 507 | |||
| 508 | Dcl-Pr inflateBackEnd Int(10) Extproc('inflateBackend'); | ||
| 509 | strm Like(z_stream); // Expansion stream | ||
| 510 | End-Pr; | ||
| 511 | |||
| 512 | Dcl-Pr zlibCompileFlags Uns(10) Extproc('zlibCompileFlags') End-Pr; | ||
| 513 | |||
| 514 | //************************************************************************* | ||
| 515 | // Checksum function prototypes | ||
| 516 | //************************************************************************* | ||
| 517 | |||
| 518 | Dcl-Pr adler32 Uns(10) Extproc('adler32'); // New checksum | ||
| 519 | adler Uns(10) Value; // Old checksum | ||
| 520 | buf Char(65535) Const Options(*VARSIZE); // Bytes to accumulate | ||
| 521 | len Uns(10) Value; // Buffer length | ||
| 522 | End-Pr; | ||
| 523 | |||
| 524 | Dcl-Pr adler32_combine Uns(10) Extproc('adler32_combine'); // New checksum | ||
| 525 | adler1 Uns(10) Value; // Old checksum | ||
| 526 | adler2 Uns(10) Value; // Old checksum | ||
| 527 | len2 Uns(20) Value; // Buffer length | ||
| 528 | End-Pr; | ||
| 529 | |||
| 530 | Dcl-Pr adler32_z Uns(10) Extproc('adler32_z'); // New checksum | ||
| 531 | adler Uns(10) Value; // Old checksum | ||
| 532 | buf Char(65535) Const Options(*VARSIZE); // Bytes to accumulate | ||
| 533 | len Uns(20) Value; // Buffer length | ||
| 534 | End-Pr; | ||
| 535 | |||
| 536 | Dcl-Pr crc32 Uns(10) Extproc('crc32'); // New checksum | ||
| 537 | crc Uns(10) Value; // Old checksum | ||
| 538 | buf Char(65535) Const Options(*VARSIZE); // Bytes to accumulate | ||
| 539 | len Uns(10) Value; // Buffer length | ||
| 540 | End-Pr; | ||
| 541 | |||
| 542 | Dcl-Pr crc32_combine Uns(10) Extproc('crc32_combine'); // New checksum | ||
| 543 | crc1 Uns(10) Value; // Old checksum | ||
| 544 | crc2 Uns(10) Value; // Old checksum | ||
| 545 | len2 Uns(20) Value; // Buffer length | ||
| 546 | End-Pr; | ||
| 547 | |||
| 548 | Dcl-Pr crc32_z Uns(10) Extproc('crc32_z'); // New checksum | ||
| 549 | crc Uns(10) Value; // Old checksum | ||
| 550 | buf Char(65535) Const Options(*VARSIZE); // Bytes to accumulate | ||
| 551 | len Uns(20) Value; // Buffer length | ||
| 552 | End-Pr; | ||
| 553 | |||
| 554 | //************************************************************************* | ||
| 555 | // Miscellaneous function prototypes | ||
| 556 | //************************************************************************* | ||
| 557 | |||
| 558 | Dcl-Pr zError Pointer Extproc('zError'); // Error string | ||
| 559 | err Int(10) Value; // Error code | ||
| 560 | End-Pr; | ||
| 561 | |||
| 562 | Dcl-Pr inflateSyncPoint Int(10) Extproc('inflateSyncPoint'); | ||
| 563 | strm Like(z_stream); // Expansion stream | ||
| 564 | End-Pr; | ||
| 565 | |||
| 566 | Dcl-Pr get_crc_table Pointer Extproc('get_crc_table'); // Ptr to ulongs | ||
| 567 | End-Pr; | ||
| 568 | |||
| 569 | Dcl-Pr inflateUndermine Int(10) Extproc('inflateUndermine'); | ||
| 570 | strm Like(z_stream); // Expansion stream | ||
| 571 | arg Int(10) Value; // Error code | ||
| 572 | End-Pr; | ||
| 573 | |||
| 574 | Dcl-Pr inflateResetKeep Int(10) Extproc('inflateResetKeep'); // End and init. stream | ||
| 575 | strm Like(z_stream); // Expansion stream | ||
| 576 | End-Pr; | ||
| 577 | |||
| 578 | Dcl-Pr deflateResetKeep Int(10) Extproc('deflateResetKeep'); // End and init. stream | ||
| 579 | strm Like(z_stream); // Expansion stream | ||
| 580 | End-Pr; | ||
| 581 | |||
| 582 | /endif | ||
