提交 92a3ef4a 编写于 作者: G Glenn Randers-Pehrson

[devel] Combined multiple png_warning() calls for a single error.

上级 946c3f98
Libpng 1.5.0beta16 - March 30, 2010
Libpng 1.5.0beta16 - April 1, 2010
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
......@@ -131,7 +131,7 @@ version 1.5.0beta15 [March 17, 2010]
Removed makefile.mingw.
Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN
version 1.5.0beta16 [March 30, 2010]
version 1.5.0beta16 [April 1, 2010]
Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that
fields are initialized in all configurations. The READ/WRITE
macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as
......@@ -139,6 +139,7 @@ version 1.5.0beta16 [March 30, 2010]
and iTXt_SUPPORTED can be used to detect presence of either
read or write support (but it is probably better to check for
the one actually required - read or write.)
Combined multiple png_warning() calls for a single error.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -2608,7 +2608,7 @@ version 1.5.0beta15 [March 17, 2010]
Removed makefile.mingw.
Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN
version 1.5.0beta16 [March 30, 2010]
version 1.5.0beta16 [April 1, 2010]
Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that
fields are initialized in all configurations. The READ/WRITE
macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as
......@@ -2616,6 +2616,7 @@ version 1.5.0beta16 [March 30, 2010]
and iTXt_SUPPORTED can be used to detect presence of either
read or write support (but it is probably better to check for
the one actually required - read or write.)
Combined multiple png_warning() calls for a single error.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
/* pngread.c - read a PNG file
*
* Last changed in libpng 1.5.0 [March 17, 2010]
* Last changed in libpng 1.5.0 [April 1, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
......@@ -127,21 +127,20 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
char msg[80];
if (user_png_ver)
{
png_snprintf(msg, 80,
"Application was compiled with png.h from libpng-%.20s",
user_png_ver);
png_snprintf2(msg, 80,
"Application built with libpng-%.20s"
" but running with %.20s",
user_png_ver,
png_libpng_ver);
png_warning(png_ptr, msg);
}
png_snprintf(msg, 80,
"Application is running with png.c from libpng-%.20s",
png_libpng_ver);
png_warning(png_ptr, msg);
#else
png_warning(png_ptr,
"Incompatible libpng version in application and library");
#endif
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
png_ptr->flags = 0;
#endif
png_warning(png_ptr,
"Incompatible libpng version in application and library");
png_cleanup_needed = 1;
}
......
/* pngrio.c - functions for data input
*
* Last changed in libpng 1.5.0 [March 17, 2010]
* Last changed in libpng 1.5.0 [April 1, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
......@@ -150,9 +150,8 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
{
png_ptr->write_data_fn = NULL;
png_warning(png_ptr,
"It's an error to set both read_data_fn and write_data_fn in the ");
png_warning(png_ptr,
"same structure. Resetting write_data_fn to NULL");
"Can't set both read_data_fn and write_data_fn in the"
" same structure");
}
#ifdef PNG_WRITE_FLUSH_SUPPORTED
......
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.4.1 [March 30, 2010]
* Last changed in libpng 1.4.1 [April 1, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
......@@ -1133,15 +1133,14 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
png_warning(png_ptr, "Ignoring truncated iCCP profile");
#ifdef PNG_STDIO_SUPPORTED
{
char umsg[50];
char umsg[80];
png_snprintf(umsg, 50, "declared profile size = %lu",
(unsigned long)profile_size);
png_warning(png_ptr, umsg);
png_snprintf(umsg, 50, "actual profile length = %lu",
png_snprintf2(umsg, 80,
"Ignoring iCCP chunk with declared size = %lu "
"and actual length = %lu",
(unsigned long)profile_size,
(unsigned long)profile_length);
png_warning(png_ptr, umsg);
}
......
/* pngwio.c - functions for data output
*
* Last changed in libpng 1.5.0 [March 17, 2010]
* Last changed in libpng 1.5.0 [April 1, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
......@@ -200,9 +200,8 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
{
png_ptr->read_data_fn = NULL;
png_warning(png_ptr,
"Attempted to set both read_data_fn and write_data_fn in");
png_warning(png_ptr,
"the same structure. Resetting read_data_fn to NULL");
"Can't set both read_data_fn and write_data_fn in the"
" same structure");
}
}
......
/* pngwrite.c - general routines to write a PNG file
*
* Last changed in libpng 1.5.0 [March 17, 2010]
* Last changed in libpng 1.5.0 [April 1, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
......@@ -541,21 +541,20 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
char msg[80];
if (user_png_ver)
{
png_snprintf(msg, 80,
"Application was compiled with png.h from libpng-%.20s",
user_png_ver);
png_warning(png_ptr, msg);
}
png_snprintf(msg, 80,
"Application is running with png.c from libpng-%.20s",
png_libpng_ver);
png_warning(png_ptr, msg);
png_snprintf2(msg, 80,
"Application built with libpng-%.20s"
" but running with %.20s",
user_png_ver,
png_libpng_ver);
png_warning(png_ptr, msg);
}
#else
png_warning(png_ptr,
"Incompatible libpng version in application and library");
#endif
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
png_ptr->flags = 0;
#endif
png_warning(png_ptr,
"Incompatible libpng version in application and library");
png_cleanup_needed = 1;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册