From d7bd2d2b2cade4bccf8d2e90c88ef360366e9f54 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 28 Jul 2009 08:18:31 -0500 Subject: [PATCH] [master] Relocated prototype for png_64bit_product() into png.h and revised the documenatation (in the libpng style section) about placement of prototypes. --- ANNOUNCE | 3 +++ CHANGES | 3 +++ libpng-1.2.39beta03.txt | 22 ++++++++++++++++------ png.c | 5 +---- png.h | 8 ++++++++ 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 4ec73101..e3e17f44 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -51,6 +51,9 @@ version 1.2.39beta02 [July 27, 2009] (bug introduced in libpng-0.95, discovered by Evan Rouault) version 1.2.39beta03 [July 28, 2009] + Relocated new png_64_bit_product() prototype into png.h + Expanded the information about prototypes in the libpng style section of + the documentation. Send comments/corrections/commendations to png-mng-implement at lists.sf.net diff --git a/CHANGES b/CHANGES index 9c5b5479..89903969 100644 --- a/CHANGES +++ b/CHANGES @@ -2440,6 +2440,9 @@ version 1.2.39beta02 [July 27, 2009] (bug introduced in libpng-0.95, discovered by Evan Rouault) version 1.2.39beta03 [July 28, 2009] + Relocated new png_64_bit_product() prototype into png.h + Expanded the information about prototypes in the libpng style section of + the documentation. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/libpng-1.2.39beta03.txt b/libpng-1.2.39beta03.txt index 5f44a4ec..4f037bb1 100644 --- a/libpng-1.2.39beta03.txt +++ b/libpng-1.2.39beta03.txt @@ -4,8 +4,10 @@ libpng.txt - A description on how to use and modify libpng Updated and distributed by Glenn Randers-Pehrson Copyright (c) 1998-2009 Glenn Randers-Pehrson - For conditions of distribution and use, see copyright - notice in png.h. + + This document is released under the libpng license. + For conditions of distribution and use, see the disclaimer + and license in png.h Based on: @@ -2934,7 +2936,9 @@ X. Detecting libpng The png_get_io_ptr() function has been present since libpng-0.88, has never changed, and is unaffected by conditional compilation macros. It is the best choice for use in configure scripts for detecting the presence of any -libpng version since 0.88. +libpng version since 0.88. In an autoconf "configure.in" you could use + + AC_CHECK_LIB(png, png_get_io_ptr, ... XI. Source code repository @@ -3011,7 +3015,10 @@ exported functions are marked with PNGAPI: body; } -The prototypes for all exported functions appear in png.h. +The prototypes for all exported functions appear in png.h, +above the comment that says + + /* Maintainer: Put new public prototypes here ... */ We mark all non-exported functions with "/* PRIVATE */"": @@ -3021,9 +3028,12 @@ We mark all non-exported functions with "/* PRIVATE */"": body; } -The prototypes for non-exported functions can appear in +The prototypes for non-exported functions (except for those in +pngtest) appear in the PNG_INTERNAL section of png.h -or in the file where the function is located. +above the comment that says + + /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ The names of all exported functions and variables begin with "png_", and all publicly visible C preprocessor diff --git a/png.c b/png.c index cd76c222..928eb182 100644 --- a/png.c +++ b/png.c @@ -1,7 +1,7 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.2.39 [July 28, 2009] + * Last changed in libpng 1.2.37 [June 4, 2009] * Copyright (c) 1998-2009 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.) @@ -828,9 +828,6 @@ png_convert_size(size_t size) * A and D, and X || Y is (X << 16) + Y. */ -void /* PRIVATE */ -png_64bit_product (long v1, long v2, unsigned long *hi_product, - unsigned long *lo_product); void /* PRIVATE */ png_64bit_product (long v1, long v2, unsigned long *hi_product, unsigned long *lo_product) diff --git a/png.h b/png.h index 3b9007fe..abe72912 100644 --- a/png.h +++ b/png.h @@ -3698,6 +3698,14 @@ PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, png_fixed_point int_blue_y)); #endif +#if defined(PNG_cHRM_SUPPORTED) +#if !defined(PNG_NO_CHECK_cHRM) +/* Added at libpng version 1.2.34 */ +PNG_EXTERN void png_64bit_product (long v1, long v2, unsigned long *hi_product, + unsigned long *lo_product); +#endif +#endif + /* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */ #endif /* PNG_INTERNAL */