home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 March / CMCD0304.ISO / Software / Freeware / Programare / nullsoft / nsis20.exe / Source / zlib / ZUTIL.H < prev   
C/C++ Source or Header  |  2002-09-22  |  2KB  |  74 lines

  1. /* zutil.h -- internal interface and configuration of the compression library
  2.  * Copyright (C) 1995-1998 Jean-loup Gailly.
  3.  * For conditions of distribution and use, see copyright notice in zlib.h
  4.  */
  5.  
  6. /* WARNING: this file should *not* be used by applications. It is
  7.    part of the implementation of the compression library and is
  8.    subject to change. Applications should only use zlib.h.
  9.  */
  10.  
  11. /* @(#) $Id: ZUTIL.H,v 1.2 2002/09/22 20:02:03 eccles Exp $ */
  12.  
  13. #ifndef _Z_UTIL_H
  14. #define _Z_UTIL_H
  15.  
  16. #include <windows.h>
  17. #include "zlib.h"
  18.  
  19. #ifndef local
  20. #  define local static
  21. #endif
  22.  
  23. typedef unsigned char  uch;
  24. typedef uch FAR uchf;
  25. typedef unsigned short ush;
  26. typedef ush FAR ushf;
  27. typedef unsigned long  ulg;
  28.  
  29. #ifndef DEF_WBITS
  30. #  define DEF_WBITS MAX_WBITS
  31. #endif
  32. /* default windowBits for decompression. MAX_WBITS is for compression only */
  33.  
  34. #define DEF_MEM_LEVEL  MAX_MEM_LEVEL
  35.  
  36. #define STORED_BLOCK 0
  37. #define STATIC_TREES 1
  38. #define DYN_TREES    2
  39. /* The three kinds of block type */
  40.  
  41. #define MIN_MATCH  3
  42. #define MAX_MATCH  258
  43. /* The minimum and maximum match lengths */
  44.  
  45. #define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
  46.  
  47.  
  48. #ifdef EXEHEAD
  49. #include "../exehead/util.h"
  50. #define zmemcpy mini_memcpy
  51. #else
  52. #define zmemcpy memcpy
  53. #define zmemzero(a,b) memset(a,0,b)
  54. #endif
  55.  
  56. #  define Assert(cond,msg)
  57. #  define Trace(x)
  58. #  define Tracev(x)
  59. #  define Tracevv(x)
  60. #  define Tracec(c,x)
  61. #  define Tracecv(c,x)
  62.  
  63. #ifdef EXEHEAD
  64. #include "../exehead/util.h"
  65. #define ZALLOC(strm, items, size) my_GlobalAlloc((items)*(size))
  66. #else   // def EXEHEAD
  67. #define ZALLOC(strm, items, size) GlobalAlloc(GPTR,(items)*(size))
  68. #endif  // def EXEHEAD
  69. #define ZFREE(strm, addr)  { if (addr) GlobalFree(addr); }
  70. #define TRY_FREE(s, p) { ZFREE(s, p); }
  71. #define ERR_RETURN(strm,err) return (err)
  72.  
  73. #endif /* _Z_UTIL_H */
  74.