[master] Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin)

Moved reading of file signature into png_read_sig (Cosmin)
Fixed atomicity of chunk header serialization (Cosmin)
Added test for io_state in pngtest.c (Cosmin)
Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts.
This commit is contained in:
Glenn Randers-Pehrson
2010-11-20 21:48:29 -06:00
parent d801b3882c
commit a581556b17
11 changed files with 191 additions and 152 deletions

8
png.c
View File

@@ -556,13 +556,13 @@ png_get_copyright(png_structp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.5.0beta55 - November 11, 2010" PNG_STRING_NEWLINE \
"libpng version 1.5.0beta55 - November 21, 2010" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 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.0beta55 - November 11, 2010\
return "libpng version 1.5.0beta55 - November 21, 2010\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -1274,7 +1274,7 @@ png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
* place - after the DP don't adjust 'exp' any
* more!
*/
if (exp != (-1))
if (exp != (-1))
{
if (exp == 0) *ascii++ = 46, --size;
/* PLUS 1: TOTAL 4 */
@@ -1800,7 +1800,7 @@ png_log8bit(unsigned int x)
* always at most 19 bits.
*/
if ((x &= 0xff) == 0)
return 0xffffffff;
return 0xffffffff;
if ((x & 0xf0) == 0)
log = 4, x <<= 4;