source: trunk/src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch@ 858

Last change on this file since 858 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 15.9 KB
  • compress.c

    old new  
    5959
    6060/* ===========================================================================
    6161 */
    62 int ZEXPORT compress (dest, destLen, source, sourceLen)
     62int ZEXPORT compress (dest, destLen, source, sourceLen)
    6363    Bytef *dest;
    6464    uLongf *destLen;
    6565    const Bytef *source;
  • gzio.c

    old new  
    205205/* ===========================================================================
    206206     Opens a gzip (.gz) file for reading or writing.
    207207*/
    208 gzFile ZEXPORT gzopen (path, mode)
     208gzFile ZEXPORT gzopen (path, mode)
    209209    const char *path;
    210210    const char *mode;
    211211{
     
    391391     Reads the given number of uncompressed bytes from the compressed file.
    392392   gzread returns the number of bytes actually read (0 for end of file).
    393393*/
    394 int ZEXPORT gzread (file, buf, len)
     394int ZEXPORT gzread (file, buf, len)
    395395    gzFile file;
    396396    voidp buf;
    397397    unsigned len;
     
    600600#ifdef STDC
    601601#include <stdarg.h>
    602602
    603 int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
     603int gzprintf (gzFile file, const char *format, /* args */ ...)
    604604{
    605605    char buf[Z_PRINTF_BUFSIZE];
    606606    va_list va;
     
    634634}
    635635#else /* not ANSI C */
    636636
    637 int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
     637int gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
    638638                       a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
    639639    gzFile file;
    640640    const char *format;
     
    950950     Flushes all pending output if necessary, closes the compressed file
    951951   and deallocates all the (de)compression state.
    952952*/
    953 int ZEXPORT gzclose (file)
     953int ZEXPORT gzclose (file)
    954954    gzFile file;
    955955{
    956956    gz_stream *s = (gz_stream*)file;
  • uncompr.c

    old new  
    2323   enough memory, Z_BUF_ERROR if there was not enough room in the output
    2424   buffer, or Z_DATA_ERROR if the input data was corrupted.
    2525*/
    26 int ZEXPORT uncompress (dest, destLen, source, sourceLen)
     26int ZEXPORT uncompress (dest, destLen, source, sourceLen)
    2727    Bytef *dest;
    2828    uLongf *destLen;
    2929    const Bytef *source;
  • zlib.h

    old new  
    3232#define ZLIB_H
    3333
    3434#include "zconf.h"
     35
    3536
    3637#ifdef __cplusplus
    3738extern "C" {
     
    4041#define ZLIB_VERSION "1.2.3"
    4142#define ZLIB_VERNUM 0x1230
    4243
     44
     45
     46
     47
     48
     49
     50
     51
     52
     53
     54
     55
     56
    4357/*
    4458     The 'zlib' compression library provides in-memory compression and
    4559  decompression functions, including integrity checks of the uncompressed
     
    209223
    210224                        /* basic functions */
    211225
    212 ZEXTERN const char * ZEXPORT zlibVersion OF((void));
     226ZEXTERN zlibVersion OF((void));
    213227/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
    214228   If the first character differs, the library code actually used is
    215229   not compatible with the zlib.h header file used by the application.
     
    239253*/
    240254
    241255
    242 ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
     256ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
    243257/*
    244258    deflate compresses as much data as possible, and stops when the input
    245259  buffer becomes empty or the output buffer becomes full. It may introduce some
     
    325339*/
    326340
    327341
    328 ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
     342ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
    329343/*
    330344     All dynamically allocated data structures for this stream are freed.
    331345   This function discards any unprocessed input and does not flush any
     
    360374*/
    361375
    362376
    363 ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
     377ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
    364378/*
    365379    inflate decompresses as much data as possible, and stops when the input
    366380  buffer becomes empty or the output buffer becomes full. It may introduce
     
    459473*/
    460474
    461475
    462 ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
     476ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
    463477/*
    464478     All dynamically allocated data structures for this stream are freed.
    465479   This function discards any unprocessed input and does not flush any
     
    535549   not perform any compression: this will be done by deflate().
    536550*/
    537551
    538 ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
     552ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
    539553                                             const Bytef *dictionary,
    540554                                             uInt  dictLength));
    541555/*
     
    574588   perform any compression: this will be done by deflate().
    575589*/
    576590
    577 ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
     591ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
    578592                                    z_streamp source));
    579593/*
    580594     Sets the destination stream as a complete copy of the source stream.
     
    592606   destination.
    593607*/
    594608
    595 ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
     609ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
    596610/*
    597611     This function is equivalent to deflateEnd followed by deflateInit,
    598612   but does not free and reallocate all the internal compression state.
     
    603617   stream state was inconsistent (such as zalloc or state being NULL).
    604618*/
    605619
    606 ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
     620ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
    607621                                      int level,
    608622                                      int strategy));
    609623/*
     
    733747   and avail_out are unchanged.)
    734748*/
    735749
    736 ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
     750ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
    737751                                             const Bytef *dictionary,
    738752                                             uInt  dictLength));
    739753/*
     
    755769   inflate().
    756770*/
    757771
    758 ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
     772ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
    759773/*
    760774    Skips invalid compressed data until a full flush point (see above the
    761775  description of deflate with Z_FULL_FLUSH) can be found, or until all
     
    786800   destination.
    787801*/
    788802
    789 ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
     803ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
    790804/*
    791805     This function is equivalent to inflateEnd followed by inflateInit,
    792806   but does not free and reallocate all the internal decompression state.
     
    10061020   utility functions can easily be modified if you need special options.
    10071021*/
    10081022
    1009 ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
     1023ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
    10101024                                 const Bytef *source, uLong sourceLen));
    10111025/*
    10121026     Compresses the source buffer into the destination buffer.  sourceLen is
     
    10211035   buffer.
    10221036*/
    10231037
    1024 ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
     1038ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
    10251039                                  const Bytef *source, uLong sourceLen,
    10261040                                  int level));
    10271041/*
     
    10441058   a compress() or compress2() call to allocate the destination buffer.
    10451059*/
    10461060
    1047 ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
     1061ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
    10481062                                   const Bytef *source, uLong sourceLen));
    10491063/*
    10501064     Decompresses the source buffer into the destination buffer.  sourceLen is
     
    10651079
    10661080typedef voidp gzFile;
    10671081
    1068 ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
     1082ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
    10691083/*
    10701084     Opens a gzip (.gz) file for reading or writing. The mode parameter
    10711085   is as in fopen ("rb" or "wb") but can also include a compression level
     
    10821096   can be checked to distinguish the two cases (if errno is zero, the
    10831097   zlib error is Z_MEM_ERROR).  */
    10841098
    1085 ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
     1099ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
    10861100/*
    10871101     gzdopen() associates a gzFile with the file descriptor fd.  File
    10881102   descriptors are obtained from calls like open, dup, creat, pipe or
     
    10951109   the (de)compression state.
    10961110*/
    10971111
    1098 ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
     1112ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
    10991113/*
    11001114     Dynamically update the compression level or strategy. See the description
    11011115   of deflateInit2 for the meaning of these parameters.
     
    11031117   opened for writing.
    11041118*/
    11051119
    1106 ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
     1120ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
    11071121/*
    11081122     Reads the given number of uncompressed bytes from the compressed file.
    11091123   If the input file was not in gzip format, gzread copies the given number
     
    11111125     gzread returns the number of uncompressed bytes actually read (0 for
    11121126   end of file, -1 for error). */
    11131127
    1114 ZEXTERN int ZEXPORT    gzwrite OF((gzFile file,
     1128ZEXTERN int ZEXPORT    gzwrite OF((gzFile file,
    11151129                                   voidpc buf, unsigned len));
    11161130/*
    11171131     Writes the given number of uncompressed bytes into the compressed file.
     
    11191133   (0 in case of error).
    11201134*/
    11211135
    1122 ZEXTERN int ZEXPORTVA  gzprintf OF((gzFile file, const char *format, ...));
     1136ZEXTERN int gzprintf OF((gzFile file, const char *format, ...));
    11231137/*
    11241138     Converts, formats, and writes the args to the compressed file under
    11251139   control of the format string, as in fprintf. gzprintf returns the number of
     
    11321146   because the secure snprintf() or vsnprintf() functions were not available.
    11331147*/
    11341148
    1135 ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
     1149ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
    11361150/*
    11371151      Writes the given null-terminated string to the compressed file, excluding
    11381152   the terminating null character.
    11391153      gzputs returns the number of characters written, or -1 in case of error.
    11401154*/
    11411155
    1142 ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
     1156ZEXTERN gzgets OF((gzFile file, char *buf, int len));
    11431157/*
    11441158      Reads bytes from the compressed file until len-1 characters are read, or
    11451159   a newline character is read and transferred to buf, or an end-of-file
     
    11481162      gzgets returns buf, or Z_NULL in case of error.
    11491163*/
    11501164
    1151 ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
     1165ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
    11521166/*
    11531167      Writes c, converted to an unsigned char, into the compressed file.
    11541168   gzputc returns the value that was written, or -1 in case of error.
    11551169*/
    11561170
    1157 ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
     1171ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
    11581172/*
    11591173      Reads one byte from the compressed file. gzgetc returns this byte
    11601174   or -1 in case of end of file or error.
     
    11701184   or gzrewind().
    11711185*/
    11721186
    1173 ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
     1187ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
    11741188/*
    11751189     Flushes all pending output into the compressed file. The parameter
    11761190   flush is as in the deflate() function. The return value is the zlib
     
    11801194   degrade compression.
    11811195*/
    11821196
    1183 ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
     1197ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
    11841198                                      z_off_t offset, int whence));
    11851199/*
    11861200      Sets the starting position for the next gzread or gzwrite on the
     
    11981212   would be before the current position.
    11991213*/
    12001214
    1201 ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
     1215ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
    12021216/*
    12031217     Rewinds the given file. This function is supported only for reading.
    12041218
    12051219   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
    12061220*/
    12071221
    1208 ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
     1222ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
    12091223/*
    12101224     Returns the starting position for the next gzread or gzwrite on the
    12111225   given compressed file. This position represents a number of bytes in the
     
    12141228   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
    12151229*/
    12161230
    1217 ZEXTERN int ZEXPORT gzeof OF((gzFile file));
     1231ZEXTERN int ZEXPORT gzeof OF((gzFile file));
    12181232/*
    12191233     Returns 1 when EOF has previously been detected reading the given
    12201234   input stream, otherwise zero.
     
    12261240   zero.
    12271241*/
    12281242
    1229 ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
     1243ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
    12301244/*
    12311245     Flushes all pending output if necessary, closes the compressed file
    12321246   and deallocates all the (de)compression state. The return value is the zlib
    12331247   error number (see function gzerror below).
    12341248*/
    12351249
    1236 ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
     1250ZEXTERN gzerror OF((gzFile file, int *errnum));
    12371251/*
    12381252     Returns the error message for the last error which occurred on the
    12391253   given compressed file. errnum is set to zlib error number. If an
     
    12571271   compression library.
    12581272*/
    12591273
    1260 ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
     1274ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
    12611275/*
    12621276     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
    12631277   return the updated checksum. If buf is NULL, this function returns
     
    12821296   seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
    12831297*/
    12841298
    1285 ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
     1299ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
    12861300/*
    12871301     Update a running CRC-32 with the bytes buf[0..len-1] and return the
    12881302   updated CRC-32. If buf is NULL, this function returns the required initial
     
    13141328/* deflateInit and inflateInit are macros to allow checking the zlib version
    13151329 * and the compiler's view of z_stream:
    13161330 */
    1317 ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
     1331ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
    13181332                                     const char *version, int stream_size));
    1319 ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
     1333ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
    13201334                                     const char *version, int stream_size));
    1321 ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
     1335ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
    13221336                                      int windowBits, int memLevel,
    13231337                                      int strategy, const char *version,
    13241338                                      int stream_size));
    1325 ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
     1339ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
    13261340                                      const char *version, int stream_size));
    13271341ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
    13281342                                         unsigned char FAR *window,
     
    13461360    struct internal_state {int dummy;}; /* hack for buggy compilers */
    13471361#endif
    13481362
    1349 ZEXTERN const char   * ZEXPORT zError           OF((int));
    1350 ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
    1351 ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
     1363ZEXTERN zError           OF((int));
     1364ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
     1365ZEXTERN get_crc_table    OF((void));
    13521366
    13531367#ifdef __cplusplus
    13541368}
Note: See TracBrowser for help on using the repository browser.