summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCosmin Truta <ctruta@gmail.com>2022-11-20 21:23:33 +0200
committerCosmin Truta <ctruta@gmail.com>2022-11-20 21:23:33 +0200
commit77c3a39299eaa32acd5422a416fad7da2b3d75b5 (patch)
tree8b38a70fc4781eea54c69721ac677f08d86f0435
parent8cfdb5436d7d384e4c8915397ee9ead845418d40 (diff)
downloadlibpng-77c3a39299eaa32acd5422a416fad7da2b3d75b5.tar.gz
Clean up comments and whitespace characters in source files
Remove all remaining "last changed" version info from source comments. (The version control system maintains this information automatically.) Delete the trailing whitespace characters.
-rw-r--r--CHANGES10
-rw-r--r--contrib/arm-neon/android-ndk.c2
-rw-r--r--contrib/arm-neon/linux-auxv.c2
-rw-r--r--contrib/arm-neon/linux.c2
-rw-r--r--contrib/examples/pngtopng.c2
-rw-r--r--contrib/powerpc-vsx/linux.c3
-rw-r--r--contrib/powerpc-vsx/linux_aux.c1
-rw-r--r--contrib/tools/checksum-icc.c4
-rw-r--r--contrib/tools/cvtcolor.c6
-rw-r--r--contrib/tools/genpng.c3
-rw-r--r--contrib/tools/makesRGB.c3
-rw-r--r--contrib/tools/png-fix-itxt.c4
-rw-r--r--contrib/tools/pngcp.c5
-rw-r--r--contrib/tools/pngfix.c2
-rw-r--r--contrib/tools/sRGB.h6
-rw-r--r--intel/filter_sse2_intrinsics.c2
-rw-r--r--libpng-manual.txt2
-rw-r--r--libpng.32
-rw-r--r--pngread.c4
-rw-r--r--scripts/intprefix.c1
-rw-r--r--scripts/prefix.c1
-rw-r--r--scripts/sym.c1
-rw-r--r--scripts/symbols.c1
-rw-r--r--scripts/vers.c1
24 files changed, 26 insertions, 44 deletions
diff --git a/CHANGES b/CHANGES
index 6a7cce170..e0910ccc3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4052,7 +4052,7 @@ Version 1.6.0beta16 [March 6, 2012]
(in fact this is harmless, but the PNG data produced may be sub-optimal).
Version 1.6.0beta17 [March 10, 2012]
- Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
+ Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
Reject all iCCP chunks after the first, even if the first one is invalid.
Deflate/inflate was reworked to move common zlib calls into single
functions [rw]util.c. A new shared keyword check routine was also added
@@ -4962,7 +4962,7 @@ Version 1.6.13beta01 [July 4, 2014]
Changed "if defined(__ARM_NEON__)" to
"if (defined(__ARM_NEON__) || defined(__ARM_NEON))" (James Wu).
Fixed clang no-warning builds: png_digit was defined but never used.
-
+
Version 1.6.13beta02 [July 21, 2014]
Fixed an incorrect separator ("/" should be "\") in scripts/makefile.vcwin32
(bug report from Wolfgang S. Kechel). Bug was introduced in libpng-1.6.11.
@@ -5453,7 +5453,7 @@ Version 1.6.21beta01 [December 11, 2015]
Version 1.6.21beta02 [December 14, 2015]
Moved png_check_keyword() from pngwutil.c to pngset.c
Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
- in the BigEndian tests by not testing it, making the BE code the same
+ in the BigEndian tests by not testing it, making the BE code the same
as the LE version.
Fixes to pngvalid for various reduced build configurations (eliminate unused
statics) and a fix for the case in rgb_to_gray when the digitize option
@@ -5517,7 +5517,7 @@ Version 1.6.22beta03 [March 9, 2016]
Added a common-law trademark notice and export control information
to the LICENSE file, png.h, and the man page.
Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that
- were accidentally removed from libpng-1.6.17.
+ were accidentally removed from libpng-1.6.17.
Changed PNG_INFO_cHNK and PNG_FREE_cHNK from 0xnnnn to 0xnnnnU in png.h
(Robert C. Seacord).
Removed dubious "#if INT_MAX" test from png.h that was added to
@@ -5950,7 +5950,7 @@ Version 1.6.32beta09 [August 3, 2017]
Require cmake-2.8.8 in CMakeLists.txt. Revised symlink creation,
no longer using deprecated cmake LOCATION feature (Clifford Yapp).
Fixed five-byte error in the calculation of IDAT maximum possible size.
-
+
Version 1.6.32beta10 [August 5, 2017]
Moved chunk-length check into a png_check_chunk_length() private
function (Suggested by Max Stepin).
diff --git a/contrib/arm-neon/android-ndk.c b/contrib/arm-neon/android-ndk.c
index fb3a4898d..c72c468a7 100644
--- a/contrib/arm-neon/android-ndk.c
+++ b/contrib/arm-neon/android-ndk.c
@@ -2,7 +2,6 @@
*
* Copyright (c) 2014 Glenn Randers-Pehrson
* Written by John Bowler, 2014.
- * Last changed in libpng 1.6.10 [March 6, 2014]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -24,6 +23,7 @@
* has been compiled only, not linked: no version of the library has been found,
* only the header files exist in the NDK.
*/
+
#include <cpu-features.h>
static int
diff --git a/contrib/arm-neon/linux-auxv.c b/contrib/arm-neon/linux-auxv.c
index 4d26bd3b3..c5d7f5127 100644
--- a/contrib/arm-neon/linux-auxv.c
+++ b/contrib/arm-neon/linux-auxv.c
@@ -2,7 +2,6 @@
*
* Copyright (c) 2014 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
- * Last changed in libpng 1.6.10 [March 6, 2014]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -22,6 +21,7 @@
* This generic __linux__ implementation requires reading /proc/self/auxv and
* looking at each element for one that records NEON capabilities.
*/
+
#include <unistd.h> /* for POSIX 1003.1 */
#include <errno.h> /* for EINTR */
diff --git a/contrib/arm-neon/linux.c b/contrib/arm-neon/linux.c
index a9bc360dd..b5429d0c3 100644
--- a/contrib/arm-neon/linux.c
+++ b/contrib/arm-neon/linux.c
@@ -1,6 +1,5 @@
/* contrib/arm-neon/linux.c
*
- * Last changed in libpng 1.6.31 [July 27, 2017]
* Copyright (c) 2014, 2017 Glenn Randers-Pehrson
* Written by John Bowler, 2014, 2017.
*
@@ -19,6 +18,7 @@
* This code is strict ANSI-C and is probably moderately portable; it does
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
*/
+
#include <stdio.h>
static int
diff --git a/contrib/examples/pngtopng.c b/contrib/examples/pngtopng.c
index 904b97238..1d55496ac 100644
--- a/contrib/examples/pngtopng.c
+++ b/contrib/examples/pngtopng.c
@@ -5,8 +5,6 @@
* related or neighboring rights to this work. This work is published from:
* United States.
*
- * Last changed in libpng 1.6.29 [March 16, 2017]
- *
* Read a PNG and write it out in a fixed format, using the 'simplified API'
* that was introduced in libpng-1.6.0.
*
diff --git a/contrib/powerpc-vsx/linux.c b/contrib/powerpc-vsx/linux.c
index 32ed9d749..d861b2826 100644
--- a/contrib/powerpc-vsx/linux.c
+++ b/contrib/powerpc-vsx/linux.c
@@ -2,7 +2,6 @@
*
* Copyright (c) 2017 Glenn Randers-Pehrson
* Written by Vadim Barkov, 2017.
- * Last changed in libpng 1.6.29 [March 16, 2017]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -12,7 +11,7 @@
* BUG REPORTS: png-mng-implement@sourceforge.net
*
* png_have_vsx implemented for Linux by reading the widely available
- * pseudo-file /proc/cpuinfo.
+ * pseudo-file /proc/cpuinfo.
*
* This code is strict ANSI-C and is probably moderately portable; it does
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
diff --git a/contrib/powerpc-vsx/linux_aux.c b/contrib/powerpc-vsx/linux_aux.c
index 7828acafb..6ec048e80 100644
--- a/contrib/powerpc-vsx/linux_aux.c
+++ b/contrib/powerpc-vsx/linux_aux.c
@@ -2,7 +2,6 @@
*
* Copyright (c) 2017 Glenn Randers-Pehrson
* Written by Vadim Barkov, 2017.
- * Last changed in libpng 1.6.29 [March 16, 2017]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/contrib/tools/checksum-icc.c b/contrib/tools/checksum-icc.c
index 581e7088a..83e1f9a43 100644
--- a/contrib/tools/checksum-icc.c
+++ b/contrib/tools/checksum-icc.c
@@ -2,8 +2,6 @@
*
* Copyright (c) 2013 John Cunningham Bowler
*
- * Last changed in libpng 1.6.0 [February 14, 2013]
- *
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
@@ -11,8 +9,8 @@
* Generate crc32 and adler32 checksums of the given input files, used to
* generate check-codes for use when matching ICC profiles within libpng.
*/
-#include <stdio.h>
+#include <stdio.h>
#include <zlib.h>
static int
diff --git a/contrib/tools/cvtcolor.c b/contrib/tools/cvtcolor.c
index e6793c7d5..111dfcee7 100644
--- a/contrib/tools/cvtcolor.c
+++ b/contrib/tools/cvtcolor.c
@@ -1,7 +1,4 @@
-/*-
- * convert.c
- *
- * Last changed in libpng 1.6.0 [February 14, 2013]
+/* convert.c
*
* COPYRIGHT: Written by John Cunningham Bowler, 2013.
* To the extent possible under law, the author has waived all copyright and
@@ -10,6 +7,7 @@
*
* Convert 8-bit sRGB or 16-bit linear values to another format.
*/
+
#define _ISOC99_SOURCE 1
#include <stdlib.h>
diff --git a/contrib/tools/genpng.c b/contrib/tools/genpng.c
index 3140fb49d..c43bea906 100644
--- a/contrib/tools/genpng.c
+++ b/contrib/tools/genpng.c
@@ -1,4 +1,4 @@
-/*- genpng
+/* genpng
*
* COPYRIGHT: Written by John Cunningham Bowler, 2015.
* Revised by Glenn Randers-Pehrson, 2017, to add buffer-size check.
@@ -69,6 +69,7 @@
* joins are mitres; the outside of the lines are continued to the point of
* intersection.
*/
+
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/tools/makesRGB.c b/contrib/tools/makesRGB.c
index d0c0ca931..5ef3ddf99 100644
--- a/contrib/tools/makesRGB.c
+++ b/contrib/tools/makesRGB.c
@@ -1,7 +1,5 @@
/* makesRGB.c -- build sRGB-to-linear and linear-to-sRGB conversion tables
*
- * Last changed in libpng 1.6.0 [February 14, 2013]
- *
* COPYRIGHT: Written by John Cunningham Bowler, 2013.
* To the extent possible under law, the author has waived all copyright and
* related or neighboring rights to this work. This work is published from:
@@ -14,6 +12,7 @@
* approximation to the 8-bit sRGB encoded value. Calculate the error in these
* tables and display it.
*/
+
#define _C99_SOURCE 1
#include <stdio.h>
#include <math.h>
diff --git a/contrib/tools/png-fix-itxt.c b/contrib/tools/png-fix-itxt.c
index 6dcd652dc..b8286b9e5 100644
--- a/contrib/tools/png-fix-itxt.c
+++ b/contrib/tools/png-fix-itxt.c
@@ -1,8 +1,6 @@
-
-/* png-fix-itxt version 1.0.0
+/* png-fix-itxt
*
* Copyright 2015 Glenn Randers-Pehrson
- * Last changed in libpng 1.6.18 [July 23, 2015]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/contrib/tools/pngcp.c b/contrib/tools/pngcp.c
index c03b6c7fc..8b979f3d3 100644
--- a/contrib/tools/pngcp.c
+++ b/contrib/tools/pngcp.c
@@ -2,8 +2,6 @@
*
* Copyright (c) 2016 John Cunningham Bowler
*
- * Last changed in libpng 1.6.24 [August 4, 2016]
- *
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
@@ -15,6 +13,7 @@
* For a more extensive example that uses the transforms see
* contrib/libtests/pngimage.c in the libpng distribution.
*/
+
#include "pnglibconf.h" /* To find how libpng was configured. */
#ifdef PNG_PNGCP_TIMING_SUPPORTED
@@ -778,7 +777,7 @@ static void
set_opt_string(struct display *dp, unsigned int sp)
/* Add the appropriate option string to dp->curr. */
{
- dp->stack[sp].opt_string_end = set_opt_string_(dp, sp, dp->stack[sp].opt,
+ dp->stack[sp].opt_string_end = set_opt_string_(dp, sp, dp->stack[sp].opt,
options[dp->stack[sp].opt].values[dp->stack[sp].entry].name);
}
diff --git a/contrib/tools/pngfix.c b/contrib/tools/pngfix.c
index 389434ff4..9afe09831 100644
--- a/contrib/tools/pngfix.c
+++ b/contrib/tools/pngfix.c
@@ -1,6 +1,5 @@
/* pngfix.c
*
- * Last changed in libpng 1.6.31 [July 27, 2017]
* Copyright (c) 2014-2017 John Cunningham Bowler
*
* This code is released under the libpng license.
@@ -10,6 +9,7 @@
* Tool to check and fix the zlib inflate 'too far back' problem.
* See the usage message for more information.
*/
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/contrib/tools/sRGB.h b/contrib/tools/sRGB.h
index d1ece5129..7f6bdfc28 100644
--- a/contrib/tools/sRGB.h
+++ b/contrib/tools/sRGB.h
@@ -1,7 +1,4 @@
-/*-
- * sRGB.h
- *
- * Last changed in libpng 1.6.0 [February 14, 2013]
+/* sRGB.h
*
* COPYRIGHT: Written by John Cunningham Bowler, 2013.
* To the extent possible under law, the author has waived all copyright and
@@ -16,6 +13,7 @@
* (in fact the source of the numbers is the wikipedia article at
* https://en.wikipedia.org/wiki/SRGB).
*/
+
static double
sRGB_from_linear(double l)
{
diff --git a/intel/filter_sse2_intrinsics.c b/intel/filter_sse2_intrinsics.c
index f52aaa800..d3c0fe9e2 100644
--- a/intel/filter_sse2_intrinsics.c
+++ b/intel/filter_sse2_intrinsics.c
@@ -259,7 +259,7 @@ void png_read_filter_row_paeth3_sse2(png_row_infop row_info, png_bytep row,
a = d; d = _mm_unpacklo_epi8(load4(row ), zero);
/* (p-a) == (a+b-c - a) == (b-c) */
-
+
pa = _mm_sub_epi16(b,c);
/* (p-b) == (a+b-c - b) == (a-c) */
diff --git a/libpng-manual.txt b/libpng-manual.txt
index 19b1e0c35..0a4f37351 100644
--- a/libpng-manual.txt
+++ b/libpng-manual.txt
@@ -877,7 +877,7 @@ described below (the latter being the two common names for associated alpha
color channels). Note that PNG files always contain non-associated color
channels; png_set_alpha_mode() with one of the modes causes the decoder to
convert the pixels to an associated form before returning them to your
-application.
+application.
Since it is not necessary to perform arithmetic on opaque color values so
long as they are not to be resampled and are in the final color space it is
diff --git a/libpng.3 b/libpng.3
index b7fc18296..87cd775a8 100644
--- a/libpng.3
+++ b/libpng.3
@@ -1396,7 +1396,7 @@ described below (the latter being the two common names for associated alpha
color channels). Note that PNG files always contain non-associated color
channels; png_set_alpha_mode() with one of the modes causes the decoder to
convert the pixels to an associated form before returning them to your
-application.
+application.
Since it is not necessary to perform arithmetic on opaque color values so
long as they are not to be resampled and are in the final color space it is
diff --git a/pngread.c b/pngread.c
index 5ab922403..96996ced5 100644
--- a/pngread.c
+++ b/pngread.c
@@ -3762,13 +3762,13 @@ png_image_read_direct(png_voidp argument)
mode = PNG_ALPHA_PNG;
output_gamma = PNG_DEFAULT_sRGB;
}
-
+
if ((change & PNG_FORMAT_FLAG_ASSOCIATED_ALPHA) != 0)
{
mode = PNG_ALPHA_OPTIMIZED;
change &= ~PNG_FORMAT_FLAG_ASSOCIATED_ALPHA;
}
-
+
/* If 'do_local_background' is set check for the presence of gamma
* correction; this is part of the work-round for the libpng bug
* described above.
diff --git a/scripts/intprefix.c b/scripts/intprefix.c
index 254f8e94b..4085e5401 100644
--- a/scripts/intprefix.c
+++ b/scripts/intprefix.c
@@ -1,7 +1,6 @@
/* intprefix.c - generate an unprefixed internal symbol list
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2013-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
diff --git a/scripts/prefix.c b/scripts/prefix.c
index 8b604a091..06576ae6a 100644
--- a/scripts/prefix.c
+++ b/scripts/prefix.c
@@ -1,7 +1,6 @@
/* prefix.c - generate an unprefixed symbol list
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2013-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
diff --git a/scripts/sym.c b/scripts/sym.c
index ea9e4c507..7571de2b7 100644
--- a/scripts/sym.c
+++ b/scripts/sym.c
@@ -1,7 +1,6 @@
/* sym.c - define format of libpng.sym
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
diff --git a/scripts/symbols.c b/scripts/symbols.c
index 28b841d8b..d51a8303c 100644
--- a/scripts/symbols.c
+++ b/scripts/symbols.c
@@ -1,7 +1,6 @@
/* symbols.c - find all exported symbols
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.
diff --git a/scripts/vers.c b/scripts/vers.c
index de7319716..d74972643 100644
--- a/scripts/vers.c
+++ b/scripts/vers.c
@@ -1,7 +1,6 @@
/* vers.c - define format of libpng.vers
*
- * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
*
* This code is released under the libpng license.