diff options
Diffstat (limited to 'zlib.h')
-rw-r--r-- | zlib.h | 152 |
1 files changed, 86 insertions, 66 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* zlib.h -- interface of the 'zlib' general purpose compression library | 1 | /* zlib.h -- interface of the 'zlib' general purpose compression library |
2 | version 1.0.8, Jan 27th, 1998 | 2 | version 1.0.9, Feb 16th, 1998 |
3 | 3 | ||
4 | Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler | 4 | Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler |
5 | 5 | ||
@@ -37,7 +37,7 @@ extern "C" { | |||
37 | 37 | ||
38 | #include "zconf.h" | 38 | #include "zconf.h" |
39 | 39 | ||
40 | #define ZLIB_VERSION "1.0.8" | 40 | #define ZLIB_VERSION "1.0.9" |
41 | 41 | ||
42 | /* | 42 | /* |
43 | The 'zlib' compression library provides in-memory compression and | 43 | The 'zlib' compression library provides in-memory compression and |
@@ -101,6 +101,9 @@ typedef z_stream FAR *z_streamp; | |||
101 | opaque value. | 101 | opaque value. |
102 | 102 | ||
103 | zalloc must return Z_NULL if there is not enough memory for the object. | 103 | zalloc must return Z_NULL if there is not enough memory for the object. |
104 | If zlib is used in a multi-threaded application, zalloc and zfree must be | ||
105 | thread safe. | ||
106 | |||
104 | On 16-bit systems, the functions zalloc and zfree must be able to allocate | 107 | On 16-bit systems, the functions zalloc and zfree must be able to allocate |
105 | exactly 65536 bytes, but will not be required to allocate more than this | 108 | exactly 65536 bytes, but will not be required to allocate more than this |
106 | if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, | 109 | if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, |
@@ -165,7 +168,7 @@ typedef z_stream FAR *z_streamp; | |||
165 | 168 | ||
166 | /* basic functions */ | 169 | /* basic functions */ |
167 | 170 | ||
168 | extern const char * EXPORT zlibVersion OF((void)); | 171 | extern const char * ZEXPORT zlibVersion OF((void)); |
169 | /* The application can compare zlibVersion and ZLIB_VERSION for consistency. | 172 | /* The application can compare zlibVersion and ZLIB_VERSION for consistency. |
170 | If the first character differs, the library code actually used is | 173 | If the first character differs, the library code actually used is |
171 | not compatible with the zlib.h header file used by the application. | 174 | not compatible with the zlib.h header file used by the application. |
@@ -173,7 +176,7 @@ extern const char * EXPORT zlibVersion OF((void)); | |||
173 | */ | 176 | */ |
174 | 177 | ||
175 | /* | 178 | /* |
176 | extern int EXPORT deflateInit OF((z_streamp strm, int level)); | 179 | extern int ZEXPORT deflateInit OF((z_streamp strm, int level)); |
177 | 180 | ||
178 | Initializes the internal stream state for compression. The fields | 181 | Initializes the internal stream state for compression. The fields |
179 | zalloc, zfree and opaque must be initialized before by the caller. | 182 | zalloc, zfree and opaque must be initialized before by the caller. |
@@ -195,7 +198,7 @@ extern int EXPORT deflateInit OF((z_streamp strm, int level)); | |||
195 | */ | 198 | */ |
196 | 199 | ||
197 | 200 | ||
198 | extern int EXPORT deflate OF((z_streamp strm, int flush)); | 201 | extern int ZEXPORT deflate OF((z_streamp strm, int flush)); |
199 | /* | 202 | /* |
200 | deflate compresses as much data as possible, and stops when the input | 203 | deflate compresses as much data as possible, and stops when the input |
201 | buffer becomes empty or the output buffer becomes full. It may introduce some | 204 | buffer becomes empty or the output buffer becomes full. It may introduce some |
@@ -272,7 +275,7 @@ extern int EXPORT deflate OF((z_streamp strm, int flush)); | |||
272 | */ | 275 | */ |
273 | 276 | ||
274 | 277 | ||
275 | extern int EXPORT deflateEnd OF((z_streamp strm)); | 278 | extern int ZEXPORT deflateEnd OF((z_streamp strm)); |
276 | /* | 279 | /* |
277 | All dynamically allocated data structures for this stream are freed. | 280 | All dynamically allocated data structures for this stream are freed. |
278 | This function discards any unprocessed input and does not flush any | 281 | This function discards any unprocessed input and does not flush any |
@@ -287,7 +290,7 @@ extern int EXPORT deflateEnd OF((z_streamp strm)); | |||
287 | 290 | ||
288 | 291 | ||
289 | /* | 292 | /* |
290 | extern int EXPORT inflateInit OF((z_streamp strm)); | 293 | extern int ZEXPORT inflateInit OF((z_streamp strm)); |
291 | 294 | ||
292 | Initializes the internal stream state for decompression. The fields | 295 | Initializes the internal stream state for decompression. The fields |
293 | next_in, avail_in, zalloc, zfree and opaque must be initialized before by | 296 | next_in, avail_in, zalloc, zfree and opaque must be initialized before by |
@@ -307,7 +310,7 @@ extern int EXPORT inflateInit OF((z_streamp strm)); | |||
307 | */ | 310 | */ |
308 | 311 | ||
309 | 312 | ||
310 | extern int EXPORT inflate OF((z_streamp strm, int flush)); | 313 | extern int ZEXPORT inflate OF((z_streamp strm, int flush)); |
311 | /* | 314 | /* |
312 | inflate decompresses as much data as possible, and stops when the input | 315 | inflate decompresses as much data as possible, and stops when the input |
313 | buffer becomes empty or the output buffer becomes full. It may some | 316 | buffer becomes empty or the output buffer becomes full. It may some |
@@ -376,7 +379,7 @@ extern int EXPORT inflate OF((z_streamp strm, int flush)); | |||
376 | */ | 379 | */ |
377 | 380 | ||
378 | 381 | ||
379 | extern int EXPORT inflateEnd OF((z_streamp strm)); | 382 | extern int ZEXPORT inflateEnd OF((z_streamp strm)); |
380 | /* | 383 | /* |
381 | All dynamically allocated data structures for this stream are freed. | 384 | All dynamically allocated data structures for this stream are freed. |
382 | This function discards any unprocessed input and does not flush any | 385 | This function discards any unprocessed input and does not flush any |
@@ -394,12 +397,12 @@ extern int EXPORT inflateEnd OF((z_streamp strm)); | |||
394 | */ | 397 | */ |
395 | 398 | ||
396 | /* | 399 | /* |
397 | extern int EXPORT deflateInit2 OF((z_streamp strm, | 400 | extern int ZEXPORT deflateInit2 OF((z_streamp strm, |
398 | int level, | 401 | int level, |
399 | int method, | 402 | int method, |
400 | int windowBits, | 403 | int windowBits, |
401 | int memLevel, | 404 | int memLevel, |
402 | int strategy)); | 405 | int strategy)); |
403 | 406 | ||
404 | This is another version of deflateInit with more compression options. The | 407 | This is another version of deflateInit with more compression options. The |
405 | fields next_in, zalloc, zfree and opaque must be initialized before by | 408 | fields next_in, zalloc, zfree and opaque must be initialized before by |
@@ -437,9 +440,9 @@ extern int EXPORT deflateInit2 OF((z_streamp strm, | |||
437 | not perform any compression: this will be done by deflate(). | 440 | not perform any compression: this will be done by deflate(). |
438 | */ | 441 | */ |
439 | 442 | ||
440 | extern int EXPORT deflateSetDictionary OF((z_streamp strm, | 443 | extern int ZEXPORT deflateSetDictionary OF((z_streamp strm, |
441 | const Bytef *dictionary, | 444 | const Bytef *dictionary, |
442 | uInt dictLength)); | 445 | uInt dictLength)); |
443 | /* | 446 | /* |
444 | Initializes the compression dictionary from the given byte sequence | 447 | Initializes the compression dictionary from the given byte sequence |
445 | without producing any compressed output. This function must be called | 448 | without producing any compressed output. This function must be called |
@@ -473,8 +476,8 @@ extern int EXPORT deflateSetDictionary OF((z_streamp strm, | |||
473 | perform any compression: this will be done by deflate(). | 476 | perform any compression: this will be done by deflate(). |
474 | */ | 477 | */ |
475 | 478 | ||
476 | extern int EXPORT deflateCopy OF((z_streamp dest, | 479 | extern int ZEXPORT deflateCopy OF((z_streamp dest, |
477 | z_streamp source)); | 480 | z_streamp source)); |
478 | /* | 481 | /* |
479 | Sets the destination stream as a complete copy of the source stream. | 482 | Sets the destination stream as a complete copy of the source stream. |
480 | 483 | ||
@@ -491,7 +494,7 @@ extern int EXPORT deflateCopy OF((z_streamp dest, | |||
491 | destination. | 494 | destination. |
492 | */ | 495 | */ |
493 | 496 | ||
494 | extern int EXPORT deflateReset OF((z_streamp strm)); | 497 | extern int ZEXPORT deflateReset OF((z_streamp strm)); |
495 | /* | 498 | /* |
496 | This function is equivalent to deflateEnd followed by deflateInit, | 499 | This function is equivalent to deflateEnd followed by deflateInit, |
497 | but does not free and reallocate all the internal compression state. | 500 | but does not free and reallocate all the internal compression state. |
@@ -502,7 +505,7 @@ extern int EXPORT deflateReset OF((z_streamp strm)); | |||
502 | stream state was inconsistent (such as zalloc or state being NULL). | 505 | stream state was inconsistent (such as zalloc or state being NULL). |
503 | */ | 506 | */ |
504 | 507 | ||
505 | extern int EXPORT deflateParams OF((z_streamp strm, int level, int strategy)); | 508 | extern int ZEXPORT deflateParams OF((z_streamp strm, int level, int strategy)); |
506 | /* | 509 | /* |
507 | Dynamically update the compression level and compression strategy. The | 510 | Dynamically update the compression level and compression strategy. The |
508 | interpretation of level and strategy is as in deflateInit2. This can be | 511 | interpretation of level and strategy is as in deflateInit2. This can be |
@@ -522,8 +525,8 @@ extern int EXPORT deflateParams OF((z_streamp strm, int level, int strategy)); | |||
522 | */ | 525 | */ |
523 | 526 | ||
524 | /* | 527 | /* |
525 | extern int EXPORT inflateInit2 OF((z_streamp strm, | 528 | extern int ZEXPORT inflateInit2 OF((z_streamp strm, |
526 | int windowBits)); | 529 | int windowBits)); |
527 | 530 | ||
528 | This is another version of inflateInit with an extra parameter. The | 531 | This is another version of inflateInit with an extra parameter. The |
529 | fields next_in, avail_in, zalloc, zfree and opaque must be initialized | 532 | fields next_in, avail_in, zalloc, zfree and opaque must be initialized |
@@ -544,9 +547,9 @@ extern int EXPORT inflateInit2 OF((z_streamp strm, | |||
544 | modified, but next_out and avail_out are unchanged.) | 547 | modified, but next_out and avail_out are unchanged.) |
545 | */ | 548 | */ |
546 | 549 | ||
547 | extern int EXPORT inflateSetDictionary OF((z_streamp strm, | 550 | extern int ZEXPORT inflateSetDictionary OF((z_streamp strm, |
548 | const Bytef *dictionary, | 551 | const Bytef *dictionary, |
549 | uInt dictLength)); | 552 | uInt dictLength)); |
550 | /* | 553 | /* |
551 | Initializes the decompression dictionary from the given uncompressed byte | 554 | Initializes the decompression dictionary from the given uncompressed byte |
552 | sequence. This function must be called immediately after a call of inflate | 555 | sequence. This function must be called immediately after a call of inflate |
@@ -563,7 +566,7 @@ extern int EXPORT inflateSetDictionary OF((z_streamp strm, | |||
563 | inflate(). | 566 | inflate(). |
564 | */ | 567 | */ |
565 | 568 | ||
566 | extern int EXPORT inflateSync OF((z_streamp strm)); | 569 | extern int ZEXPORT inflateSync OF((z_streamp strm)); |
567 | /* | 570 | /* |
568 | Skips invalid compressed data until a full flush point (see above the | 571 | Skips invalid compressed data until a full flush point (see above the |
569 | description of deflate with Z_FULL_FLUSH) can be found, or until all | 572 | description of deflate with Z_FULL_FLUSH) can be found, or until all |
@@ -578,7 +581,7 @@ extern int EXPORT inflateSync OF((z_streamp strm)); | |||
578 | until success or end of the input data. | 581 | until success or end of the input data. |
579 | */ | 582 | */ |
580 | 583 | ||
581 | extern int EXPORT inflateReset OF((z_streamp strm)); | 584 | extern int ZEXPORT inflateReset OF((z_streamp strm)); |
582 | /* | 585 | /* |
583 | This function is equivalent to inflateEnd followed by inflateInit, | 586 | This function is equivalent to inflateEnd followed by inflateInit, |
584 | but does not free and reallocate all the internal decompression state. | 587 | but does not free and reallocate all the internal decompression state. |
@@ -599,8 +602,8 @@ extern int EXPORT inflateReset OF((z_streamp strm)); | |||
599 | utility functions can easily be modified if you need special options. | 602 | utility functions can easily be modified if you need special options. |
600 | */ | 603 | */ |
601 | 604 | ||
602 | extern int EXPORT compress OF((Bytef *dest, uLongf *destLen, | 605 | extern int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, |
603 | const Bytef *source, uLong sourceLen)); | 606 | const Bytef *source, uLong sourceLen)); |
604 | /* | 607 | /* |
605 | Compresses the source buffer into the destination buffer. sourceLen is | 608 | Compresses the source buffer into the destination buffer. sourceLen is |
606 | the byte length of the source buffer. Upon entry, destLen is the total | 609 | the byte length of the source buffer. Upon entry, destLen is the total |
@@ -614,9 +617,9 @@ extern int EXPORT compress OF((Bytef *dest, uLongf *destLen, | |||
614 | buffer. | 617 | buffer. |
615 | */ | 618 | */ |
616 | 619 | ||
617 | extern int EXPORT compress2 OF((Bytef *dest, uLongf *destLen, | 620 | extern int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, |
618 | const Bytef *source, uLong sourceLen, | 621 | const Bytef *source, uLong sourceLen, |
619 | int level)); | 622 | int level)); |
620 | /* | 623 | /* |
621 | Compresses the source buffer into the destination buffer. The level | 624 | Compresses the source buffer into the destination buffer. The level |
622 | parameter has the same meaning as in deflateInit. sourceLen is the byte | 625 | parameter has the same meaning as in deflateInit. sourceLen is the byte |
@@ -629,8 +632,8 @@ extern int EXPORT compress2 OF((Bytef *dest, uLongf *destLen, | |||
629 | Z_STREAM_ERROR if the level parameter is invalid. | 632 | Z_STREAM_ERROR if the level parameter is invalid. |
630 | */ | 633 | */ |
631 | 634 | ||
632 | extern int EXPORT uncompress OF((Bytef *dest, uLongf *destLen, | 635 | extern int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, |
633 | const Bytef *source, uLong sourceLen)); | 636 | const Bytef *source, uLong sourceLen)); |
634 | /* | 637 | /* |
635 | Decompresses the source buffer into the destination buffer. sourceLen is | 638 | Decompresses the source buffer into the destination buffer. sourceLen is |
636 | the byte length of the source buffer. Upon entry, destLen is the total | 639 | the byte length of the source buffer. Upon entry, destLen is the total |
@@ -650,7 +653,7 @@ extern int EXPORT uncompress OF((Bytef *dest, uLongf *destLen, | |||
650 | 653 | ||
651 | typedef voidp gzFile; | 654 | typedef voidp gzFile; |
652 | 655 | ||
653 | extern gzFile EXPORT gzopen OF((const char *path, const char *mode)); | 656 | extern gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); |
654 | /* | 657 | /* |
655 | Opens a gzip (.gz) file for reading or writing. The mode parameter | 658 | Opens a gzip (.gz) file for reading or writing. The mode parameter |
656 | is as in fopen ("rb" or "wb") but can also include a compression level | 659 | is as in fopen ("rb" or "wb") but can also include a compression level |
@@ -666,7 +669,7 @@ extern gzFile EXPORT gzopen OF((const char *path, const char *mode)); | |||
666 | can be checked to distinguish the two cases (if errno is zero, the | 669 | can be checked to distinguish the two cases (if errno is zero, the |
667 | zlib error is Z_MEM_ERROR). */ | 670 | zlib error is Z_MEM_ERROR). */ |
668 | 671 | ||
669 | extern gzFile EXPORT gzdopen OF((int fd, const char *mode)); | 672 | extern gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); |
670 | /* | 673 | /* |
671 | gzdopen() associates a gzFile with the file descriptor fd. File | 674 | gzdopen() associates a gzFile with the file descriptor fd. File |
672 | descriptors are obtained from calls like open, dup, creat, pipe or | 675 | descriptors are obtained from calls like open, dup, creat, pipe or |
@@ -679,7 +682,7 @@ extern gzFile EXPORT gzdopen OF((int fd, const char *mode)); | |||
679 | the (de)compression state. | 682 | the (de)compression state. |
680 | */ | 683 | */ |
681 | 684 | ||
682 | extern int EXPORT gzsetparams OF((gzFile file, int level, int strategy)); | 685 | extern int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); |
683 | /* | 686 | /* |
684 | Dynamically update the compression level or strategy. See the description | 687 | Dynamically update the compression level or strategy. See the description |
685 | of deflateInit2 for the meaning of these parameters. | 688 | of deflateInit2 for the meaning of these parameters. |
@@ -687,7 +690,7 @@ extern int EXPORT gzsetparams OF((gzFile file, int level, int strategy)); | |||
687 | opened for writing. | 690 | opened for writing. |
688 | */ | 691 | */ |
689 | 692 | ||
690 | extern int EXPORT gzread OF((gzFile file, voidp buf, unsigned len)); | 693 | extern int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); |
691 | /* | 694 | /* |
692 | Reads the given number of uncompressed bytes from the compressed file. | 695 | Reads the given number of uncompressed bytes from the compressed file. |
693 | If the input file was not in gzip format, gzread copies the given number | 696 | If the input file was not in gzip format, gzread copies the given number |
@@ -695,33 +698,49 @@ extern int EXPORT gzread OF((gzFile file, voidp buf, unsigned len)); | |||
695 | gzread returns the number of uncompressed bytes actually read (0 for | 698 | gzread returns the number of uncompressed bytes actually read (0 for |
696 | end of file, -1 for error). */ | 699 | end of file, -1 for error). */ |
697 | 700 | ||
698 | extern int EXPORT gzwrite OF((gzFile file, const voidp buf, unsigned len)); | 701 | extern int ZEXPORT gzwrite OF((gzFile file, const voidp buf, unsigned len)); |
699 | /* | 702 | /* |
700 | Writes the given number of uncompressed bytes into the compressed file. | 703 | Writes the given number of uncompressed bytes into the compressed file. |
701 | gzwrite returns the number of uncompressed bytes actually written | 704 | gzwrite returns the number of uncompressed bytes actually written |
702 | (0 in case of error). | 705 | (0 in case of error). |
703 | */ | 706 | */ |
704 | 707 | ||
705 | extern int EXPORTVA gzprintf OF((gzFile file, const char *format, ...)); | 708 | extern int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); |
706 | /* | 709 | /* |
707 | Converts, formats, and writes the args to the compressed file under | 710 | Converts, formats, and writes the args to the compressed file under |
708 | control of the format string, as in fprintf. gzprintf returns the number of | 711 | control of the format string, as in fprintf. gzprintf returns the number of |
709 | uncompressed bytes actually written (0 in case of error). | 712 | uncompressed bytes actually written (0 in case of error). |
710 | */ | 713 | */ |
711 | 714 | ||
712 | extern int EXPORT gzputc OF((gzFile file, int c)); | 715 | extern int ZEXPORT gzputs OF((gzFile file, const char *s)); |
716 | /* | ||
717 | Writes the given null-terminated string to the compressed file, excluding | ||
718 | the terminating null character. | ||
719 | gzputs returns the number of characters written, or -1 in case of error. | ||
720 | */ | ||
721 | |||
722 | extern char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); | ||
723 | /* | ||
724 | Reads bytes from the compressed file until len-1 characters are read, or | ||
725 | a newline character is read and transferred to buf, or an end-of-file | ||
726 | condition is encountered. The string is then terminated with a null | ||
727 | character. | ||
728 | gzgets returns buf, or Z_NULL in case of error. | ||
729 | */ | ||
730 | |||
731 | extern int ZEXPORT gzputc OF((gzFile file, int c)); | ||
713 | /* | 732 | /* |
714 | Writes c, converted to an unsigned char, into the compressed file. | 733 | Writes c, converted to an unsigned char, into the compressed file. |
715 | gzputc returns the value that was written, or -1 in case of error. | 734 | gzputc returns the value that was written, or -1 in case of error. |
716 | */ | 735 | */ |
717 | 736 | ||
718 | extern int EXPORT gzgetc OF((gzFile file)); | 737 | extern int ZEXPORT gzgetc OF((gzFile file)); |
719 | /* | 738 | /* |
720 | Reads one byte from the compressed file. gzgetc returns this byte | 739 | Reads one byte from the compressed file. gzgetc returns this byte |
721 | or -1 in case of end of file or error. | 740 | or -1 in case of end of file or error. |
722 | */ | 741 | */ |
723 | 742 | ||
724 | extern int EXPORT gzflush OF((gzFile file, int flush)); | 743 | extern int ZEXPORT gzflush OF((gzFile file, int flush)); |
725 | /* | 744 | /* |
726 | Flushes all pending output into the compressed file. The parameter | 745 | Flushes all pending output into the compressed file. The parameter |
727 | flush is as in the deflate() function. The return value is the zlib | 746 | flush is as in the deflate() function. The return value is the zlib |
@@ -731,7 +750,7 @@ extern int EXPORT gzflush OF((gzFile file, int flush)); | |||
731 | degrade compression. | 750 | degrade compression. |
732 | */ | 751 | */ |
733 | 752 | ||
734 | extern z_off_t EXPORT gzseek OF((gzFile file, z_off_t offset, int whence)); | 753 | extern z_off_t ZEXPORT gzseek OF((gzFile file, z_off_t offset, int whence)); |
735 | /* | 754 | /* |
736 | Sets the starting position for the next gzread or gzwrite on the given | 755 | Sets the starting position for the next gzread or gzwrite on the given |
737 | compressed file. The offset represents a number of bytes in the | 756 | compressed file. The offset represents a number of bytes in the |
@@ -748,14 +767,14 @@ extern z_off_t EXPORT gzseek OF((gzFile file, z_off_t offset, int whence)); | |||
748 | would be before the current position. | 767 | would be before the current position. |
749 | */ | 768 | */ |
750 | 769 | ||
751 | extern int EXPORT gzrewind OF((gzFile file)); | 770 | extern int ZEXPORT gzrewind OF((gzFile file)); |
752 | /* | 771 | /* |
753 | Rewinds the given file. This function is supported only for reading. | 772 | Rewinds the given file. This function is supported only for reading. |
754 | 773 | ||
755 | gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) | 774 | gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) |
756 | */ | 775 | */ |
757 | 776 | ||
758 | extern z_off_t EXPORT gztell OF((gzFile file)); | 777 | extern z_off_t ZEXPORT gztell OF((gzFile file)); |
759 | /* | 778 | /* |
760 | Returns the starting position for the next gzread or gzwrite on the | 779 | Returns the starting position for the next gzread or gzwrite on the |
761 | given compressed file. This position represents a number of bytes in the | 780 | given compressed file. This position represents a number of bytes in the |
@@ -764,20 +783,20 @@ extern z_off_t EXPORT gztell OF((gzFile file)); | |||
764 | gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) | 783 | gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) |
765 | */ | 784 | */ |
766 | 785 | ||
767 | extern int EXPORT gzeof OF((gzFile file)); | 786 | extern int ZEXPORT gzeof OF((gzFile file)); |
768 | /* | 787 | /* |
769 | Returns 1 when EOF has previously been detected reading the given | 788 | Returns 1 when EOF has previously been detected reading the given |
770 | input stream, otherwise zero. | 789 | input stream, otherwise zero. |
771 | */ | 790 | */ |
772 | 791 | ||
773 | extern int EXPORT gzclose OF((gzFile file)); | 792 | extern int ZEXPORT gzclose OF((gzFile file)); |
774 | /* | 793 | /* |
775 | Flushes all pending output if necessary, closes the compressed file | 794 | Flushes all pending output if necessary, closes the compressed file |
776 | and deallocates all the (de)compression state. The return value is the zlib | 795 | and deallocates all the (de)compression state. The return value is the zlib |
777 | error number (see function gzerror below). | 796 | error number (see function gzerror below). |
778 | */ | 797 | */ |
779 | 798 | ||
780 | extern const char * EXPORT gzerror OF((gzFile file, int *errnum)); | 799 | extern const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); |
781 | /* | 800 | /* |
782 | Returns the error message for the last error which occurred on the | 801 | Returns the error message for the last error which occurred on the |
783 | given compressed file. errnum is set to zlib error number. If an | 802 | given compressed file. errnum is set to zlib error number. If an |
@@ -794,7 +813,7 @@ extern const char * EXPORT gzerror OF((gzFile file, int *errnum)); | |||
794 | compression library. | 813 | compression library. |
795 | */ | 814 | */ |
796 | 815 | ||
797 | extern uLong EXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); | 816 | extern uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); |
798 | 817 | ||
799 | /* | 818 | /* |
800 | Update a running Adler-32 checksum with the bytes buf[0..len-1] and | 819 | Update a running Adler-32 checksum with the bytes buf[0..len-1] and |
@@ -811,7 +830,7 @@ extern uLong EXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); | |||
811 | if (adler != original_adler) error(); | 830 | if (adler != original_adler) error(); |
812 | */ | 831 | */ |
813 | 832 | ||
814 | extern uLong EXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); | 833 | extern uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); |
815 | /* | 834 | /* |
816 | Update a running crc with the bytes buf[0..len-1] and return the updated | 835 | Update a running crc with the bytes buf[0..len-1] and return the updated |
817 | crc. If buf is NULL, this function returns the required initial value | 836 | crc. If buf is NULL, this function returns the required initial value |
@@ -833,22 +852,23 @@ extern uLong EXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); | |||
833 | /* deflateInit and inflateInit are macros to allow checking the zlib version | 852 | /* deflateInit and inflateInit are macros to allow checking the zlib version |
834 | * and the compiler's view of z_stream: | 853 | * and the compiler's view of z_stream: |
835 | */ | 854 | */ |
836 | extern int EXPORT deflateInit_ OF((z_streamp strm, int level, | 855 | extern int ZEXPORT deflateInit_ OF((z_streamp strm, int level, |
837 | const char *version, int stream_size)); | 856 | const char *version, int stream_size)); |
838 | extern int EXPORT inflateInit_ OF((z_streamp strm, | 857 | extern int ZEXPORT inflateInit_ OF((z_streamp strm, |
839 | const char *version, int stream_size)); | 858 | const char *version, int stream_size)); |
840 | extern int EXPORT deflateInit2_ OF((z_streamp strm, int level, int method, | 859 | extern int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, |
841 | int windowBits, int memLevel, int strategy, | 860 | int windowBits, int memLevel, |
842 | const char *version, int stream_size)); | 861 | int strategy, const char *version, |
843 | extern int EXPORT inflateInit2_ OF((z_streamp strm, int windowBits, | 862 | int stream_size)); |
844 | const char *version, int stream_size)); | 863 | extern int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, |
864 | const char *version, int stream_size)); | ||
845 | #define deflateInit(strm, level) \ | 865 | #define deflateInit(strm, level) \ |
846 | deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) | 866 | deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) |
847 | #define inflateInit(strm) \ | 867 | #define inflateInit(strm) \ |
848 | inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) | 868 | inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) |
849 | #define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ | 869 | #define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ |
850 | deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ | 870 | deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ |
851 | (strategy), ZLIB_VERSION, sizeof(z_stream)) | 871 | (strategy), ZLIB_VERSION, sizeof(z_stream)) |
852 | #define inflateInit2(strm, windowBits) \ | 872 | #define inflateInit2(strm, windowBits) \ |
853 | inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) | 873 | inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) |
854 | 874 | ||
@@ -857,9 +877,9 @@ extern int EXPORT inflateInit2_ OF((z_streamp strm, int windowBits, | |||
857 | struct internal_state {int dummy;}; /* hack for buggy compilers */ | 877 | struct internal_state {int dummy;}; /* hack for buggy compilers */ |
858 | #endif | 878 | #endif |
859 | 879 | ||
860 | extern const char * EXPORT zError OF((int err)); | 880 | extern const char * ZEXPORT zError OF((int err)); |
861 | extern int EXPORT inflateSyncPoint OF((z_streamp z)); | 881 | extern int ZEXPORT inflateSyncPoint OF((z_streamp z)); |
862 | extern const uLongf * EXPORT get_crc_table OF((void)); | 882 | extern const uLongf * ZEXPORT get_crc_table OF((void)); |
863 | 883 | ||
864 | #ifdef __cplusplus | 884 | #ifdef __cplusplus |
865 | } | 885 | } |