Imported from libpng-1.2.30rc04.tar

This commit is contained in:
Glenn Randers-Pehrson
2008-07-22 13:51:08 -05:00
parent 3215e97b17
commit 9c8717e42f
62 changed files with 156 additions and 147 deletions

View File

@@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* Last changed in libpng 1.2.30 [July 21, 2008]
* Last changed in libpng 1.2.30 [July 22, 2008]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2008 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -51,9 +51,9 @@ png_error(png_structp png_ptr, png_const_charp error_message)
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
{
int i;
for (i=0; i<offset - 1; i++)
msg[i]=error_message[i+1];
msg[i]='\0';
for (i = 0; i<offset - 1; i++)
msg[i] = error_message[i + 1];
msg[i] = '\0';
error_message = msg;
}
else
@@ -63,9 +63,9 @@ png_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
{
msg[0]='0';
msg[1]='\0';
error_message=msg;
msg[0] = '0';
msg[1] = '\0';
error_message = msg;
}
}
}
@@ -218,7 +218,7 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
{
int offset;
char error_number[16];
for (offset=0; offset<15; offset++)
for (offset = 0; offset<15; offset++)
{
error_number[offset] = *(error_message + offset + 1);
if (*(error_message + offset) == ' ')
@@ -226,7 +226,7 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
}
if ((offset > 1) && (offset < 15))
{
error_number[offset - 1]='\0';
error_number[offset - 1] = '\0';
fprintf(stderr, "libpng error no. %s: %s\n", error_number,
error_message + offset);
}
@@ -274,7 +274,7 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
{
int offset;
char warning_number[16];
for (offset=0; offset<15; offset++)
for (offset = 0; offset < 15; offset++)
{
warning_number[offset]=*(warning_message + offset + 1);
if (*(warning_message + offset) == ' ')
@@ -282,7 +282,7 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
}
if ((offset > 1) && (offset < 15))
{
warning_number[offset + 1]='\0';
warning_number[offset + 1] = '\0';
fprintf(stderr, "libpng warning no. %s: %s\n", warning_number,
warning_message + offset);
}