mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Backport recent changes from libpng-1.7.0beta30 and beta31.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
685dff485e
commit
414d7b5f7d
1618
contrib/libtests/pngimage.c
Normal file
1618
contrib/libtests/pngimage.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -439,7 +439,7 @@ display_rc(const display *d, int strict)
|
||||
}
|
||||
|
||||
/* libpng error and warning callbacks */
|
||||
PNG_FUNCTION(void, error, (png_structp png_ptr, const char *message),
|
||||
PNG_FUNCTION(void, (PNGCBAPI error), (png_structp png_ptr, const char *message),
|
||||
static PNG_NORETURN)
|
||||
{
|
||||
display *d = (display*)png_get_error_ptr(png_ptr);
|
||||
@@ -448,7 +448,7 @@ PNG_FUNCTION(void, error, (png_structp png_ptr, const char *message),
|
||||
display_exit(d);
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
warning(png_structp png_ptr, const char *message)
|
||||
{
|
||||
display *d = (display*)png_get_error_ptr(png_ptr);
|
||||
@@ -490,7 +490,7 @@ get_valid(display *d, png_infop info_ptr)
|
||||
}
|
||||
|
||||
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|
||||
static int
|
||||
static int PNGCBAPI
|
||||
read_callback(png_structp pp, png_unknown_chunkp pc)
|
||||
{
|
||||
/* This function mimics the behavior of png_set_keep_unknown_chunks by
|
||||
|
||||
@@ -926,7 +926,7 @@ internal_error(png_store *ps, png_const_charp message)
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
|
||||
/* Functions to use as PNG callbacks. */
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
store_error(png_structp ppIn, png_const_charp message) /* PNG_NORETURN */
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -942,7 +942,7 @@ store_error(png_structp ppIn, png_const_charp message) /* PNG_NORETURN */
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
store_warning(png_structp ppIn, png_const_charp message)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -1093,7 +1093,7 @@ store_image_check(PNG_CONST png_store* ps, png_const_structp pp, int iImage)
|
||||
}
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
store_write(png_structp ppIn, png_bytep pb, png_size_t st)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -1121,7 +1121,7 @@ store_write(png_structp ppIn, png_bytep pb, png_size_t st)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
store_flush(png_structp ppIn)
|
||||
{
|
||||
UNUSED(ppIn) /*DOES NOTHING*/
|
||||
@@ -1215,7 +1215,7 @@ store_read_imp(png_store *ps, png_bytep pb, png_size_t st)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
store_read(png_structp ppIn, png_bytep pb, png_size_t st)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -1408,7 +1408,7 @@ store_pool_delete(png_store *ps, store_pool *pool)
|
||||
}
|
||||
|
||||
/* The memory callbacks: */
|
||||
static png_voidp
|
||||
static png_voidp PNGCBAPI
|
||||
store_malloc(png_structp ppIn, png_alloc_size_t cb)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -1457,7 +1457,7 @@ store_malloc(png_structp ppIn, png_alloc_size_t cb)
|
||||
return new;
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
store_free(png_structp ppIn, png_voidp memory)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -2676,7 +2676,7 @@ modifier_read_imp(png_modifier *pm, png_bytep pb, png_size_t st)
|
||||
}
|
||||
|
||||
/* The callback: */
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
modifier_read(png_structp ppIn, png_bytep pb, png_size_t st)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -4680,7 +4680,7 @@ standard_info_imp(standard_display *dp, png_structp pp, png_infop pi,
|
||||
standard_info_part2(dp, pp, pi, nImages);
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
standard_info(png_structp pp, png_infop pi)
|
||||
{
|
||||
standard_display *dp = voidcast(standard_display*,
|
||||
@@ -4692,7 +4692,7 @@ standard_info(png_structp pp, png_infop pi)
|
||||
standard_info_imp(dp, pp, pi, 1 /*only one image*/);
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
progressive_row(png_structp ppIn, png_bytep new_row, png_uint_32 y, int pass)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -5006,7 +5006,7 @@ standard_image_validate(standard_display *dp, png_const_structp pp, int iImage,
|
||||
dp->ps->validated = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
standard_end(png_structp ppIn, png_infop pi)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -5841,7 +5841,7 @@ transform_info_imp(transform_display *dp, png_structp pp, png_infop pi)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
transform_info(png_structp pp, png_infop pi)
|
||||
{
|
||||
transform_info_imp(voidcast(transform_display*, png_get_progressive_ptr(pp)),
|
||||
@@ -6048,7 +6048,7 @@ transform_image_validate(transform_display *dp, png_const_structp pp,
|
||||
dp->this.ps->validated = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
transform_end(png_structp ppIn, png_infop pi)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
@@ -7865,7 +7865,7 @@ gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi)
|
||||
standard_info_part2(&dp->this, pp, pi, 1 /*images*/);
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
gamma_info(png_structp pp, png_infop pi)
|
||||
{
|
||||
gamma_info_imp(voidcast(gamma_display*, png_get_progressive_ptr(pp)), pp,
|
||||
@@ -8829,7 +8829,7 @@ gamma_image_validate(gamma_display *dp, png_const_structp pp,
|
||||
dp->this.ps->validated = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
static void PNGCBAPI
|
||||
gamma_end(png_structp ppIn, png_infop pi)
|
||||
{
|
||||
png_const_structp pp = ppIn;
|
||||
|
||||
Reference in New Issue
Block a user