Imported from pngcrush-1.4.6.tar

This commit is contained in:
Glenn Randers-Pehrson
2000-07-18 06:38:28 -05:00
parent 55c878d8e5
commit 4d6ce965b5
24 changed files with 1000 additions and 436 deletions

11
zutil.c
View File

@@ -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;