home *** CD-ROM | disk | FTP | other *** search
/ Palm Utilities / Palm_Utilities_CD-ROM_2001_2001.iso / files / utils misc / Boxer 0.18 / Boxer018.exe / boxer / ZLib / zconf.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-29  |  7.9 KB  |  296 lines

  1. #define PILOT
  2.  
  3. /* zconf.h -- configuration of the zlib compression library
  4.  * Copyright (C) 1995-1998 Jean-loup Gailly.
  5.  * For conditions of distribution and use, see copyright notice in zlib.h 
  6.  */
  7.  
  8. /* @(#) $Id$ */
  9.  
  10. #ifndef _ZCONF_H
  11. #define _ZCONF_H
  12.  
  13. /*
  14.  * If you *really* need a unique prefix for all types and library functions,
  15.  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
  16.  */
  17. #ifdef Z_PREFIX
  18. #  define deflateInit_    z_deflateInit_
  19. #  define deflate    z_deflate
  20. #  define deflateEnd    z_deflateEnd
  21. #  define inflateInit_     z_inflateInit_
  22. #  define inflate    z_inflate
  23. #  define inflateEnd    z_inflateEnd
  24. #  define deflateInit2_    z_deflateInit2_
  25. #  define deflateSetDictionary z_deflateSetDictionary
  26. #  define deflateCopy    z_deflateCopy
  27. #  define deflateReset    z_deflateReset
  28. #  define deflateParams    z_deflateParams
  29. #  define inflateInit2_    z_inflateInit2_
  30. #  define inflateSetDictionary z_inflateSetDictionary
  31. #  define inflateSync    z_inflateSync
  32. #  define inflateSyncPoint z_inflateSyncPoint
  33. #  define inflateReset    z_inflateReset
  34. #  define compress    z_compress
  35. #  define compress2    z_compress2
  36. #  define uncompress    z_uncompress
  37. #  define adler32    z_adler32
  38. #  define crc32        z_crc32
  39. #  define get_crc_table z_get_crc_table
  40.  
  41. #  define Byte        z_Byte
  42. #  define uInt        z_uInt
  43. #  define uLong        z_uLong
  44. #  define Bytef            z_Bytef
  45. #  define charf        z_charf
  46. #  define intf        z_intf
  47. #  define uIntf        z_uIntf
  48. #  define uLongf    z_uLongf
  49. #  define voidpf    z_voidpf
  50. #  define voidp        z_voidp
  51. #endif
  52.  
  53. #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
  54. #  define WIN32
  55. #endif
  56. #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
  57. #  ifndef __32BIT__
  58. #    define __32BIT__
  59. #  endif
  60. #endif
  61. #if defined(__MSDOS__) && !defined(MSDOS)
  62. #  define MSDOS
  63. #endif
  64.  
  65. /*
  66.  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
  67.  * than 64k bytes at a time (needed on systems with 16-bit int).
  68.  */
  69. #if defined(MSDOS) && !defined(__32BIT__)
  70. #  define MAXSEG_64K
  71. #endif
  72. #ifdef MSDOS
  73. #  define UNALIGNED_OK
  74. #endif
  75.  
  76. #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  && !defined(STDC)
  77. #  define STDC
  78. #endif
  79. #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
  80. #  ifndef STDC
  81. #    define STDC
  82. #  endif
  83. #endif
  84.  
  85. #ifndef STDC
  86. #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
  87. #    define const
  88. #  endif
  89. #endif
  90.  
  91. /* Some Mac compilers merge all .h files incorrectly: */
  92. #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
  93. #  define NO_DUMMY_DECL
  94. #endif
  95.  
  96. /* Old Borland C incorrectly complains about missing returns: */
  97. #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
  98. #  define NEED_DUMMY_RETURN
  99. #endif
  100.  
  101.  
  102. /* Maximum value for memLevel in deflateInit2 */
  103. #ifndef MAX_MEM_LEVEL
  104. #  ifdef MAXSEG_64K
  105. #    define MAX_MEM_LEVEL 8
  106. #  else
  107. #    define MAX_MEM_LEVEL 9
  108. #  endif
  109. #endif
  110.  
  111. /* Maximum value for windowBits in deflateInit2 and inflateInit2.
  112.  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
  113.  * created by gzip. (Files created by minigzip can still be extracted by
  114.  * gzip.)
  115.  */
  116. #ifndef MAX_WBITS
  117. #  define MAX_WBITS   15 /* 32K LZ77 window */
  118. #endif
  119.  
  120. /* The memory requirements for deflate are (in bytes):
  121.             (1 << (windowBits+2)) +  (1 << (memLevel+9))
  122.  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
  123.  plus a few kilobytes for small objects. For example, if you want to reduce
  124.  the default memory requirements from 256K to 128K, compile with
  125.      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
  126.  Of course this will generally degrade compression (there's no free lunch).
  127.  
  128.    The memory requirements for inflate are (in bytes) 1 << windowBits
  129.  that is, 32K for windowBits=15 (default value) plus a few kilobytes
  130.  for small objects.
  131. */
  132.  
  133.                         /* Type declarations */
  134.  
  135. #ifndef OF /* function prototypes */
  136. #  ifdef STDC
  137. #    define OF(args)  args
  138. #  else
  139. #    define OF(args)  ()
  140. #  endif
  141. #endif
  142.  
  143. /* The following definitions for FAR are needed only for MSDOS mixed
  144.  * model programming (small or medium model with some far allocations).
  145.  * This was tested only with MSC; for other MSDOS compilers you may have
  146.  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
  147.  * just define FAR to be empty.
  148.  */
  149. #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
  150.    /* MSC small or medium model */
  151. #  define SMALL_MEDIUM
  152. #  ifdef _MSC_VER
  153. #    define FAR _far
  154. #  else
  155. #    define FAR far
  156. #  endif
  157. #endif
  158. #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
  159. #  ifndef __32BIT__
  160. #    define SMALL_MEDIUM
  161. #    define FAR _far
  162. #  endif
  163. #endif
  164.  
  165. /* Compile with -DZLIB_DLL for Windows DLL support */
  166. #if defined(ZLIB_DLL)
  167. #  if defined(_WINDOWS) || defined(WINDOWS)
  168. #    ifdef FAR
  169. #      undef FAR
  170. #    endif
  171. #    include <windows.h>
  172. #    define ZEXPORT  WINAPI
  173. #    ifdef WIN32
  174. #      define ZEXPORTVA  WINAPIV
  175. #    else
  176. #      define ZEXPORTVA  FAR _cdecl _export
  177. #    endif
  178. #  endif
  179. #  if defined (__BORLANDC__)
  180. #    if (__BORLANDC__ >= 0x0500) && defined (WIN32)
  181. #      include <windows.h>
  182. #      define ZEXPORT __declspec(dllexport) WINAPI
  183. #      define ZEXPORTRVA __declspec(dllexport) WINAPIV
  184. #    else
  185. #      if defined (_Windows) && defined (__DLL__)
  186. #        define ZEXPORT _export
  187. #        define ZEXPORTVA _export
  188. #      endif
  189. #    endif
  190. #  endif
  191. #endif
  192.  
  193. #if defined (__BEOS__)
  194. #  if defined (ZLIB_DLL)
  195. #    define ZEXTERN extern __declspec(dllexport)
  196. #  else
  197. #    define ZEXTERN extern __declspec(dllimport)
  198. #  endif
  199. #endif
  200.  
  201. #ifndef ZEXPORT
  202. #  define ZEXPORT
  203. #endif
  204. #ifndef ZEXPORTVA
  205. #  define ZEXPORTVA
  206. #endif
  207. #ifndef ZEXTERN
  208. #  define ZEXTERN extern
  209. #endif
  210.  
  211. #ifndef FAR
  212. #   define FAR
  213. #endif
  214.  
  215. #if !defined(MACOS) && !defined(TARGET_OS_MAC) && !defined(PILOT)
  216. typedef unsigned char  Byte;  /* 8 bits */
  217. #endif
  218. typedef unsigned int   uInt;  /* 16 bits or more */
  219. typedef unsigned long  uLong; /* 32 bits or more */
  220.  
  221. #ifdef PILOT
  222. typedef unsigned char FAR Bytef;
  223. #else
  224. #ifdef SMALL_MEDIUM
  225.    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
  226. #  define Bytef Byte FAR
  227. #else
  228.    typedef Byte  FAR Bytef;
  229. #endif
  230. #endif
  231. typedef char  FAR charf;
  232. typedef int   FAR intf;
  233. typedef uInt  FAR uIntf;
  234. typedef uLong FAR uLongf;
  235.  
  236. #ifdef STDC
  237.    typedef void FAR *voidpf;
  238.    typedef void     *voidp;
  239. #else
  240.    typedef Byte FAR *voidpf;
  241.    typedef Byte     *voidp;
  242. #endif
  243.  
  244. #ifdef HAVE_UNISTD_H
  245. #  include <sys/types.h> /* for off_t */
  246. #  include <unistd.h>    /* for SEEK_* and off_t */
  247. #  define z_off_t  off_t
  248. #endif
  249. #ifndef SEEK_SET
  250. #  define SEEK_SET        0       /* Seek from beginning of file.  */
  251. #  define SEEK_CUR        1       /* Seek from current position.  */
  252. #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
  253. #endif
  254. #ifndef z_off_t
  255. #  define  z_off_t long
  256. #endif
  257.  
  258. /* MVS linker does not support external names larger than 8 bytes */
  259. #if defined(__MVS__)
  260. #   pragma map(deflateInit_,"DEIN")
  261. #   pragma map(deflateInit2_,"DEIN2")
  262. #   pragma map(deflateEnd,"DEEND")
  263. #   pragma map(inflateInit_,"ININ")
  264. #   pragma map(inflateInit2_,"ININ2")
  265. #   pragma map(inflateEnd,"INEND")
  266. #   pragma map(inflateSync,"INSY")
  267. #   pragma map(inflateSetDictionary,"INSEDI")
  268. #   pragma map(inflate_blocks,"INBL")
  269. #   pragma map(inflate_blocks_new,"INBLNE")
  270. #   pragma map(inflate_blocks_free,"INBLFR")
  271. #   pragma map(inflate_blocks_reset,"INBLRE")
  272. #   pragma map(inflate_codes_free,"INCOFR")
  273. #   pragma map(inflate_codes,"INCO")
  274. #   pragma map(inflate_fast,"INFA")
  275. #   pragma map(inflate_flush,"INFLU")
  276. #   pragma map(inflate_mask,"INMA")
  277. #   pragma map(inflate_set_dictionary,"INSEDI2")
  278. #   pragma map(inflate_copyright,"INCOPY")
  279. #   pragma map(inflate_trees_bits,"INTRBI")
  280. #   pragma map(inflate_trees_dynamic,"INTRDY")
  281. #   pragma map(inflate_trees_fixed,"INTRFI")
  282. #   pragma map(inflate_trees_free,"INTRFR")
  283. #endif
  284.  
  285. #ifdef PILOT
  286. #pragma pack(2)
  287. #undef Byte
  288. #include <System/SysAll.h>
  289. #include <System/Unix/unix_stdlib.h>
  290. #include <System/Unix/unix_string.h>
  291. #undef STDC
  292. #define HAVE_MEMCPY
  293. #endif
  294.  
  295. #endif /* _ZCONF_H */
  296.