Imported from libpng-1.0.7beta11.tar
diff --git a/pngmem.c b/pngmem.c
index ff12605..66f83f2 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,7 +1,7 @@
/* pngmem.c - stub functions for memory allocation
*
- * libpng 1.0.6j - May 4, 2000
+ * libpng 1.0.7beta11 - May 6, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
@@ -23,7 +23,7 @@
/* Allocate memory for a png_struct. The malloc and memset can be replaced
by a single call to calloc() if this is thought to improve performance. */
-png_voidp
+png_voidp /* PRIVATE */
png_create_struct(int type)
{
#ifdef PNG_USER_MEM_SUPPORTED
@@ -31,7 +31,7 @@
}
/* Alternate version of png_create_struct, for use with user-defined malloc. */
-png_voidp
+png_voidp /* PRIVATE */
png_create_struct_2(int type, png_malloc_ptr malloc_fn)
{
#endif /* PNG_USER_MEM_SUPPORTED */
@@ -62,7 +62,7 @@
/* Free memory allocated by a png_create_struct() call */
-void
+void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
#ifdef PNG_USER_MEM_SUPPORTED
@@ -70,7 +70,7 @@
}
/* Free memory allocated by a png_create_struct() call */
-void
+void /* PRIVATE */
png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn)
{
#endif
@@ -108,7 +108,7 @@
* result, we would be truncating potentially larger memory requests
* (which should cause a fatal error) and introducing major problems.
*/
-png_voidp
+png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
@@ -124,7 +124,7 @@
return png_malloc_default(png_ptr, size);
}
-png_voidp
+png_voidp PNGAPI
png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
png_voidp ret;
@@ -224,7 +224,7 @@
/* free a pointer allocated by png_malloc(). In the default
configuration, png_ptr is not used, but is passed in case it
is needed. If ptr is NULL, return without taking any action. */
-void
+void PNGAPI
png_free(png_structp png_ptr, png_voidp ptr)
{
if (png_ptr == NULL || ptr == NULL)
@@ -239,7 +239,7 @@
else png_free_default(png_ptr, ptr);
}
-void
+void PNGAPI
png_free_default(png_structp png_ptr, png_voidp ptr)
{
#endif /* PNG_USER_MEM_SUPPORTED */
@@ -277,7 +277,7 @@
/* Allocate memory for a png_struct or a png_info. The malloc and
memset can be replaced by a single call to calloc() if this is thought
to improve performance noticably.*/
-png_voidp
+png_voidp /* PRIVATE */
png_create_struct(int type)
{
#ifdef PNG_USER_MEM_SUPPORTED
@@ -287,7 +287,7 @@
/* Allocate memory for a png_struct or a png_info. The malloc and
memset can be replaced by a single call to calloc() if this is thought
to improve performance noticably.*/
-png_voidp
+png_voidp /* PRIVATE */
png_create_struct_2(int type, png_malloc_ptr malloc_fn)
{
#endif /* PNG_USER_MEM_SUPPORTED */
@@ -328,7 +328,7 @@
/* Free memory allocated by a png_create_struct() call */
-void
+void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
#ifdef PNG_USER_MEM_SUPPORTED
@@ -336,7 +336,7 @@
}
/* Free memory allocated by a png_create_struct() call */
-void
+void /* PRIVATE */
png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn)
{
#endif /* PNG_USER_MEM_SUPPORTED */
@@ -370,7 +370,7 @@
need to allocate exactly 64K, so whatever you call here must
have the ability to do that. */
-png_voidp
+png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
@@ -385,7 +385,7 @@
else
return (png_malloc_default(png_ptr, size));
}
-png_voidp
+png_voidp /* PRIVATE */
png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
png_voidp ret;
@@ -416,7 +416,7 @@
/* Free a pointer allocated by png_malloc(). If ptr is NULL, return
without taking any action. */
-void
+void PNGAPI
png_free(png_structp png_ptr, png_voidp ptr)
{
if (png_ptr == NULL || ptr == NULL)
@@ -430,7 +430,7 @@
}
else png_free_default(png_ptr, ptr);
}
-void
+void /* PRIVATE */
png_free_default(png_structp png_ptr, png_voidp ptr)
{
if (png_ptr == NULL || ptr == NULL)
@@ -451,7 +451,7 @@
#endif /* Not Borland DOS special memory handler */
-png_voidp
+png_voidp /* PRIVATE */
png_memcpy_check (png_structp png_ptr, png_voidp s1, png_voidp s2,
png_uint_32 length)
{
@@ -464,7 +464,7 @@
return(png_memcpy (s1, s2, size));
}
-png_voidp
+png_voidp /* PRIVATE */
png_memset_check (png_structp png_ptr, png_voidp s1, int value,
png_uint_32 length)
{
@@ -482,7 +482,7 @@
/* This function is called when the application wants to use another method
* of allocating and freeing memory.
*/
-void
+void PNGAPI
png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
malloc_fn, png_free_ptr free_fn)
{
@@ -495,7 +495,7 @@
* functions. The application should free any memory associated with this
* pointer before png_write_destroy and png_read_destroy are called.
*/
-png_voidp
+png_voidp PNGAPI
png_get_mem_ptr(png_structp png_ptr)
{
return ((png_voidp)png_ptr->mem_ptr);