diff --git a/ANNOUNCE b/ANNOUNCE index 9e583640c..3f6845b12 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -164,6 +164,11 @@ version 1.5.0beta17 [April 17, 2010] version 1.5.0beta18 [April 17, 2010] Restored the ability to include optional pngusr.h + Moved replacements for png_error() and png_warning() from the + contrib/pngminim project to pngerror.c, for use when warnings or + errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid + storing unneeded error/warning text. + Updated contrib/pngminim project to work with the new pnglibconf.h Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit diff --git a/CHANGES b/CHANGES index 26900733f..8007bf3c8 100644 --- a/CHANGES +++ b/CHANGES @@ -2646,6 +2646,11 @@ version 1.5.0beta17 [April 17, 2010] version 1.5.0beta18 [April 17, 2010] Restored the ability to include optional pngusr.h + Moved replacements for png_error() and png_warning() from the + contrib/pngminim project to pngerror.c, for use when warnings or + errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid + storing unneeded error/warning text. + Updated contrib/pngminim project to work with the new pnglibconf.h Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngerror.c b/pngerror.c index 8e0569e12..f6762b148 100644 --- a/pngerror.c +++ b/pngerror.c @@ -184,8 +184,9 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\0'; } } +#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ -#ifdef PNG_READ_SUPPORTED +#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) void PNGAPI png_chunk_error(png_structp png_ptr, png_const_charp error_message) { @@ -198,8 +199,7 @@ png_chunk_error(png_structp png_ptr, png_const_charp error_message) png_error(png_ptr, msg); } } -#endif /* PNG_READ_SUPPORTED */ -#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */ +#endif /* PNG_READ_SUPPORTED && PNG_ERROR_TEXT_SUPPORTED */ #ifdef PNG_WARNINGS_SUPPORTED void PNGAPI