Use exehead's my_GlobalAlloc
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1155 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
93262d1d00
commit
f97b2f81f7
2 changed files with 27 additions and 17 deletions
|
@ -17,16 +17,16 @@
|
|||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product
|
||||
2. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product
|
||||
documentation would be appreciated but is not required.
|
||||
|
||||
3. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
4. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
4. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
||||
|
@ -85,7 +85,7 @@ typedef unsigned short UInt16;
|
|||
|
||||
#ifndef __GNUC__
|
||||
#define __inline__ /* */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define AssertD(cond,msg) /* */
|
||||
#define AssertH(cond,errcode) /* */
|
||||
|
@ -98,7 +98,12 @@ typedef unsigned short UInt16;
|
|||
#define VPrintf5(zf,za1,za2,za3,za4,za5) /* */
|
||||
|
||||
|
||||
#ifdef EXEHEAD
|
||||
#include "../exehead/util.h"
|
||||
#define BZALLOC(items) my_GlobalAlloc(items)
|
||||
#else // def EXEHEAD
|
||||
#define BZALLOC(items) GlobalAlloc(GPTR,items)
|
||||
#endif // def EXEHEAD
|
||||
#define BZFREE(addr) { if (addr) GlobalFree(addr); }
|
||||
|
||||
|
||||
|
@ -161,7 +166,7 @@ extern Int16 BZ2_rNums[512];
|
|||
}
|
||||
*/
|
||||
|
||||
#define BZ_UPDATE_CRC(crcVar,cha)
|
||||
#define BZ_UPDATE_CRC(crcVar,cha)
|
||||
/*
|
||||
\
|
||||
{ \
|
||||
|
@ -262,19 +267,19 @@ typedef
|
|||
|
||||
/*-- externs for compression. --*/
|
||||
|
||||
extern void
|
||||
extern void
|
||||
BZ2_blockSort ( EState* );
|
||||
|
||||
extern void
|
||||
extern void
|
||||
BZ2_compressBlock ( EState*, Bool );
|
||||
|
||||
extern void
|
||||
extern void
|
||||
BZ2_bsInitWrite ( EState* );
|
||||
|
||||
extern void
|
||||
extern void
|
||||
BZ2_hbAssignCodes ( Int32*, UChar*, Int32, Int32, Int32 );
|
||||
|
||||
extern void
|
||||
extern void
|
||||
BZ2_hbMakeCodeLengths ( UChar*, Int32*, Int32, Int32 );
|
||||
|
||||
|
||||
|
@ -396,7 +401,7 @@ typedef
|
|||
Int32 save_N;
|
||||
Int32 save_curr;
|
||||
Int32 save_zt;
|
||||
Int32 save_zn;
|
||||
Int32 save_zn;
|
||||
Int32 save_zvec;
|
||||
Int32 save_zj;
|
||||
Int32 save_gSel;
|
||||
|
@ -446,13 +451,13 @@ typedef
|
|||
|
||||
/*-- externs for decompression. --*/
|
||||
|
||||
extern Int32
|
||||
extern Int32
|
||||
BZ2_indexIntoF ( Int32, Int32* );
|
||||
|
||||
extern Int32
|
||||
extern Int32
|
||||
BZ2_decompress ( DState* );
|
||||
|
||||
extern void
|
||||
extern void
|
||||
BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
|
||||
Int32, Int32, Int32 );
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
/* @(#) $Id: ZUTIL.H,v 1.1.1.1 2002/08/02 10:01:35 kichik Exp $ */
|
||||
|
||||
#ifndef _Z_UTIL_H
|
||||
#define _Z_UTIL_H
|
||||
|
@ -60,7 +60,12 @@ typedef unsigned long ulg;
|
|||
# define Tracec(c,x)
|
||||
# define Tracecv(c,x)
|
||||
|
||||
#ifdef EXEHEAD
|
||||
#include "../exehead/util.h"
|
||||
#define ZALLOC(strm, items, size) my_GlobalAlloc((items)*(size))
|
||||
#else // def EXEHEAD
|
||||
#define ZALLOC(strm, items, size) GlobalAlloc(GPTR,(items)*(size))
|
||||
#endif // def EXEHEAD
|
||||
#define ZFREE(strm, addr) { if (addr) GlobalFree(addr); }
|
||||
#define TRY_FREE(s, p) { ZFREE(s, p); }
|
||||
#define ERR_RETURN(strm,err) return (err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue