Imported from libpng-1.2.6beta3.tar

This commit is contained in:
Glenn Randers-Pehrson
2004-07-17 22:45:44 -05:00
parent 761bf9f06f
commit 5b5dcf8b88
103 changed files with 3153 additions and 4254 deletions

View File

@@ -1,8 +1,9 @@
/* pngconf.h - machine configurable file for libpng
*
* libpng 1.2.6beta2 - November 1, 2002
* libpng version 1.2.6beta3 - July 18, 2004
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2002 Glenn Randers-Pehrson
* Copyright (c) 1998-2004 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
@@ -16,6 +17,10 @@
#ifndef PNGCONF_H
#define PNGCONF_H
#ifdef PNG_USER_CONFIG
#include "pngusr.h"
#endif
/* This is the size of the compression buffer, and thus the size of
* an IDAT chunk. Make this whatever size you feel is best for your
* machine. One of these will be allocated per png_struct. When this
@@ -317,15 +322,13 @@
# define PNG_ALWAYS_EXTERN
#endif
/* For some reason, Borland C++ defines memcmp, etc. in mem.h, not
* stdlib.h like it should (I think). Or perhaps this is a C++
* "feature"?
*/
#ifdef __TURBOC__
/* This provides the non-ANSI (far) memory allocation routines. */
#if defined(__TURBOC__) && defined(__MSDOS__)
# include <mem.h>
# include "alloc.h"
# include <alloc.h>
#endif
/* I have no idea why is this necessary... */
#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
# include <malloc.h>
@@ -1171,8 +1174,6 @@ typedef z_stream FAR * png_zstreamp;
* zlib and your applications the same way you build libpng.
*/
#ifndef PNGAPI
#if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
# ifndef PNG_NO_MODULEDEF
# define PNG_NO_MODULEDEF
@@ -1187,10 +1188,12 @@ typedef z_stream FAR * png_zstreamp;
(( defined(_Windows) || defined(_WINDOWS) || \
defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
# define PNGAPI __cdecl
# else
# define PNGAPI _cdecl
# ifndef PNGAPI
# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
# define PNGAPI __cdecl
# else
# define PNGAPI _cdecl
# endif
# endif
# if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
@@ -1228,17 +1231,14 @@ typedef z_stream FAR * png_zstreamp;
# endif
# endif /* PNG_IMPEXP */
#else /* !(DLL || non-cygwin WINDOWS) */
# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
# define PNGAPI _System
# define PNG_IMPEXP
# else
# if 0 /* ... other platforms, with other meanings */
# else
# define PNGAPI
# define PNG_IMPEXP
# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
# ifndef PNGAPI
# define PNGAPI _System
# endif
# endif
#endif
# else
# if 0 /* ... other platforms, with other meanings */
# endif
# endif
#endif
#ifndef PNGAPI
@@ -1279,28 +1279,30 @@ typedef z_stream FAR * png_zstreamp;
# define NOCHECK 0
# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
# define png_strcpy _fstrcpy
# define png_strlen _fstrlen
# define png_memcmp _fmemcmp /* SJT: added */
# define png_memcpy _fmemcpy
# define png_memset _fmemset
# define png_strcpy _fstrcpy
# define png_strncpy _fstrncpy /* Added to v 1.2.6 */
# define png_strlen _fstrlen
# define png_memcmp _fmemcmp /* SJT: added */
# define png_memcpy _fmemcpy
# define png_memset _fmemset
#else /* use the usual functions */
# define CVT_PTR(ptr) (ptr)
# define CVT_PTR_NOCHECK(ptr) (ptr)
# define png_strcpy strcpy
# define png_strlen strlen
# define png_memcmp memcmp /* SJT: added */
# define png_memcpy memcpy
# define png_memset memset
# define png_strcpy strcpy
# define png_strncpy strncpy /* Added to v 1.2.6 */
# define png_strlen strlen
# define png_memcmp memcmp /* SJT: added */
# define png_memcpy memcpy
# define png_memset memset
#endif
/* End of memory model independent support */
/* Just a little check that someone hasn't tried to define something
* contradictory.
*/
#if (PNG_ZBUF_SIZE > 65536) && defined(PNG_MAX_MALLOC_64K)
#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
# undef PNG_ZBUF_SIZE
# define PNG_ZBUF_SIZE 65536
# define PNG_ZBUF_SIZE 65536L
#endif
#ifdef PNG_READ_SUPPORTED