Imported from libpng-1.0.5.tar

This commit is contained in:
Glenn Randers-Pehrson
1999-10-14 07:43:10 -05:00
parent ad5dd1f0fb
commit 860ab2b1c0
48 changed files with 6420 additions and 285 deletions

14
png.c
View File

@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
* libpng version 1.0.5 - October 5, 1999
* libpng version 1.0.5 - October 15, 1999
* Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
* Copyright (c) 1996, 1997 Andreas Dilger
* Copyright (c) 1998, 1999 Glenn Randers-Pehrson
@@ -12,6 +12,8 @@
#define PNG_NO_EXTERN
#include "png.h"
PNG_GET_HEADER
/* Version information for C files. This had better match the version
* string defined in png.h.
*/
@@ -86,7 +88,7 @@ png_set_sig_bytes(png_structp png_ptr, int num_bytes)
if (num_bytes > 8)
png_error(png_ptr, "Too many bytes for PNG signature.");
png_ptr->sig_bytes = num_bytes < 0 ? 0 : num_bytes;
png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes);
}
/* Checks whether the supplied bytes match the PNG signature. We allow
@@ -350,12 +352,12 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
png_charp
png_get_copyright(png_structp png_ptr)
{
if(png_ptr == NULL)
/* silence compiler warning about unused png_ptr */ ;
return("\n libpng version 1.0.5 - October 5, 1999\n\
if (png_ptr != NULL || png_ptr == NULL) /* silence compiler warning */
return ("\n libpng version 1.0.5 - October 15, 1999\n\
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n\
Copyright (c) 1996, 1997 Andreas Dilger\n\
Copyright (c) 1998, 1999 Glenn Randers-Pehrson\n");
return ("");
}
/* Generate a compiler error if there is an old png.h in the search path. */
@@ -364,5 +366,5 @@ png_check_version
(version_1_0_5 png_h_is_not_version_1_0_5)
{
if(png_h_is_not_version_1_0_5 == NULL)
/* silence compiler warning about unused parameter */ ;
return;
}