mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Imported from libpng-1.0.5.tar
This commit is contained in:
14
png.c
14
png.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user