Imported from libpng-1.0.7beta11.tar

This commit is contained in:
Glenn Randers-Pehrson
2000-05-06 14:09:57 -05:00
parent 98c9d73605
commit 752945701e
42 changed files with 799 additions and 860 deletions

View File

@@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and 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
@@ -16,9 +16,11 @@
#define PNG_INTERNAL
#include "png.h"
static void png_default_error PNGARG((png_structp png_ptr,
static void /* PRIVATE */
png_default_error PNGARG((png_structp png_ptr,
png_const_charp message));
static void png_default_warning PNGARG((png_structp png_ptr,
static void /* PRIVATE */
png_default_warning PNGARG((png_structp png_ptr,
png_const_charp message));
/* This function is called whenever there is a fatal error. This function
@@ -26,7 +28,7 @@ static void png_default_warning PNGARG((png_structp png_ptr,
* you should supply a replacement error function and use png_set_error_fn()
* to replace the error function at run-time.
*/
void
void PNGAPI
png_error(png_structp png_ptr, png_const_charp message)
{
if (png_ptr->error_fn != NULL)
@@ -42,7 +44,7 @@ png_error(png_structp png_ptr, png_const_charp message)
* you should supply a replacement warning function and use
* png_set_error_fn() to replace the warning function at run-time.
*/
void
void PNGAPI
png_warning(png_structp png_ptr, png_const_charp message)
{
if (png_ptr->warning_fn != NULL)
@@ -62,7 +64,7 @@ static PNG_CONST char png_digit[16] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};
static void
static void /* PRIVATE */
png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp message)
{
int iout = 0, iin = 0;
@@ -94,7 +96,7 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp message
}
}
void
void PNGAPI
png_chunk_error(png_structp png_ptr, png_const_charp message)
{
char msg[16+64];
@@ -102,7 +104,7 @@ png_chunk_error(png_structp png_ptr, png_const_charp message)
png_error(png_ptr, msg);
}
void
void PNGAPI
png_chunk_warning(png_structp png_ptr, png_const_charp message)
{
char msg[16+64];
@@ -115,7 +117,7 @@ png_chunk_warning(png_structp png_ptr, png_const_charp message)
* function is used by default, or if the program supplies NULL for the
* error function pointer in png_set_error_fn().
*/
static void
static void /* PRIVATE */
png_default_error(png_structp png_ptr, png_const_charp message)
{
#ifndef PNG_NO_CONSOLE_IO
@@ -144,7 +146,7 @@ png_default_error(png_structp png_ptr, png_const_charp message)
* here if you don't want them to. In the default configuration, png_ptr is
* not used, but it is passed in case it may be useful.
*/
static void
static void /* PRIVATE */
png_default_warning(png_structp png_ptr, png_const_charp message)
{
#ifndef PNG_NO_CONSOLE_IO
@@ -159,7 +161,7 @@ png_default_warning(png_structp png_ptr, png_const_charp message)
* return to the calling routine or serious problems will occur. The return
* method used in the default routine calls longjmp(png_ptr->jmpbuf, 1)
*/
void
void PNGAPI
png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr warning_fn)
{
@@ -173,7 +175,7 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
* 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_error_ptr(png_structp png_ptr)
{
return ((png_voidp)png_ptr->error_ptr);