mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from pngcrush-1.4.6.tar
This commit is contained in:
11
zutil.c
11
zutil.c
@@ -202,6 +202,7 @@ void zcfree (voidpf opaque, voidpf ptr)
|
||||
|
||||
#ifndef STDC
|
||||
extern voidp calloc OF((uInt items, uInt size));
|
||||
extern voidp malloc OF((uInt items));
|
||||
extern void free OF((voidpf ptr));
|
||||
#endif
|
||||
|
||||
@@ -214,6 +215,16 @@ voidpf zcalloc (opaque, items, size)
|
||||
return (voidpf)calloc(items, size);
|
||||
}
|
||||
|
||||
/* added to version 1.1.3pc -- glennrp */
|
||||
voidpf zmalloc (opaque, items, size)
|
||||
voidpf opaque;
|
||||
unsigned items;
|
||||
unsigned size;
|
||||
{
|
||||
if (opaque) items += size - size; /* make compiler happy */
|
||||
return (voidpf)malloc(items * size);
|
||||
}
|
||||
|
||||
void zcfree (opaque, ptr)
|
||||
voidpf opaque;
|
||||
voidpf ptr;
|
||||
|
||||
Reference in New Issue
Block a user