[libpng16] Reverted use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING

in the manual, example.c, pngtest.c, and applications in the contrib directory.
It was incorrect advice.
This commit is contained in:
Glenn Randers-Pehrson
2014-11-06 06:39:56 -06:00
parent 8e7c35fc81
commit 61ea3eacb0
14 changed files with 34 additions and 28 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_get_libpng_ver(NULL),
png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,
name, makepng_error, makepng_warning);
volatile png_infop info_ptr = NULL;
volatile png_bytep row = NULL;

View File

@@ -826,7 +826,7 @@ read_png(struct display *dp, struct buffer *bp, const char *operation,
dp->transforms = transforms;
}
dp->read_pp = pp = png_create_read_struct(png_get_libpng_ver(NULL), dp,
dp->read_pp = pp = png_create_read_struct(PNG_LIBPNG_VER_STRING, dp,
display_error, display_warning);
if (pp == NULL)
display_log(dp, LIBPNG_ERROR, "failed to create read struct");
@@ -1271,7 +1271,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_get_libpng_ver(NULL), dp,
dp->write_pp = png_create_write_struct(PNG_LIBPNG_VER_STRING, 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_get_libpng_ver(NULL), d, error,
d->png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, d, error,
warning);
if (d->png_ptr == NULL)
{

View File

@@ -1559,7 +1559,7 @@ 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_get_libpng_ver(NULL),
ps->pwrite = png_create_write_struct_2(PNG_LIBPNG_VER_STRING,
ps, store_error, store_warning, &ps->write_memory_pool,
store_malloc, store_free);
@@ -1680,13 +1680,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_get_libpng_ver(NULL), ps,
ps->pread = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, ps,
store_error, store_warning, &ps->read_memory_pool, store_malloc,
store_free);
else
# endif
ps->pread = png_create_read_struct(png_get_libpng_ver(NULL), ps, store_error,
ps->pread = png_create_read_struct(PNG_LIBPNG_VER_STRING, 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_get_libpng_ver(NULL),0,0,0);
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,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_get_libpng_ver(NULL),0,0,0);
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
png_infop info_ptr = NULL;
png_bytep row = NULL, display = NULL;