summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-04-01 09:50:03 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-04-01 11:29:12 -0500
commit8f4d83a8819330b1c7b32955c406183250f4756f (patch)
tree807e449fdef33399c485cf177bef68cd94d07d8b
parenta9b02399ac4acbe593424d96e0905b01b427446b (diff)
downloadlibpng-8f4d83a8819330b1c7b32955c406183250f4756f.tar.gz
[libpng17] Imported from libpng-1.7.0beta87.tarv1.7.0beta87
-rw-r--r--ANNOUNCE5
-rw-r--r--CHANGES3
-rw-r--r--LICENSE4
-rw-r--r--README4
-rw-r--r--contrib/arm-neon/android-ndk.c2
-rw-r--r--contrib/gregbook/README2
-rw-r--r--contrib/tools/sRGB.h2
-rw-r--r--libpng-manual.txt30
-rw-r--r--libpng.338
-rw-r--r--libpngpf.32
-rw-r--r--png.510
-rw-r--r--png.c32
-rw-r--r--png.h14
-rw-r--r--pngconf.h2
-rw-r--r--pngrutil.c15
-rw-r--r--pngset.c3
-rw-r--r--projects/owatcom/pngconfig.mak2
-rw-r--r--projects/vstudio/README.txt2
-rw-r--r--projects/vstudio/zlib.props2
-rw-r--r--scripts/README.txt2
-rw-r--r--scripts/pnglibconf.h.prebuilt2
21 files changed, 100 insertions, 78 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index 829446b14..2b2dc67b9 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.7.0beta87 - March 22, 2017
+Libpng 1.7.0beta87 - April 1, 2017
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.
@@ -1423,12 +1423,13 @@ Version 1.7.0beta86 [December 29, 2016]
Fixed a potential null pointer dereference in png_set_text_2() (bug report
and patch by Patrick Keshishian, CVE-2016-10087).
-Version 1.7.0beta87 [March 22, 2017]
+Version 1.7.0beta87 [April 1, 2017]
Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna).
The contrib/examples/pngtopng.c recovery code was in the wrong "if"
branches; the comments were correct.
Added missing "$(CPPFLAGS)" to the compile line for c.pic.o in
makefile.linux and makefile.solaris-x86 (Cosmin).
+ Merged some recent changes from libpng-1.6.30beta01.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index a41efb70f..0f26ea92c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5723,12 +5723,13 @@ Version 1.7.0beta86 [December 29, 2016]
Fixed a potential null pointer dereference in png_set_text_2() (bug report
and patch by Patrick Keshishian, CVE-2016-10087).
-Version 1.7.0beta87 [March 22, 2017]
+Version 1.7.0beta87 [April 1, 2017]
Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna).
The contrib/examples/pngtopng.c recovery code was in the wrong "if"
branches; the comments were correct.
Added missing "$(CPPFLAGS)" to the compile line for c.pic.o in
makefile.linux and makefile.solaris-x86 (Cosmin).
+ Merged some recent changes from libpng-1.6.30beta01.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/LICENSE b/LICENSE
index 6a35406ce..de3ea8f3e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.0.7, July 1, 2000 through 1.7.0beta87, December 30, 2016 are
+libpng versions 1.0.7, July 1, 2000 through 1.7.0beta87, April 1, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
@@ -127,4 +127,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-December 30, 2016
+April 1, 2017
diff --git a/README b/README
index 24bf0afb5..bd086bcb6 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-README for libpng version 1.7.0beta87 - December 30, 2016 (shared library 17.0)
+README for libpng version 1.7.0beta87 - April 1, 2017 (shared library 17.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@@ -90,7 +90,7 @@ You may also want a copy of the PNG specification. It is available
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
these at http://www.libpng.org/pub/png/documents/
-This code is currently being archived at libpng.sf.net in the
+This code is currently being archived at libpng.sourceforge.io in the
[DOWNLOAD] area, and at ftp://ftp.simplesystems.org. If you can't find it
in any of those places, e-mail me, and I'll help you find it.
diff --git a/contrib/arm-neon/android-ndk.c b/contrib/arm-neon/android-ndk.c
index 724012348..fb3a4898d 100644
--- a/contrib/arm-neon/android-ndk.c
+++ b/contrib/arm-neon/android-ndk.c
@@ -17,7 +17,7 @@
*
* Documentation:
* http://www.kandroid.org/ndk/docs/CPU-ARM-NEON.html
- * http://code.google.com/p/android/issues/detail?id=49065
+ * https://code.google.com/p/android/issues/detail?id=49065
*
* NOTE: this requires that libpng is built against the Android NDK and linked
* with an implementation of the Android ARM 'cpu-features' library. The code
diff --git a/contrib/gregbook/README b/contrib/gregbook/README
index 7b1f6a3ea..edaf2b722 100644
--- a/contrib/gregbook/README
+++ b/contrib/gregbook/README
@@ -55,7 +55,7 @@ mation and links to the latest version of the source code, and Chapters
13-15 of the book for detailed discussion of the three programs.
Greg Roelofs
-http://pobox.com/~newt/greg_contact.html
+https://pobox.com/~newt/greg_contact.html
16 March 2008
diff --git a/contrib/tools/sRGB.h b/contrib/tools/sRGB.h
index 22c8f7c0e..d1ece5129 100644
--- a/contrib/tools/sRGB.h
+++ b/contrib/tools/sRGB.h
@@ -14,7 +14,7 @@
* All routines take and return a floating point value in the range
* 0 to 1.0, doing a calculation according to the sRGB specification
* (in fact the source of the numbers is the wikipedia article at
- * http://en.wikipedia.org/wiki/SRGB).
+ * https://en.wikipedia.org/wiki/SRGB).
*/
static double
sRGB_from_linear(double l)
diff --git a/libpng-manual.txt b/libpng-manual.txt
index 11f53fe3f..b32b4aa63 100644
--- a/libpng-manual.txt
+++ b/libpng-manual.txt
@@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.7.0beta87 - December 30, 2016
+ libpng version 1.7.0beta87 - April 1, 2017
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.7.0beta87 - December 30, 2016
+ libpng versions 0.97, January 1998, through 1.7.0beta87 - April 1, 2017
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@@ -67,17 +67,17 @@ file format in application programs.
The PNG specification (second edition), November 2003, is available as
a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at
-<http://www.w3.org/TR/2003/REC-PNG-20031110/
+<https://www.w3.org/TR/2003/REC-PNG-20031110/
The W3C and ISO documents have identical technical content.
The PNG-1.2 specification is available at
-<http://png-mng.sourceforge.net/pub/png/spec/1.2/>.
+<https://png-mng.sourceforge.io/pub/png/spec/1.2/>.
It is technically equivalent
to the PNG specification (second edition) but has some additional material.
-The PNG-1.0 specification is available as RFC 2083
-<http://png-mng.sourceforge.net/pub/png/spec/1.0/> and as a
-W3C Recommendation <http://www.w3.org/TR/REC-png-961001>.
+The PNG-1.0 specification is available as RFC 2083
+<https://png-mng.sourceforge.io/pub/png/spec/1.0/> and as a
+W3C Recommendation <https://www.w3.org/TR/REC-png-961001>.
Some additional chunks are described in the special-purpose public chunks
documents at <http://www.libpng.org/pub/png/spec/register/>
@@ -4050,7 +4050,7 @@ READ APIs
When the simplified API needs to convert between sRGB and linear colorspaces,
the actual sRGB transfer curve defined in the sRGB specification (see the
-article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
approximation used elsewhere in libpng.
WRITE APIS
@@ -4227,7 +4227,7 @@ However, there are some uncertainties about the status of local variables
after a longjmp, so the user may want to be careful about doing anything
after setjmp returns non-zero besides returning itself. Consult your
compiler documentation for more details. For an alternative approach, you
-may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
+may wish to use the "cexcept" facility (see https://cexcept.sourceforge.io/),
which is illustrated in pngvalid.c and in contrib/visupng.
Beginning in libpng-1.4.0, the png_set_benign_errors() API became available.
@@ -4447,7 +4447,7 @@ in a MNG datastream. As a minimum, it must have the MNG 8-byte signature
and the MHDR and MEND chunks. Libpng does not provide support for these
or any other MNG chunks; your application must provide its own support for
them. You may wish to consider using libmng (available at
-http://www.libmng.com) instead.
+https://www.libmng.com/) instead.
VIII. Changes to Libpng from version 0.88
@@ -5189,7 +5189,7 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files
going back to version 0.70. You can access the git repository (read only)
at
- git://git.code.sf.net/p/libpng/code
+ https://git.code.sf.net/p/libpng/code.git
or you can browse it with a web browser by selecting the "code" button at
@@ -5199,7 +5199,7 @@ Patches can be sent to glennrp at users.sourceforge.net or to
png-mng-implement at lists.sourceforge.net or you can upload them to
the libpng bug tracker at
- http://libpng.sourceforge.net
+ https://libpng.sourceforge.io/
We also accept patches built from the tar or zip distributions, and
simple verbal discriptions of bug fixes, reported either to the
@@ -5209,7 +5209,7 @@ mailing list, or directly to glennrp.
XVI. Coding style
Our coding style is similar to the "Allman" style
-(See http://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
+(See https://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
braces on separate lines:
if (condition)
@@ -5323,7 +5323,7 @@ Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as
though it were a function.
Control keywords if, for, while, and switch are always followed by a space
-to distinguish them from function calls, which have no trailing space.
+to distinguish them from function calls, which have no trailing space.
We put a space after each comma and after each semicolon
in "for" statements, and we put spaces before and after each
@@ -5347,7 +5347,7 @@ for a few type names that we inherit from zlib.h.
We prefer "if (something != 0)" and "if (something == 0)" over
"if (something)" and if "(!something)", respectively, and for pointers
-we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
+we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
We do not use the TAB character for indentation in the C sources.
diff --git a/libpng.3 b/libpng.3
index 34f7270d9..db2e43ea9 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1,4 +1,4 @@
-.TH LIBPNG 3 "December 30, 2016"
+.TH LIBPNG 3 "April 1, 2017"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta87
.SH SYNOPSIS
@@ -500,7 +500,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.7.0beta87 - December 30, 2016
+ libpng version 1.7.0beta87 - April 1, 2017
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@@ -511,7 +511,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.7.0beta87 - December 30, 2016
+ libpng versions 0.97, January 1998, through 1.7.0beta87 - April 1, 2017
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2015 Glenn Randers-Pehrson
@@ -567,17 +567,17 @@ file format in application programs.
The PNG specification (second edition), November 2003, is available as
a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at
-<http://www.w3.org/TR/2003/REC-PNG-20031110/
+<https://www.w3.org/TR/2003/REC-PNG-20031110/
The W3C and ISO documents have identical technical content.
The PNG-1.2 specification is available at
-<http://png-mng.sourceforge.net/pub/png/spec/1.2/>.
+<https://png-mng.sourceforge.io/pub/png/spec/1.2/>.
It is technically equivalent
to the PNG specification (second edition) but has some additional material.
-The PNG-1.0 specification is available as RFC 2083
-<http://png-mng.sourceforge.net/pub/png/spec/1.0/> and as a
-W3C Recommendation <http://www.w3.org/TR/REC-png-961001>.
+The PNG-1.0 specification is available as RFC 2083
+<https://png-mng.sourceforge.io/pub/png/spec/1.0/> and as a
+W3C Recommendation <https://www.w3.org/TR/REC-png-961001>.
Some additional chunks are described in the special-purpose public chunks
documents at <http://www.libpng.org/pub/png/spec/register/>
@@ -4550,7 +4550,7 @@ READ APIs
When the simplified API needs to convert between sRGB and linear colorspaces,
the actual sRGB transfer curve defined in the sRGB specification (see the
-article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
approximation used elsewhere in libpng.
WRITE APIS
@@ -4727,7 +4727,7 @@ However, there are some uncertainties about the status of local variables
after a longjmp, so the user may want to be careful about doing anything
after setjmp returns non-zero besides returning itself. Consult your
compiler documentation for more details. For an alternative approach, you
-may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
+may wish to use the "cexcept" facility (see https://cexcept.sourceforge.io/),
which is illustrated in pngvalid.c and in contrib/visupng.
Beginning in libpng-1.4.0, the png_set_benign_errors() API became available.
@@ -4947,7 +4947,7 @@ in a MNG datastream. As a minimum, it must have the MNG 8-byte signature
and the MHDR and MEND chunks. Libpng does not provide support for these
or any other MNG chunks; your application must provide its own support for
them. You may wish to consider using libmng (available at
-http://www.libmng.com) instead.
+https://www.libmng.com/) instead.
.SH VIII. Changes to Libpng from version 0.88
@@ -5689,7 +5689,7 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files
going back to version 0.70. You can access the git repository (read only)
at
- git://git.code.sf.net/p/libpng/code
+ https://git.code.sf.net/p/libpng/code.git
or you can browse it with a web browser by selecting the "code" button at
@@ -5699,7 +5699,7 @@ Patches can be sent to glennrp at users.sourceforge.net or to
png-mng-implement at lists.sourceforge.net or you can upload them to
the libpng bug tracker at
- http://libpng.sourceforge.net
+ https://libpng.sourceforge.io/
We also accept patches built from the tar or zip distributions, and
simple verbal discriptions of bug fixes, reported either to the
@@ -5709,7 +5709,7 @@ mailing list, or directly to glennrp.
.SH XVI. Coding style
Our coding style is similar to the "Allman" style
-(See http://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
+(See https://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
braces on separate lines:
if (condition)
@@ -5823,7 +5823,7 @@ Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as
though it were a function.
Control keywords if, for, while, and switch are always followed by a space
-to distinguish them from function calls, which have no trailing space.
+to distinguish them from function calls, which have no trailing space.
We put a space after each comma and after each semicolon
in "for" statements, and we put spaces before and after each
@@ -5847,7 +5847,7 @@ for a few type names that we inherit from zlib.h.
We prefer "if (something != 0)" and "if (something == 0)" over
"if (something)" and if "(!something)", respectively, and for pointers
-we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
+we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
We do not use the TAB character for indentation in the C sources.
@@ -6020,7 +6020,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.7.0beta87 - December 30, 2016:
+Libpng version 1.7.0beta87 - April 1, 2017:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -6045,7 +6045,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.0.7, July 1, 2000 through 1.7.0beta87, December 30, 2016 are
+libpng versions 1.0.7, July 1, 2000 through 1.7.0beta87, April 1, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
@@ -6170,7 +6170,7 @@ files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-December 30, 2016
+April 1, 2017
.\" end of man page
diff --git a/libpngpf.3 b/libpngpf.3
index bd43a355d..cede1282a 100644
--- a/libpngpf.3
+++ b/libpngpf.3
@@ -1,4 +1,4 @@
-.TH LIBPNGPF 3 "December 30, 2016"
+.TH LIBPNGPF 3 "April 1, 2017"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta87
(private functions)
diff --git a/png.5 b/png.5
index e13626586..4fdc9f02f 100644
--- a/png.5
+++ b/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "December 30, 2016"
+.TH PNG 5 "April 1, 2017"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
@@ -23,12 +23,12 @@ platforms.
PNG specification (second edition), November 2003:
.IP
.br
- <http://www.w3.org/TR/2003/REC-PNG-20031110/
+ <https://www.w3.org/TR/2003/REC-PNG-20031110/
.LP
PNG 1.2 specification, July 1999:
.IP
.br
-http://png-mng.sourceforge.net/pub/png/spec/1.2/
+https://png-mng.sourceforge.io/pub/png/spec/1.2/
.LP
PNG 1.0 specification, October 1996:
.IP
@@ -36,11 +36,11 @@ PNG 1.0 specification, October 1996:
RFC 2083
.IP
.br
-http://www.ietf.org/rfc/rfc2083.txt
+https://www.ietf.org/rfc/rfc2083.txt
.br
or (as a W3C Recommendation) at
.br
-http://www.w3.org/TR/REC-png-961001
+https://www.w3.org/TR/REC-png-961001
.SH AUTHORS
This man page: Glenn Randers-Pehrson
.LP
diff --git a/png.c b/png.c
index b4266cf79..5aa02ada1 100644
--- a/png.c
+++ b/png.c
@@ -705,14 +705,14 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.7.0beta87 - December 30, 2016" PNG_STRING_NEWLINE \
+ "libpng version 1.7.0beta87 - April 1, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
- return "libpng version 1.7.0beta87 - December 30, 2016\
+ return "libpng version 1.7.0beta87 - April 1, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -2791,7 +2791,7 @@ png_pow10(int power)
if (power < 0)
{
if (power < DBL_MIN_10_EXP) return 0;
- recip = 1, power = -power;
+ recip = 1; power = -power;
}
if (power > 0)
@@ -2869,7 +2869,9 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
double test = png_pow10(exp_b10+1);
if (test <= DBL_MAX)
- ++exp_b10, base = test;
+ {
+ ++exp_b10; base = test;
+ }
else
break;
@@ -2883,7 +2885,10 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
* test on DBL_MAX above.
*/
fp /= base;
- while (fp >= 1) fp /= 10, ++exp_b10;
+ while (fp >= 1)
+ {
+ fp /= 10; ++exp_b10;
+ }
/* Because of the code above fp may, at this point, be
* less than .1, this is ok because the code below can
@@ -2934,7 +2939,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
/* Rounding up to 10, handle that here. */
if (czero > 0)
{
- --czero, d = 1;
+ --czero; d = 1;
if (cdigits == 0) --clead;
}
else
@@ -2948,7 +2953,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
else if (ch == 46)
{
- ch = *--ascii, ++size;
+ ch = *--ascii; ++size;
/* Advance exp_b10 to '1', so that the
* decimal point happens after the
* previous digit.
@@ -2975,7 +2980,9 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
int ch = *--ascii;
if (ch == 46)
- ++size, exp_b10 = 1;
+ {
+ ++size; exp_b10 = 1;
+ }
/* Else lost a leading zero, so 'exp_b10' is
* still ok at (-1)
@@ -3066,7 +3073,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
*/
size -= cdigits;
- *ascii++ = 69, --size; /* 'E': PLUS 1 TOTAL 2+precision */
+ *ascii++ = 69; --size; /* 'E': PLUS 1 TOTAL 2+precision */
/* The following use of an unsigned temporary avoids ambiguities in
* the signed arithmetic on exp_b10 and permits GCC at least to do
@@ -3182,7 +3189,10 @@ png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii,
* then ndigits digits to first:
*/
i = 5;
- while (ndigits < i) *ascii++ = 48, --i;
+ while (ndigits < i)
+ {
+ *ascii++ = 48; --i;
+ }
while (ndigits >= first) *ascii++ = digits[--ndigits];
/* Don't output the trailing zeros! */
}
@@ -3486,7 +3496,7 @@ png_setting(png_structrp png_ptr, png_uint_32 setting, png_uint_32 parameter,
defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
/* sRGB conversion tables; these are machine generated with the code in
* contrib/tools/makesRGB.c. The actual sRGB transfer curve defined in the
- * specification (see the article at http://en.wikipedia.org/wiki/SRGB)
+ * specification (see the article at https://en.wikipedia.org/wiki/SRGB)
* is used, not the gamma=1/2.2 approximation use elsewhere in libpng.
* The sRGB to linear table is exact (to the nearest 16-bit linear fraction).
* The inverse (linear to sRGB) table has accuracies as follows:
diff --git a/png.h b/png.h
index 8437c3424..d1d629afc 100644
--- a/png.h
+++ b/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.7.0beta87, December 30, 2016
+ * libpng version 1.7.0beta87, April 1, 2017
*
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -12,7 +12,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.7.0beta87, December 30, 2016:
+ * libpng versions 0.97, January 1998, through 1.7.0beta87, April 1, 2017:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@@ -25,7 +25,7 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.0.7, July 1, 2000 through 1.7.0beta87, December 30, 2016 are
+ * libpng versions 1.0.7, July 1, 2000 through 1.7.0beta87, April 1, 2017 are
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals
@@ -234,14 +234,14 @@
*
* See libpng.txt or libpng.3 for more information. The PNG specification
* is available as a W3C Recommendation and as an ISO Specification,
- * <http://www.w3.org/TR/2003/REC-PNG-20031110/
+ * <https://www.w3.org/TR/2003/REC-PNG-20031110/
*/
/*
* Y2K compliance in libpng:
* =========================
*
- * December 30, 2016
+ * April 1, 2017
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
@@ -310,7 +310,7 @@
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.7.0beta87"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.7.0beta87 - December 30, 2016\n"
+#define PNG_HEADER_VERSION_STRING " libpng version 1.7.0beta87 - April 1, 2017\n"
#define PNG_LIBPNG_VER_SONUM 17
#define PNG_LIBPNG_VER_DLLNUM 17
@@ -3405,7 +3405,7 @@ typedef struct
*
* When the simplified API needs to convert between sRGB and linear colorspaces,
* the actual sRGB transfer curve defined in the sRGB specification (see the
- * article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+ * article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
* approximation used elsewhere in libpng.
*
* When an alpha channel is present it is expected to denote pixel coverage
diff --git a/pngconf.h b/pngconf.h
index a41606972..185881027 100644
--- a/pngconf.h
+++ b/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.7.0beta87, December 30, 2016
+ * libpng version 1.7.0beta87, April 1, 2017
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/pngrutil.c b/pngrutil.c
index f3effdb6d..2da883eb0 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -3549,7 +3549,10 @@ png_read_filter_row_paeth_1byte_pixel(png_alloc_size_t row_bytes,
/* Find the best predictor, the least of pa, pb, pc favoring the earlier
* ones in the case of a tie.
*/
- if (pb < pa) pa = pb, a = b;
+ if (pb < pa)
+ {
+ pa = pb; a = b;
+ }
if (pc < pa) a = c;
/* Calculate the current pixel in a, and move the previous row pixel to c
@@ -3594,7 +3597,10 @@ png_read_filter_row_paeth_multibyte_pixel(png_alloc_size_t row_bytes,
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
# endif
- if (pb < pa) pa = pb, a = b;
+ if (pb < pa)
+ {
+ pa = pb; a = b;
+ }
if (pc < pa) a = c;
a = 0xFFU & (a + *row);
@@ -3626,7 +3632,10 @@ png_read_filter_row_paeth_multibyte_pixel(png_alloc_size_t row_bytes,
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
# endif
- if (pb < pa) pa = pb, a = b;
+ if (pb < pa)
+ {
+ pa = pb; a = b;
+ }
if (pc < pa) a = c;
a = 0xFFU & (a + *row);
diff --git a/pngset.c b/pngset.c
index 75257c1a1..abd13c377 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1208,8 +1208,9 @@ png_set_sPLT(png_structrp png_ptr,
info_ptr->valid |= PNG_INFO_sPLT;
++(info_ptr->splt_palettes_num);
++np;
+ ++entries;
}
- while (++entries, --nentries);
+ while (--nentries);
if (nentries > 0)
png_chunk_report(png_ptr, "sPLT out of memory", PNG_CHUNK_WRITE_ERROR);
diff --git a/projects/owatcom/pngconfig.mak b/projects/owatcom/pngconfig.mak
index 054a3fc20..3ef2948ca 100644
--- a/projects/owatcom/pngconfig.mak
+++ b/projects/owatcom/pngconfig.mak
@@ -126,7 +126,7 @@ $# to work, download Brian Kernighan's awk (Brian Kernighan is the author of
$# awk.) You can find source code and a built executable (called awk95.exe)
$# here:
$#
-$# http://www.cs.princeton.edu/~bwk/btl.mirror/
+$# https://www.cs.princeton.edu/~bwk/btl.mirror/
$#
$# The executable works just fine.
$#
diff --git a/projects/vstudio/README.txt b/projects/vstudio/README.txt
index 04d327689..39d5542d3 100644
--- a/projects/vstudio/README.txt
+++ b/projects/vstudio/README.txt
@@ -1,7 +1,7 @@
VisualStudio instructions
-libpng version 1.7.0beta87 - December 30, 2016
+libpng version 1.7.0beta87 - April 1, 2017
Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson
diff --git a/projects/vstudio/zlib.props b/projects/vstudio/zlib.props
index 3d140b957..64a50316a 100644
--- a/projects/vstudio/zlib.props
+++ b/projects/vstudio/zlib.props
@@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
- * libpng version 1.7.0beta87 - December 30, 2016
+ * libpng version 1.7.0beta87 - April 1, 2017
*
* Copyright (c) 2011,2013,2014 Glenn Randers-Pehrson
*
diff --git a/scripts/README.txt b/scripts/README.txt
index 4b7d5c914..79f2809d3 100644
--- a/scripts/README.txt
+++ b/scripts/README.txt
@@ -1,5 +1,5 @@
-Makefiles for libpng version 1.7.0beta87 - December 30, 2016
+Makefiles for libpng version 1.7.0beta87 - April 1, 2017
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt
index a4644a589..21216bdc6 100644
--- a/scripts/pnglibconf.h.prebuilt
+++ b/scripts/pnglibconf.h.prebuilt
@@ -2,7 +2,7 @@
/* pnglibconf.h - library build configuration */
-/* libpng version 1.7.0beta87, December 30, 2016 */
+/* libpng version 1.7.0beta87, April 1, 2017 */
/* Copyright (c) 1998-2016 Glenn Randers-Pehrson */