Main Page   Class Hierarchy   Compound List   File List   Compound Members  

zconf.h

00001 /* zconf.h -- configuration of the zlib compression library
00002  * Copyright (C) 1995-1998 Jean-loup Gailly.
00003  * For conditions of distribution and use, see copyright notice in zlib.h 
00004  */
00005 
00006 #ifndef _ZCONF_H
00007 #define _ZCONF_H
00008 
00009 /*
00010  * If you *really* need a unique prefix for all types and library functions,
00011  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
00012  */
00013 #ifdef Z_PREFIX
00014 #  define deflateInit_  z_deflateInit_
00015 #  define deflate       z_deflate
00016 #  define deflateEnd    z_deflateEnd
00017 #  define inflateInit_  z_inflateInit_
00018 #  define inflate       z_inflate
00019 #  define inflateEnd    z_inflateEnd
00020 #  define deflateInit2_ z_deflateInit2_
00021 #  define deflateSetDictionary z_deflateSetDictionary
00022 #  define deflateCopy   z_deflateCopy
00023 #  define deflateReset  z_deflateReset
00024 #  define deflateParams z_deflateParams
00025 #  define inflateInit2_ z_inflateInit2_
00026 #  define inflateSetDictionary z_inflateSetDictionary
00027 #  define inflateSync   z_inflateSync
00028 #  define inflateSyncPoint z_inflateSyncPoint
00029 #  define inflateReset  z_inflateReset
00030 #  define compress      z_compress
00031 #  define compress2     z_compress2
00032 #  define uncompress    z_uncompress
00033 #  define adler32       z_adler32
00034 #  define crc32         z_crc32
00035 #  define get_crc_table z_get_crc_table
00036 
00037 #  define Byte          z_Byte
00038 #  define uInt          z_uInt
00039 #  define uLong         z_uLong
00040 #  define Bytef         z_Bytef
00041 #  define charf         z_charf
00042 #  define intf          z_intf
00043 #  define uIntf         z_uIntf
00044 #  define uLongf        z_uLongf
00045 #  define voidpf        z_voidpf
00046 #  define voidp         z_voidp
00047 #endif
00048 
00049 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
00050 #  define WIN32
00051 #endif
00052 #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
00053 #  ifndef __32BIT__
00054 #    define __32BIT__
00055 #  endif
00056 #endif
00057 #if defined(__MSDOS__) && !defined(MSDOS)
00058 #  define MSDOS
00059 #endif
00060 
00061 /*
00062  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
00063  * than 64k bytes at a time (needed on systems with 16-bit int).
00064  */
00065 #if defined(MSDOS) && !defined(__32BIT__)
00066 #  define MAXSEG_64K
00067 #endif
00068 #ifdef MSDOS
00069 #  define UNALIGNED_OK
00070 #endif
00071 
00072 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  && !defined(STDC)
00073 #  define STDC
00074 #endif
00075 #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
00076 #  ifndef STDC
00077 #    define STDC
00078 #  endif
00079 #endif
00080 
00081 #ifndef STDC
00082 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
00083 #    define const
00084 #  endif
00085 #endif
00086 
00087 /* Some Mac compilers merge all .h files incorrectly: */
00088 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
00089 #  define NO_DUMMY_DECL
00090 #endif
00091 
00092 /* Borland C incorrectly complains about missing returns: */
00093 #if defined(__BORLANDC__)
00094 #  define NEED_DUMMY_RETURN
00095 #endif
00096 
00097 
00098 /* Maximum value for memLevel in deflateInit2 */
00099 #ifndef MAX_MEM_LEVEL
00100 #  ifdef MAXSEG_64K
00101 #    define MAX_MEM_LEVEL 8
00102 #  else
00103 #    define MAX_MEM_LEVEL 9
00104 #  endif
00105 #endif
00106 
00107 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
00108  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
00109  * created by gzip. (Files created by minigzip can still be extracted by
00110  * gzip.)
00111  */
00112 #ifndef MAX_WBITS
00113 #  define MAX_WBITS   15 /* 32K LZ77 window */
00114 #endif
00115 
00116 /* The memory requirements for deflate are (in bytes):
00117             (1 << (windowBits+2)) +  (1 << (memLevel+9))
00118  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
00119  plus a few kilobytes for small objects. For example, if you want to reduce
00120  the default memory requirements from 256K to 128K, compile with
00121      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
00122  Of course this will generally degrade compression (there's no free lunch).
00123 
00124    The memory requirements for inflate are (in bytes) 1 << windowBits
00125  that is, 32K for windowBits=15 (default value) plus a few kilobytes
00126  for small objects.
00127 */
00128 
00129                         /* Type declarations */
00130 
00131 #ifndef OF /* function prototypes */
00132 #  ifdef STDC
00133 #    define OF(args)  args
00134 #  else
00135 #    define OF(args)  ()
00136 #  endif
00137 #endif
00138 
00139 /* The following definitions for FAR are needed only for MSDOS mixed
00140  * model programming (small or medium model with some far allocations).
00141  * This was tested only with MSC; for other MSDOS compilers you may have
00142  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
00143  * just define FAR to be empty.
00144  */
00145 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
00146    /* MSC small or medium model */
00147 #  define SMALL_MEDIUM
00148 #  ifdef _MSC_VER
00149 #    define FAR __far
00150 #  else
00151 #    define FAR far
00152 #  endif
00153 #endif
00154 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
00155 #  ifndef __32BIT__
00156 #    define SMALL_MEDIUM
00157 #    define FAR __far
00158 #  endif
00159 #endif
00160 
00161 /* Compile with -DZLIB_DLL for Windows DLL support */
00162 #if (defined(_WINDOWS) || defined(WINDOWS)) && defined(ZLIB_DLL)
00163 #  ifdef FAR
00164 #    undef FAR
00165 #  endif
00166 #  include <windows.h>
00167 #  define ZEXPORT  WINAPI
00168 #  ifdef WIN32
00169 #    define ZEXPORTVA  WINAPIV
00170 #  else
00171 #    define ZEXPORTVA  FAR _cdecl _export
00172 #  endif
00173 #else
00174 #   if defined (__BORLANDC__) && defined (_Windows) && defined (__DLL__)
00175 #       define ZEXPORT _export
00176 #       define ZEXPORTVA _export
00177 #   else
00178 #       define ZEXPORT
00179 #       define ZEXPORTVA
00180 #   endif
00181 #endif
00182 
00183 #ifndef FAR
00184 #   define FAR
00185 #endif
00186 
00187 typedef unsigned char  Byte;  /* 8 bits */
00188 typedef unsigned int   uInt;  /* 16 bits or more */
00189 typedef unsigned long  uLong; /* 32 bits or more */
00190 
00191 #if defined(__BORLANDC__) && defined(SMALL_MEDIUM)
00192    /* Borland C/C++ ignores FAR inside typedef */
00193 #  define Bytef Byte FAR
00194 #else
00195    typedef Byte  FAR Bytef;
00196 #endif
00197 typedef char  FAR charf;
00198 typedef int   FAR intf;
00199 typedef uInt  FAR uIntf;
00200 typedef uLong FAR uLongf;
00201 
00202 #ifdef STDC
00203    typedef void FAR *voidpf;
00204    typedef void     *voidp;
00205 #else
00206    typedef Byte FAR *voidpf;
00207    typedef Byte     *voidp;
00208 #endif
00209 
00210 #ifdef HAVE_UNISTD_H
00211 #  include <sys/types.h> /* for off_t */
00212 #  include <unistd.h>    /* for SEEK_* and off_t */
00213 #  define z_off_t  off_t
00214 #endif
00215 #ifndef SEEK_SET
00216 #  define SEEK_SET        0       /* Seek from beginning of file.  */
00217 #  define SEEK_CUR        1       /* Seek from current position.  */
00218 #endif
00219 #ifndef z_off_t
00220 #  define  z_off_t long
00221 #endif
00222 
00223 /* MVS linker does not support external names larger than 8 bytes */
00224 #if defined(__MVS__)
00225 #   pragma map(deflateInit_,"DEIN")
00226 #   pragma map(deflateInit2_,"DEIN2")
00227 #   pragma map(deflateEnd,"DEEND")
00228 #   pragma map(inflateInit_,"ININ")
00229 #   pragma map(inflateInit2_,"ININ2")
00230 #   pragma map(inflateEnd,"INEND")
00231 #   pragma map(inflateSync,"INSY")
00232 #   pragma map(inflateSetDictionary,"INSEDI")
00233 #   pragma map(inflate_blocks,"INBL")
00234 #   pragma map(inflate_blocks_new,"INBLNE")
00235 #   pragma map(inflate_blocks_free,"INBLFR")
00236 #   pragma map(inflate_blocks_reset,"INBLRE")
00237 #   pragma map(inflate_codes_free,"INCOFR")
00238 #   pragma map(inflate_codes,"INCO")
00239 #   pragma map(inflate_fast,"INFA")
00240 #   pragma map(inflate_flush,"INFLU")
00241 #   pragma map(inflate_mask,"INMA")
00242 #   pragma map(inflate_set_dictionary,"INSEDI2")
00243 #   pragma map(inflate_copyright,"INCOPY")
00244 #   pragma map(inflate_trees_bits,"INTRBI")
00245 #   pragma map(inflate_trees_dynamic,"INTRDY")
00246 #   pragma map(inflate_trees_fixed,"INTRFI")
00247 #   pragma map(inflate_trees_free,"INTRFR")
00248 #endif
00249 
00250 #endif /* _ZCONF_H */

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000