mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Fixed a large number of instances where PNGCBAPI was omitted from
function definitions.
This commit is contained in:
parent
b7362c6738
commit
39fee3cee1
10
ANNOUNCE
10
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.7.0beta30 - January 30, 2014
|
||||
Libpng 1.7.0beta30 - February 1, 2014
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@ -496,7 +496,13 @@ Version 1.7.0beta28 [January 20, 2014]
|
||||
Version 1.7.0beta29 [January 30, 2014]
|
||||
Quiet an uninitialized memory warning from VS2013 in png_get_png().
|
||||
|
||||
Version 1.7.0beta30 [January 30, 2014]
|
||||
Version 1.7.0beta30 [February 1, 2014]
|
||||
Fixed a large number of instances where PNGCBAPI was omitted from
|
||||
function definitions.
|
||||
Added pngimage test program for png_read_png and png_write_png. This
|
||||
is a work-in-progress, no tests are run automatically at present and
|
||||
the program by virtue of exhaustively testing all the transforms is
|
||||
very slow.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
8
CHANGES
8
CHANGES
@ -4785,7 +4785,13 @@ Version 1.7.0beta28 [January 20, 2014]
|
||||
Version 1.7.0beta29 [January 30, 2014]
|
||||
Quiet an uninitialized memory warning from VS2013 in png_get_png().
|
||||
|
||||
Version 1.7.0beta30 [January 30, 2014]
|
||||
Version 1.7.0beta30 [February 1, 2014]
|
||||
Fixed a large number of instances where PNGCBAPI was omitted from
|
||||
function definitions.
|
||||
Added pngimage test program for png_read_png and png_write_png. This
|
||||
is a work-in-progress, no tests are run automatically at present and
|
||||
the program by virtue of exhaustively testing all the transforms is
|
||||
very slow.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -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;
|
||||
|
@ -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' */
|
||||
{
|
||||
|
@ -886,8 +886,8 @@ png_set_strip_error_numbers(png_structrp png_ptr, png_uint_32 strip_mode)
|
||||
* possible to implement without setjmp support just so long as there is some
|
||||
* way to handle the error return here:
|
||||
*/
|
||||
PNG_FUNCTION(void /* PRIVATE */,
|
||||
png_safe_error,(png_structp png_nonconst_ptr, png_const_charp error_message),
|
||||
PNG_FUNCTION(void /* PRIVATE */, (PNGCBAPI
|
||||
png_safe_error),(png_structp png_nonconst_ptr, png_const_charp error_message),
|
||||
PNG_NORETURN)
|
||||
{
|
||||
const png_const_structrp png_ptr = png_nonconst_ptr;
|
||||
@ -922,7 +922,7 @@ png_safe_error,(png_structp png_nonconst_ptr, png_const_charp error_message),
|
||||
}
|
||||
|
||||
#ifdef PNG_WARNINGS_SUPPORTED
|
||||
void /* PRIVATE */
|
||||
void /* PRIVATE */ PNGCBAPI
|
||||
png_safe_warning(png_structp png_nonconst_ptr, png_const_charp warning_message)
|
||||
{
|
||||
const png_const_structrp png_ptr = png_nonconst_ptr;
|
||||
|
@ -291,6 +291,11 @@
|
||||
extern PNG_FUNCTION(type, name, args, PNG_EMPTY attributes)
|
||||
#endif
|
||||
|
||||
#ifndef PNG_INTERNAL_CALLBACK
|
||||
# define PNG_INTERNAL_CALLBACK(type, name, args, attributes)\
|
||||
extern PNG_FUNCTION(type, (PNGCBAPI name), args, PNG_EMPTY attributes)
|
||||
#endif
|
||||
|
||||
/* If floating or fixed point APIs are disabled they may still be compiled
|
||||
* internally. To handle this make sure they are declared as the appropriate
|
||||
* internal extern function (otherwise the symbol prefixing stuff won't work and
|
||||
@ -1795,11 +1800,11 @@ typedef struct png_control
|
||||
* errors that might occur. Returns true on success, false on failure (either
|
||||
* of the function or as a result of a png_error.)
|
||||
*/
|
||||
PNG_INTERNAL_FUNCTION(void,png_safe_error,(png_structp png_ptr,
|
||||
PNG_INTERNAL_CALLBACK(void,png_safe_error,(png_structp png_ptr,
|
||||
png_const_charp error_message),PNG_NORETURN);
|
||||
|
||||
#ifdef PNG_WARNINGS_SUPPORTED
|
||||
PNG_INTERNAL_FUNCTION(void,png_safe_warning,(png_structp png_ptr,
|
||||
PNG_INTERNAL_CALLBACK(void,png_safe_warning,(png_structp png_ptr,
|
||||
png_const_charp warning_message),PNG_EMPTY);
|
||||
#else
|
||||
# define png_safe_warning 0/*dummy argument*/
|
||||
|
@ -15,5 +15,8 @@
|
||||
#define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\
|
||||
PNG_DFN "@" name "@"
|
||||
|
||||
#define PNG_INTERNAL_CALLBACK(type, name, args, attributes)\
|
||||
PNG_DFN "@" name "@"
|
||||
|
||||
#define PNGPREFIX_H /* self generation */
|
||||
#include "../pngpriv.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user