From d59c19b64cb3c3a171e2d302878e5726579e60cd Mon Sep 17 00:00:00 2001 From: John Bowler Date: Sat, 15 Dec 2012 21:34:14 -0600 Subject: [PATCH] [libpng17] Removed more functions that were deprecated in libpng-1.6.0: png_malloc_default png_free_default. Updated some left over "1.6.0beta32" in code sources. Fixed a "png_structp" prototype (should be png_structrp) in arm_init.c Updated the version-number hack in pngvalid.c --- ANNOUNCE | 4 +-- CHANGES | 10 ++++-- LICENSE | 4 +-- README | 2 +- arm/arm_init.c | 2 +- contrib/libtests/pngvalid.c | 9 ++---- libpng-manual.txt | 6 ++-- libpng.3 | 22 ++++--------- libpngpf.3 | 2 +- png.5 | 2 +- png.c | 42 +++--------------------- png.h | 60 +++++++++++++++++++++-------------- pngerror.c | 2 +- pngget.c | 2 +- pngmem.c | 33 ++----------------- pngpriv.h | 5 +-- pngrio.c | 2 +- pngrtran.c | 2 +- pngrutil.c | 2 +- pngset.c | 2 +- pngtest.c | 4 +-- pngtrans.c | 2 +- pngwio.c | 2 +- pngwrite.c | 2 +- pngwutil.c | 2 +- projects/vstudio/readme.txt | 2 +- projects/vstudio/zlib.props | 2 +- scripts/README.txt | 2 +- scripts/def.dfn | 2 +- scripts/pnglibconf.h.prebuilt | 2 +- scripts/symbols.def | 2 -- 31 files changed, 90 insertions(+), 149 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index bf155700d..cb0f98238 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0alpha02 - December 15, 2012 +Libpng 1.7.0alpha02 - December 16, 2012 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. @@ -61,7 +61,7 @@ Version 1.7.0alpha01 [December 15, 2012] Fixed cases of unquoted DESTDIR in Makefile.am. Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.12.5. -Version 1.7.0alpha02 [December 15, 2012] +Version 1.7.0alpha02 [December 16, 2012] Removed functions that were deprecated in libpng-1.6.0: png_reset_zstream(), png_info_init_3(), and png_data_freer() and its associated flags. diff --git a/CHANGES b/CHANGES index c784b98d4..5b3394295 100644 --- a/CHANGES +++ b/CHANGES @@ -4346,12 +4346,16 @@ Version 1.7.0alpha01 [December 15, 2012] Fixed cases of unquoted DESTDIR in Makefile.am. Rebuilt Makefile.in, configure, etc., with autoconf-2.69 and automake-1.12.5. -Version 1.7.0alpha02 [December 15, 2012] +Version 1.7.0alpha02 [December 16, 2012] Removed functions that were deprecated in libpng-1.6.0: - png_reset_zstream(), png_info_init_3(), and png_data_freer() and its - associated flags. + png_reset_zstream(), png_info_init_3(), png_data_freer() and its + associated flags, png_malloc_default, and png_free_default. Removed some duplicated lines from contrib/tools/scale.c and png.c. Changed some instances of png_warning() to png_app_error(). + Updated some left over "1.6.0beta32" in code sources. + Fixed a "png_structp" prototype (should be png_structrp) in arm_init.c + Updated the version-number hack in pngvalid.c + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/LICENSE b/LICENSE index 5bbb229a4..a9c8eacaa 100644 --- a/LICENSE +++ b/LICENSE @@ -10,7 +10,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha02, December 15, 2012, are +libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha02, December 16, 2012, are Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -108,4 +108,4 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -December 15, 2012 +December 16, 2012 diff --git a/README b/README index 939e58452..6e34b8fd4 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -README for libpng version 1.7.0alpha02 - December 15, 2012 (shared library 17.0) +README for libpng version 1.7.0alpha02 - December 16, 2012 (shared library 17.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. diff --git a/arm/arm_init.c b/arm/arm_init.c index 6d19cf1b3..e455940cb 100644 --- a/arm/arm_init.c +++ b/arm/arm_init.c @@ -43,7 +43,7 @@ static int png_have_hwcap(unsigned cap) #endif /* __linux__ && __arm__ */ void -png_init_filter_functions_neon(png_structp pp, unsigned int bpp) +png_init_filter_functions_neon(png_structrp pp, unsigned int bpp) { #ifdef __arm__ #ifdef __linux__ diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index 2627143dd..75441f3f6 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -1983,7 +1983,7 @@ modifier_init(png_modifier *pm) * in the rgb_to_gray check, replacing it with an exact copy of the libpng 1.5 * algorithm. */ -#define DIGITIZE PNG_LIBPNG_VER < 10600 +#define DIGITIZE PNG_LIBPNG_VER < 10700 /* If pm->calculations_use_input_precision is set then operations will happen * with the precision of the input, not the precision of the output depth. @@ -8190,7 +8190,7 @@ gamma_component_validate(PNG_CONST char *name, PNG_CONST validate_info *vi, * lost. This can result in up to a +/-1 error in the presence of * an sbit less than the bit depth. */ -# if PNG_LIBPNG_VER < 10600 +# if PNG_LIBPNG_VER < 10700 # define SBIT_ERROR .5 # else # define SBIT_ERROR 1. @@ -9905,11 +9905,8 @@ int main(int argc, char **argv) /* Default assume_16_bit_calculations appropriately; this tells the checking * code that 16-bit arithmetic is used for 8-bit samples when it would make a * difference. - * - * TODO: IMPORTANT; set to '>= 10600' below to enable development, change - * this to the correct value before release! */ - pm.assume_16_bit_calculations = PNG_LIBPNG_VER >= 10600; + pm.assume_16_bit_calculations = PNG_LIBPNG_VER >= 10700; /* Currently 16 bit expansion happens at the end of the pipeline, so the * calculations are done in the input bit depth not the output. diff --git a/libpng-manual.txt b/libpng-manual.txt index 7f1f29039..fe1ecb9a7 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -1,6 +1,6 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.7.0alpha02 - December 15, 2012 + libpng version 1.7.0alpha02 - December 16, 2012 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson @@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.7.0alpha02 - December 15, 2012 + libpng versions 0.97, January 1998, through 1.7.0alpha02 - December 16, 2012 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson @@ -5138,7 +5138,7 @@ Other rules can be inferred by inspecting the libpng source. XVII. Y2K Compliance in libpng -December 15, 2012 +December 16, 2012 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. diff --git a/libpng.3 b/libpng.3 index 661bb9581..e748088d3 100644 --- a/libpng.3 +++ b/libpng.3 @@ -1,4 +1,4 @@ -.TH LIBPNG 3 "December 15, 2012" +.TH LIBPNG 3 "December 16, 2012" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0alpha02 .SH SYNOPSIS @@ -96,10 +96,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0alpha02 \fI\fB -\fBvoid png_free_default (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP - -\fI\fB - \fBvoid png_free_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fInum\fP\fB);\fP \fI\fB @@ -464,10 +460,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0alpha02 \fI\fB -\fBpng_voidp png_malloc_default (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP - -\fI\fB - \fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP \fI\fB @@ -985,7 +977,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.7.0alpha02 - December 15, 2012 + libpng version 1.7.0alpha02 - December 16, 2012 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson @@ -996,7 +988,7 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.7.0alpha02 - December 15, 2012 + libpng versions 0.97, January 1998, through 1.7.0alpha02 - December 16, 2012 Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2011 Glenn Randers-Pehrson @@ -6124,7 +6116,7 @@ Other rules can be inferred by inspecting the libpng source. .SH XVII. Y2K Compliance in libpng -December 15, 2012 +December 16, 2012 Since the PNG Development group is an ad-hoc body, we can't make an official declaration. @@ -6393,7 +6385,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.7.0alpha02 - December 15, 2012: +Libpng version 1.7.0alpha02 - December 16, 2012: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -6416,7 +6408,7 @@ this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha02, December 15, 2012, are +libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha02, December 16, 2012, are Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors @@ -6515,7 +6507,7 @@ certification mark of the Open Source Initiative. Glenn Randers-Pehrson glennrp at users.sourceforge.net -December 15, 2012 +December 16, 2012 .\" end of man page diff --git a/libpngpf.3 b/libpngpf.3 index 668a79f72..188ec42cc 100644 --- a/libpngpf.3 +++ b/libpngpf.3 @@ -1,4 +1,4 @@ -.TH LIBPNGPF 3 "December 15, 2012" +.TH LIBPNGPF 3 "December 16, 2012" .SH NAME libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0alpha02 (private functions) diff --git a/png.5 b/png.5 index 94159168f..991249bf7 100644 --- a/png.5 +++ b/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "December 15, 2012" +.TH PNG 5 "December 16, 2012" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/png.c b/png.c index 8a3cde597..0ccfed998 100644 --- a/png.c +++ b/png.c @@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -14,7 +14,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_0beta32 Your_png_h_is_not_version_1_6_0beta32; +typedef png_libpng_version_1_7_0alpha02 Your_png_h_is_not_version_1_7_0alpha02; /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -380,40 +380,6 @@ png_destroy_info_struct(png_const_structrp png_ptr, png_infopp info_ptr_ptr) } } -/* Initialize the info structure. This is now an internal function (0.89) - * and applications using it are urged to use png_create_info_struct() - * instead. Use deprecated in 1.6.0, internal use removed (used internally it - * is just a memset). - * - * NOTE: it is almost inconceivable that this API is used because it bypasses - * the user-memory mechanism and the user error handling/warning mechanisms in - * those cases where it does anything other than a memset. - */ -PNG_FUNCTION(void,PNGAPI -png_info_init_3,(png_infopp ptr_ptr, png_size_t png_info_struct_size), - PNG_DEPRECATED) -{ - png_inforp info_ptr = *ptr_ptr; - - png_debug(1, "in png_info_init_3"); - - if (info_ptr == NULL) - return; - - if ((sizeof (png_info)) > png_info_struct_size) - { - *ptr_ptr = NULL; - /* The following line is why this API should not be used: */ - free(info_ptr); - info_ptr = png_voidcast(png_inforp, png_malloc_base(NULL, - (sizeof *info_ptr))); - *ptr_ptr = info_ptr; - } - - /* Set everything to 0 */ - memset(info_ptr, 0, (sizeof *info_ptr)); -} - void PNGAPI png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask, int num) @@ -725,13 +691,13 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.0beta32 - November 25, 2012" PNG_STRING_NEWLINE \ + "libpng version 1.7.0alpha02 - December 16, 2012" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2012 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE; # else - return "libpng version 1.6.0beta32 - November 25, 2012\ + return "libpng version 1.7.0alpha02 - December 16, 2012\ Copyright (c) 1998-2012 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; diff --git a/png.h b/png.h index abc7305f0..9e8884cee 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.6.0beta32 - November 25, 2012 + * libpng version 1.7.0alpha02 - December 16, 2012 * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -11,7 +11,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.6.0beta32 - November 25, 2012: Glenn + * libpng versions 0.97, January 1998, through 1.7.0alpha02 - December 16, 2012: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -199,7 +199,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.6.0beta32, November 25, 2012, are + * libpng versions 1.2.6, August 15, 2004, through 1.7.0alpha02, December 16, 2012, are * Copyright (c) 2004, 2006-2012 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.2.5 * with the following individual added to the list of Contributing Authors: @@ -311,13 +311,13 @@ * Y2K compliance in libpng: * ========================= * - * November 25, 2012 + * December 16, 2012 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.6.0beta32 are Y2K compliant. It is my belief that + * upward through 1.7.0alpha02 are Y2K compliant. It is my belief that * earlier versions were also Y2K compliant. * * Libpng only has two year fields. One is a 2-byte unsigned integer @@ -377,23 +377,23 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.6.0beta32" +#define PNG_LIBPNG_VER_STRING "1.7.0alpha02" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.6.0beta32 - November 25, 2012\n" + " libpng version 1.7.0alpha02 - December 16, 2012\n" -#define PNG_LIBPNG_VER_SONUM 16 -#define PNG_LIBPNG_VER_DLLNUM 16 +#define PNG_LIBPNG_VER_SONUM 17 +#define PNG_LIBPNG_VER_DLLNUM 17 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 -#define PNG_LIBPNG_VER_MINOR 6 +#define PNG_LIBPNG_VER_MINOR 7 #define PNG_LIBPNG_VER_RELEASE 0 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: */ -#define PNG_LIBPNG_VER_BUILD 32 +#define PNG_LIBPNG_VER_BUILD 02 /* Release Status */ #define PNG_LIBPNG_BUILD_ALPHA 1 @@ -410,7 +410,7 @@ #define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with PNG_LIBPNG_BUILD_PRIVATE */ -#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_ALPHA /* Careful here. At one time, Guy wanted to use 082, but that would be octal. * We must not include leading zeros. @@ -418,7 +418,7 @@ * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10600 /* 1.6.0 */ +#define PNG_LIBPNG_VER 10700 /* 1.7.0 */ /* Library configuration: these options cannot be changed after * the library has been built. @@ -523,7 +523,7 @@ extern "C" { /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef char* png_libpng_version_1_6_0beta32; +typedef char* png_libpng_version_1_7_0alpha02; /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * @@ -1055,10 +1055,11 @@ PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), PNG_NORETURN); #ifdef PNG_READ_SUPPORTED -/* Reset the compression stream - * Removed from libpng-1.7.0 +/* REMOVED: this function allowed init structures to be created using the + * default allocation method (typically malloc). Removed in 1.7.0 */ -PNG_REMOVED(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); +PNG_REMOVED(10, void, png_info_init_3, (png_infopp info_ptr, + png_size_t png_info_struct_size), PNG_DEPRECATED) #endif /* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ @@ -1117,7 +1118,7 @@ PNG_EXPORT(22, void, png_read_info, #ifdef PNG_TIME_RFC1123_SUPPORTED /* Convert to a US string format: there is no localization support in this * routine. The original implementation used a 29 character buffer in - * png_struct; this was removed from libpng-1.7.0 + * png_struct, this has been removed (in libpng 1.7.0). */ PNG_REMOVED(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr, png_const_timep ptime),PNG_DEPRECATED) @@ -1927,9 +1928,16 @@ PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 free_me, int num)); -/* Removed from libpng-1.7.0 */ +/* Reassign responsibility for freeing existing data, whether allocated + * by libpng or by the application; this works on the png_info structure passed + * in, it does not change the state for other png_info structures. + * + * It is unlikely that this function works correctly as of 1.6.0 and using it + * may result either in memory leaks or double free of allocated data. It was + * removed in libpng 1.7.0. + */ PNG_REMOVED(99, void, png_data_freer, (png_const_structrp png_ptr, - png_inforp info_ptr, int freer, png_uint_32 mask), PNG_DEPRECATED); + png_inforp info_ptr, int freer, png_uint_32 mask), PNG_DEPRECATED) /* Flags for png_ptr->free_me and info_ptr->free_me */ #define PNG_FREE_HIST 0x0008 @@ -1949,10 +1957,14 @@ PNG_REMOVED(99, void, png_data_freer, (png_const_structrp png_ptr, #define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ #ifdef PNG_USER_MEM_SUPPORTED -PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, - png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED); -PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr, - png_voidp ptr), PNG_DEPRECATED); + /* These were deprecated in libpng 1.6.0 and have been removed from libpng + * 1.7.0; the functionality should be accessed by calling malloc or free + * directly or, if png_error handling is required, calling png_malloc. + */ +PNG_REMOVED(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED) +PNG_REMOVED(101, void, png_free_default, (png_const_structrp png_ptr, + png_voidp ptr), PNG_DEPRECATED) #endif #ifdef PNG_ERROR_TEXT_SUPPORTED diff --git a/pngerror.c b/pngerror.c index a97778b3c..b7ec5f86e 100644 --- a/pngerror.c +++ b/pngerror.c @@ -1,7 +1,7 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngget.c b/pngget.c index 3d5f00807..b7e977780 100644 --- a/pngget.c +++ b/pngget.c @@ -1,7 +1,7 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngmem.c b/pngmem.c index ee42efb2e..f761c3c76 100644 --- a/pngmem.c +++ b/pngmem.c @@ -110,31 +110,11 @@ png_malloc,(png_const_structrp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) ret = png_malloc_base(png_ptr, size); if (ret == NULL) - png_error(png_ptr, "Out of memory"); /* 'm' means png_malloc */ + png_error(png_ptr, "Out of memory"); return ret; } -#ifdef PNG_USER_MEM_SUPPORTED -PNG_FUNCTION(png_voidp,PNGAPI -png_malloc_default,(png_const_structrp png_ptr, png_alloc_size_t size), - PNG_ALLOCATED PNG_DEPRECATED) -{ - png_voidp ret; - - if (png_ptr == NULL) - return NULL; - - /* Passing 'NULL' here bypasses the application provided memory handler. */ - ret = png_malloc_base(NULL/*use malloc*/, size); - - if (ret == NULL) - png_error(png_ptr, "Out of Memory"); /* 'M' means png_malloc_default */ - - return ret; -} -#endif /* PNG_USER_MEM_SUPPORTED */ - /* This function was added at libpng version 1.2.3. The png_malloc_warn() * function will issue a png_warning and return NULL instead of issuing a * png_error, if it fails to allocate the requested memory. @@ -170,17 +150,8 @@ png_free(png_const_structrp png_ptr, png_voidp ptr) png_ptr->free_fn(png_constcast(png_structrp,png_ptr), ptr); else - png_free_default(png_ptr, ptr); -} - -PNG_FUNCTION(void,PNGAPI -png_free_default,(png_const_structrp png_ptr, png_voidp ptr),PNG_DEPRECATED) -{ - if (png_ptr == NULL || ptr == NULL) - return; #endif /* PNG_USER_MEM_SUPPORTED */ - - free(ptr); + free(ptr); } #ifdef PNG_USER_MEM_SUPPORTED diff --git a/pngpriv.h b/pngpriv.h index 5d42f47f0..d81a6f9bb 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -6,7 +6,7 @@ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -1873,7 +1873,8 @@ PNG_INTERNAL_FUNCTION(void, png_image_free, (png_imagep image), PNG_EMPTY); #endif /* SIMPLIFIED READ/WRITE */ #ifdef PNG_FILTER_OPTIMIZATIONS -PNG_INTERNAL_FUNCTION(void, PNG_FILTER_OPTIMIZATIONS, (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void, PNG_FILTER_OPTIMIZATIONS, (png_structrp png_ptr, + unsigned int bpp), PNG_EMPTY); /* This is the initialization function for hardware specific optimizations, * one implementation (for ARM NEON machines) is contained in * arm/filter_neon.c. It need not be defined - the generic code will be used diff --git a/pngrio.c b/pngrio.c index f9c842f4b..364581a62 100644 --- a/pngrio.c +++ b/pngrio.c @@ -1,7 +1,7 @@ /* pngrio.c - functions for data input * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngrtran.c b/pngrtran.c index 032d14017..32d19ec0a 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1,7 +1,7 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngrutil.c b/pngrutil.c index 8e66a5979..6b9b5f869 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngset.c b/pngset.c index f52a20731..01cc581a8 100644 --- a/pngset.c +++ b/pngset.c @@ -1,7 +1,7 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngtest.c b/pngtest.c index 3859a6d62..b48d7efd4 100644 --- a/pngtest.c +++ b/pngtest.c @@ -1,7 +1,7 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -1949,4 +1949,4 @@ main(void) #endif /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_0beta32 Your_png_h_is_not_version_1_6_0beta32; +typedef png_libpng_version_1_7_0alpha02 Your_png_h_is_not_version_1_7_0alpha02; diff --git a/pngtrans.c b/pngtrans.c index a80c32c12..ce8fe3dd0 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -1,7 +1,7 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngwio.c b/pngwio.c index cb4439f70..d6f6a9d7c 100644 --- a/pngwio.c +++ b/pngwio.c @@ -1,7 +1,7 @@ /* pngwio.c - functions for data output * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngwrite.c b/pngwrite.c index 1578dd3c3..ef07a3ba9 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1,7 +1,7 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngwutil.c b/pngwutil.c index 378ad6199..f61bed93b 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1,7 +1,7 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.6.0 [(PENDING RELEASE)] + * Last changed in libpng 1.7.0 [(PENDING RELEASE)] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/projects/vstudio/readme.txt b/projects/vstudio/readme.txt index 37269d51e..45acb681b 100644 --- a/projects/vstudio/readme.txt +++ b/projects/vstudio/readme.txt @@ -1,7 +1,7 @@ VisualStudio instructions -libpng version 1.7.0alpha02 - December 15, 2012 +libpng version 1.7.0alpha02 - December 16, 2012 Copyright (c) 1998-2010 Glenn Randers-Pehrson diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props index 3d0c63e62..4e1187d16 100644 --- a/projects/vstudio/zlib.props +++ b/projects/vstudio/zlib.props @@ -2,7 +2,7 @@