mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.2.30rc04.tar
This commit is contained in:
22
pngerror.c
22
pngerror.c
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user