[libpng16] Use png_get_libpng_ver(NULL), not PNG_LIBPNG_VER_STRING

This commit is contained in:
Glenn Randers-Pehrson
2014-11-04 23:33:46 -06:00
parent 5efb1327df
commit f1b547a509
21 changed files with 56 additions and 50 deletions

View File

@@ -556,7 +556,7 @@ write_png(const char **name, FILE *fp, int color_type, int bit_depth,
volatile png_fixed_point gamma, chunk_insert * volatile insert,
unsigned int filters, unsigned int *colors)
{
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
png_structp png_ptr = png_create_write_struct(png_get_libpng_ver(NULL),
name, makepng_error, makepng_warning);
volatile png_infop info_ptr = NULL;
volatile png_bytep row = NULL;

View File

@@ -795,7 +795,7 @@ read_png(struct display *dp, struct buffer *bp, const char *operation,
dp->transforms = transforms;
}
dp->read_pp = pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, dp,
dp->read_pp = pp = png_create_read_struct(png_get_libpng_ver(NULL), dp,
display_error, display_warning);
if (pp == NULL)
display_log(dp, LIBPNG_ERROR, "failed to create read struct");
@@ -1240,7 +1240,7 @@ write_png(struct display *dp, png_infop ip, int transforms)
dp->operation = "write";
dp->transforms = transforms;
dp->write_pp = png_create_write_struct(PNG_LIBPNG_VER_STRING, dp,
dp->write_pp = png_create_write_struct(png_get_libpng_ver(NULL), dp,
display_error, display_warning);
if (dp->write_pp == NULL)

View File

@@ -651,7 +651,7 @@ check(FILE *fp, int argc, const char **argv, png_uint_32p flags/*out*/,
/* Some of these errors are permanently fatal and cause an exit here, others
* are per-test and cause an error return.
*/
d->png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, d, error,
d->png_ptr = png_create_read_struct(png_get_libpng_ver(NULL), d, error,
warning);
if (d->png_ptr == NULL)
{

View File

@@ -1552,13 +1552,13 @@ set_store_for_write(png_store *ps, png_infopp ppi,
*/
# ifdef PNG_USER_MEM_SUPPORTED
if (!ps->speed)
ps->pwrite = png_create_write_struct_2(PNG_LIBPNG_VER_STRING,
ps->pwrite = png_create_write_struct_2(png_get_libpng_ver(NULL),
ps, store_error, store_warning, &ps->write_memory_pool,
store_malloc, store_free);
else
# endif
ps->pwrite = png_create_write_struct(PNG_LIBPNG_VER_STRING,
ps->pwrite = png_create_write_struct(png_get_libpng_ver(NULL),
ps, store_error, store_warning);
png_set_write_fn(ps->pwrite, ps, store_write, store_flush);
@@ -1673,13 +1673,13 @@ set_store_for_read(png_store *ps, png_infopp ppi, png_uint_32 id,
*/
# ifdef PNG_USER_MEM_SUPPORTED
if (!ps->speed)
ps->pread = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, ps,
ps->pread = png_create_read_struct_2(png_get_libpng_ver(NULL), ps,
store_error, store_warning, &ps->read_memory_pool, store_malloc,
store_free);
else
# endif
ps->pread = png_create_read_struct(PNG_LIBPNG_VER_STRING, ps, store_error,
ps->pread = png_create_read_struct(png_get_libpng_ver(NULL), ps, store_error,
store_warning);
if (ps->pread == NULL)

View File

@@ -34,7 +34,7 @@
static int
read_png(FILE *fp)
{
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
png_structp png_ptr = png_create_read_struct(png_get_libpng_ver(NULL),0,0,0);
png_infop info_ptr = NULL;
png_bytep row = NULL, display = NULL;

View File

@@ -37,7 +37,7 @@
static int read_png(FILE *fp)
{
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
png_structp png_ptr = png_create_read_struct(png_get_libpng_ver(NULL),0,0,0);
png_infop info_ptr = NULL;
png_bytep row = NULL, display = NULL;