summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2000-07-17 06:17:09 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-04-06 16:05:29 -0500
commit4766a244b23f951a64b7d7514f6b495debfa5a98 (patch)
tree6b0525ece9dd9d23b395da7e26e9adb786915a5f
parenta4d54bdb4ab6b727e6b98b6990950f0864b1e067 (diff)
downloadlibpng-1.0.8rc1.tar.gz
Imported from libpng-1.0.8rc1.tarv1.0.8rc1
-rw-r--r--ANNOUNCE3
-rw-r--r--CHANGES4
-rw-r--r--INSTALL12
-rw-r--r--LICENSE4
-rw-r--r--README10
-rw-r--r--Y2KINFO4
-rwxr-xr-xconfigure2
-rw-r--r--example.c2
-rw-r--r--libpng.316
-rw-r--r--libpng.txt6
-rw-r--r--libpngpf.34
-rw-r--r--msvc/README.txt2
-rw-r--r--msvc/png32ms.def2
-rw-r--r--png.52
-rw-r--r--png.c29
-rw-r--r--png.h57
-rw-r--r--pngasmrd.h2
-rw-r--r--pngconf.h2
-rw-r--r--pngerror.c2
-rw-r--r--pnggccrd.c2
-rw-r--r--pngget.c2
-rw-r--r--pngmem.c2
-rw-r--r--pngpread.c2
-rw-r--r--pngread.c11
-rw-r--r--pngrio.c2
-rw-r--r--pngrtran.c2
-rw-r--r--pngrutil.c22
-rw-r--r--pngset.c15
-rw-r--r--pngtest.c29
-rw-r--r--pngtrans.c2
-rw-r--r--pngvcrd.c2
-rw-r--r--pngwio.c2
-rw-r--r--pngwrite.c8
-rw-r--r--pngwtran.c2
-rw-r--r--pngwutil.c8
-rw-r--r--scripts/makefile.beos2
-rw-r--r--scripts/makefile.dec2
-rw-r--r--scripts/makefile.gcmmx2
-rw-r--r--scripts/makefile.linux2
-rw-r--r--scripts/makefile.sco2
-rw-r--r--scripts/makefile.sggcc4
-rw-r--r--scripts/makefile.solaris2
-rw-r--r--scripts/pngdef.pas2
43 files changed, 170 insertions, 126 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index 0bba759c0..f8fe29792 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.0.8beta4 - July 14, 2000
+Libpng 1.0.8rc1 - July 17, 2000
This is a public release of libpng, intended for use in production codes.
@@ -18,6 +18,7 @@ Changes since the last public release (1.0.7):
Added the files pngbar.png and pngbar.jpg to the distribution.
Added cygwin subdirectory, makefile.cygwin, and cygwin support in pngconf.h
Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
+ Revised png_debug() macros and statements to eliminate compiler warnings.
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
diff --git a/CHANGES b/CHANGES
index 15cd3cc1a..307dc38f5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -797,7 +797,7 @@ version 1.0.7rc2 [June 28, 2000]
Fixed "DJBPP" typo in pnggccrd.c introduced in beta18.
version 1.0.7 [July 1, 2000]
Revised the definition of "trans_values" in libpng.3/libpng.txt
-version 1.0.8beta4 [July 14, 2000]
+version 1.0.8rc1 [July 17, 2000]
version 1.0.8beta1 [July 8, 2000]
Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
@@ -818,6 +818,8 @@ version 1.0.8beta4 [July 14, 2000]
Added the files pngbar.png and pngbar.jpg to the distribution.
Added cygwin subdirectory, makefile.cygwin, and cygwin support in pngconf.h
Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
+version 1.0.8rc1 [July 17, 2000]
+ Revised png_debug() macros and statements to eliminate compiler warnings.
Send comments/corrections/commendations to
png-implement@ccrc.wustl.edu or to randeg@alum.rpi.edu
diff --git a/INSTALL b/INSTALL
index 26a3b6362..b382e8d2a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
-Installing libpng version 1.0.8beta4 - July 14, 2000
+Installing libpng version 1.0.8rc1 - July 17, 2000
Before installing libpng, you must first install zlib. zlib
can usually be found wherever you got libpng. zlib can be
@@ -10,7 +10,7 @@ zlib.h and zconf.h include files that correspond to the
version of zlib that's installed.
You can rename the directories that you downloaded (they
-might be called "libpng-1.0.8beta4" or "lpng107" and "zlib-1.1.3"
+might be called "libpng-1.0.8rc1" or "lpng107" and "zlib-1.1.3"
or "zlib113") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@@ -57,8 +57,8 @@ The files that are presently available in the scripts directory
include
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
- makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta4)
- makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8beta4,
+ makefile.linux => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8rc1)
+ makefile.gcmmx => Linux/ELF makefile (gcc, creates libpng.so.2.1.0.8rc1,
uses assembler code tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@@ -70,9 +70,9 @@ include
makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file for IBM VisualAge/C++ version 4.0 or later
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
- makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta4)
+ makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8rc1)
makefile.sunos => Sun makefile
- makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.8beta4)
+ makefile.solaris => Solaris 2.X makefile (gcc, creates libpng.so.2.1.0.8rc1)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
diff --git a/LICENSE b/LICENSE
index 2cbd38337..573b80a8f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -4,7 +4,7 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
-libpng version 1.0.8beta4, July 14, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
+libpng version 1.0.8rc1, July 17, 2000 is Copyright (c) 2000 Glenn Randers-Pehrson
Distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
@@ -94,4 +94,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
-July 14, 2000
+July 17, 2000
diff --git a/README b/README
index bff2733df..dc75e15a2 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng 1.0.8beta4 - July 14, 2000 (shared library 2.1)
+README for libpng 1.0.8rc1 - July 17, 2000 (shared library 2.1)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@@ -177,9 +177,9 @@ Files in this distribution:
descrip.mms => VMS makefile for MMS or MMK
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng.so.2.1.0.8beta4)
+ (gcc, creates libpng.so.2.1.0.8rc1)
makefile.gcmmx => Linux/ELF makefile (gcc, creates
- libpng.so.2.1.0.8beta4, uses assembler code
+ libpng.so.2.1.0.8rc1, uses assembler code
tuned for Intel MMX platform)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
@@ -191,10 +191,10 @@ Files in this distribution:
makefile.intel => Intel C/C++ version 4.0 and later
libpng.icc => Project file, IBM VisualAge/C++ 4.0 or later
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
- makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8beta4)
+ makefile.sggcc => Silicon Graphics (gcc, creates libpng.so.2.1.0.8rc1)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
- (gcc, creates libpng.so.2.1.0.8beta4)
+ (gcc, creates libpng.so.2.1.0.8rc1)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.mips => MIPS makefile
makefile.acorn => Acorn makefile
diff --git a/Y2KINFO b/Y2KINFO
index c301bcbd2..8d8eb2426 100644
--- a/Y2KINFO
+++ b/Y2KINFO
@@ -1,13 +1,13 @@
Y2K compliance in libpng:
=========================
- July 14, 2000
+ July 17, 2000
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
- upward through 1.0.8beta4 are Y2K compliant. It is my belief that earlier
+ upward through 1.0.8rc1 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer
diff --git a/configure b/configure
index d5720bfd6..7e3f233c2 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
echo "
- There is no \"configure\" script for Libpng-1.0.8beta4. Instead, please
+ There is no \"configure\" script for Libpng-1.0.8rc1. Instead, please
copy the appropriate makefile for your system from the \"scripts\"
directory. Read the INSTALL file for more details.
"
diff --git a/example.c b/example.c
index 88726dff1..aa920fe05 100644
--- a/example.c
+++ b/example.c
@@ -755,11 +755,13 @@ void write_png(char *file_name /* , ... other image information ... */)
allocated it with malloc() instead of png_malloc(), use free() instead
of png_free(). */
png_free(png_ptr, palette);
+ palette=NULL;
/* Similarly, if you png_malloced any data that you passed in with
png_set_something(), such as a hist or trans array, free it here,
when you can be sure that libpng is through with it. */
png_free(png_ptr, trans);
+ trans=NULL;
/* clean up after the write, and free any memory allocated */
png_destroy_write_struct(&png_ptr, &info_ptr);
diff --git a/libpng.3 b/libpng.3
index aef211000..184425f30 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "July 14, 2000"
+.TH LIBPNG 3 "July 17, 2000"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta4
+libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8rc1
.SH SYNOPSIS
\fI\fB
@@ -747,7 +747,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
- libpng version 1.0.8beta4 - July 14, 2000
+ libpng version 1.0.8rc1 - July 17, 2000
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
@@ -3381,13 +3381,13 @@ application:
.SH VII. Y2K Compliance in libpng
-July 14, 2000
+July 17, 2000
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.0.8beta4 are Y2K compliant. It is my belief that earlier
+upward through 1.0.8rc1 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@@ -3528,7 +3528,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.0.8beta4 - July 14, 2000:
+Libpng version 1.0.8rc1 - July 17, 2000:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (randeg@alum.rpi.edu).
@@ -3541,7 +3541,7 @@ Supported by the PNG development group
If you modify libpng you may insert additional notices immediately following
this sentence.
-libpng version 1.0.8beta4, July 14, 2000 is
+libpng version 1.0.8rc1, July 17, 2000 is
Copyright (c) 2000 Glenn Randers-Pehrson
Distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
@@ -3632,7 +3632,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
randeg@alum.rpi.edu
-July 14, 2000
+July 17, 2000
.\" end of man page
diff --git a/libpng.txt b/libpng.txt
index 14306feb3..60dc20081 100644
--- a/libpng.txt
+++ b/libpng.txt
@@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
- libpng version 1.0.8beta4 - July 14, 2000
+ libpng version 1.0.8rc1 - July 17, 2000
Updated and distributed by Glenn Randers-Pehrson
<randeg@alum.rpi.edu>
Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
@@ -2634,13 +2634,13 @@ application:
VII. Y2K Compliance in libpng
-July 14, 2000
+July 17, 2000
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.0.8beta4 are Y2K compliant. It is my belief that earlier
+upward through 1.0.8rc1 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
diff --git a/libpngpf.3 b/libpngpf.3
index a5479d67e..4967bc669 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "July 14, 2000"
+.TH LIBPNGPF 3 "July 17, 2000"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8beta4
+libpng \- Portable Network Graphics (PNG) Reference Library 1.0.8rc1
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
diff --git a/msvc/README.txt b/msvc/README.txt
index 19f8db613..b6404b319 100644
--- a/msvc/README.txt
+++ b/msvc/README.txt
@@ -1,5 +1,5 @@
Microsoft Developer Studio Build File, Format Version 6.00 for
-libpng 1.0.8beta4 (July 14, 2000) and zlib
+libpng 1.0.8rc1 (July 17, 2000) and zlib
Copyright (C) 2000 Simon-Pierre Cadieux
For conditions of distribution and use, see copyright notice in png.h
diff --git a/msvc/png32ms.def b/msvc/png32ms.def
index 5685ec468..5e94e5c64 100644
--- a/msvc/png32ms.def
+++ b/msvc/png32ms.def
@@ -6,7 +6,7 @@ LIBRARY
DESCRIPTION "PNG image compression library for Windows"
EXPORTS
-;Version 1.0.8beta4
+;Version 1.0.8rc1
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
diff --git a/png.5 b/png.5
index 1e8d31662..0e5cfc2b8 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "July 14, 2000"
+.TH PNG 5 "July 17, 2000"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
diff --git a/png.c b/png.c
index 1d28fa3bc..325e1d01f 100644
--- a/png.c
+++ b/png.c
@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
- * libpng version 1.0.8beta4 - July 14, 2000
+ * libpng version 1.0.8rc1 - July 17, 2000
* Copyright (c) 1998, 1999, 2000 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,14 +13,14 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_0_8beta4 Your_png_h_is_not_version_1_0_8beta4;
+typedef version_1_0_8rc1 Your_png_h_is_not_version_1_0_8rc1;
/* Version information for C files. This had better match the version
* string defined in png.h. */
#ifdef PNG_USE_GLOBAL_ARRAYS
/* png_libpng_ver was changed to a function in version 1.0.5c */
-char png_libpng_ver[12] = "1.0.8beta4";
+char png_libpng_ver[12] = "1.0.8rc1";
/* png_sig was changed to a function in version 1.0.5c */
/* Place to hold the signature string for a PNG file. */
@@ -363,7 +363,10 @@ if (mask & PNG_FREE_PCAL)
{
int i;
for (i = 0; i < (int)info_ptr->pcal_nparams; i++)
+ {
png_free(png_ptr, info_ptr->pcal_params[i]);
+ info_ptr->pcal_params[i]=NULL;
+ }
png_free(png_ptr, info_ptr->pcal_params);
info_ptr->pcal_params = NULL;
}
@@ -493,7 +496,10 @@ if (mask & PNG_FREE_ROWS)
{
int row;
for (row = 0; row < (int)info_ptr->height; row++)
+ {
png_free(png_ptr, info_ptr->row_pointers[row]);
+ info_ptr->row_pointers[row]=NULL;
+ }
png_free(png_ptr, info_ptr->row_pointers);
info_ptr->row_pointers=NULL;
}
@@ -524,6 +530,7 @@ png_info_destroy(png_structp png_ptr, png_infop info_ptr)
if (png_ptr->num_chunk_list)
{
png_free(png_ptr, png_ptr->chunk_list);
+ png_ptr->chunk_list=NULL;
png_ptr->num_chunk_list=0;
}
#endif
@@ -618,11 +625,11 @@ png_charp PNGAPI
png_get_copyright(png_structp png_ptr)
{
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
- return ("\n libpng version 1.0.8beta4 - July 14, 2000\n\
+ return ((png_charp) "\n libpng version 1.0.8rc1 - July 17, 2000\n\
Copyright (c) 1998-2000 Glenn Randers-Pehrson\n\
Copyright (c) 1996, 1997 Andreas Dilger\n\
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
- return ("");
+ return ((png_charp) "");
}
/* The following return the library version as a short string in the
@@ -636,8 +643,8 @@ png_get_libpng_ver(png_structp png_ptr)
{
/* Version of *.c files used when building libpng */
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
- return("1.0.8beta4");
- return("1.0.8beta4");
+ return((png_charp) "1.0.8rc1");
+ return((png_charp) "1.0.8rc1");
}
png_charp PNGAPI
@@ -645,8 +652,8 @@ png_get_header_ver(png_structp png_ptr)
{
/* Version of *.h files used when building libpng */
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
- return(PNG_LIBPNG_VER_STRING);
- return(PNG_LIBPNG_VER_STRING);
+ return((png_charp) PNG_LIBPNG_VER_STRING);
+ return((png_charp) PNG_LIBPNG_VER_STRING);
}
png_charp PNGAPI
@@ -654,8 +661,8 @@ png_get_header_version(png_structp png_ptr)
{
/* Returns longer string containing both version and date */
if(png_ptr != NULL) /* silence compiler warning about unused png_ptr */
- return(PNG_HEADER_VERSION_STRING);
- return(PNG_HEADER_VERSION_STRING);
+ return((png_charp) PNG_HEADER_VERSION_STRING);
+ return((png_charp) PNG_HEADER_VERSION_STRING);
}
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
diff --git a/png.h b/png.h
index 38e017be1..aeb86ef63 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.0.8beta4 - July 14, 2000
+ * libpng version 1.0.8rc1 - July 17, 2000
* Copyright (c) 1998, 1999, 2000 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.)
@@ -9,7 +9,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.0.8beta4 - July 14, 2000: Glenn
+ * libpng versions 0.97, January 1998, through 1.0.8rc1 - July 17, 2000: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -55,7 +55,8 @@
* 1.0.7beta11-18 10007 2.1.0.7beta11-18 (binary compatible)
* 1.0.7rc1-2 10007 2.1.0.7rc1-2 (binary compatible)
* 1.0.7 10007 (still compatible)
- * 1.0.7beta1-2 10008 2.1.0.8beta1-2
+ * 1.0.8beta1-4 10008 2.1.0.8beta1-4
+ * 1.0.8rc1 10008 2.1.0.8rc1
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -82,7 +83,7 @@
* If you modify libpng you may insert additional notices immediately following
* this sentence.
*
- * libpng version 1.0.8beta4, July 14, 2000, is
+ * libpng version 1.0.8rc1, July 17, 2000, is
* Copyright (c) 2000 Glenn Randers-Pehrson
* Distributed according to the same disclaimer and license as libpng-1.0.6
* with the following individuals added to the list of Contributing Authors
@@ -187,13 +188,13 @@
* Y2K compliance in libpng:
* =========================
*
- * July 14, 2000
+ * July 17, 2000
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.0.8beta4 are Y2K compliant. It is my belief that earlier
+ * upward through 1.0.8rc1 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@@ -249,7 +250,7 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.0.8beta4"
+#define PNG_LIBPNG_VER_STRING "1.0.8rc1"
#define PNG_LIBPNG_VER_SONUM 2
@@ -259,7 +260,7 @@
#define PNG_LIBPNG_VER_RELEASE 8
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: */
-#define PNG_LIBPNG_VER_BUILD 4
+#define PNG_LIBPNG_VER_BUILD 1
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -1147,9 +1148,9 @@ struct png_struct_def
};
/* This prevents a compiler error in png_get_copyright() in png.c if png.c
-and png.h are both at * version 1.0.8beta4
+and png.h are both at * version 1.0.8rc1
*/
-typedef png_structp version_1_0_8beta4;
+typedef png_structp version_1_0_8rc1;
typedef png_struct FAR * FAR * png_structpp;
@@ -2131,25 +2132,35 @@ extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
#if (PNG_DEBUG > 0)
#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
#include <crtdbg.h>
-#define png_debug(l,m) if (PNG_DEBUG > l) _RPT0(_CRT_WARN,m)
-#define png_debug1(l,m,p1) if (PNG_DEBUG > l) _RPT1(_CRT_WARN,m,p1)
-#define png_debug2(l,m,p1,p2) if (PNG_DEBUG > l) _RPT2(_CRT_WARN,m,p1,p2)
+#if (PNG_DEBUG > 1)
+#define png_debug(l,m) _RPT0(_CRT_WARN,m)
+#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m,p1)
+#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m,p1,p2)
+#endif
#else /* PNG_DEBUG_FILE || !_MSC_VER */
#ifndef PNG_DEBUG_FILE
#define PNG_DEBUG_FILE stderr
#endif /* PNG_DEBUG_FILE */
+#if (PNG_DEBUG > 1)
#define png_debug(l,m) \
- if (PNG_DEBUG > l) \
- fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
- (l==2 ? "\t\t":(l>2 ? "\t\t\t":""))))
+{ \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
+}
#define png_debug1(l,m,p1) \
- if (PNG_DEBUG > l) \
- fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
- (l==2 ? "\t\t":(l>2 ? "\t\t\t":""))),p1)
+{ \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
+}
#define png_debug2(l,m,p1,p2) \
- if (PNG_DEBUG > l) \
- fprintf(PNG_DEBUG_FILE,"%s"m,(l==1 ? "\t" : \
- (l==2 ? "\t\t":(l>2 ? "\t\t\t":""))),p1,p2)
+{ \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
+}
+#endif /* (PNG_DEBUG > 1) */
#endif /* _MSC_VER */
#endif /* (PNG_DEBUG > 0) */
#endif /* PNG_DEBUG */
@@ -2171,7 +2182,7 @@ 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));
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.0.8beta4 - July 14, 2000 (header)\n"
+ " libpng version 1.0.8rc1 - July 17, 2000 (header)\n"
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
/* With these routines we avoid an integer divide, which will be slower on
diff --git a/pngasmrd.h b/pngasmrd.h
index 6eda7b10d..3e08d6c94 100644
--- a/pngasmrd.h
+++ b/pngasmrd.h
@@ -1,6 +1,6 @@
/* pngasmrd.h - assembler version of utilities to read a PNG file
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1999, 2000 Glenn Randers-Pehrson
*
diff --git a/pngconf.h b/pngconf.h
index 22866efaf..0f83e282d 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,6 +1,6 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngerror.c b/pngerror.c
index 29c80c70f..cf7930812 100644
--- a/pngerror.c
+++ b/pngerror.c
@@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pnggccrd.c b/pnggccrd.c
index 7402ca58a..24115aa66 100644
--- a/pnggccrd.c
+++ b/pnggccrd.c
@@ -6,7 +6,7 @@
* and http://www.intel.com/drg/pentiumII/appnotes/923/923.htm
* for Intel's performance analysis of the MMX vs. non-MMX code.
*
- * libpng version 1.0.8beta4 - July 14, 2000
+ * libpng version 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* Copyright (c) 1998, Intel Corporation
diff --git a/pngget.c b/pngget.c
index e6375bfb4..ef63066f5 100644
--- a/pngget.c
+++ b/pngget.c
@@ -1,7 +1,7 @@
/* pngget.c - retrieval of values from info struct
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngmem.c b/pngmem.c
index 9a5ab2673..12126bc42 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,7 +1,7 @@
/* pngmem.c - stub functions for memory allocation
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngpread.c b/pngpread.c
index 13fd4134f..e621cc8b5 100644
--- a/pngpread.c
+++ b/pngpread.c
@@ -1,7 +1,7 @@
/* pngpread.c - read a png file in push mode
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngread.c b/pngread.c
index fea208c0b..ac652085a 100644
--- a/pngread.c
+++ b/pngread.c
@@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -62,6 +62,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#endif
{
png_free(png_ptr, png_ptr->zbuf);
+ png_ptr->zbuf=NULL;
png_destroy_struct(png_ptr);
return (png_structp)NULL;
}
@@ -315,7 +316,7 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
png_reset_crc(png_ptr);
png_crc_read(png_ptr, png_ptr->chunk_name, 4);
- png_debug2(0, "Reading %s chunk, length=%d.\n", png_ptr->chunk_name,
+ png_debug2(0, "Reading %s chunk, length=%lu.\n", png_ptr->chunk_name,
length);
/* This should be a binary subdivision search or a hash for
@@ -465,7 +466,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
const int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
#endif
int ret;
- png_debug2(1, "in png_read_row (row %d, pass %d)\n",
+ png_debug2(1, "in png_read_row (row %lu, pass %d)\n",
png_ptr->row_number, png_ptr->pass);
/* save jump buffer and error functions */
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
@@ -697,7 +698,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
* not called png_set_interlace_handling(), the display_row buffer will
* be ignored, so pass NULL to it.
*
- * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta4
+ * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8rc1
*/
void PNGAPI
@@ -746,7 +747,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
* only call this function once. If you desire to have an image for
* each pass of a interlaced image, use png_read_rows() instead.
*
- * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8beta4
+ * [*] png_handle_alpha() does not exist yet, as of libpng version 1.0.8rc1
*/
void PNGAPI
png_read_image(png_structp png_ptr, png_bytepp image)
diff --git a/pngrio.c b/pngrio.c
index 82c0c4588..8e9a6b36b 100644
--- a/pngrio.c
+++ b/pngrio.c
@@ -1,7 +1,7 @@
/* pngrio.c - functions for data input
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngrtran.c b/pngrtran.c
index 3e53fa891..d84c6a2bc 100644
--- a/pngrtran.c
+++ b/pngrtran.c
@@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngrutil.c b/pngrutil.c
index 45e175579..2be3c87b8 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -388,7 +388,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
(png_uint_32)png_ptr->pixel_depth + 7) >> 3);
png_debug1(3,"bit_depth = %d\n", png_ptr->bit_depth);
png_debug1(3,"channels = %d\n", png_ptr->channels);
- png_debug1(3,"rowbytes = %d\n", png_ptr->rowbytes);
+ png_debug1(3,"rowbytes = %lu\n", png_ptr->rowbytes);
png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth,
color_type, interlace_type, compression_type, filter_type);
}
@@ -1541,7 +1541,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return;
}
- png_debug1(2, "Allocating and reading pCAL chunk data (%d bytes)\n",
+ png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)\n",
length + 1);
purpose = (png_charp)png_malloc(png_ptr, length + 1);
slength = (png_size_t)length;
@@ -1661,7 +1661,7 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return;
}
- png_debug1(2, "Allocating and reading sCAL chunk data (%d bytes)\n",
+ png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)\n",
length + 1);
buffer = (png_charp)png_malloc(png_ptr, length + 1);
slength = (png_size_t)length;
@@ -2576,7 +2576,7 @@ png_read_filter_row
png_bytep prev_row, int filter)
{
png_debug(1, "in png_read_filter_row\n");
- png_debug2(2,"row = %d, filter = %d\n", png_ptr->row_number, filter);
+ png_debug2(2,"row = %lu, filter = %d\n", png_ptr->row_number, filter);
switch (filter)
{
case PNG_FILTER_VALUE_NONE:
@@ -2990,12 +2990,12 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_memset_check(png_ptr, png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
- png_debug1(3, "width = %d,\n", png_ptr->width);
- png_debug1(3, "height = %d,\n", png_ptr->height);
- png_debug1(3, "iwidth = %d,\n", png_ptr->iwidth);
- png_debug1(3, "num_rows = %d\n", png_ptr->num_rows);
- png_debug1(3, "rowbytes = %d,\n", png_ptr->rowbytes);
- png_debug1(3, "irowbytes = %d,\n", png_ptr->irowbytes);
+ png_debug1(3, "width = %lu,\n", png_ptr->width);
+ png_debug1(3, "height = %lu,\n", png_ptr->height);
+ png_debug1(3, "iwidth = %lu,\n", png_ptr->iwidth);
+ png_debug1(3, "num_rows = %lu\n", png_ptr->num_rows);
+ png_debug1(3, "rowbytes = %lu,\n", png_ptr->rowbytes);
+ png_debug1(3, "irowbytes = %lu,\n", png_ptr->irowbytes);
png_ptr->flags |= PNG_FLAG_ROW_INIT;
}
diff --git a/pngset.c b/pngset.c
index 72d5227aa..eb6fb9e40 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -212,7 +212,7 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
return;
length = png_strlen(purpose) + 1;
- png_debug1(3, "allocating purpose for info (%d bytes)\n", length);
+ png_debug1(3, "allocating purpose for info (%lu bytes)\n", length);
info_ptr->pcal_purpose = (png_charp)png_malloc(png_ptr, length);
png_memcpy(info_ptr->pcal_purpose, purpose, (png_size_t)length);
@@ -223,7 +223,7 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
info_ptr->pcal_nparams = (png_byte)nparams;
length = png_strlen(units) + 1;
- png_debug1(3, "allocating units for info (%d bytes)\n", length);
+ png_debug1(3, "allocating units for info (%lu bytes)\n", length);
info_ptr->pcal_units = (png_charp)png_malloc(png_ptr, length);
png_memcpy(info_ptr->pcal_units, units, (png_size_t)length);
@@ -234,7 +234,7 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
for (i = 0; i < nparams; i++)
{
length = png_strlen(params[i]) + 1;
- png_debug2(3, "allocating parameter %d for info (%d bytes)\n", i, length);
+ png_debug2(3, "allocating parameter %d for info (%lu bytes)\n", i, length);
info_ptr->pcal_params[i] = (png_charp)png_malloc(png_ptr, length);
png_memcpy(info_ptr->pcal_params[i], params[i], (png_size_t)length);
}
@@ -556,7 +556,7 @@ png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
textp->key = (png_charp)png_malloc(png_ptr,
(png_uint_32)(key_len + text_length + lang_len + lang_key_len + 4));
png_debug2(2, "Allocated %d bytes at %x in png_set_text\n",
- key_len + lang_len + lang_key_len + text_length + 4, textp->key);
+ key_len + lang_len + lang_key_len + text_length + 4, (int)textp->key);
png_memcpy(textp->key, text_ptr[i].key,
(png_size_t)(key_len));
@@ -659,6 +659,7 @@ png_set_sPLT(png_structp png_ptr,
png_memcpy(np, info_ptr->splt_palettes,
info_ptr->splt_palettes_num * sizeof(png_sPLT_t));
png_free(png_ptr, info_ptr->splt_palettes);
+ info_ptr->splt_palettes=NULL;
for (i = 0; i < nentries; i++)
{
@@ -703,6 +704,7 @@ png_set_unknown_chunks(png_structp png_ptr,
png_memcpy(np, info_ptr->unknown_chunks,
info_ptr->unknown_chunks_num * sizeof(png_unknown_chunk));
png_free(png_ptr, info_ptr->unknown_chunks);
+ info_ptr->unknown_chunks=NULL;
for (i = 0; i < num_unknowns; i++)
{
@@ -739,7 +741,7 @@ png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr,
void PNGAPI
png_permit_empty_plte (png_structp png_ptr, int empty_plte_permitted)
{
- png_debug1(1, "in png_permit_empty_plte\n", "");
+ png_debug(1, "in png_permit_empty_plte\n");
if (png_ptr == NULL)
return;
png_ptr->empty_plte_permitted=(png_byte)empty_plte_permitted;
@@ -774,6 +776,7 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
{
png_memcpy(new_list, png_ptr->chunk_list, 5*old_num_chunks);
png_free(png_ptr, png_ptr->chunk_list);
+ png_ptr->chunk_list=NULL;
}
png_memcpy(new_list+5*old_num_chunks, chunk_list, 5*num_chunks);
for (p=new_list+5*old_num_chunks+4, i=0; i<num_chunks; i++, p+=5)
diff --git a/pngtest.c b/pngtest.c
index 269409402..f08bbb41e 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -1,7 +1,7 @@
/* pngtest.c - a simple test program to test libpng
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -104,6 +104,8 @@ static int status_dots_requested=0;
static int status_dots=1;
void
+read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
+void
read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
{
if(png_ptr == NULL || row_number > PNG_MAX_UINT) return;
@@ -123,6 +125,8 @@ read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
}
void
+write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
+void
write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
{
if(png_ptr == NULL || row_number > PNG_MAX_UINT || pass > 7) return;
@@ -136,6 +140,8 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
5 in case illegal filter values are present.) */
static png_uint_32 filters_used[256];
void
+count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data);
+void
count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
{
if(png_ptr != NULL && row_info != NULL)
@@ -150,6 +156,8 @@ count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
static png_uint_32 zero_samples;
void
+count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data);
+void
count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
{
png_bytep dp = data;
@@ -517,6 +525,7 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
the memory that is to be freed. */
memset(ptr, 0x55, pinfo->size);
png_free_default(png_ptr, pinfo);
+ pinfo=NULL;
break;
}
if (pinfo->next == NULL)
@@ -534,6 +543,7 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
printf("Freeing %x\n",ptr);
#endif
png_free_default(png_ptr, ptr);
+ ptr=NULL;
}
#endif /* PNG_USER_MEM_SUPPORTED */
/* END of code to test memory allocation/deallocation */
@@ -878,22 +888,24 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_FLOATING_POINT_SUPPORTED
{
int unit;
- double width, height;
+ double scal_width, scal_height;
- if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &width, &height))
+ if (png_get_sCAL(read_ptr, read_info_ptr, &unit, &scal_width,
+ &scal_height))
{
- png_set_sCAL(write_ptr, write_info_ptr, unit, width, height);
+ png_set_sCAL(write_ptr, write_info_ptr, unit, scal_width, scal_height);
}
}
#else
#ifdef PNG_FIXED_POINT_SUPPORTED
{
int unit;
- png_charp width, height;
+ png_charp scal_width, scal_height;
- if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &width, &height))
+ 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, width, height);
+ png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height);
}
}
#endif
@@ -1091,6 +1103,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_debug(0, "Destroying data structs\n");
png_free(read_ptr, row_buf);
+ row_buf=NULL;
png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);
png_destroy_info_struct(write_ptr, &write_end_info_ptr);
png_destroy_write_struct(&write_ptr, &write_info_ptr);
@@ -1435,4 +1448,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_0_8beta4 your_png_h_is_not_version_1_0_8beta4;
+typedef version_1_0_8rc1 your_png_h_is_not_version_1_0_8rc1;
diff --git a/pngtrans.c b/pngtrans.c
index fe7c49f65..77d69b5f6 100644
--- a/pngtrans.c
+++ b/pngtrans.c
@@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngvcrd.c b/pngvcrd.c
index e6d533935..c446bf308 100644
--- a/pngvcrd.c
+++ b/pngvcrd.c
@@ -2,7 +2,7 @@
*
* For Intel x86 CPU and Microsoft Visual C++ compiler
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* Copyright (c) 1998, Intel Corporation
diff --git a/pngwio.c b/pngwio.c
index 3d5bc522b..9e61616de 100644
--- a/pngwio.c
+++ b/pngwio.c
@@ -1,7 +1,7 @@
/* pngwio.c - functions for data output
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwrite.c b/pngwrite.c
index 97d0ff9a3..7c1150cec 100644
--- a/pngwrite.c
+++ b/pngwrite.c
@@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -447,6 +447,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#endif
{
png_free(png_ptr, png_ptr->zbuf);
+ png_ptr->zbuf=NULL;
png_destroy_struct(png_ptr);
return ((png_structp)NULL);
}
@@ -737,11 +738,11 @@ png_write_row(png_structp png_ptr, png_bytep row)
(png_uint_32)png_ptr->row_info.pixel_depth + 7) >> 3);
png_debug1(3, "row_info->color_type = %d\n", png_ptr->row_info.color_type);
- png_debug1(3, "row_info->width = %d\n", png_ptr->row_info.width);
+ png_debug1(3, "row_info->width = %lu\n", png_ptr->row_info.width);
png_debug1(3, "row_info->channels = %d\n", png_ptr->row_info.channels);
png_debug1(3, "row_info->bit_depth = %d\n", png_ptr->row_info.bit_depth);
png_debug1(3, "row_info->pixel_depth = %d\n", png_ptr->row_info.pixel_depth);
- png_debug1(3, "row_info->rowbytes = %d\n", png_ptr->row_info.rowbytes);
+ png_debug1(3, "row_info->rowbytes = %lu\n", png_ptr->row_info.rowbytes);
/* Copy user's row into buffer, leaving room for filter byte. */
png_memcpy_check(png_ptr, png_ptr->row_buf + 1, row,
@@ -866,6 +867,7 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
if (png_ptr->num_chunk_list)
{
png_free(png_ptr, png_ptr->chunk_list);
+ png_ptr->chunk_list=NULL;
png_ptr->num_chunk_list=0;
}
#endif
diff --git a/pngwtran.c b/pngwtran.c
index c0efa9e26..78999eafb 100644
--- a/pngwtran.c
+++ b/pngwtran.c
@@ -1,7 +1,7 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngwutil.c b/pngwutil.c
index b41cc092a..b41447407 100644
--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1,7 +1,7 @@
/* pngwutil.c - utilities to write a PNG file
*
- * libpng 1.0.8beta4 - July 14, 2000
+ * libpng 1.0.8rc1 - July 17, 2000
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -77,7 +77,7 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
png_uint_32 length)
{
png_byte buf[4];
- png_debug2(0, "Writing %s chunk (%d bytes)\n", chunk_name, length);
+ png_debug2(0, "Writing %s chunk (%lu bytes)\n", chunk_name, length);
/* write the length */
png_save_uint_32(buf, length);
@@ -339,9 +339,11 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
png_write_chunk_data(png_ptr,(png_bytep)comp->output_ptr[i],
png_ptr->zbuf_size);
png_free(png_ptr, comp->output_ptr[i]);
+ comp->output_ptr[i]=NULL;
}
if (comp->max_output_ptr != 0)
png_free(png_ptr, comp->output_ptr);
+ comp->output_ptr=NULL;
/* write anything left in zbuf */
if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size)
png_write_chunk_data(png_ptr, png_ptr->zbuf,
@@ -1400,7 +1402,7 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
for (i = 0; i < nparams; i++)
{
params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1);
- png_debug2(3, "pCAL parameter %d length = %d\n", i, params_len[i]);
+ png_debug2(3, "pCAL parameter %d length = %lu\n", i, params_len[i]);
total_len += (png_size_t)params_len[i];
}
diff --git a/scripts/makefile.beos b/scripts/makefile.beos
index 46d462373..ef90394b3 100644
--- a/scripts/makefile.beos
+++ b/scripts/makefile.beos
@@ -31,7 +31,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
-PNGMIN = 1.0.8beta4
+PNGMIN = 1.0.8rc1
PNGVER = $(PNGMAJ).$(PNGMIN)
# where make install puts libpng.a, libpng.so*, and png.h
diff --git a/scripts/makefile.dec b/scripts/makefile.dec
index 4d075188a..ce18ead84 100644
--- a/scripts/makefile.dec
+++ b/scripts/makefile.dec
@@ -14,7 +14,7 @@ ZLIBINC=../zlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
-PNGMIN = 1.0.8beta4
+PNGMIN = 1.0.8rc1
PNGVER = $(PNGMAJ).$(PNGMIN)
CC=cc
diff --git a/scripts/makefile.gcmmx b/scripts/makefile.gcmmx
index 87c8d9108..e5b261cb3 100644
--- a/scripts/makefile.gcmmx
+++ b/scripts/makefile.gcmmx
@@ -36,7 +36,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
-PNGMIN = 1.0.8beta4
+PNGMIN = 1.0.8rc1
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
diff --git a/scripts/makefile.linux b/scripts/makefile.linux
index ca7a4653a..adf3af30d 100644
--- a/scripts/makefile.linux
+++ b/scripts/makefile.linux
@@ -34,7 +34,7 @@ RANLIB=ranlib
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
-PNGMIN = 1.0.8beta4
+PNGMIN = 1.0.8rc1
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
diff --git a/scripts/makefile.sco b/scripts/makefile.sco
index ec4b18adb..f02012b6e 100644
--- a/scripts/makefile.sco
+++ b/scripts/makefile.sco
@@ -25,7 +25,7 @@ RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
-PNGMIN = 1.0.8beta4
+PNGMIN = 1.0.8rc1
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
diff --git a/scripts/makefile.sggcc b/scripts/makefile.sggcc
index 6935884f0..1e0953b26 100644
--- a/scripts/makefile.sggcc
+++ b/scripts/makefile.sggcc
@@ -19,8 +19,8 @@ CFLAGS=-I$(ZLIBINC) -O2 $(WARNMORE) -fPIC -mabi=n32 # -g -DPNG_DEBUG=5
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
LDSHARED=gcc -shared
-VER=1.0.8beta4
-LIBS=libpng.so.1.0.8beta4
+VER=1.0.8rc1
+LIBS=libpng.so.1.0.8rc1
SHAREDLIB=libpng.so
libdir=$(prefix)/lib32
diff --git a/scripts/makefile.solaris b/scripts/makefile.solaris
index 7f47da332..d8a67662b 100644
--- a/scripts/makefile.solaris
+++ b/scripts/makefile.solaris
@@ -31,7 +31,7 @@ RANLIB=echo
# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
# have to change it.
PNGMAJ = 2
-PNGMIN = 1.0.8beta4
+PNGMIN = 1.0.8rc1
PNGVER = $(PNGMAJ).$(PNGMIN)
INCPATH=$(prefix)/include
diff --git a/scripts/pngdef.pas b/scripts/pngdef.pas
index ff073c1cf..a6a7df17b 100644
--- a/scripts/pngdef.pas
+++ b/scripts/pngdef.pas
@@ -5,7 +5,7 @@ unit pngdef;
interface
const
- PNG_LIBPNG_VER_STRING = '1.0.8beta4';
+ PNG_LIBPNG_VER_STRING = '1.0.8rc1';
PNG_LIBPNG_VER = 10008;
type