summaryrefslogtreecommitdiff
path: root/zutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'zutil.c')
-rw-r--r--zutil.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/zutil.c b/zutil.c
index 9fd4ecc..4ceb89f 100644
--- a/zutil.c
+++ b/zutil.c
@@ -3,7 +3,7 @@
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
6/* $Id: zutil.c,v 1.5 1995/04/14 21:30:23 jloup Exp $ */ 6/* $Id: zutil.c,v 1.6 1995/04/29 14:54:02 jloup Exp $ */
7 7
8#include <stdio.h> 8#include <stdio.h>
9 9
@@ -55,7 +55,7 @@ void zmemzero(dest, len)
55} 55}
56#endif 56#endif
57 57
58#if defined(MSDOS) && !defined(USE_CALLOC) 58#if defined(MSDOS) && !defined(__SMALL__) && !defined(M_I86SM)
59# ifdef __TURBOC__ 59# ifdef __TURBOC__
60 60
61/* Turbo C malloc() does not allow dynamic allocation of 64K bytes 61/* Turbo C malloc() does not allow dynamic allocation of 64K bytes
@@ -84,7 +84,7 @@ local ptr_table table[MAX_PTR];
84 84
85voidp zcalloc (voidp opaque, unsigned items, unsigned size) 85voidp zcalloc (voidp opaque, unsigned items, unsigned size)
86{ 86{
87 voidp buf; 87 voidp buf = opaque; /* just to make some compilers happy */
88 ulg bsize = (ulg)items*size; 88 ulg bsize = (ulg)items*size;
89 89
90 if (bsize < 65536L) { 90 if (bsize < 65536L) {
@@ -121,6 +121,7 @@ void zcfree (voidp opaque, voidp ptr)
121 next_ptr--; 121 next_ptr--;
122 return; 122 return;
123 } 123 }
124 ptr = opaque; /* just to make some compilers happy */
124 z_error("zcfree: ptr not found"); 125 z_error("zcfree: ptr not found");
125} 126}
126 127
@@ -133,11 +134,13 @@ void zcfree (voidp opaque, voidp ptr)
133 134
134voidp zcalloc (voidp opaque, unsigned items, unsigned size) 135voidp zcalloc (voidp opaque, unsigned items, unsigned size)
135{ 136{
137 if (opaque) opaque = 0; /* to make compiler happy */
136 return _halloc((long)items, size); 138 return _halloc((long)items, size);
137} 139}
138 140
139void zcfree (voidp opaque, voidp ptr) 141void zcfree (voidp opaque, voidp ptr)
140{ 142{
143 if (opaque) opaque = 0; /* to make compiler happy */
141 _hfree(ptr); 144 _hfree(ptr);
142} 145}
143 146