forked from Imagelibrary/rtems
Stop using old-style function definitions.
This commit is contained in:
@@ -146,10 +146,10 @@ const char * ZEXPORT zError(
|
||||
|
||||
#ifndef HAVE_MEMCPY
|
||||
|
||||
void zmemcpy(dest, source, len)
|
||||
Bytef* dest;
|
||||
const Bytef* source;
|
||||
uInt len;
|
||||
void zmemcpy(
|
||||
Bytef* dest,
|
||||
const Bytef* source,
|
||||
uInt len)
|
||||
{
|
||||
if (len == 0) return;
|
||||
do {
|
||||
@@ -157,10 +157,10 @@ void zmemcpy(dest, source, len)
|
||||
} while (--len != 0);
|
||||
}
|
||||
|
||||
int zmemcmp(s1, s2, len)
|
||||
const Bytef* s1;
|
||||
const Bytef* s2;
|
||||
uInt len;
|
||||
int zmemcmp(
|
||||
const Bytef* s1,
|
||||
const Bytef* s2,
|
||||
uInt len)
|
||||
{
|
||||
uInt j;
|
||||
|
||||
@@ -170,9 +170,9 @@ int zmemcmp(s1, s2, len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void zmemzero(dest, len)
|
||||
Bytef* dest;
|
||||
uInt len;
|
||||
void zmemzero(
|
||||
Bytef* dest,
|
||||
uInt len)
|
||||
{
|
||||
if (len == 0) return;
|
||||
do {
|
||||
@@ -297,19 +297,19 @@ extern voidp calloc OF((uInt items, uInt size));
|
||||
extern void free OF((voidpf ptr));
|
||||
#endif
|
||||
|
||||
voidpf zcalloc (opaque, items, size)
|
||||
voidpf opaque;
|
||||
unsigned items;
|
||||
unsigned size;
|
||||
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);
|
||||
}
|
||||
|
||||
void zcfree (opaque, ptr)
|
||||
voidpf opaque;
|
||||
voidpf ptr;
|
||||
void zcfree (
|
||||
voidpf opaque,
|
||||
voidpf ptr)
|
||||
{
|
||||
free(ptr);
|
||||
if (opaque) return; /* make compiler happy */
|
||||
|
||||
Reference in New Issue
Block a user