summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2011-11-28 10:51:29 -0600
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2011-11-28 10:51:29 -0600
commit2e31b96a5a180e2a133e529493c8846c66a6598e (patch)
treeda22a9e3b944f482c20f8c0d99ecf04111c5713f
parent02221248015dafc4a46970673d8be0f4c1410a57 (diff)
downloadlibpng-2e31b96a5a180e2a133e529493c8846c66a6598e.tar.gz
[libpng15] Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else)
-rw-r--r--ANNOUNCE1
-rw-r--r--CHANGES1
-rw-r--r--png.c10
3 files changed, 8 insertions, 4 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index d625d0d65..8e8d91980 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -115,6 +115,7 @@ Version 1.5.7beta05 [November 25, 2011]
Version 1.5.7beta06 [November 28, 2011]
Replaced an "#if" with "ifdef" in pngrtran.c
+ Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
(subscription required; visit
diff --git a/CHANGES b/CHANGES
index 1e0f41723..ac485138b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3760,6 +3760,7 @@ Version 1.5.7beta05 [November 25, 2011]
Version 1.5.7beta06 [November 28, 2011]
Replaced an "#if" with "ifdef" in pngrtran.c
+ Revised #if PNG_DO_BC block in png.c (use #ifdef and add #else)
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/png.c b/png.c
index e271ca1d0..3994778d4 100644
--- a/png.c
+++ b/png.c
@@ -655,13 +655,13 @@ png_get_copyright(png_const_structp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.5.7beta06 - November 25, 2011" PNG_STRING_NEWLINE \
+ "libpng version 1.5.7beta06 - November 28, 2011" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2011 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.5.7beta06 - November 25, 2011\
+ return "libpng version 1.5.7beta06 - November 28, 2011\
Copyright (c) 1998-2011 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -2174,9 +2174,9 @@ png_64bit_product (long v1, long v2, unsigned long *hi_product,
static png_uint_32
png_8bit_l2[128] =
{
-# if PNG_DO_BC
+# ifdef PNG_DO_BC
for (i=128;i<256;++i) { .5 - l(i/255)/l(2)*65536*65536; }
-# endif
+# else
4270715492U, 4222494797U, 4174646467U, 4127164793U, 4080044201U, 4033279239U,
3986864580U, 3940795015U, 3895065449U, 3849670902U, 3804606499U, 3759867474U,
3715449162U, 3671346997U, 3627556511U, 3584073329U, 3540893168U, 3498011834U,
@@ -2199,6 +2199,8 @@ png_8bit_l2[128] =
324227938U, 298676034U, 273229066U, 247886176U, 222646516U, 197509248U,
172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U,
24347096U, 0U
+# endif
+
#if 0
/* The following are the values for 16-bit tables - these work fine for the
* 8-bit conversions but produce very slightly larger errors in the 16-bit