[libpng16] Backport recent changes from libpng-1.7.0beta30 and beta31.

This commit is contained in:
John Bowler
2014-02-06 11:32:57 -06:00
committed by Glenn Randers-Pehrson
parent 685dff485e
commit 414d7b5f7d
17 changed files with 1862 additions and 93 deletions

View File

@@ -3159,13 +3159,13 @@ read_chunk(struct file *file)
/* This returns a file* from a png_struct in an implementation specific way. */
static struct file *get_control(png_const_structrp png_ptr);
static void
static void PNGCBAPI
error_handler(png_structp png_ptr, png_const_charp message)
{
stop(get_control(png_ptr), LIBPNG_ERROR_CODE, message);
}
static void
static void PNGCBAPI
warning_handler(png_structp png_ptr, png_const_charp message)
{
struct file *file = get_control(png_ptr);
@@ -3177,7 +3177,7 @@ warning_handler(png_structp png_ptr, png_const_charp message)
/* Read callback - this is where the work gets done to check the stream before
* passing it to libpng
*/
static void
static void PNGCBAPI
read_callback(png_structp png_ptr, png_bytep buffer, size_t count)
/* Return 'count' bytes to libpng in 'buffer' */
{