From 3e42a99cf5122a5e4659b0ce38d44b280e667887 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 31 Mar 2010 22:16:07 -0500 Subject: [PATCH] [devel] Restored the macro definition of png_check_sig(). --- ANNOUNCE | 3 ++- CHANGES | 1 + png.h | 15 ++++++++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index ce54f401e..492c97252 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -132,7 +132,7 @@ version 1.5.0beta15 [March 17, 2010] Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN version 1.5.0beta16 [April 1, 2010] - Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that + Made png_text_struct independent of PNG_iTXt_SUPPORTED, so that fields are initialized in all configurations. The READ/WRITE macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as before to disable code to actually read or write iTXt chunks @@ -140,6 +140,7 @@ version 1.5.0beta16 [April 1, 2010] read or write support (but it is probably better to check for the one actually required - read or write.) Combined multiple png_warning() calls for a single error. + Restored the macro definition of png_check_sig(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index fb04654f8..80690e11e 100644 --- a/CHANGES +++ b/CHANGES @@ -2617,6 +2617,7 @@ version 1.5.0beta16 [April 1, 2010] read or write support (but it is probably better to check for the one actually required - read or write.) Combined multiple png_warning() calls for a single error. + Restored the macro definition of png_check_sig(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.h b/png.h index c704186be..7f0d18130 100644 --- a/png.h +++ b/png.h @@ -1,7 +1,7 @@ /* png.h - header file for PNG reference library * - * libpng version 1.5.0beta16 - March 30, 2010 + * libpng version 1.5.0beta16 - April 1, 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,7 +11,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.5.0beta16 - March 30, 2010: Glenn + * libpng versions 0.97, January 1998, through 1.5.0beta16 - April 1, 2010: Glenn * See also "Contributing Authors", below. * * Note about libpng version numbers: @@ -170,7 +170,7 @@ * * This code is released under the libpng license. * - * libpng versions 1.2.6, August 15, 2004, through 1.5.0beta16, March 30, 2010, are + * libpng versions 1.2.6, August 15, 2004, through 1.5.0beta16, April 1, 2010, are * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are * distributed according to the same disclaimer and license as libpng-1.2.5 * with the following individual added to the list of Contributing Authors: @@ -282,7 +282,7 @@ * Y2K compliance in libpng: * ========================= * - * March 30, 2010 + * April 1, 2010 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. @@ -346,7 +346,7 @@ /* Version information for png.h - this should match the version in png.c */ #define PNG_LIBPNG_VER_STRING "1.5.0beta16" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.5.0beta16 - March 30, 2010\n" + " libpng version 1.5.0beta16 - April 1, 2010\n" #define PNG_LIBPNG_VER_SONUM 15 #define PNG_LIBPNG_VER_DLLNUM 15 @@ -807,6 +807,11 @@ extern PNG_EXPORT(void,png_set_sig_bytes,(png_structp png_ptr, extern PNG_EXPORT(int,png_sig_cmp,(png_bytep sig, png_size_t start, png_size_t num_to_check),,3); +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n). + */ +#define png_check_sig(sig,n) !png_sig_cmp((sig), 0, (n)) + /* Allocate and initialize png_ptr struct for reading, and any other memory. */ extern PNG_EXPORT(png_structp,png_create_read_struct, (png_const_charp user_png_ver, png_voidp error_ptr,