diff -ru4NwbB libpng-1.4.0/Makefile.am libpng-1.5.0beta03/Makefile.am --- libpng-1.4.0/Makefile.am 2010-01-02 23:05:43.198938331 -0600 +++ libpng-1.5.0beta03/Makefile.am 2010-02-08 15:36:39.029036646 -0600 @@ -1,13 +1,7 @@ # Makefile.am: # Source file for Makefile.in (and hence Makefile) # -# Makefile.am need only be changed on a major version number -# change (e.g. libpng12 --> libpng13). In that case seach -# this file for every instance of the old base name (libpng12) -# and change to the new one (libpng13), then change the -# -version-number settings below so that the new values have -# the correct major part (first field). PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ # libpng does not follow GNU file name conventions @@ -15,43 +9,42 @@ # test programs - run on make check, make distcheck check_PROGRAMS= pngtest pngtest_SOURCES = pngtest.c -pngtest_LDADD = libpng14.la +pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la TESTS = test-pngtest.sh TESTS_ENVIRONMENT= srcdir=$(srcdir) # man pages dist_man_MANS= libpng.3 libpngpf.3 png.5 # generate the -config scripts if required -binconfigs= libpng14-config -EXTRA_SCRIPTS= libpng-config libpng14-config +binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config +EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config bin_SCRIPTS= @binconfigs@ # rules to build libpng, only build the old library on request -lib_LTLIBRARIES=libpng14.la -EXTRA_LTLIBRARIES= libpng.la -libpng14_la_SOURCES = png.c pngset.c pngget.c pngrutil.c \ +lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +# EXTRA_LTLIBRARIES= libpng.la +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngset.c pngget.c pngrutil.c \ pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c \ - png.h pngconf.h pngpriv.h + png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h -libpng14_la_CPPFLAGS = @LIBPNG_DEFINES@ +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@ -# MAJOR UPGRADE: the version-number settings below must be changed. -libpng14_la_LDFLAGS = -no-undefined -export-dynamic \ - -version-number 14:@PNGLIB_RELEASE@:0 +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ + -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 if HAVE_LD_VERSION_SCRIPT # Versioned symbols and restricted exports - libpng14_la_LDFLAGS += -Wl,--version-script=libpng.vers - libpng14_la_DEPENDENCIES = libpng.vers + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers else # Only restricted exports when possible - libpng14_la_LDFLAGS += -export-symbols libpng.sym - libpng14_la_DEPENDENCIES = libpng.sym + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym endif # Avoid depending upon Character Ranges. AN = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' @@ -62,13 +55,13 @@ # pkg-config stuff, note that libpng.pc is always required in order # to get the correct library pkgconfigdir = @pkgconfigdir@ -pkgconfig_DATA = libpng14.pc +pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc #extra source distribution files. EXTRA_DIST= \ - ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ + ANNOUNCE CHANGES INSTALL LICENSE README TODO \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ ${srcdir}/projects/cbuilder5/* \ ${srcdir}/projects/visualc6/* \ ${srcdir}/projects/visualc71/* \ @@ -81,9 +74,9 @@ ${srcdir}/contrib/visupng/* \ $(TESTS) \ example.c libpng-1.5.0beta03.txt -CLEANFILES= pngout.png libpng14.pc libpng14-config libpng.vers \ +CLEANFILES= pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers \ libpng.sym MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ config.sub configure depcomp install-sh ltmain.sh missing @@ -120,15 +113,15 @@ pngconf.h cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc -# do evil things to libpng to cause libpng14 to be used +# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used install-exec-hook: cd $(DESTDIR)$(bindir); rm -f libpng-config cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config @set -x;\ cd $(DESTDIR)$(libdir);\ - for ext in a la so sl dylib; do\ + for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib; do\ rm -f libpng.$$ext;\ if test -f $(PNGLIB_BASENAME).$$ext; then\ $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\ fi;\ diff -ru4NwbB libpng-1.4.0/configure.ac libpng-1.5.0beta03/configure.ac --- libpng-1.4.0/configure.ac 2010-01-02 23:05:43.205506090 -0600 +++ libpng-1.5.0beta03/configure.ac 2010-02-08 15:36:39.034322590 -0600 @@ -24,9 +24,9 @@ AM_MAINTAINER_MODE PNGLIB_VERSION=1.5.0beta03 PNGLIB_MAJOR=1 -PNGLIB_MINOR=4 +PNGLIB_MINOR=5 PNGLIB_RELEASE=%RELEASE% dnl End of version number stuff diff -ru4NwbB libpng-1.4.0/contrib/gregbook/Makefile.sgi libpng-1.5.0beta03/contrib/gregbook/Makefile.sgi --- libpng-1.4.0/contrib/gregbook/Makefile.sgi 2010-01-02 23:05:36.669867259 -0600 +++ libpng-1.5.0beta03/contrib/gregbook/Makefile.sgi 2010-02-08 15:36:33.046250868 -0600 @@ -22,11 +22,11 @@ # macros -------------------------------------------------------------------- -PNGINC = -I/usr/local/include/libpng14 -PNGLIB = -L/usr/local/lib -lpng14 # dynamically linked against libpng -#PNGLIB = /usr/local/lib/libpng14.a # statically linked against libpng +PNGINC = -I/usr/local/include/libpng15 +PNGLIB = -L/usr/local/lib -lpng15 # dynamically linked against libpng +#PNGLIB = /usr/local/lib/libpng15.a # statically linked against libpng # or: #PNGINC = -I../.. #PNGLIB = -L../.. -lpng #PNGLIB = ../../libpng.a diff -ru4NwbB libpng-1.4.0/contrib/gregbook/Makefile.unx libpng-1.5.0beta03/contrib/gregbook/Makefile.unx --- libpng-1.4.0/contrib/gregbook/Makefile.unx 2010-01-02 23:05:36.682432821 -0600 +++ libpng-1.5.0beta03/contrib/gregbook/Makefile.unx 2010-02-08 15:36:33.055425553 -0600 @@ -25,16 +25,16 @@ # macros -------------------------------------------------------------------- #PNGDIR = /usr/local/lib -#PNGINC = -I/usr/local/include/libpng14 -#PNGLIBd = -L$(PNGDIR) -lpng14 # dynamically linked, installed libpng -#PNGLIBs = $(PNGDIR)/libpng14.a # statically linked, installed libpng +#PNGINC = -I/usr/local/include/libpng15 +#PNGLIBd = -L$(PNGDIR) -lpng15 # dynamically linked, installed libpng +#PNGLIBs = $(PNGDIR)/libpng15.a # statically linked, installed libpng # or: PNGDIR = ../..# this one is for libpng-x.y.z/contrib/gregbook builds #PNGDIR = ../libpng PNGINC = -I$(PNGDIR) -PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng14 # dynamically linked +PNGLIBd = -Wl,-rpath,$(PNGDIR) -L$(PNGDIR) -lpng15 # dynamically linked PNGLIBs = $(PNGDIR)/libpng.a # statically linked, local libpng ZDIR = /usr/local/lib #ZDIR = /usr/lib64 diff -ru4NwbB libpng-1.4.0/contrib/pngminim/decoder/makefile libpng-1.5.0beta03/contrib/pngminim/decoder/makefile --- libpng-1.4.0/contrib/pngminim/decoder/makefile 2010-01-02 23:05:37.345360838 -0600 +++ libpng-1.5.0beta03/contrib/pngminim/decoder/makefile 2010-02-08 15:36:33.640963856 -0600 @@ -24,9 +24,9 @@ pngset$(O) pngtrans$(O) $(ZOBJS) # implicit make rules ------------------------------------------------------- -.c$(O): png.h pngconf.h pngpriv.h pngusr.h zlib.h +.c$(O): png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h pngusr.h zlib.h $(CC) -c $(CFLAGS) $< # dependencies diff -ru4NwbB libpng-1.4.0/contrib/pngminim/decoder/pngusr.h libpng-1.5.0beta03/contrib/pngminim/decoder/pngusr.h --- libpng-1.4.0/contrib/pngminim/decoder/pngusr.h 2010-01-02 23:05:37.354267767 -0600 +++ libpng-1.5.0beta03/contrib/pngminim/decoder/pngusr.h 2010-02-08 15:36:33.649750657 -0600 @@ -68,6 +68,8 @@ #define PNG_NO_ZALLOC_ZERO #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS #define PNG_NO_PROGRESSIVE_READ +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS #endif /* MINRDPNGCONF_H */ diff -ru4NwbB libpng-1.4.0/contrib/pngminim/encoder/makefile libpng-1.5.0beta03/contrib/pngminim/encoder/makefile --- libpng-1.4.0/contrib/pngminim/encoder/makefile 2010-01-02 23:05:37.388210791 -0600 +++ libpng-1.5.0beta03/contrib/pngminim/encoder/makefile 2010-02-08 15:36:33.684176457 -0600 @@ -23,9 +23,9 @@ pngwtran$(O) pngwutil$(O) $(ZOBJS) # implicit make rules ------------------------------------------------------- -.c$(O): png.h pngconf.h pngpriv.h pngusr.h zlib.h +.c$(O): png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h pngusr.h zlib.h $(CC) -c $(CFLAGS) $< # dependencies diff -ru4NwbB libpng-1.4.0/contrib/pngminim/encoder/pngusr.h libpng-1.5.0beta03/contrib/pngminim/encoder/pngusr.h --- libpng-1.4.0/contrib/pngminim/encoder/pngusr.h 2010-01-02 23:05:37.396982261 -0600 +++ libpng-1.5.0beta03/contrib/pngminim/encoder/pngusr.h 2010-02-08 15:36:33.692968685 -0600 @@ -66,6 +66,8 @@ #define PNG_NO_CONSOLE_IO #define PNG_NO_ZALLOC_ZERO #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS #endif /* MINWRPNGCONF_H */ diff -ru4NwbB libpng-1.4.0/contrib/pngminim/preader/makefile libpng-1.5.0beta03/contrib/pngminim/preader/makefile --- libpng-1.4.0/contrib/pngminim/preader/makefile 2010-01-02 23:05:37.424490062 -0600 +++ libpng-1.5.0beta03/contrib/pngminim/preader/makefile 2010-02-08 15:36:33.718954912 -0600 @@ -40,9 +40,9 @@ pngset$(O) pngtrans$(O) $(ZOBJS) # implicit make rules ------------------------------------------------------- -.c$(O): png.h pngconf.h pngpriv.h readpng2.h pngusr.h zlib.h +.c$(O): png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h readpng2.h pngusr.h zlib.h $(CC) -c $(CFLAGS) $< # dependencies diff -ru4NwbB libpng-1.4.0/contrib/pngminim/preader/pngusr.h libpng-1.5.0beta03/contrib/pngminim/preader/pngusr.h --- libpng-1.4.0/contrib/pngminim/preader/pngusr.h 2010-01-02 23:05:37.434084192 -0600 +++ libpng-1.5.0beta03/contrib/pngminim/preader/pngusr.h 2010-02-08 15:36:33.727823148 -0600 @@ -58,6 +58,8 @@ #define PNG_NO_CONSOLE_IO #define PNG_NO_ZALLOC_ZERO #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS #endif /* MINPRDPNGCONF_H */ diff -ru4NwbB libpng-1.4.0/example.c libpng-1.5.0beta03/example.c --- libpng-1.4.0/example.c 2010-01-02 23:05:36.440226864 -0600 +++ libpng-1.5.0beta03/example.c 2010-02-08 15:36:32.854329107 -0600 @@ -1,9 +1,9 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.0 [January 3, 2010] * This file has been placed in the public domain by the authors. * Maintained 1998-2010 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff -ru4NwbB libpng-1.4.0/png.c libpng-1.5.0beta03/png.c --- libpng-1.4.0/png.c 2010-01-02 23:05:36.448004439 -0600 +++ libpng-1.5.0beta03/png.c 2010-02-08 15:36:32.861870911 -0600 @@ -1,8 +1,8 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -10,8 +10,9 @@ * For conditions of distribution and use, see the disclaimer * and license in png.h */ +#define PNG_INTERNAL #define PNG_NO_EXTERN #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #include "pngpriv.h" diff -ru4NwbB libpng-1.4.0/png.h libpng-1.5.0beta03/png.h --- libpng-1.4.0/png.h 2010-01-02 23:05:36.416098186 -0600 +++ libpng-1.5.0beta03/png.h 2010-02-08 15:36:32.819193600 -0600 @@ -133,8 +133,12 @@ * 1.4.0rc01 14 10400 14.so.14.0[.0] * 1.4.0beta88-109 14 10400 14.so.14.0[.0] * 1.4.0rc02-08 14 10400 14.so.14.0[.0] * 1.4.0 14 10400 14.so.14.0[.0] + * 1.4.1beta01-03 14 10401 14.so.14.1[.0] + * 1.4.1rc01 14 10401 14.so.14.1[.0] + * 1.4.1beta04-09 14 10401 14.so.14.1[.0] + * 1.5.0beta01-02 15 10500 15.so.15.0[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be * used for changes in backward compatibility, as it is intended. The @@ -378,9 +382,9 @@ * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only * 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 10400 /* 1.4.0 */ +#define PNG_LIBPNG_VER %VER_NUM% /* %MAJOR%.%MINOR%.%RELEASE% */ #ifndef PNG_VERSION_INFO_ONLY /* Include the compression library's header */ #include "zlib.h" @@ -586,284 +590,31 @@ typedef png_unknown_chunk FAR * png_unknown_chunkp; typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp; #endif -/* png_info is a structure that holds the information in a PNG file so - * that the application can find out the characteristics of the image. - * If you are reading the file, this structure will tell you what is - * in the PNG file. If you are writing the file, fill in the information - * you want to put into the PNG file, then call png_write_info(). - * The names chosen should be very close to the PNG specification, so - * consult that document for information about the meaning of each field. - * - * With libpng < 0.95, it was only possible to directly set and read the - * the values in the png_info_struct, which meant that the contents and - * order of the values had to remain fixed. With libpng 0.95 and later, - * however, there are now functions that abstract the contents of - * png_info_struct from the application, so this makes it easier to use - * libpng with dynamic libraries, and even makes it possible to use - * libraries that don't have all of the libpng ancillary chunk-handing - * functionality. - * - * In any case, the order of the parameters in png_info_struct should NOT - * be changed for as long as possible to keep compatibility with applications - * that use the old direct-access method with png_info_struct. - * - * The following members may have allocated storage attached that should be - * cleaned up before the structure is discarded: palette, trans, text, - * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, - * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these - * are automatically freed when the info structure is deallocated, if they were - * allocated internally by libpng. This behavior can be changed by means - * of the png_data_freer() function. - * - * More allocation details: all the chunk-reading functions that - * change these members go through the corresponding png_set_* - * functions. A function to clear these members is available: see - * png_free_data(). The png_set_* functions do not depend on being - * able to point info structure members to any of the storage they are - * passed (they make their own copies), EXCEPT that the png_set_text - * functions use the same storage passed to them in the text_ptr or - * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns - * functions do not make their own copies. - */ -typedef struct png_info_struct -{ - /* the following are necessary for every PNG file */ - png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */ - png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */ - png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ below) */ - png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed row */ - png_colorp palette PNG_DEPSTRUCT; /* array of color values (valid & PNG_INFO_PLTE) */ - png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in "palette" (PLTE) */ - png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette color (tRNS) */ - png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ - png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below (from IHDR) */ - /* The following three should have been named *_method not *_type */ - png_byte compression_type PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ - png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ - png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - - /* The following is informational only on read, and not used on writes. */ - png_byte channels PNG_DEPSTRUCT; /* number of data channels per pixel (1, 2, 3, 4) */ - png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ - png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for future use */ - png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng from start of file */ - - /* The rest of the data is optional. If you are reading, check the - * valid field to see if the information in these are valid. If you - * are writing, set the valid field to those chunks you want written, - * and initialize the appropriate fields below. - */ - -#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) - /* The gAMA chunk describes the gamma characteristics of the system - * on which the image was created, normally in the range [1.0, 2.5]. - * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. - */ - float gamma PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ -#endif - -#ifdef PNG_sRGB_SUPPORTED - /* GR-P, 0.96a */ - /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ - png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */ -#endif - -#ifdef PNG_TEXT_SUPPORTED - /* The tEXt, and zTXt chunks contain human-readable textual data in - * uncompressed, compressed, and optionally compressed forms, respectively. - * The data in "text" is an array of pointers to uncompressed, - * null-terminated C strings. Each chunk has a keyword that describes the - * textual data contained in that chunk. Keywords are not required to be - * unique, and the text string may be empty. Any number of text chunks may - * be in an image. - */ - int num_text PNG_DEPSTRUCT; /* number of comments read/to write */ - int max_text PNG_DEPSTRUCT; /* current size of text array */ - png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */ -#endif /* PNG_TEXT_SUPPORTED */ - -#ifdef PNG_tIME_SUPPORTED - /* The tIME chunk holds the last time the displayed image data was - * modified. See the png_time struct for the contents of this struct. - */ - png_time mod_time PNG_DEPSTRUCT; -#endif - -#ifdef PNG_sBIT_SUPPORTED - /* The sBIT chunk specifies the number of significant high-order bits - * in the pixel data. Values are in the range [1, bit_depth], and are - * only specified for the channels in the pixel data. The contents of - * the low-order bits is not specified. Data is valid if - * (valid & PNG_INFO_sBIT) is non-zero. - */ - png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */ -#endif - -#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ -defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The tRNS chunk supplies transparency data for paletted images and - * other image types that don't need a full alpha channel. There are - * "num_trans" transparency values for a paletted image, stored in the - * same order as the palette colors, starting from index 0. Values - * for the data are in the range [0, 255], ranging from fully transparent - * to fully opaque, respectively. For non-paletted images, there is a - * single color specified that should be treated as fully transparent. - * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. - */ - png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted image */ - png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-palette image */ -#endif - -#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - /* The bKGD chunk gives the suggested image background color if the - * display program does not have its own background color and the image - * is needs to composited onto a background before display. The colors - * in "background" are normally in the same color space/depth as the - * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. - */ - png_color_16 background PNG_DEPSTRUCT; -#endif - -#ifdef PNG_oFFs_SUPPORTED - /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards - * and downwards from the top-left corner of the display, page, or other - * application-specific co-ordinate space. See the PNG_OFFSET_ defines - * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. - */ - png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */ - png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */ - png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */ -#endif -#ifdef PNG_pHYs_SUPPORTED - /* The pHYs chunk gives the physical pixel density of the image for - * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ - * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. - */ - png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */ - png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */ - png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */ -#endif - -#ifdef PNG_hIST_SUPPORTED - /* The hIST chunk contains the relative frequency or importance of the - * various palette entries, so that a viewer can intelligently select a - * reduced-color palette, if required. Data is an array of "num_palette" - * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) - * is non-zero. - */ - png_uint_16p hist PNG_DEPSTRUCT; -#endif - -#ifdef PNG_cHRM_SUPPORTED - /* The cHRM chunk describes the CIE color characteristics of the monitor - * on which the PNG was created. This data allows the viewer to do gamut - * mapping of the input image to ensure that the viewer sees the same - * colors in the image as the creator. Values are in the range - * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. - */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - float x_white PNG_DEPSTRUCT; - float y_white PNG_DEPSTRUCT; - float x_red PNG_DEPSTRUCT; - float y_red PNG_DEPSTRUCT; - float x_green PNG_DEPSTRUCT; - float y_green PNG_DEPSTRUCT; - float x_blue PNG_DEPSTRUCT; - float y_blue PNG_DEPSTRUCT; -#endif -#endif - -#ifdef PNG_pCAL_SUPPORTED - /* The pCAL chunk describes a transformation between the stored pixel - * values and original physical data values used to create the image. - * The integer range [0, 2^bit_depth - 1] maps to the floating-point - * range given by [pcal_X0, pcal_X1], and are further transformed by a - * (possibly non-linear) transformation function given by "pcal_type" - * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ - * defines below, and the PNG-Group's PNG extensions document for a - * complete description of the transformations and how they should be - * implemented, and for a description of the ASCII parameter strings. - * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. - */ - png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */ - png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */ - png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */ - png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical units */ - png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing parameter values */ - png_byte pcal_type PNG_DEPSTRUCT; /* equation type (see PNG_EQUATION_ below) */ - png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given in pcal_params */ -#endif - -/* New members added in libpng-1.0.6 */ - png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ - -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ - defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) - /* Storage for unknown chunks that the library doesn't recognize. */ - png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT; - png_size_t unknown_chunks_num PNG_DEPSTRUCT; -#endif - -#ifdef PNG_iCCP_SUPPORTED - /* iCCP chunk data. */ - png_charp iccp_name PNG_DEPSTRUCT; /* profile name */ - png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium profile data */ - /* Note to maintainer: should be png_bytep */ - png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */ - png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */ -#endif +#ifdef PNG_INTERNAL +#include "pnginfo.h" +#else -#ifdef PNG_sPLT_SUPPORTED - /* Data on sPLT chunks (there may be more than one). */ - png_sPLT_tp splt_palettes PNG_DEPSTRUCT; - png_uint_32 splt_palettes_num PNG_DEPSTRUCT; -#endif +/* provide an incomplete structure-type-reference for png_info */ -#ifdef PNG_sCAL_SUPPORTED - /* The sCAL chunk describes the actual physical dimensions of the - * subject matter of the graphic. The chunk contains a unit specification - * a byte value, and two ASCII strings representing floating-point - * values. The values are width and height corresponsing to one pixel - * in the image. This external representation is converted to double - * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. - */ - png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */ - double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */ -#endif -#ifdef PNG_FIXED_POINT_SUPPORTED - png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */ - png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */ -#endif +# if 1 /* this works on FreeBSD but is not in the C language. */ + /* gcc (GCC) 4.2.1 20070719 [FreeBSD] */ + /* also on Sunos running gcc (GCC) 4.3.4 */ +typedef struct { ; } png_info; #endif -#ifdef PNG_INFO_IMAGE_SUPPORTED - /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ - /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ - png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */ +# if 0 /* does not work on FreeBSD or SunOS. */ +typedef struct png_info; #endif -#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) - png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */ +# if 0 /* does not work on FreeBSD or SunOS */ +struct png_info; #endif -#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) - png_fixed_point int_x_white PNG_DEPSTRUCT; - png_fixed_point int_y_white PNG_DEPSTRUCT; - png_fixed_point int_x_red PNG_DEPSTRUCT; - png_fixed_point int_y_red PNG_DEPSTRUCT; - png_fixed_point int_x_green PNG_DEPSTRUCT; - png_fixed_point int_y_green PNG_DEPSTRUCT; - png_fixed_point int_x_blue PNG_DEPSTRUCT; - png_fixed_point int_y_blue PNG_DEPSTRUCT; #endif -} png_info; - typedef png_info FAR * png_infop; typedef png_info FAR * FAR * png_infopp; /* Maximum positive integer used in PNG is (2^31)-1 */ @@ -993,9 +744,10 @@ typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32, int)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED -typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop)); +typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, + png_infop)); typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop)); typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep, png_uint_32, int)); #endif @@ -1006,9 +758,10 @@ png_row_infop, png_bytep)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); +typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, + png_unknown_chunkp)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); #endif @@ -1047,300 +800,12 @@ typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_alloc_size_t)); typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp)); -/* The structure that holds the information to read and write PNG files. - * The only people who need to care about what is inside of this are the - * people who will be modifying the library for their own special needs. - * It should NOT be accessed directly by an application, except to store - * the jmp_buf. - */ - -struct png_struct_def -{ -#ifdef PNG_SETJMP_SUPPORTED - jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */ - png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto function. */ -#endif - png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing errors and aborting */ - png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing warnings */ - png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for error functions */ - png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing output data */ - png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading input data */ - png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct for I/O functions */ - -#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */ -#endif - -#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED - png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */ -#endif - -/* These were added in libpng-1.0.2 */ -#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED -#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ - defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */ - png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user transformed pixels */ - png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */ -#endif -#endif - - png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in the PNG file */ - png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various things to libpng */ - png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */ - - z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression structure (below) */ - png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ - png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ - int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ - int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ - int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window bits */ - int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory level */ - int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression strategy */ - - png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ - png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ - png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ - png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ - png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ - png_size_t irowbytes PNG_DEPSTRUCT; /* size of current interlaced row in bytes */ - png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced row in pixels */ - png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ - png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */ - png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ - png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row when filtering */ - png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row when filtering */ - png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row when filtering */ - png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row when filtering */ - png_row_info row_info PNG_DEPSTRUCT; /* used for transformation routines */ - - png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ - png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ - png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ - png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in palette */ - png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ - png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current chunk */ - png_byte compression PNG_DEPSTRUCT; /* file compression type (always 0) */ - png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ - png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ - png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ - png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see PNG_FILTER_ below ) */ - png_byte color_type PNG_DEPSTRUCT; /* color type of file */ - png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ - png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ - png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ - png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ - png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ - png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from start of file */ - -#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) - png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel expansion */ -#endif - -#ifdef PNG_bKGD_SUPPORTED - png_byte background_gamma_type PNG_DEPSTRUCT; -# ifdef PNG_FLOATING_POINT_SUPPORTED - float background_gamma PNG_DEPSTRUCT; -# endif - png_color_16 background PNG_DEPSTRUCT; /* background color in screen gamma space */ -#ifdef PNG_READ_GAMMA_SUPPORTED - png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */ -#endif -#endif /* PNG_bKGD_SUPPORTED */ - -#ifdef PNG_WRITE_FLUSH_SUPPORTED - png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */ - png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, 0 - no flush */ - png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since last flush */ -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits 16-bit gamma */ -#ifdef PNG_FLOATING_POINT_SUPPORTED - float gamma PNG_DEPSTRUCT; /* file gamma value */ - float screen_gamma PNG_DEPSTRUCT; /* screen gamma value (display_exponent) */ -#endif -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit depth files */ - png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ - png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ - png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */ - png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ - png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ -#endif - -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) - png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each available channel */ -#endif - -#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) - png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit tranformation */ -#endif - -#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ - || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted files */ - png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-paletted files */ -#endif - - png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each row is decoded */ - png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */ -#ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */ - png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each prog. row is decoded */ - png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image is complete */ - png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in save_buffer */ - png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously read data */ - png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in current_buffer */ - png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently used data */ - png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input chunk */ - png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in input data */ - png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now in save_buffer */ - png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of save_buffer */ - png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of available input data */ - png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now in current_buffer */ - int process_mode PNG_DEPSTRUCT; /* what push library is currently doing */ - int cur_palette PNG_DEPSTRUCT; /* current push library palette index */ - -# ifdef PNG_TEXT_SUPPORTED - png_size_t current_text_size PNG_DEPSTRUCT; /* current size of text input data */ - png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left to read in input */ - png_charp current_text PNG_DEPSTRUCT; /* current text chunk buffer */ - png_charp current_text_ptr PNG_DEPSTRUCT; /* current location in current_text */ -# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ - -#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ - -#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) -/* For the Borland special 64K segment handler */ - png_bytepp offset_table_ptr PNG_DEPSTRUCT; - png_bytep offset_table PNG_DEPSTRUCT; - png_uint_16 offset_table_number PNG_DEPSTRUCT; - png_uint_16 offset_table_count PNG_DEPSTRUCT; - png_uint_16 offset_table_count_free PNG_DEPSTRUCT; -#endif - -#ifdef PNG_READ_DITHER_SUPPORTED - png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */ - png_bytep dither_index PNG_DEPSTRUCT; /* index translation for palette files */ -#endif - -#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) - png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ -#endif - -#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row filter selection */ - png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights for previous rows */ - png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */ - png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous line(s) */ - png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for previous line(s) */ - png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter calculation cost */ - png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter calculation cost */ -#endif - -#ifdef PNG_TIME_RFC1123_SUPPORTED - png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ -#endif - -/* New members added in libpng-1.0.6 */ - - png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ - -#ifdef PNG_USER_CHUNKS_SUPPORTED - png_voidp user_chunk_ptr PNG_DEPSTRUCT; - png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */ +#ifdef PNG_INTERNAL +#include "pngstruct.h" #endif -#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED - int num_chunk_list PNG_DEPSTRUCT; - png_bytep chunk_list PNG_DEPSTRUCT; -#endif - -/* New members added in libpng-1.0.3 */ -#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED - png_byte rgb_to_gray_status PNG_DEPSTRUCT; - /* These were changed from png_byte in libpng-1.0.6 */ - png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT; - png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT; - png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT; -#endif - -/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ -#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ - defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ - defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) -/* Changed from png_byte to png_uint_32 at version 1.2.0 */ - png_uint_32 mng_features_permitted PNG_DEPSTRUCT; -#endif - -/* New member added in libpng-1.0.7 */ -#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_fixed_point int_gamma PNG_DEPSTRUCT; -#endif - -/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ -#ifdef PNG_MNG_FEATURES_SUPPORTED - png_byte filter_type PNG_DEPSTRUCT; -#endif - -/* New members added in libpng-1.2.0 */ - -/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ -#ifdef PNG_USER_MEM_SUPPORTED - png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for mem functions */ - png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for allocating memory */ - png_free_ptr free_fn PNG_DEPSTRUCT; /* function for freeing memory */ -#endif - -/* New member added in libpng-1.0.13 and 1.2.0 */ - png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ - -#ifdef PNG_READ_DITHER_SUPPORTED -/* The following three members were added at version 1.0.14 and 1.2.4 */ - png_bytep dither_sort PNG_DEPSTRUCT; /* working sort array */ - png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original index currently is */ - /* in the palette */ - png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index points to this */ - /* palette color */ -#endif - -/* New members added in libpng-1.0.16 and 1.2.6 */ - png_byte compression_type PNG_DEPSTRUCT; - -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_uint_32 user_width_max PNG_DEPSTRUCT; - png_uint_32 user_height_max PNG_DEPSTRUCT; - /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown - * chunks that can be stored (0x7fffffff means unlimited). - */ - png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT; -#endif - -/* New member added in libpng-1.0.25 and 1.2.17 */ -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED - /* Storage for unknown chunk that the library doesn't recognize. */ - png_unknown_chunk unknown_chunk PNG_DEPSTRUCT; -#endif - -/* New members added in libpng-1.2.26 */ - png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT; - png_uint_32 old_prev_row_size PNG_DEPSTRUCT; - -/* New member added in libpng-1.2.30 */ - png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ - -/* New member added in libpng-1.4.0 */ -#ifdef PNG_IO_STATE_SUPPORTED - png_uint_32 io_state PNG_DEPSTRUCT; -#endif -}; - - /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ typedef png_structp version_%_VER_%; @@ -1379,17 +844,13 @@ extern PNG_EXPORT(png_structp,png_create_write_struct) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; -#ifdef PNG_WRITE_SUPPORTED extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size) PNGARG((png_structp png_ptr)); -#endif -#ifdef PNG_WRITE_SUPPORTED extern PNG_EXPORT(void,png_set_compression_buffer_size) PNGARG((png_structp png_ptr, png_size_t size)); -#endif /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp * match up. */ @@ -1401,9 +862,10 @@ * allocated by the library - the call will return NULL on a mismatch * indicating an ABI mismatch. */ extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn) - PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); + PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t + jmp_buf_size)); # define png_jmpbuf(png_ptr) \ (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) #else # define png_jmpbuf(png_ptr) \ @@ -1546,9 +1008,10 @@ /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); #endif -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); #endif @@ -1587,9 +1050,11 @@ extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_DITHER_SUPPORTED -/* Turn on dithering, and reduce the palette to the number of colors available. */ +/* Turn on dithering, and reduce the palette to the number of colors + * available. + */ extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_dither)); #endif @@ -1804,9 +1269,10 @@ */ #ifdef PNG_STDIO_SUPPORTED /* Initialize the input/output for the PNG file to the default functions. */ -extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); +extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, + png_FILE_p fp)); #endif /* Replace the (error and abort), and warning functions with user * supplied functions. If no messages are to be printed you must still @@ -2361,9 +1827,10 @@ #endif extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp + png_ptr)); extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp @@ -2396,8 +1863,13 @@ extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp png_ptr, png_uint_32 user_chunk_cache_max)); extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max) PNGARG((png_structp png_ptr)); +/* Added in libpng-1.4.1 */ +extern PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp + png_ptr, png_alloc_size_t user_chunk_cache_max)); +extern PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max) + PNGARG((png_structp png_ptr)); #endif #if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) PNG_EXPORT(png_uint_32,png_get_pixels_per_inch) PNGARG((png_structp png_ptr, @@ -2459,17 +1931,19 @@ /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ # define png_composite(composite, fg, alpha, bg) \ - { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \ - + (png_uint_16)(bg)*(png_uint_16)(255 - \ - (png_uint_16)(alpha)) + (png_uint_16)128); \ + { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + (png_uint_16)128); \ (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } # define png_composite_16(composite, fg, alpha, bg) \ - { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \ - + (png_uint_32)(bg)*(png_uint_32)(65535L - \ - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ + { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(png_uint_32)(65535L \ + - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } #else /* Standard method using integer division */ diff -ru4NwbB libpng-1.4.0/pngconf.h libpng-1.5.0beta03/pngconf.h --- libpng-1.4.0/pngconf.h 2010-01-02 23:05:36.424884679 -0600 +++ libpng-1.5.0beta03/pngconf.h 2010-02-08 15:36:32.827834808 -0600 @@ -27,9 +27,11 @@ #endif /* Added at libpng-1.2.9 */ -/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" script. */ +/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" + * script. + */ #ifdef PNG_CONFIGURE_LIBPNG # ifdef HAVE_CONFIG_H # include "config.h" # endif @@ -671,27 +673,49 @@ # define PNG_USER_MEM_SUPPORTED #endif /* Added at libpng-1.2.6 */ -#ifndef PNG_SET_USER_LIMITS_SUPPORTED # ifndef PNG_NO_SET_USER_LIMITS +# ifndef PNG_SET_USER_LIMITS_SUPPORTED # define PNG_SET_USER_LIMITS_SUPPORTED # endif + /* Feature added at libpng-1.4.0, this flag added at 1.4.1 */ +# ifndef PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +# define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED +# endif + /* Feature added at libpng-1.4.1, this flag added at 1.4.1 */ +# ifndef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +# define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +# endif +#endif + +/* Added at libpng-1.2.43 */ +#ifndef PNG_NO_USER_LIMITS +# ifndef PNG_USER_LIMITS_SUPPORTED +# define PNG_USER_LIMITS_SUPPORTED +# endif #endif /* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter - * how large, set these limits to 0x7fffffffL + * how large, set these two limits to 0x7fffffffL */ #ifndef PNG_USER_WIDTH_MAX # define PNG_USER_WIDTH_MAX 1000000L #endif #ifndef PNG_USER_HEIGHT_MAX # define PNG_USER_HEIGHT_MAX 1000000L #endif -/* Added at libpng-1.4.0 */ +/* Added at libpng-1.2.43. To accept all valid PNGs no matter + * how large, set these two limits to 0. + */ #ifndef PNG_USER_CHUNK_CACHE_MAX -# define PNG_USER_CHUNK_CACHE_MAX 0x7fffffffL +# define PNG_USER_CHUNK_CACHE_MAX 0 +#endif + +/* Added at libpng-1.2.43 */ +#ifndef PNG_USER_CHUNK_MALLOC_MAX +# define PNG_USER_CHUNK_MALLOC_MAX 0 #endif /* Added at libpng-1.4.0 */ #if !defined(PNG_NO_IO_STATE) && !defined(PNG_IO_STATE_SUPPORTED) @@ -860,22 +884,24 @@ #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ #ifndef PNG_NO_READ_UNKNOWN_CHUNKS +# ifndef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +# endif # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED # define PNG_UNKNOWN_CHUNKS_SUPPORTED # endif +# ifndef PNG_READ_USER_CHUNKS_SUPPORTED +# define PNG_READ_USER_CHUNKS_SUPPORTED #endif -#if !defined(PNG_NO_READ_USER_CHUNKS) && \ - defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) +#endif +#ifndef PNG_NO_READ_USER_CHUNKS +# ifndef PNG_READ_USER_CHUNKS_SUPPORTED # define PNG_READ_USER_CHUNKS_SUPPORTED -# define PNG_USER_CHUNKS_SUPPORTED -# ifdef PNG_NO_READ_UNKNOWN_CHUNKS -# undef PNG_NO_READ_UNKNOWN_CHUNKS # endif -# ifdef PNG_NO_HANDLE_AS_UNKNOWN -# undef PNG_NO_HANDLE_AS_UNKNOWN +# ifndef PNG_USER_CHUNKS_SUPPORTED +# define PNG_USER_CHUNKS_SUPPORTED # endif #endif #ifndef PNG_NO_HANDLE_AS_UNKNOWN # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED @@ -1015,11 +1041,13 @@ #endif #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ -#if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED) +#ifndef PNG_NO_WRITE_FILTER +# ifndef PNG_WRITE_FILTER_SUPPORTED # define PNG_WRITE_FILTER_SUPPORTED #endif +#endif #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED diff -ru4NwbB libpng-1.4.0/pngerror.c libpng-1.5.0beta03/pngerror.c --- libpng-1.4.0/pngerror.c 2010-01-02 23:05:36.453901617 -0600 +++ libpng-1.5.0beta03/pngerror.c 2010-02-08 15:36:32.867509306 -0600 @@ -1,8 +1,8 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.0 [January 3, 2010] * Copyright (c) 1998-2010 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.) * @@ -15,8 +15,9 @@ * and use png_set_error_fn() to use those functions. See the instructions * at each function. */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" diff -ru4NwbB libpng-1.4.0/pngget.c libpng-1.5.0beta03/pngget.c --- libpng-1.4.0/pngget.c 2010-01-02 23:05:36.461299406 -0600 +++ libpng-1.5.0beta03/pngget.c 2010-02-08 15:36:32.874596451 -0600 @@ -1,8 +1,8 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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,8 +11,9 @@ * and license in png.h * */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" @@ -871,19 +872,18 @@ return (png_ptr? png_ptr->user_chunk_ptr : NULL); } #endif -#ifdef PNG_WRITE_SUPPORTED png_size_t PNGAPI png_get_compression_buffer_size(png_structp png_ptr) { return (png_ptr ? png_ptr->zbuf_size : 0L); } -#endif #ifdef PNG_SET_USER_LIMITS_SUPPORTED -/* These functions were added to libpng 1.2.6 */ +/* These functions were added to libpng 1.2.6 and were enabled + * by default in libpng-1.4.0 */ png_uint_32 PNGAPI png_get_user_width_max (png_structp png_ptr) { return (png_ptr? png_ptr->user_width_max : 0); @@ -896,13 +896,20 @@ /* This function was added to libpng 1.4.0 */ png_uint_32 PNGAPI png_get_chunk_cache_max (png_structp png_ptr) { - return (png_ptr? png_ptr->user_chunk_cache_max? 0x7fffffffL : - png_ptr->user_chunk_cache_max - 1 : 0); + return (png_ptr? png_ptr->user_chunk_cache_max : 0); +} +/* This function was added to libpng 1.4.1 */ +png_uint_32 PNGAPI +png_get_chunk_malloc_max (png_structp png_ptr) +{ + return (png_ptr? + (png_uint_32)png_ptr->user_chunk_malloc_max : 0); } #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ +/* These functions were added to libpng 1.4.0 */ #ifdef PNG_IO_STATE_SUPPORTED png_uint_32 PNGAPI png_get_io_state (png_structp png_ptr) { diff -ru4NwbB libpng-1.4.0/pnginfo.h libpng-1.5.0beta03/pnginfo.h --- libpng-1.4.0/pnginfo.h 1969-12-31 18:00:00.000000000 -0600 +++ libpng-1.5.0beta03/pnginfo.h 2010-02-08 15:36:32.847033882 -0600 @@ -0,0 +1,301 @@ +/* png_info is a structure that holds the information in a PNG file so + * that the application can find out the characteristics of the image. + * If you are reading the file, this structure will tell you what is + * in the PNG file. If you are writing the file, fill in the information + * you want to put into the PNG file, then call png_write_info(). + * The names chosen should be very close to the PNG specification, so + * consult that document for information about the meaning of each field. + * + * With libpng < 0.95, it was only possible to directly set and read the + * the values in the png_info_struct, which meant that the contents and + * order of the values had to remain fixed. With libpng 0.95 and later, + * however, there are now functions that abstract the contents of + * png_info_struct from the application, so this makes it easier to use + * libpng with dynamic libraries, and even makes it possible to use + * libraries that don't have all of the libpng ancillary chunk-handing + * functionality. + * + * In any case, the order of the parameters in png_info_struct should NOT + * be changed for as long as possible to keep compatibility with applications + * that use the old direct-access method with png_info_struct. + * + * The following members may have allocated storage attached that should be + * cleaned up before the structure is discarded: palette, trans, text, + * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile, + * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these + * are automatically freed when the info structure is deallocated, if they were + * allocated internally by libpng. This behavior can be changed by means + * of the png_data_freer() function. + * + * More allocation details: all the chunk-reading functions that + * change these members go through the corresponding png_set_* + * functions. A function to clear these members is available: see + * png_free_data(). The png_set_* functions do not depend on being + * able to point info structure members to any of the storage they are + * passed (they make their own copies), EXCEPT that the png_set_text + * functions use the same storage passed to them in the text_ptr or + * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns + * functions do not make their own copies. + */ +typedef struct png_info_struct +{ + /* the following are necessary for every PNG file */ + png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */ + png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */ + png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ + below) */ + png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed + row */ + png_colorp palette PNG_DEPSTRUCT; /* array of color values + (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in + "palette" (PLTE) */ + png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette + color (tRNS) */ + png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel + (from IHDR) */ + png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below + (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type PNG_DEPSTRUCT; /* must be + PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE + (from IHDR) */ + png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, + PNG_INTERLACE_ADAM7 */ + + /* The following is informational only on read, and not used on writes. */ + png_byte channels PNG_DEPSTRUCT; /* number of data channels per + pixel (1, 2, 3, 4) */ + png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ + png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for + future use */ + png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng + from start of file */ + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ + +#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED) + /* The gAMA chunk describes the gamma characteristics of the system + * on which the image was created, normally in the range [1.0, 2.5]. + * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. + */ + float gamma PNG_DEPSTRUCT; /* gamma value of image, + if (valid & PNG_INFO_gAMA) */ +#endif + +#ifdef PNG_sRGB_SUPPORTED + /* GR-P, 0.96a */ + /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ + png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent + [0, 1, 2, or 3] */ +#endif + +#ifdef PNG_TEXT_SUPPORTED + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text PNG_DEPSTRUCT; /* number of comments read/to write */ + int max_text PNG_DEPSTRUCT; /* current size of text array */ + png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */ +#endif /* PNG_TEXT_SUPPORTED */ + +#ifdef PNG_tIME_SUPPORTED + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time PNG_DEPSTRUCT; +#endif + +#ifdef PNG_sBIT_SUPPORTED + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ +defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted + image */ + png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for + non-palette image */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background PNG_DEPSTRUCT; +#endif + +#ifdef PNG_oFFs_SUPPORTED + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */ + png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */ + png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */ +#endif + +#ifdef PNG_pHYs_SUPPORTED + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */ + png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see + PNG_RESOLUTION_ below) */ +#endif + +#ifdef PNG_hIST_SUPPORTED + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist PNG_DEPSTRUCT; +#endif + +#ifdef PNG_cHRM_SUPPORTED + /* The cHRM chunk describes the CIE color characteristics of the monitor + * on which the PNG was created. This data allows the viewer to do gamut + * mapping of the input image to ensure that the viewer sees the same + * colors in the image as the creator. Values are in the range + * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero. + */ +#ifdef PNG_FLOATING_POINT_SUPPORTED + float x_white PNG_DEPSTRUCT; + float y_white PNG_DEPSTRUCT; + float x_red PNG_DEPSTRUCT; + float y_red PNG_DEPSTRUCT; + float x_green PNG_DEPSTRUCT; + float y_green PNG_DEPSTRUCT; + float x_blue PNG_DEPSTRUCT; + float y_blue PNG_DEPSTRUCT; +#endif +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */ + png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */ + png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */ + png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical + units */ + png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing + parameter values */ + png_byte pcal_type PNG_DEPSTRUCT; /* equation type + (see PNG_EQUATION_ below) */ + png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given + in pcal_params */ +#endif + +/* New members added in libpng-1.0.6 */ + png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is + responsible for freeing */ + +#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + /* Storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT; + png_size_t unknown_chunks_num PNG_DEPSTRUCT; +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* iCCP chunk data. */ + png_charp iccp_name PNG_DEPSTRUCT; /* profile name */ + png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium + profile data */ + /* Note to maintainer: should be png_bytep */ + png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */ + png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */ +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes PNG_DEPSTRUCT; + png_uint_32 splt_palettes_num PNG_DEPSTRUCT; +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponsing to one pixel + * in the image. This external representation is converted to double + * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero. + */ + png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */ +#ifdef PNG_FLOATING_POINT_SUPPORTED + double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */ + double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */ +#endif +#ifdef PNG_FIXED_POINT_SUPPORTED + png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */ + png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */ +#endif +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */ +#endif + +#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) + png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, + if (valid & PNG_INFO_gAMA) */ +#endif + +#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) + png_fixed_point int_x_white PNG_DEPSTRUCT; + png_fixed_point int_y_white PNG_DEPSTRUCT; + png_fixed_point int_x_red PNG_DEPSTRUCT; + png_fixed_point int_y_red PNG_DEPSTRUCT; + png_fixed_point int_x_green PNG_DEPSTRUCT; + png_fixed_point int_y_green PNG_DEPSTRUCT; + png_fixed_point int_x_blue PNG_DEPSTRUCT; + png_fixed_point int_y_blue PNG_DEPSTRUCT; +#endif + +} png_info; diff -ru4NwbB libpng-1.4.0/pngmem.c libpng-1.5.0beta03/pngmem.c --- libpng-1.4.0/pngmem.c 2010-01-02 23:05:36.467926491 -0600 +++ libpng-1.5.0beta03/pngmem.c 2010-02-08 15:36:32.880861210 -0600 @@ -16,8 +16,9 @@ * png_create_read_struct_2() and png_create_write_struct_2() to * identify the replacement functions. */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" @@ -200,9 +201,9 @@ if (table == NULL) { #ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of Memory"); /* Note "O" and "M" */ + png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */ else png_warning(png_ptr, "Out Of Memory"); #endif return (NULL); @@ -228,9 +229,9 @@ if (png_ptr->offset_table_ptr == NULL) { #ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of memory"); /* Note "O" and "M" */ + png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */ else png_warning(png_ptr, "Out Of memory"); #endif return (NULL); diff -ru4NwbB libpng-1.4.0/pngpread.c libpng-1.5.0beta03/pngpread.c --- libpng-1.4.0/pngpread.c 2010-01-02 23:05:36.477006213 -0600 +++ libpng-1.5.0beta03/pngpread.c 2010-02-08 15:36:32.889689952 -0600 @@ -1,8 +1,8 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -10,8 +10,9 @@ * For conditions of distribution and use, see the disclaimer * and license in png.h */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_PROGRESSIVE_READ_SUPPORTED #include "pngpriv.h" @@ -328,9 +329,11 @@ png_ptr->idat_size = png_ptr->push_length; png_ptr->mode |= PNG_HAVE_IDAT; png_ptr->process_mode = PNG_READ_IDAT_MODE; png_push_have_info(png_ptr, info_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1; png_ptr->zstream.next_out = png_ptr->row_buf; return; } @@ -697,10 +700,15 @@ } new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; old_buffer = png_ptr->save_buffer; - png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr, + png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr, (png_size_t)new_max); + if (png_ptr->save_buffer == NULL) + { + png_free(png_ptr, old_buffer); + png_error(png_ptr, "Insufficient memory for save_buffer"); + } png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); png_free(png_ptr, old_buffer); png_ptr->save_buffer_max = new_max; } @@ -868,9 +876,11 @@ png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; break; } png_push_process_row(png_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1; png_ptr->zstream.next_out = png_ptr->row_buf; } else @@ -1133,11 +1143,8 @@ png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, - png_ptr->iwidth) + 1; - if (png_ptr->transformations & PNG_INTERLACE) break; png_ptr->num_rows = (png_ptr->height + diff -ru4NwbB libpng-1.4.0/pngpriv.h libpng-1.5.0beta03/pngpriv.h --- libpng-1.4.0/pngpriv.h 2010-01-02 23:05:36.432657321 -0600 +++ libpng-1.5.0beta03/pngpriv.h 2010-02-08 15:36:32.835373684 -0600 @@ -305,8 +305,10 @@ /* Decompress data in a chunk that uses compression */ #if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) +PNG_EXTERN png_size_t png_measure_decompressed_chunk PNGARG((png_structp + png_ptr, int comp_type, png_size_t chunklength, png_size_t prefix_length)); PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, int comp_type, png_size_t chunklength, png_size_t prefix_length, png_size_t *data_length)); #endif @@ -350,10 +352,10 @@ #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point - file_gamma)); +PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, + png_fixed_point file_gamma)); #endif #endif #ifdef PNG_WRITE_sBIT_SUPPORTED @@ -555,9 +557,10 @@ #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); #endif -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED diff -ru4NwbB libpng-1.4.0/pngread.c libpng-1.5.0beta03/pngread.c --- libpng-1.4.0/pngread.c 2010-01-02 23:05:36.485963803 -0600 +++ libpng-1.5.0beta03/pngread.c 2010-02-08 15:36:32.898363440 -0600 @@ -1,8 +1,8 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -13,8 +13,9 @@ * This file contains routines that an application calls directly to * read a PNG file or stream. */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_READ_SUPPORTED #include "pngpriv.h" @@ -30,9 +31,11 @@ return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn, warn_fn, NULL, NULL, NULL)); } -/* Alternate create PNG structure for reading, and allocate any memory needed. */ +/* Alternate create PNG structure for reading, and allocate any memory + * needed. + */ png_structp PNGAPI png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn) @@ -64,14 +67,20 @@ if (png_ptr == NULL) return (NULL); /* Added at libpng-1.2.6 */ -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED png_ptr->user_width_max = PNG_USER_WIDTH_MAX; png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; - /* Added at libpng-1.4.0 */ +# ifdef PNG_USER_CHUNK_CACHE_MAX + /* Added at libpng-1.2.43 and 1.4.0 */ png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; #endif +# ifdef PNG_SET_USER_CHUNK_MALLOC_MAX + /* Added at libpng-1.2.43 and 1.4.1 */ + png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; +# endif +#endif #ifdef PNG_SETJMP_SUPPORTED /* Applications that neglect to set up their own setjmp() and then encounter a png_error() will longjmp here. Since the jmpbuf is @@ -476,9 +485,10 @@ #if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED) if (png_ptr->transformations & PNG_FILLER) png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined"); #endif -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED) +#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + !defined(PNG_READ_PACKSWAP_SUPPORTED) if (png_ptr->transformations & PNG_PACKSWAP) png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined"); #endif #if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED) @@ -579,9 +589,11 @@ if (!(png_ptr->mode & PNG_HAVE_IDAT)) png_error(png_ptr, "Invalid attempt to read row data"); png_ptr->zstream.next_out = png_ptr->row_buf; - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1); do { if (!(png_ptr->zstream.avail_in)) { @@ -1043,9 +1055,10 @@ } /* Free all memory used by the read (old method) */ void /* PRIVATE */ -png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr) +png_read_destroy(png_structp png_ptr, png_infop info_ptr, + png_infop end_info_ptr) { #ifdef PNG_SETJMP_SUPPORTED jmp_buf tmp_jmp; #endif diff -ru4NwbB libpng-1.4.0/pngrio.c libpng-1.5.0beta03/pngrio.c --- libpng-1.4.0/pngrio.c 2010-01-02 23:05:36.491106698 -0600 +++ libpng-1.5.0beta03/pngrio.c 2010-02-08 15:36:32.903233730 -0600 @@ -1,8 +1,8 @@ /* pngrio.c - functions for data input * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -17,8 +17,9 @@ * function, but rather write a replacement function and then make * libpng use it at run time with png_set_read_fn(...). */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_READ_SUPPORTED #include "pngpriv.h" diff -ru4NwbB libpng-1.4.0/pngrtran.c libpng-1.5.0beta03/pngrtran.c --- libpng-1.4.0/pngrtran.c 2010-01-02 23:05:36.506593645 -0600 +++ libpng-1.5.0beta03/pngrtran.c 2010-02-08 15:36:32.918769225 -0600 @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -15,8 +15,9 @@ * Transformations that are used in both reading and writing are * in pngtrans.c. */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_READ_SUPPORTED #include "pngpriv.h" @@ -431,10 +432,12 @@ [num_new_palette]] = png_ptr->index_to_palette[j]; png_ptr->palette_to_index[png_ptr->index_to_palette[j]] = png_ptr->palette_to_index[num_new_palette]; - png_ptr->index_to_palette[j] = (png_byte)num_new_palette; - png_ptr->palette_to_index[num_new_palette] = (png_byte)j; + png_ptr->index_to_palette[j] = + (png_byte)num_new_palette; + png_ptr->palette_to_index[num_new_palette] = + (png_byte)j; } if (num_new_palette <= maximum_colors) break; } @@ -501,9 +504,10 @@ for (ir = 0; ir < num_red; ir++) { /* int dr = abs(ir - r); */ int dr = ((ir > r) ? ir - r : r - ir); - int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS)); + int index_r = (ir << (PNG_DITHER_BLUE_BITS + + PNG_DITHER_GREEN_BITS)); for (ig = 0; ig < num_green; ig++) { /* int dg = abs(ig - g); */ @@ -746,10 +750,11 @@ { png_debug(1, "in png_init_read_transformations"); { -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \ - || defined(PNG_READ_GAMMA_SUPPORTED) +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_SHIFT_SUPPORTED) || \ + defined(PNG_READ_GAMMA_SUPPORTED) int color_type = png_ptr->color_type; #endif #if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) @@ -944,9 +949,10 @@ { back.red = (png_byte)(pow( (double)png_ptr->background.red/%F255%, gs) * 255.0 + .5); back.green = (png_byte)(pow( - (double)png_ptr->background.green/%F255%, gs) * 255.0 + .5); + (double)png_ptr->background.green/%F255%, gs) * 255.0 + + .5); back.blue = (png_byte)(pow( (double)png_ptr->background.blue/%F255%, gs) * 255.0 + .5); } @@ -1356,9 +1362,10 @@ #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED if (png_ptr->transformations & PNG_RGB_TO_GRAY) { int rgb_error = - png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1); + png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), + png_ptr->row_buf + 1); if (rgb_error) { png_ptr->rgb_to_gray_status=1; if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == @@ -2342,9 +2349,10 @@ else { png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> png_ptr->gamma_shift][red>>8]; - png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> + png_uint_16 green_1 = + png_ptr->gamma_16_to_1[(green&0xff) >> png_ptr->gamma_shift][green>>8]; png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> png_ptr->gamma_shift][blue>>8]; png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1 @@ -2439,9 +2447,10 @@ else { png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> png_ptr->gamma_shift][red>>8]; - png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> + png_uint_16 green_1 = + png_ptr->gamma_16_to_1[(green&0xff) >> png_ptr->gamma_shift][green>>8]; png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> png_ptr->gamma_shift][blue>>8]; png_uint_16 gray16 = (png_uint_16)((rc * red_1 @@ -2722,29 +2731,24 @@ sp = row; for (i = 0; i < row_width; i++, sp++) { if (*sp == trans_color->gray) - { *sp = (png_byte)background->gray; - } + else - { *sp = gamma_table[*sp]; } } - } else #endif { sp = row; for (i = 0; i < row_width; i++, sp++) { if (*sp == trans_color->gray) - { *sp = (png_byte)background->gray; } } - } break; } case 16: @@ -2913,11 +2917,10 @@ { png_uint_16 a = *(sp + 1); if (a == 0xff) - { *dp = gamma_table[*sp]; - } + else if (a == 0) { /* Background is already in screen gamma */ *dp = (png_byte)background->gray; @@ -2941,20 +2944,17 @@ { png_byte a = *(sp + 1); if (a == 0xff) - { *dp = *sp; - } + #ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) - { *dp = (png_byte)background->gray; - } + else - { png_composite(*dp, *sp, a, background_1->gray); - } + #else *dp = (png_byte)background->gray; #endif } @@ -3012,11 +3012,10 @@ for (i = 0; i < row_width; i++, sp += 4, dp += 2) { png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3)); if (a == (png_uint_16)0xffff) - { png_memcpy(dp, sp, 2); - } + #ifdef PNG_READ_GAMMA_SUPPORTED else if (a == 0) #else else diff -ru4NwbB libpng-1.4.0/pngrutil.c libpng-1.5.0beta03/pngrutil.c --- libpng-1.4.0/pngrutil.c 2010-01-02 23:05:36.520586494 -0600 +++ libpng-1.5.0beta03/pngrutil.c 2010-02-08 15:36:32.932468265 -0600 @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -13,8 +13,9 @@ * This file contains routines that are only called from within * libpng itself during the course of reading an image. */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_READ_SUPPORTED #include "pngpriv.h" @@ -200,8 +201,74 @@ } #if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \ defined(PNG_READ_iCCP_SUPPORTED) +png_size_t +png_measure_decompressed_chunk(png_structp png_ptr, int comp_type, + png_size_t chunklength, png_size_t prefix_size) +{ + png_charp text; + png_charp test = "X"; + png_size_t text_size = 0; + + if (comp_type == PNG_COMPRESSION_TYPE_BASE) + { + int ret = Z_OK; + + png_ptr->zstream.next_in = (png_bytep)(png_ptr->chunkdata + prefix_size); + png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + + text = NULL; + + while (png_ptr->zstream.avail_in) + { + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret != Z_OK && ret != Z_STREAM_END) + { + inflateReset(&png_ptr->zstream); + png_ptr->zstream.avail_in = 0; + break; + } + if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) + { + if (text == NULL) /* Initialize the decompression buffer */ + { + text_size = prefix_size + + png_ptr->zbuf_size - png_ptr->zstream.avail_out; + + text=test; + } + else /* Enlarge the decompression buffer */ + { + text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; +#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED + if (png_ptr->user_chunk_malloc_max && + (text_size >= png_ptr->user_chunk_malloc_max - 1)) +#else + if ((PNG_USER_CHUNK_MALLOC_MAX > 0) && + text_size >= PNG_USER_CHUNK_MALLOC_MAX - 1) +#endif + return 0; + } + } + if (ret == Z_STREAM_END) + break; + + else + { + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + } + } + + inflateReset(&png_ptr->zstream); + png_ptr->zstream.avail_in = 0; + } + return text_size; +} + /* * Decompress trailing data in a chunk. The assumption is that chunkdata * points at an allocated area holding the contents of a chunk with a * trailing compressed part. What we get back is an allocated area @@ -215,19 +282,31 @@ { static PNG_CONST char msg[] = "Error decoding compressed chunk"; png_charp text; png_size_t text_size; + png_size_t expanded_size; + + expanded_size= png_measure_decompressed_chunk(png_ptr, comp_type, + chunklength, prefix_size); + if (expanded_size == 0) + { + *newlength=0; + return; + } if (comp_type == PNG_COMPRESSION_TYPE_BASE) { int ret = Z_OK; + png_size_t buffer_size; + png_ptr->zstream.next_in = (png_bytep)(png_ptr->chunkdata + prefix_size); png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size); png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; text_size = 0; text = NULL; + buffer_size = 0; while (png_ptr->zstream.avail_in) { ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); @@ -245,11 +324,12 @@ text_size = prefix_size + png_sizeof(msg) + 1; text = (png_charp)png_malloc_warn(png_ptr, text_size); if (text == NULL) { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, "Not enough memory to decompress chunk"); + png_warning(png_ptr, + "Not enough memory to decompress chunk"); + text_size = 0; + break; } png_memcpy(text, png_ptr->chunkdata, prefix_size); } @@ -257,71 +337,40 @@ /* Copy what we can of the error message into the text chunk */ text_size = (png_size_t)(chunklength - (text - png_ptr->chunkdata) - 1); + if (text_size > png_sizeof(msg)) text_size = png_sizeof(msg); + png_memcpy(text + prefix_size, msg, text_size); + buffer_size = text_size; break; } if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) { - if (text == NULL) + if (text == NULL) /* Initialize the decompression buffer */ { - text_size = prefix_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out; + text_size = expanded_size; + text = (png_charp)png_malloc_warn(png_ptr, text_size + 1); if (text == NULL) { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, + png_warning(png_ptr, "Not enough memory to decompress chunk"); + text_size = 0; + break; } png_memcpy(text + prefix_size, png_ptr->zbuf, text_size - prefix_size); png_memcpy(text, png_ptr->chunkdata, prefix_size); *(text + text_size) = 0x00; + buffer_size = text_size; } - else - { - png_charp tmp; - - tmp = text; -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - if ((png_ptr->user_chunk_cache_max != 0) && - (--png_ptr->user_chunk_cache_max == 0)) - { - png_warning(png_ptr, "No space in chunk cache"); - text = NULL; - } - - else - { -#endif - text = (png_charp)png_malloc_warn(png_ptr, - (png_size_t)(text_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1)); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - } -#endif - if (text == NULL) - { - png_free(png_ptr, tmp); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, - "Not enough memory to decompress chunk"); - } - png_memcpy(text, tmp, text_size); - png_free(png_ptr, tmp); - png_memcpy(text + text_size, png_ptr->zbuf, - (png_ptr->zbuf_size - png_ptr->zstream.avail_out)); - text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; - *(text + text_size) = 0x00; } if (ret == Z_STREAM_END) break; + else { png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; @@ -326,9 +375,9 @@ png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } } - } + if (ret != Z_STREAM_END) { #ifdef PNG_STDIO_SUPPORTED char umsg[52]; @@ -360,12 +409,14 @@ if (text == NULL) { png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; - png_error(png_ptr, "Not enough memory for text"); + png_warning(png_ptr, "Not enough memory for text"); } + else png_memcpy(text, png_ptr->chunkdata, prefix_size); } + if (text != NULL) *(text + text_size) = 0x00; } inflateReset(&png_ptr->zstream); @@ -1134,9 +1185,9 @@ png_size_t slength; png_debug(1, "in png_handle_sPLT"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) @@ -1184,9 +1235,10 @@ } png_ptr->chunkdata[slength] = 0x00; - for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; entry_start++) + for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; + entry_start++) /* Empty loop to find end of name */ ; ++entry_start; /* A sample depth should follow the separator, and we should be on it */ @@ -1938,9 +1990,9 @@ int ret; png_debug(1, "in png_handle_tEXt"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) { @@ -2040,9 +2092,9 @@ png_size_t slength, prefix_len, data_len; png_debug(1, "in png_handle_zTXt"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) { @@ -2161,9 +2213,9 @@ png_size_t slength, prefix_len, data_len; png_debug(1, "in png_handle_iTXt"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) { @@ -2305,9 +2357,9 @@ png_uint_32 skip = 0; png_debug(1, "in png_handle_unknown"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) { @@ -2360,9 +2412,10 @@ #endif png_memcpy((png_charp)png_ptr->unknown_chunk.name, (png_charp)png_ptr->chunk_name, png_sizeof(png_ptr->unknown_chunk.name)); - png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] = '\0'; + png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] + = '\0'; png_ptr->unknown_chunk.size = (png_size_t)length; if (length == 0) png_ptr->unknown_chunk.data = NULL; else @@ -2832,9 +2885,10 @@ } default: { png_size_t pixel_bytes = (row_info->pixel_depth >> 3); - png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes; + png_bytep sp = row + (png_size_t)(row_info->width - 1) + * pixel_bytes; png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes; int jstop = png_pass_inc[pass]; png_uint_32 i; @@ -3027,11 +3081,8 @@ png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, - png_ptr->iwidth) + 1; - if (!(png_ptr->transformations & PNG_INTERLACE)) { png_ptr->num_rows = (png_ptr->height + png_pass_yinc[png_ptr->pass] - 1 - @@ -3154,18 +3205,14 @@ png_ptr->iwidth = (png_ptr->width + png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - - png_ptr->irowbytes = - PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1; } else #endif /* PNG_READ_INTERLACING_SUPPORTED */ { png_ptr->num_rows = png_ptr->height; png_ptr->iwidth = png_ptr->width; - png_ptr->irowbytes = png_ptr->rowbytes + 1; } max_pixel_depth = png_ptr->pixel_depth; #ifdef PNG_READ_PACK_SUPPORTED @@ -3328,9 +3375,10 @@ png_debug1(3, "height = %lu,", png_ptr->height); png_debug1(3, "iwidth = %lu,", png_ptr->iwidth); png_debug1(3, "num_rows = %lu,", png_ptr->num_rows); png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes); - png_debug1(3, "irowbytes = %lu", png_ptr->irowbytes); + png_debug1(3, "irowbytes = %lu", + PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); png_ptr->flags |= PNG_FLAG_ROW_INIT; } #endif /* PNG_READ_SUPPORTED */ diff -ru4NwbB libpng-1.4.0/pngset.c libpng-1.5.0beta03/pngset.c --- libpng-1.4.0/pngset.c 2010-01-02 23:05:36.528892955 -0600 +++ libpng-1.5.0beta03/pngset.c 2010-02-08 15:36:32.940788341 -0600 @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -15,8 +15,9 @@ * into the info struct for writing into the file. This abstracts the * info struct and allows us to change the structure in the future. */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) #include "pngpriv.h" @@ -1092,9 +1093,8 @@ info_ptr->valid |= PNG_INFO_IDAT; } #endif -#ifdef PNG_WRITE_SUPPORTED void PNGAPI png_set_compression_buffer_size(png_structp png_ptr, png_size_t size) { @@ -1105,9 +1105,8 @@ png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size); png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } -#endif void PNGAPI png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask) { @@ -1136,15 +1136,20 @@ void PNGAPI png_set_chunk_cache_max (png_structp png_ptr, png_uint_32 user_chunk_cache_max) { - if (png_ptr == NULL) - return; + if (png_ptr) png_ptr->user_chunk_cache_max = user_chunk_cache_max; - if (user_chunk_cache_max == 0x7fffffffL) /* Unlimited */ - png_ptr->user_chunk_cache_max = 0; - else - png_ptr->user_chunk_cache_max = user_chunk_cache_max + 1; +} + +/* This function was added to libpng 1.4.1 */ +void PNGAPI +png_set_chunk_malloc_max (png_structp png_ptr, + png_alloc_size_t user_chunk_malloc_max) +{ + if (png_ptr) + png_ptr->user_chunk_malloc_max = + (png_size_t)user_chunk_malloc_max; } #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ diff -ru4NwbB libpng-1.4.0/pngstruct.h libpng-1.5.0beta03/pngstruct.h --- libpng-1.4.0/pngstruct.h 1969-12-31 18:00:00.000000000 -0600 +++ libpng-1.5.0beta03/pngstruct.h 2010-02-08 15:36:32.841410070 -0600 @@ -0,0 +1,378 @@ +/* The structure that holds the information to read and write PNG files. + * The only people who need to care about what is inside of this are the + * people who will be modifying the library for their own special needs. + * It should NOT be accessed directly by an application, except to store + * the jmp_buf. + */ + +struct png_struct_def +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */ + png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto + function. */ +#endif + png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing + errors and aborting */ + png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing + warnings */ + png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for + error functions */ + png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing + output data */ + png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading + input data */ + png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct + for I/O functions */ + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read + transform */ +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write + transform */ +#endif + +/* These were added in libpng-1.0.2 */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct + for user transform */ + png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user + transformed pixels */ + png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user + transformed pixels */ +#endif +#endif + + png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in + the PNG file */ + png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various + things to libpng */ + png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations + to perform */ + + z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression + structure (below) */ + png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ + png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ + int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ + int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ + int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window + bits */ + int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory + level */ + int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression + strategy */ + + png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ + png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ + png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ + png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ + png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ + png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced + row in pixels */ + png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ + png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous + (unfiltered) row */ + png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current + (unfiltered) row */ + png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row + when filtering */ + png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row + when filtering */ + png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row + when filtering */ + png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row + when filtering */ + png_row_info row_info PNG_DEPSTRUCT; /* used for transformation + routines */ + + png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ + png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ + png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ + png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in + palette */ + png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ + png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current + chunk */ + png_byte compression PNG_DEPSTRUCT; /* file compression type + (always 0) */ + png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ + png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, + PNG_INTERLACE_ADAM7 */ + png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ + png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see + PNG_FILTER_ below ) */ + png_byte color_type PNG_DEPSTRUCT; /* color type of file */ + png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ + png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ + png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ + png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ + png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ + png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from + start of file */ + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) + png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel + expansion */ +#endif + +#ifdef PNG_bKGD_SUPPORTED + png_byte background_gamma_type PNG_DEPSTRUCT; +# ifdef PNG_FLOATING_POINT_SUPPORTED + float background_gamma PNG_DEPSTRUCT; +# endif + png_color_16 background PNG_DEPSTRUCT; /* background color in + screen gamma space */ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized + to gamma 1.0 */ +#endif +#endif /* PNG_bKGD_SUPPORTED */ + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing + output */ + png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, + 0 - no flush */ + png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since + last flush */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits + 16-bit gamma */ +#ifdef PNG_FLOATING_POINT_SUPPORTED + float gamma PNG_DEPSTRUCT; /* file gamma value */ + float screen_gamma PNG_DEPSTRUCT; /* screen gamma value + (display_exponent) */ +#endif +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit + depth files */ + png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ + png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit + depth files */ + png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to + screen */ + png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ +#endif + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) + png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each + available channel */ +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) + png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit + tranformation */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for + paletted files */ + png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for + non-paletted files */ +#endif + + png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each + row is decoded */ + png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each + row is encoded */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header + data fully read */ + png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each + prog. row is decoded */ + png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image + is complete */ + png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in + save_buffer */ + png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously + read data */ + png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in + current_buffer */ + png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently + used data */ + png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input + chunk */ + png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in + input data */ + png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now + in save_buffer */ + png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of + save_buffer */ + png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of + available input data */ + png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now + in current_buffer */ + int process_mode PNG_DEPSTRUCT; /* what push library + is currently doing */ + int cur_palette PNG_DEPSTRUCT; /* current push library + palette index */ + +# ifdef PNG_TEXT_SUPPORTED + png_size_t current_text_size PNG_DEPSTRUCT; /* current size of + text input data */ + png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left + to read in input */ + png_charp current_text PNG_DEPSTRUCT; /* current text chunk + buffer */ + png_charp current_text_ptr PNG_DEPSTRUCT; /* current location + in current_text */ +# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ + +#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ + +#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__) +/* For the Borland special 64K segment handler */ + png_bytepp offset_table_ptr PNG_DEPSTRUCT; + png_bytep offset_table PNG_DEPSTRUCT; + png_uint_16 offset_table_number PNG_DEPSTRUCT; + png_uint_16 offset_table_count PNG_DEPSTRUCT; + png_uint_16 offset_table_count_free PNG_DEPSTRUCT; +#endif + +#ifdef PNG_READ_DITHER_SUPPORTED + png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */ + png_bytep dither_index PNG_DEPSTRUCT; /* index translation for palette + files */ +#endif + +#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) + png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ +#endif + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED + png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row + filter selection */ + png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights + for previous rows */ + png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of + previous row(s) */ + png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous + line(s) */ + png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for + previous line(s) */ + png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter + calculation cost */ + png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter + calculation cost */ +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ +#endif + +/* New members added in libpng-1.0.6 */ + + png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is + responsible for freeing */ + +#ifdef PNG_USER_CHUNKS_SUPPORTED + png_voidp user_chunk_ptr PNG_DEPSTRUCT; + png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read + chunk handler */ +#endif + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int num_chunk_list PNG_DEPSTRUCT; + png_bytep chunk_list PNG_DEPSTRUCT; +#endif + +/* New members added in libpng-1.0.3 */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte rgb_to_gray_status PNG_DEPSTRUCT; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT; + png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT; + png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT; +#endif + +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) || \ + defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \ + defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED) +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + png_uint_32 mng_features_permitted PNG_DEPSTRUCT; +#endif + +/* New member added in libpng-1.0.7 */ +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_fixed_point int_gamma PNG_DEPSTRUCT; +#endif + +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_byte filter_type PNG_DEPSTRUCT; +#endif + +/* New members added in libpng-1.2.0 */ + +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +#ifdef PNG_USER_MEM_SUPPORTED + png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for + mem functions */ + png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for + allocating memory */ + png_free_ptr free_fn PNG_DEPSTRUCT; /* function for + freeing memory */ +#endif + +/* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current + (unfiltered) row */ + +#ifdef PNG_READ_DITHER_SUPPORTED +/* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep dither_sort PNG_DEPSTRUCT; /* working sort array */ + png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original + index currently is + in the palette */ + png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index + points to this + palette color */ +#endif + +/* New members added in libpng-1.0.16 and 1.2.6 */ + png_byte compression_type PNG_DEPSTRUCT; + +#ifdef PNG_USER_LIMITS_SUPPORTED + png_uint_32 user_width_max PNG_DEPSTRUCT; + png_uint_32 user_height_max PNG_DEPSTRUCT; + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT; + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + */ + png_uint_32 user_chunk_malloc_max PNG_DEPSTRUCT; +#endif + +/* New member added in libpng-1.0.25 and 1.2.17 */ +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED + /* Storage for unknown chunk that the library doesn't recognize. */ + png_unknown_chunk unknown_chunk PNG_DEPSTRUCT; +#endif + +/* New members added in libpng-1.2.26 */ + png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT; + png_uint_32 old_prev_row_size PNG_DEPSTRUCT; + +/* New member added in libpng-1.2.30 */ + png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ + +#ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ + png_uint_32 io_state PNG_DEPSTRUCT; +#endif +}; diff -ru4NwbB libpng-1.4.0/pngtest.c libpng-1.5.0beta03/pngtest.c --- libpng-1.4.0/pngtest.c 2010-01-02 23:05:36.537901646 -0600 +++ libpng-1.5.0beta03/pngtest.c 2010-02-08 15:36:32.949877356 -0600 @@ -1,8 +1,8 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -858,10 +858,10 @@ #ifdef PNG_cHRM_SUPPORTED { png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; - if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y)) + if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, + &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y)) { png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); } @@ -1011,9 +1011,10 @@ if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width, &scal_height)) { - png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height); + png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, + scal_height); } } #endif #endif @@ -1389,10 +1390,8 @@ png_get_header_version(NULL)); /* Show the version of libpng used in building the application */ fprintf(STDERR, " pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER, PNG_HEADER_VERSION_STRING); - fprintf(STDERR, " sizeof(png_struct)=%ld, sizeof(png_info)=%ld\n", - (long)png_sizeof(png_struct), (long)png_sizeof(png_info)); /* Do some consistency checking on the memory allocation settings, I'm * not sure this matters, but it is nice to know, the first of these * tests should be impossible because of the way the macros are set @@ -1464,16 +1463,16 @@ int allocation_now = current_allocation; #endif for (i=2; imode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted)) + if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \ + (png_ptr->mng_features_permitted)) { png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); png_ptr->mng_features_permitted = 0; } @@ -679,11 +681,13 @@ #if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED) if (png_ptr->transformations & PNG_FILLER) png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined"); #endif -#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED) +#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + defined(PNG_READ_PACKSWAP_SUPPORTED) if (png_ptr->transformations & PNG_PACKSWAP) - png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined"); + png_warning(png_ptr, + "PNG_WRITE_PACKSWAP_SUPPORTED is not defined"); #endif #if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED) if (png_ptr->transformations & PNG_PACK) png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined"); @@ -935,9 +939,9 @@ if (png_ptr != NULL) { png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED if (png_ptr->num_chunk_list) { png_free(png_ptr, png_ptr->chunk_list); png_ptr->num_chunk_list = 0; diff -ru4NwbB libpng-1.4.0/pngwtran.c libpng-1.5.0beta03/pngwtran.c --- libpng-1.4.0/pngwtran.c 2010-01-02 23:05:36.565577397 -0600 +++ libpng-1.5.0beta03/pngwtran.c 2010-02-08 15:36:32.977172940 -0600 @@ -1,8 +1,8 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -10,8 +10,9 @@ * For conditions of distribution and use, see the disclaimer * and license in png.h */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_WRITE_SUPPORTED #include "pngpriv.h" @@ -29,9 +30,10 @@ #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED if (png_ptr->transformations & PNG_USER_TRANSFORM) if (png_ptr->write_user_transform_fn != NULL) - (*(png_ptr->write_user_transform_fn)) /* User write transform function */ + (*(png_ptr->write_user_transform_fn)) /* User write transform + function */ (png_ptr, /* png_ptr */ &(png_ptr->row_info), /* row_info: */ /* png_uint_32 width; width of row */ /* png_uint_32 rowbytes; number of bytes in row */ diff -ru4NwbB libpng-1.4.0/pngwutil.c libpng-1.5.0beta03/pngwutil.c --- libpng-1.4.0/pngwutil.c 2010-01-02 23:05:36.577284245 -0600 +++ libpng-1.5.0beta03/pngwutil.c 2010-02-08 15:36:32.988988031 -0600 @@ -1,8 +1,8 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.4.0 [February 8, 2010] + * Last changed in libpng 1.4.1 [February 8, 2010] * Copyright (c) 1998-2010 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.) * @@ -10,8 +10,9 @@ * For conditions of distribution and use, see the disclaimer * and license in png.h */ +#define PNG_INTERNAL #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_WRITE_SUPPORTED #include "pngpriv.h" @@ -435,9 +436,10 @@ case 2: case 4: case 8: case 16: png_ptr->channels = 1; break; - default: png_error(png_ptr, "Invalid bit depth for grayscale image"); + default: png_error(png_ptr, + "Invalid bit depth for grayscale image"); } break; case PNG_COLOR_TYPE_RGB: if (bit_depth != 8 && bit_depth != 16) @@ -638,9 +640,11 @@ buf[2] = pal_ptr->blue; png_write_chunk_data(png_ptr, buf, (png_size_t)3); } #else - /* This is a little slower but some buggy compilers need to do this instead */ + /* This is a little slower but some buggy compilers need to do this + * instead + */ pal_ptr=palette; for (i = 0; i < num_pal; i++) { buf[0] = pal_ptr[i].red; diff -ru4NwbB libpng-1.4.0/projects/visualc6/README.txt libpng-1.5.0beta03/projects/visualc6/README.txt --- libpng-1.4.0/projects/visualc6/README.txt 2010-01-02 23:05:38.985095055 -0600 +++ libpng-1.5.0beta03/projects/visualc6/README.txt 2010-02-08 15:36:35.144885029 -0600 @@ -32,11 +32,11 @@ This project builds the libpng binaries as follows: -* Win32_DLL_Release\libpng14.dll DLL build -* Win32_DLL_Debug\libpng14d.dll DLL build (debug version) -* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall +* Win32_DLL_Release\libpng15.dll DLL build +* Win32_DLL_Debug\libpng15d.dll DLL build (debug version) +* Win32_DLL_VB\libpng15vb.dll DLL build for Visual Basic, using stdcall * Win32_LIB_Release\libpng.lib static build * Win32_LIB_Debug\libpngd.lib static build (debug version) diff -ru4NwbB libpng-1.4.0/projects/visualc6/libpng.dsp libpng-1.5.0beta03/projects/visualc6/libpng.dsp --- libpng-1.4.0/projects/visualc6/libpng.dsp 2010-01-02 23:05:38.995366317 -0600 +++ libpng-1.5.0beta03/projects/visualc6/libpng.dsp 2010-02-08 15:36:35.154911267 -0600 @@ -58,9 +58,9 @@ # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /dll /machine:I386 -# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng14.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release" +# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng15.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release" !ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug" # PROP BASE Use_MFC 0 @@ -89,9 +89,9 @@ # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng14d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug" +# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng15d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug" !ELSEIF "$(CFG)" == "libpng - Win32 DLL VB" # PROP BASE Use_MFC 0 @@ -120,12 +120,12 @@ # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /dll /machine:I386 -# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng14vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release" +# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng15vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release" # Begin Special Build Tool OutDir=.\Win32_DLL_VB -TargetName=libpng14vb +TargetName=libpng15vb SOURCE="$(InputPath)" PostBuild_Cmds=echo Deleting $(targetname) import library and export file (Not required for VB projects) del $(outdir)\$(targetname).lib del $(outdir)\$(targetname).exp # End Special Build Tool diff -ru4NwbB libpng-1.4.0/projects/visualc6/pngtest.dsp libpng-1.5.0beta03/projects/visualc6/pngtest.dsp --- libpng-1.4.0/projects/visualc6/pngtest.dsp 2010-01-02 23:05:39.004596477 -0600 +++ libpng-1.5.0beta03/projects/visualc6/pngtest.dsp 2010-02-08 15:36:35.164787712 -0600 @@ -53,9 +53,9 @@ # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /machine:I386 -# ADD LINK32 Win32_DLL_Release\libpng14.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 Win32_DLL_Release\libpng15.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386 # Begin Special Build Tool OutDir=.\Win32_DLL_Release SOURCE="$(InputPath)" PostBuild_Desc=[Run Test] @@ -85,9 +85,9 @@ # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 Win32_DLL_Debug\libpng14d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 Win32_DLL_Debug\libpng15d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # Begin Special Build Tool OutDir=.\Win32_DLL_Debug SOURCE="$(InputPath)" PostBuild_Desc=[Run Test] diff -ru4NwbB libpng-1.4.0/projects/xcode/libpng.xcodeproj/project.pbxproj libpng-1.5.0beta03/projects/xcode/libpng.xcodeproj/project.pbxproj --- libpng-1.4.0/projects/xcode/libpng.xcodeproj/project.pbxproj 2010-01-02 23:05:37.879732170 -0600 +++ libpng-1.5.0beta03/projects/xcode/libpng.xcodeproj/project.pbxproj 2010-02-08 15:36:34.131001038 -0600 @@ -223,11 +223,11 @@ 4FADC24308B4156D00ABE55E /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; - DYLIB_COMPATIBILITY_VERSION = 14; - DYLIB_CURRENT_VERSION = 14; - FRAMEWORK_VERSION = 1.4.0; + DYLIB_COMPATIBILITY_VERSION = 15; + DYLIB_CURRENT_VERSION = 15; + FRAMEWORK_VERSION = 1.5.0beta03; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; @@ -241,11 +241,11 @@ }; 4FADC24408B4156D00ABE55E /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - DYLIB_COMPATIBILITY_VERSION = 14; - DYLIB_CURRENT_VERSION = 14; - FRAMEWORK_VERSION = 1.4.0; + DYLIB_COMPATIBILITY_VERSION = 15; + DYLIB_CURRENT_VERSION = 15; + FRAMEWORK_VERSION = 1.5.0beta03; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; diff -ru4NwbB libpng-1.4.0/scripts/makefile.32sunu libpng-1.5.0beta03/scripts/makefile.32sunu --- libpng-1.4.0/scripts/makefile.32sunu 2010-01-02 23:05:38.534505578 -0600 +++ libpng-1.5.0beta03/scripts/makefile.32sunu 2010-02-08 15:36:34.704134734 -0600 @@ -1,7 +1,7 @@ # makefile for libpng on Solaris 2.x with cc # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # This code is released under the libpng license. @@ -10,18 +10,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: CC=cc AR_RC=ar rc @@ -112,12 +108,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -129,13 +122,9 @@ echo; \ ;; \ esac $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -157,26 +146,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -228,9 +209,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.64sunu libpng-1.5.0beta03/scripts/makefile.64sunu --- libpng-1.4.0/scripts/makefile.64sunu 2010-01-02 23:05:38.545400951 -0600 +++ libpng-1.5.0beta03/scripts/makefile.64sunu 2010-02-08 15:36:34.714872842 -0600 @@ -1,7 +1,7 @@ # makefile for libpng on Solaris 2.x with cc # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # This code is released under the libpng license. @@ -10,18 +10,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: CC=cc AR_RC=ar rc @@ -112,12 +108,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -129,13 +122,9 @@ echo; \ ;; \ esac $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -157,26 +146,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -228,9 +209,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.aix libpng-1.5.0beta03/scripts/makefile.aix --- libpng-1.4.0/scripts/makefile.aix 2010-01-02 23:05:38.555099136 -0600 +++ libpng-1.5.0beta03/scripts/makefile.aix 2010-02-08 15:36:34.724641369 -0600 @@ -22,10 +22,8 @@ LN_SF = ln -f -s LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) prefix=/usr/local INCPATH=$(prefix)/include LIBPATH=$(prefix)/lib diff -ru4NwbB libpng-1.4.0/scripts/makefile.beos libpng-1.5.0beta03/scripts/makefile.beos --- libpng-1.4.0/scripts/makefile.beos 2010-01-02 23:05:38.575423720 -0600 +++ libpng-1.5.0beta03/scripts/makefile.beos 2010-02-08 15:36:34.744782755 -0600 @@ -1,7 +1,7 @@ # makefile for libpng on BeOS x86 ELF with gcc # modified from makefile.linux by Sander Stoks -# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # # This code is released under the libpng license. @@ -10,18 +10,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: CC=gcc AR_RC=ar rc @@ -104,18 +100,11 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) cp $(LIBSO)* /boot/home/config/lib -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \ - $(LIBSOVER) $(OBJSDLL) $(LDFLAGS) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -nostart -Wl,-soname,$(OLDSOMAJ) -o \ - $(OLDSOVER) $(OBJSDLL) $(LDFLAGS) + $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS) pngtest: pngtest.o $(LIBSO) $(CC) -L$(ZLIBLIB) -L. -lz -lpng%N% -o pngtest pngtest.o @@ -137,25 +126,19 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -205,9 +188,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtesti \ - $(OLDSOVER) \ libpng.pc # DO NOT DELETE THIS LINE -- make depend depends on it. diff -ru4NwbB libpng-1.4.0/scripts/makefile.cegcc libpng-1.5.0beta03/scripts/makefile.cegcc --- libpng-1.4.0/scripts/makefile.cegcc 2010-01-02 23:05:38.594837276 -0600 +++ libpng-1.5.0beta03/scripts/makefile.cegcc 2010-02-08 15:36:34.763899786 -0600 @@ -27,9 +27,9 @@ VER = $(VERMAJ).$(VERMIN).$(VERMIC) NAME = libpng PACKAGE = $(NAME)-$(VER) -BIN = libpng%NN%-0.dll libpng-%OLDNUM%.dll +BIN = libpng%NN%-0.dll LIB = libpng%NN%.a libpng%NN%.dll.a libpng.a libpng.dll.a scripts/png32ce.def INCLUDE = %HEADERS% PC = libpng%NN%.pc libpng.pc @@ -63,9 +63,9 @@ @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver compilation: @echo " * Compilation of $(PACKAGE)" - cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make + cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make copy: @echo " * Copy of binary and development files" @for i in $(BIN); do \ diff -ru4NwbB libpng-1.4.0/scripts/makefile.cygwin libpng-1.5.0beta03/scripts/makefile.cygwin --- libpng-1.4.0/scripts/makefile.cygwin 2010-01-02 23:05:38.606170815 -0600 +++ libpng-1.5.0beta03/scripts/makefile.cygwin 2010-02-08 15:36:34.774941904 -0600 @@ -67,10 +67,8 @@ LIBNAME = libpng%N% PNGMAJ = %SONUM% CYGDLL = %N% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) SHAREDLIB=cygpng$(CYGDLL).dll STATLIB=libpng.a IMPLIB=libpng.dll.a @@ -131,9 +129,9 @@ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng%N%!-lpng%N%\ -lz! > libpng.pc + -e s!-lpng%NN%!-lpng%NN%\ -lz! > libpng.pc libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in @echo -e Making $(LIBNAME) libpng-config file for this libpng \ installation..'\n' using PREFIX=\"$(prefix)\"'\n' diff -ru4NwbB libpng-1.4.0/scripts/makefile.darwin libpng-1.5.0beta03/scripts/makefile.darwin --- libpng-1.4.0/scripts/makefile.darwin 2010-01-02 23:05:38.616919723 -0600 +++ libpng-1.5.0beta03/scripts/makefile.darwin 2010-02-08 15:36:34.785398417 -0600 @@ -1,6 +1,6 @@ # makefile for libpng on Darwin / Mac OS X -# Copyright (C) 2002, 2004, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2004, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 2001 Christoph Pfisterer # derived from makefile.linux: # Copyright (C) 1998, 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -8,9 +8,9 @@ # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h -# where "make install" puts libpng.a, libpng%N%.dylib, png.h and pngconf.h +# where "make install" puts libpng.a, libpng%NN%.dylib, png.h and pngconf.h prefix=/usr/local exec_prefix=$(prefix) # Where the zlib library and include files are located @@ -19,20 +19,16 @@ ZLIBLIB=../zlib ZLIBINC=../zlib # Library name: -LIBNAME = libpng%N% -PNGMAJ = %N% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng%NN% +PNGMAJ = %NN% # Shared library names: LIBSO=$(LIBNAME).dylib LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib -LIBSOVER=$(LIBNAME).$(PNGVER).dylib +LIBSOREL=$(LIBNAME).$(PNGMAJ).$(RELEASE).dylib OLDSO=libpng.dylib -OLDSOMAJ=libpng.%OLDNUM%.dylib -OLDSOVER=libpng.%OLDNUM%.$(PNGMIN).dylib # Utilities: CC=cc AR_RC=ar rc @@ -42,9 +38,9 @@ RM_F=/bin/rm -f # CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops -LDFLAGS=-L. -L$(ZLIBLIB) -lpng%N% -lz +LDFLAGS=-L. -L$(ZLIBLIB) -lpng%NN% -lz INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib MANPATH=$(prefix)/man @@ -86,37 +82,27 @@ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng%N%!-lpng%N%\ -lz! > libpng.pc + -e s!-lpng%NN%!-lpng%NN%\ -lz! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng%N% -lz\"; \ + echo libs=\"-lpng%NN% -lz\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(CC) -dynamiclib \ -install_name $(LIBPATH)/$(LIBSOMAJ) \ -current_version %SONUM% -compatibility_version %SONUM% \ - -o $(LIBSOVER) \ - $(OBJSDLL) -L$(ZLIBLIB) -lz - -$(OLDSOVER): $(OBJSDLL) - $(CC) -dynamiclib \ - -install_name $(LIBPATH)/$(OLDSOMAJ) \ - -current_version %OLDNUM% -compatibility_version %OLDNUM% \ - -o $(OLDSOVER) \ + -o $(LIBSOMAJ) \ $(OBJSDLL) -L$(ZLIBLIB) -lz pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -140,26 +126,18 @@ $(RANLIB) $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSO) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBNAME).$(PNGVER)*.dylib - -@$(RM_F) $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/libpng.3.$(PNGMIN)*.dylib - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -208,9 +186,8 @@ ./pngtesti pngtest.png clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ - $(OLDSOVER) \ libpng.pc $(LIBNAME).*dylib pngtesti DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.dec libpng-1.5.0beta03/scripts/makefile.dec --- libpng-1.4.0/scripts/makefile.dec 2010-01-02 23:05:38.627446223 -0600 +++ libpng-1.5.0beta03/scripts/makefile.dec 2010-02-08 15:36:34.795593853 -0600 @@ -1,25 +1,21 @@ # makefile for libpng on DEC Alpha Unix -# Copyright (C) 2000-2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2000-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng%N% # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=cc @@ -89,19 +85,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ -soname $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ - -soname $(OLDSOMAJ) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) test: pngtest @@ -122,31 +111,24 @@ chmod 644 $(DL)/$(LIBNAME).a -@/bin/rm -f $(DL)/libpng.a (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@/bin/rm -f $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@/bin/rm -f $(DL)/$(LIBSOMAJ) - -@/bin/rm -f $(DL)/$(OLDSO) - -@/bin/rm -f $(DL)/$(OLDSOMAJ) - -@/bin/rm -f $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF)(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF)(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF)(LIBNAME).pc libpng.pc) + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi @@ -192,9 +174,8 @@ clean: /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc # DO NOT DELETE THIS LINE -- make depend depends on it. diff -ru4NwbB libpng-1.4.0/scripts/makefile.elf libpng-1.5.0beta03/scripts/makefile.elf --- libpng-1.4.0/scripts/makefile.elf 2010-01-02 23:05:38.647844263 -0600 +++ libpng-1.5.0beta03/scripts/makefile.elf 2010-02-08 15:36:34.815463676 -0600 @@ -1,6 +1,6 @@ # makefile for libpng.a and libpng%N%.so on Linux ELF with gcc -# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010 Greg Roelofs # and Glenn Randers-Pehrson # Copyright (C) 1996, 1997 Andreas Dilger # # This code is released under the libpng license. @@ -15,18 +15,15 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -135,21 +132,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) libpng.syms +$(LIBSOMAJ): $(OBJSDLL) libpng.syms $(CC) -shared -Wl,-soname,$(LIBSOMAJ) \ -Wl,-version-script,libpng.syms \ - -o $(LIBSOVER) \ - $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) libpng.syms - $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \ - -Wl,-version-script,libpng.syms \ - -o $(OLDSOVER) \ + -o $(LIBSOMAJ) \ $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -182,25 +170,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -250,9 +231,8 @@ clean: $(RM_F) *.o libpng.a libpng.syms pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.hp64 libpng-1.5.0beta03/scripts/makefile.hp64 --- libpng-1.4.0/scripts/makefile.hp64 2010-01-02 23:05:38.677099181 -0600 +++ libpng-1.5.0beta03/scripts/makefile.hp64 2010-02-08 15:36:34.844599354 -0600 @@ -1,6 +1,6 @@ # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 1999-2002, 2006, 2009 Glenn Randers-Pehrson +# Copyright (C) 1999-2002, 2006, 2009, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42 # contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard # # This code is released under the libpng license. @@ -20,18 +20,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.%OLDNUM% -OLDSOVER=libpng.sl.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=cc @@ -107,18 +103,11 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) @@ -140,25 +129,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -210,9 +192,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.hpgcc libpng-1.5.0beta03/scripts/makefile.hpgcc --- libpng-1.4.0/scripts/makefile.hpgcc 2010-01-02 23:05:38.687891413 -0600 +++ libpng-1.5.0beta03/scripts/makefile.hpgcc 2010-02-08 15:36:34.855005352 -0600 @@ -1,6 +1,6 @@ # makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. -# Copyright (C) 2002, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006-2008, 2010 Glenn Randers-Pehrson # Copyright (C) 2001, Laurent faillie # Copyright (C) 1998, 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # @@ -10,18 +10,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.%OLDNUM% -OLDSOVER=libpng.sl.%OLDNUM%.$(PNGMIN) # Utilities: CC=gcc LD=ld @@ -115,18 +111,11 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -149,25 +138,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -219,9 +201,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.hpux libpng-1.5.0beta03/scripts/makefile.hpux --- libpng-1.4.0/scripts/makefile.hpux 2010-01-02 23:05:38.698504292 -0600 +++ libpng-1.5.0beta03/scripts/makefile.hpux 2010-02-08 15:36:34.865106066 -0600 @@ -1,6 +1,6 @@ # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 1999-2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 1999-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42 # contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard # # This code is released under the libpng license. @@ -20,18 +20,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.%OLDNUM% -OLDSOVER=libpng.sl.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=cc @@ -104,18 +100,11 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) @@ -137,25 +126,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -207,9 +189,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.linux libpng-1.5.0beta03/scripts/makefile.linux --- libpng-1.4.0/scripts/makefile.linux 2010-01-02 23:05:38.738777069 -0600 +++ libpng-1.5.0beta03/scripts/makefile.linux 2010-02-08 15:36:34.904145763 -0600 @@ -1,6 +1,6 @@ # makefile for libpng.a and libpng%N%.so on Linux ELF with gcc -# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs and +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010 Greg Roelofs and # Glenn Randers-Pehrson # Copyright (C) 1996, 1997 Andreas Dilger # # This code is released under the libpng license. @@ -9,18 +9,15 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) +RELEASE = %RELEASE% # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -113,18 +110,10 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \ - -o $(OLDSOVER) \ - $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -156,25 +145,19 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -224,9 +207,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.mingw libpng-1.5.0beta03/scripts/makefile.mingw --- libpng-1.4.0/scripts/makefile.mingw 2010-01-02 23:05:38.749921265 -0600 +++ libpng-1.5.0beta03/scripts/makefile.mingw 2010-02-08 15:36:34.915207676 -0600 @@ -64,13 +64,11 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ -W -Wall -O3 $(ALIGN) -funroll-loops \ -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -LIBNAME = libpng%N% +LIBNAME = libpng%NN% PNGMAJ = %SONUM% -MINGDLL = %N% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) +MINGDLL = %NN% SHAREDLIB=libpng$(MINGDLL).dll STATLIB=libpng.a IMPLIB=libpng.dll.a @@ -128,9 +126,9 @@ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng%N%!-lpng%N%\ -lz\ -lm! > libpng.pc + -e s!-lpng%NN%!-lpng%NN%\ -lz\ -lm! > libpng.pc libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in @echo -e Making $(LIBNAME) libpng-config file for this libpng \ installation..'\n' using PREFIX=\"$(prefix)\"'\n' @@ -235,18 +233,18 @@ test-dd: echo echo Testing installed dynamic shared library in $(DL). $(CC) -I$(DI) $(CFLAGS) \ - `$(BINPATH)/libpng%N%-config --cflags` pngtest.c \ + `$(BINPATH)/libpng%NN%-config --cflags` pngtest.c \ -L$(DL) -L$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/libpng%N%-config --ldflags` + -o pngtestd `$(BINPATH)/libpng%NN%-config --ldflags` ./pngtestd pngtest.png test-installed: $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng%N%-config --cflags` pngtest.c \ + `$(BINPATH)/libpng%NN%-config --cflags` pngtest.c \ -L$(ZLIBLIB) \ - -o pngtesti$(EXE) `$(BINPATH)/libpng%N%-config --ldflags` + -o pngtesti$(EXE) `$(BINPATH)/libpng%NN%-config --ldflags` ./pngtesti$(EXE) pngtest.png clean: /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \ diff -ru4NwbB libpng-1.4.0/scripts/makefile.ne12bsd libpng-1.5.0beta03/scripts/makefile.ne12bsd --- libpng-1.4.0/scripts/makefile.ne12bsd 2010-01-02 23:05:38.778466818 -0600 +++ libpng-1.5.0beta03/scripts/makefile.ne12bsd 2010-02-08 15:36:34.943002151 -0600 @@ -12,11 +12,11 @@ LOCALBASE?=/usr/local LIBDIR= ${LOCALBASE}/lib MANDIR= ${LOCALBASE}/man -INCSDIR=${LOCALBASE}/include/libpng%N% +INCSDIR=${LOCALBASE}/include/libpng%NN% -LIB= png%N% +LIB= png%NN% SHLIB_MAJOR= 0 SHLIB_MINOR= 1.5.0beta03 SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ diff -ru4NwbB libpng-1.4.0/scripts/makefile.sco libpng-1.5.0beta03/scripts/makefile.sco --- libpng-1.4.0/scripts/makefile.sco 2010-01-02 23:05:38.817145823 -0600 +++ libpng-1.5.0beta03/scripts/makefile.sco 2010-02-08 15:36:34.981279883 -0600 @@ -1,8 +1,8 @@ # makefile for SCO OSr5 ELF and Unixware 7 with Native cc # Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx # force ELF build dynamic linking, SONAME setting in lib and RPATH in app -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # # This code is released under the libpng license. @@ -11,18 +11,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: CC=cc AR_RC=ar rc @@ -100,17 +96,10 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOVER) \ - $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -G -Wl,-h,$(OLDSOMAJ) -o $(OLDSOVER) \ +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOMAJ) \ $(OBJSDLL) pngtest: pngtest.o $(LIBSO) LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -135,25 +124,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -203,9 +185,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.sggcc libpng-1.5.0beta03/scripts/makefile.sggcc --- libpng-1.4.0/scripts/makefile.sggcc 2010-01-02 23:05:38.828045789 -0600 +++ libpng-1.5.0beta03/scripts/makefile.sggcc 2010-02-08 15:36:34.991668084 -0600 @@ -1,6 +1,6 @@ # makefile for libpng.a and libpng%N%.so, SGI IRIX with 'cc' -# Copyright (C) 2001-2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2001-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer @@ -8,18 +8,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -50,10 +46,8 @@ CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32 LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 -LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \ - -set_version sgi$3.0 # See "man dso" for info about shared objects INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -85,9 +79,9 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -shared: $(LIBSOVER) +shared: $(LIBSOMAJ) libpng.pc: cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ @@ -110,18 +104,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(LDSHARED) -o $@ $(OBJS) $(RM_F) $(LIBSO) $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(LDLEGACY) -o $@ $(OBJS) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) test: pngtest @@ -144,25 +132,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -215,9 +196,9 @@ ./pngtesti pngtest.png clean: $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \ - so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* $(OLDSOVER) + so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: chmod a-w *.[ch35] $(DOCS) scripts/* diff -ru4NwbB libpng-1.4.0/scripts/makefile.sgi libpng-1.5.0beta03/scripts/makefile.sgi --- libpng-1.4.0/scripts/makefile.sgi 2010-01-02 23:05:38.838932586 -0600 +++ libpng-1.5.0beta03/scripts/makefile.sgi 2010-02-08 15:36:35.002056263 -0600 @@ -1,6 +1,6 @@ # makefile for libpng.a and libpng%N%.so, SGI IRIX with 'cc' -# Copyright (C) 2001-2002, 2006, 2007 Glenn Randers-Pehrson +# Copyright (C) 2001-2002, 2006, 2007, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer @@ -8,18 +8,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=cc @@ -53,10 +49,8 @@ LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng%N% -lz -lm LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 -LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \ - -set_version sgi$3.0 # See "man dso" for info about shared objects INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -88,10 +82,8 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -shared: $(LIBSOVER) - libpng.pc: cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ @@ -112,18 +104,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(LDSHARED) -o $@ $(OBJS) $(RM_F) $(LIBSO) $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(LDLEGACY) -o $@ $(OBJS) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) test: pngtest @@ -146,25 +132,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -218,9 +197,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ so_locations DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.so9 libpng-1.5.0beta03/scripts/makefile.so9 --- libpng-1.4.0/scripts/makefile.so9 2010-01-02 23:05:38.849660289 -0600 +++ libpng-1.5.0beta03/scripts/makefile.so9 2010-02-08 15:36:35.013724149 -0600 @@ -1,8 +1,8 @@ # makefile for libpng on Solaris 9 (beta) with Forte cc # Updated by Chad Schrock for Solaris 9 # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 1998-2001 Greg Roelofs # Copyright (C) 1996-1997 Andreas Dilger # # This code is released under the libpng license. @@ -10,19 +10,15 @@ # and license in png.h # Library name: PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng%N% # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: # gcc 2.95 doesn't work. CC=cc @@ -110,12 +106,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -127,13 +120,9 @@ echo; \ ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -155,25 +144,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -225,9 +207,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.solaris libpng-1.5.0beta03/scripts/makefile.solaris --- libpng-1.4.0/scripts/makefile.solaris 2010-01-02 23:05:38.860444165 -0600 +++ libpng-1.5.0beta03/scripts/makefile.solaris 2010-02-08 15:36:35.024433148 -0600 @@ -1,6 +1,6 @@ # makefile for libpng on Solaris 2.x with gcc -# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2004, 2006-2008, 2010 Glenn Randers-Pehrson # Contributed by William L. Sebok, based on makefile.linux # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # @@ -10,18 +10,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -107,12 +103,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -124,13 +117,9 @@ echo; \ ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -152,25 +141,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -222,9 +204,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.solaris-x86 libpng-1.5.0beta03/scripts/makefile.solaris-x86 --- libpng-1.4.0/scripts/makefile.solaris-x86 2010-01-02 23:05:38.871276610 -0600 +++ libpng-1.5.0beta03/scripts/makefile.solaris-x86 2010-02-08 15:36:35.035231922 -0600 @@ -1,6 +1,6 @@ # makefile for libpng on Solaris 2.x with gcc -# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2004, 2006-2008, 2010 Glenn Randers-Pehrson # Contributed by William L. Sebok, based on makefile.linux # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -10,18 +10,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.5.0beta03 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -107,12 +103,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -124,13 +117,9 @@ echo; \ ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -152,25 +141,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -222,9 +204,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/png32ce.def libpng-1.5.0beta03/scripts/png32ce.def --- libpng-1.4.0/scripts/png32ce.def 2010-01-02 23:05:38.942119227 -0600 +++ libpng-1.5.0beta03/scripts/png32ce.def 2010-02-08 15:36:35.104155362 -0600 @@ -248,10 +248,12 @@ png_benign_chunk_error @210 png_set_benign_error @211 png_get_io_chunk_name @212 png_get_io_state @213 - png_set_premultiply_alpha @214 png_get_chunk_cache_max @215 png_set_chunk_cache_max @216 png_check_cHRM_fixed @217 png_calloc @218 png_set_longjmp_fn @219 +; Added at version 1.4.1 + png_get_chunk_malloc_max @220 + png_set_chunk_malloc_max @221 diff -ru4NwbB libpng-1.4.0/scripts/pngos2.def libpng-1.5.0beta03/scripts/pngos2.def --- libpng-1.4.0/scripts/pngos2.def 2010-01-02 23:05:38.952970892 -0600 +++ libpng-1.5.0beta03/scripts/pngos2.def 2010-02-08 15:36:35.114683153 -0600 @@ -208,14 +208,16 @@ ; png_benign_chunk_error ; png_set_benign_error png_get_io_chunk_name png_get_io_state - png_set_premultiply_alpha png_get_chunk_cache_max png_set_chunk_cache_max png_check_cHRM_fixed png_calloc png_set_longjmp_fn +; Added at version 1.4.1 + png_get_chunk_malloc_max + png_set_chunk_malloc_max ; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS png_libpng_ver png_pass_start diff -ru4NwbB libpng-1.4.0/scripts/pngwin.def libpng-1.5.0beta03/scripts/pngwin.def --- libpng-1.4.0/scripts/pngwin.def 2010-01-02 23:05:38.963715362 -0600 +++ libpng-1.5.0beta03/scripts/pngwin.def 2010-02-08 15:36:35.125018435 -0600 @@ -203,10 +203,12 @@ ; png_benign_chunk_error ; png_set_benign_error png_get_io_chunk_name png_get_io_state - png_set_premultiply_alpha png_get_chunk_cache_max png_set_chunk_cache_max png_check_cHRM_fixed png_calloc png_set_longjmp_fn +; Added at version 1.4.1 + png_get_chunk_malloc_max + png_set_chunk_malloc_max