Solid Fluid System Solutions  
Home Software About Hardware Firmware
Document Icon ZLib
Current Document Icon Modifications

Modifications made to the ZLib library

The prototypes for memory allocation in the PNG library were mentioned as being modified;

voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
void   zcfree  OF((voidpf opaque, voidpf ptr));


The following function excerpts have been taken from zutil.cpp, where modifications are marked "//here"

voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
    if (opaque) items += size - size; /* make compiler happy */
    return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
                              (voidpf)calloc(items, size);
	return img_malloc(items * size);							//Here

void  zcfree (voidpf opaque, voidpf ptr)
	img_free(ptr);												//Here
    if (opaque) return; /* make compiler happy */
Copyright © Solid Fluid 2007-2022
Last modified: SolFlu  Sun, 14 Jun 2009 09:22:46 GMT