diff options
Diffstat (limited to 'libpng/zutil.c')
-rw-r--r-- | libpng/zutil.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/libpng/zutil.c b/libpng/zutil.c index b3de4e8..64cec41 100644 --- a/libpng/zutil.c +++ b/libpng/zutil.c @@ -1,5 +1,5 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -26,7 +26,7 @@ const char *z_errmsg[10] = { ""}; -const char * ZEXPORT zlibVersion() +const char * ZEXPORT zlibVersion(void) { return ZLIB_VERSION; } @@ -38,8 +38,7 @@ const char * ZEXPORT zlibVersion() # endif int z_verbose = verbose; -void z_error (m) - char *m; +void z_error (char *m) { fprintf(stderr, "%s\n", m); exit(1); @@ -49,8 +48,7 @@ void z_error (m) /* exported to allow conversion of error code to string for compress() and * uncompress() */ -const char * ZEXPORT zError(err) - int err; +const char * ZEXPORT zError(int err) { return ERR_MSG(err); } @@ -58,10 +56,7 @@ const char * ZEXPORT zError(err) #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 { @@ -69,10 +64,7 @@ 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; @@ -82,9 +74,7 @@ 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 { @@ -205,18 +195,13 @@ 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 int items, unsigned int size) { if (opaque) items += size - size; /* make compiler happy */ return (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 */ |