[libpng16] Added #ifdef PNG_READ_SUPPORTED/endif around the

png_chunk_unknown_handling() function, and restored the unknown-chunk
handling code from libpng-1.6.6.

Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe)
or to glennrp at users.sourceforge.net

Glenn R-P
This commit is contained in:
Glenn Randers-Pehrson
2013-09-20 15:40:15 -05:00
parent 873f16fe2f
commit 6f8f004fe1
5 changed files with 13 additions and 15 deletions

6
png.c
View File

@@ -855,7 +855,8 @@ png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name)
return PNG_HANDLE_CHUNK_AS_DEFAULT;
}
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
#ifdef PNG_READ_SUPPORTED
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
int /* PRIVATE */
png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name)
{
@@ -864,7 +865,8 @@ png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name)
PNG_CSTRING_FROM_CHUNK(chunk_string, chunk_name);
return png_handle_as_unknown(png_ptr, chunk_string);
}
#endif /* READ_UNKNOWN_CHUNKS */
#endif /* HANDLE_AS_UNKNOWN */
#endif /* READ_SUPPORTED */
#endif /* SET_UNKNOWN_CHUNKS */
#ifdef PNG_READ_SUPPORTED