[devel] 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.
This commit is contained in:
Glenn Randers-Pehrson
2010-04-17 18:05:01 -05:00
parent aecef098f9
commit 8bdfb47d8c
3 changed files with 13 additions and 3 deletions

View File

@@ -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