From 34713ce23cdbc35de81049d89dcba5a1abbecd86 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 28 Apr 2010 07:49:28 -0500 Subject: [PATCH] [devel] Fixed dependencies of GET_INT_32 - it doesn't require READ_INT_FUNCTIONS because it has a macro equivalent. --- ANNOUNCE | 20 ++++++++++++-------- CHANGES | 4 ++++ pngrutil.c | 13 ++++++++++--- pngwutil.c | 4 +++- 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index d6a1d23e3..aef209b78 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.5.0beta21 - April 27, 2010 +Libpng 1.5.0beta22 - April 28, 2010 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -9,20 +9,20 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - 1.5.0beta21.tar.xz (LZMA-compressed, recommended) - 1.5.0beta21.tar.gz - 1.5.0beta21.tar.bz2 + 1.5.0beta22.tar.xz (LZMA-compressed, recommended) + 1.5.0beta22.tar.gz + 1.5.0beta22.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lp150b21.zip - lp150b21.7z + lp150b22.zip + lp150b22.7z Other information: - 1.5.0beta21-README.txt - 1.5.0beta21-LICENSE.txt + 1.5.0beta22-README.txt + 1.5.0beta22-LICENSE.txt Changes since the last public release (1.4.1): @@ -196,6 +196,10 @@ version 1.5.0beta21 [April 27, 2010] Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. +version 1.5.0beta22 [April 28, 2010] + Fixed dependencies of GET_INT_32 - it does not require READ_INT_FUNCTIONS + because it has a macro equivalent. + Send comments/corrections/commendations to png-mng-implement at lists.sf.net: (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/CHANGES b/CHANGES index 0de39744f..b736e7572 100644 --- a/CHANGES +++ b/CHANGES @@ -2678,6 +2678,10 @@ version 1.5.0beta21 [April 27, 2010] Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. +version 1.5.0beta22 [April 28, 2010] + Fixed dependencies of GET_INT_32 - it does not require READ_INT_FUNCTIONS + because it has a macro equivalent. + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/pngrutil.c b/pngrutil.c index b77af5129..04c1e639d 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.1 [April 27, 2010] + * Last changed in libpng 1.4.1 [April 28, 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.) @@ -27,7 +27,11 @@ png_get_uint_31(png_structp png_ptr, png_bytep buf) png_error(png_ptr, "PNG unsigned integer out of range"); return (i); } -#ifndef PNG_USE_READ_MACROS +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +/* NOTE: the read macros will obscure these definitions, so that if + * PNG_USE_READ_MACROS is set the library will not use them internally, + * but the APIs will still be available externally. + */ /* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ png_uint_32 (PNGAPI png_get_uint_32)(png_bytep buf) @@ -44,7 +48,9 @@ png_get_uint_32)(png_bytep buf) /* Grab a signed 32-bit integer from a buffer in big-endian format. The * data is stored in the PNG file in two's complement format, and it is * assumed that the machine format for signed integers is the same. + * Only used internally in this file. */ +#if defined(PNG_GET_INT_32_SUPPORTED) png_int_32 (PNGAPI png_get_int_32)(png_bytep buf) { @@ -55,6 +61,7 @@ png_get_int_32)(png_bytep buf) return (i); } +#endif /* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ png_uint_16 (PNGAPI @@ -65,7 +72,7 @@ png_get_uint_16)(png_bytep buf) return (i); } -#endif /* PNG_USE_READ_MACROS */ +#endif /* PNG_READ_INT_FUNCTIONS_SUPPORTED */ /* Read the chunk header (length + type name). * Put the type name into png_ptr->chunk_name, and return the length. diff --git a/pngwutil.c b/pngwutil.c index 470a84605..08207a763 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1,7 +1,7 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.5.0 [April 27, 2010] + * Last changed in libpng 1.5.0 [April 28, 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,6 +15,7 @@ #ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED /* Place a 32-bit number into a buffer in PNG byte order. We work * with unsigned numbers for convenience, although one supported * ancillary chunk uses signed (two's complement) numbers. @@ -53,6 +54,7 @@ png_save_uint_16(png_bytep buf, unsigned int i) buf[0] = (png_byte)((i >> 8) & 0xff); buf[1] = (png_byte)(i & 0xff); } +#endif /* Simple function to write the signature. If we have already written * the magic bytes of the signature, or more likely, the PNG stream is