Blame pngconf.h

Packit 0ba690
Packit 0ba690
/* pngconf.h - machine configurable file for libpng
Packit 0ba690
 *
Packit 0ba690
 * libpng version 1.2.57, December 29, 2016
Packit 0ba690
 *
Packit 0ba690
 * Copyright (c) 1998-2015 Glenn Randers-Pehrson
Packit 0ba690
 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
Packit 0ba690
 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
Packit 0ba690
 *
Packit 0ba690
 * This code is released under the libpng license.
Packit 0ba690
 * For conditions of distribution and use, see the disclaimer
Packit 0ba690
 * and license in png.h
Packit 0ba690
 *
Packit 0ba690
 * Any machine specific code is near the front of this file, so if you
Packit 0ba690
 * are configuring libpng for a machine, you may want to read the section
Packit 0ba690
 * starting here down to where it starts to typedef png_color, png_text,
Packit 0ba690
 * and png_info.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#ifndef PNGCONF_H
Packit 0ba690
#define PNGCONF_H
Packit 0ba690
Packit 0ba690
#define PNG_1_2_X
Packit 0ba690
Packit 0ba690
/*
Packit 0ba690
 * PNG_USER_CONFIG has to be defined on the compiler command line. This
Packit 0ba690
 * includes the resource compiler for Windows DLL configurations.
Packit 0ba690
 */
Packit 0ba690
#ifdef PNG_USER_CONFIG
Packit 0ba690
#  ifndef PNG_USER_PRIVATEBUILD
Packit 0ba690
#    define PNG_USER_PRIVATEBUILD
Packit 0ba690
#  endif
Packit 0ba690
#include "pngusr.h"
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
Packit 0ba690
#ifdef PNG_CONFIGURE_LIBPNG
Packit 0ba690
#ifdef HAVE_CONFIG_H
Packit 0ba690
#include "config.h"
Packit 0ba690
#endif
Packit Service af73fd
#else
Packit Service af73fd
/* pngconf.h is part of the exported API. When a libpng-using application
Packit Service af73fd
   includes us, PNG_CONFIGURE_LIBPNG is of course not defined as we do not have
Packit Service af73fd
   libpng's config.h available in this case. This means that we do not have the
Packit Service af73fd
   defines added to config.h and the commandline by libpng's ./configure .
Packit Service af73fd
   
Packit Service af73fd
   For all defines from config.h not having them set is not a problem, however
Packit Service af73fd
   ./configure also adds -DPNG_NO_ASSEMBLER_CODE to the CFLAGS when compiling
Packit Service af73fd
   on a platform on which the MMX and SSE asm code in libpng is not supported.
Packit Service af73fd
   
Packit Service af73fd
   We do need this define as this define is used to determine whether or not
Packit Service af73fd
   to define PNG_ASSEMBLER_CODE_SUPPORTED and other assembler related defines
Packit Service af73fd
   and prototypes. PNG_ASSEMBLER_CODE_SUPPORTED in turn is used by applications
Packit Service af73fd
   (ImageMagick for example) to determine whether or not they can use the asm
Packit Service af73fd
   functions. Thus we need to define PNG_NO_ASSEMBLER_CODE here on platforms
Packit Service af73fd
   on which the MMX and SSE asm code in libpng is not supported: */
Packit Service af73fd
#ifndef __i386__ /* change this if MMX/SSE become supported on x86_64! */
Packit Service af73fd
#define PNG_NO_ASSEMBLER_CODE
Packit Service af73fd
#endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/*
Packit 0ba690
 * Added at libpng-1.2.8
Packit 0ba690
 *
Packit 0ba690
 * If you create a private DLL you need to define in "pngusr.h" the followings:
Packit 0ba690
 * #define PNG_USER_PRIVATEBUILD 
Packit 0ba690
 *        the DLL was built>
Packit 0ba690
 *  e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
Packit 0ba690
 * #define PNG_USER_DLLFNAME_POSTFIX 
Packit 0ba690
 *        distinguish your DLL from those of the official release. These
Packit 0ba690
 *        correspond to the trailing letters that come after the version
Packit 0ba690
 *        number and must match your private DLL name>
Packit 0ba690
 *  e.g. // private DLL "libpng13gx.dll"
Packit 0ba690
 *       #define PNG_USER_DLLFNAME_POSTFIX "gx"
Packit 0ba690
 *
Packit 0ba690
 * The following macros are also at your disposal if you want to complete the
Packit 0ba690
 * DLL VERSIONINFO structure.
Packit 0ba690
 * - PNG_USER_VERSIONINFO_COMMENTS
Packit 0ba690
 * - PNG_USER_VERSIONINFO_COMPANYNAME
Packit 0ba690
 * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#ifdef __STDC__
Packit 0ba690
#ifdef SPECIALBUILD
Packit 0ba690
#  pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
Packit 0ba690
 are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PRIVATEBUILD
Packit 0ba690
# pragma message("PRIVATEBUILD is deprecated.\
Packit 0ba690
 Use PNG_USER_PRIVATEBUILD instead.")
Packit 0ba690
# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
Packit 0ba690
#endif
Packit 0ba690
#endif /* __STDC__ */
Packit 0ba690
Packit 0ba690
#ifndef PNG_VERSION_INFO_ONLY
Packit 0ba690
Packit 0ba690
/* End of material added to libpng-1.2.8 */
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble
Packit 0ba690
   Restored at libpng-1.2.21 */
Packit 0ba690
#if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \
Packit 0ba690
    !defined(PNG_WARN_UNINITIALIZED_ROW)
Packit 0ba690
#  define PNG_WARN_UNINITIALIZED_ROW 1
Packit 0ba690
#endif
Packit 0ba690
/* End of material added at libpng-1.2.19/1.2.21 */
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.2.51 (ported from 1.4.6) */
Packit 0ba690
#ifndef PNG_UNUSED
Packit 0ba690
/* Unused formal parameter warnings are silenced using the following macro
Packit 0ba690
 * which is expected to have no bad effects on performance (optimizing
Packit 0ba690
 * compilers will probably remove it entirely).  Note that if you replace
Packit 0ba690
 * it with something other than whitespace, you must include the terminating
Packit 0ba690
 * semicolon.
Packit 0ba690
 */
Packit 0ba690
#  define PNG_UNUSED(param) (void)param;
Packit 0ba690
#endif
Packit 0ba690
/* End of material added to libpng-1.4.6 */
Packit 0ba690
Packit 0ba690
/* This is the size of the compression buffer, and thus the size of
Packit 0ba690
 * an IDAT chunk.  Make this whatever size you feel is best for your
Packit 0ba690
 * machine.  One of these will be allocated per png_struct.  When this
Packit 0ba690
 * is full, it writes the data to the disk, and does some other
Packit 0ba690
 * calculations.  Making this an extremely small size will slow
Packit 0ba690
 * the library down, but you may want to experiment to determine
Packit 0ba690
 * where it becomes significant, if you are concerned with memory
Packit 0ba690
 * usage.  Note that zlib allocates at least 32Kb also.  For readers,
Packit 0ba690
 * this describes the size of the buffer available to read the data in.
Packit 0ba690
 * Unless this gets smaller than the size of a row (compressed),
Packit 0ba690
 * it should not make much difference how big this is.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#ifndef PNG_ZBUF_SIZE
Packit 0ba690
#  define PNG_ZBUF_SIZE 8192
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Enable if you want a write-only libpng */
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_READ_SUPPORTED
Packit 0ba690
#  define PNG_READ_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Enable if you want a read-only libpng */
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_WRITE_SUPPORTED
Packit 0ba690
#  define PNG_WRITE_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Enabled in 1.2.41. */
Packit 0ba690
#ifdef PNG_ALLOW_BENIGN_ERRORS
Packit 0ba690
#  define png_benign_error png_warning
Packit 0ba690
#  define png_chunk_benign_error png_chunk_warning
Packit 0ba690
#else
Packit 0ba690
#  ifndef PNG_BENIGN_ERRORS_SUPPORTED
Packit 0ba690
#    define png_benign_error png_error
Packit 0ba690
#    define png_chunk_benign_error png_chunk_error
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Added in libpng-1.2.41 */
Packit 0ba690
#if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED)
Packit 0ba690
#  define PNG_WARNINGS_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED)
Packit 0ba690
#  define PNG_ERROR_TEXT_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED)
Packit 0ba690
#  define PNG_CHECK_cHRM_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Enabled by default in 1.2.0.  You can disable this if you don't need to
Packit 0ba690
 * support PNGs that are embedded in MNG datastreams
Packit 0ba690
 */
Packit 0ba690
#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
Packit 0ba690
#  ifndef PNG_MNG_FEATURES_SUPPORTED
Packit 0ba690
#    define PNG_MNG_FEATURES_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_FLOATING_POINT_SUPPORTED
Packit 0ba690
#  ifndef PNG_FLOATING_POINT_SUPPORTED
Packit 0ba690
#    define PNG_FLOATING_POINT_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* If you are running on a machine where you cannot allocate more
Packit 0ba690
 * than 64K of memory at once, uncomment this.  While libpng will not
Packit 0ba690
 * normally need that much memory in a chunk (unless you load up a very
Packit 0ba690
 * large file), zlib needs to know how big of a chunk it can use, and
Packit 0ba690
 * libpng thus makes sure to check any memory allocation to verify it
Packit 0ba690
 * will fit into memory.
Packit 0ba690
#define PNG_MAX_MALLOC_64K
Packit 0ba690
 */
Packit 0ba690
#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
Packit 0ba690
#  define PNG_MAX_MALLOC_64K
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Special munging to support doing things the 'cygwin' way:
Packit 0ba690
 * 'Normal' png-on-win32 defines/defaults:
Packit 0ba690
 *   PNG_BUILD_DLL -- building dll
Packit 0ba690
 *   PNG_USE_DLL   -- building an application, linking to dll
Packit 0ba690
 *   (no define)   -- building static library, or building an
Packit 0ba690
 *                    application and linking to the static lib
Packit 0ba690
 * 'Cygwin' defines/defaults:
Packit 0ba690
 *   PNG_BUILD_DLL -- (ignored) building the dll
Packit 0ba690
 *   (no define)   -- (ignored) building an application, linking to the dll
Packit 0ba690
 *   PNG_STATIC    -- (ignored) building the static lib, or building an
Packit 0ba690
 *                    application that links to the static lib.
Packit 0ba690
 *   ALL_STATIC    -- (ignored) building various static libs, or building an
Packit 0ba690
 *                    application that links to the static libs.
Packit 0ba690
 * Thus,
Packit 0ba690
 * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
Packit 0ba690
 * this bit of #ifdefs will define the 'correct' config variables based on
Packit 0ba690
 * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
Packit 0ba690
 * unnecessary.
Packit 0ba690
 *
Packit 0ba690
 * Also, the precedence order is:
Packit 0ba690
 *   ALL_STATIC (since we can't #undef something outside our namespace)
Packit 0ba690
 *   PNG_BUILD_DLL
Packit 0ba690
 *   PNG_STATIC
Packit 0ba690
 *   (nothing) == PNG_USE_DLL
Packit 0ba690
 *
Packit 0ba690
 * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
Packit 0ba690
 *   of auto-import in binutils, we no longer need to worry about
Packit 0ba690
 *   __declspec(dllexport) / __declspec(dllimport) and friends.  Therefore,
Packit 0ba690
 *   we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
Packit 0ba690
 *   to __declspec() stuff.  However, we DO need to worry about
Packit 0ba690
 *   PNG_BUILD_DLL and PNG_STATIC because those change some defaults
Packit 0ba690
 *   such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
Packit 0ba690
 */
Packit 0ba690
#ifdef __CYGWIN__
Packit 0ba690
#  ifdef ALL_STATIC
Packit 0ba690
#    ifdef PNG_BUILD_DLL
Packit 0ba690
#      undef PNG_BUILD_DLL
Packit 0ba690
#    endif
Packit 0ba690
#    ifdef PNG_USE_DLL
Packit 0ba690
#      undef PNG_USE_DLL
Packit 0ba690
#    endif
Packit 0ba690
#    ifdef PNG_DLL
Packit 0ba690
#      undef PNG_DLL
Packit 0ba690
#    endif
Packit 0ba690
#    ifndef PNG_STATIC
Packit 0ba690
#      define PNG_STATIC
Packit 0ba690
#    endif
Packit 0ba690
#  else
Packit 0ba690
#    ifdef PNG_BUILD_DLL
Packit 0ba690
#      ifdef PNG_STATIC
Packit 0ba690
#        undef PNG_STATIC
Packit 0ba690
#      endif
Packit 0ba690
#      ifdef PNG_USE_DLL
Packit 0ba690
#        undef PNG_USE_DLL
Packit 0ba690
#      endif
Packit 0ba690
#      ifndef PNG_DLL
Packit 0ba690
#        define PNG_DLL
Packit 0ba690
#      endif
Packit 0ba690
#    else
Packit 0ba690
#      ifdef PNG_STATIC
Packit 0ba690
#        ifdef PNG_USE_DLL
Packit 0ba690
#          undef PNG_USE_DLL
Packit 0ba690
#        endif
Packit 0ba690
#        ifdef PNG_DLL
Packit 0ba690
#          undef PNG_DLL
Packit 0ba690
#        endif
Packit 0ba690
#      else
Packit 0ba690
#        ifndef PNG_USE_DLL
Packit 0ba690
#          define PNG_USE_DLL
Packit 0ba690
#        endif
Packit 0ba690
#        ifndef PNG_DLL
Packit 0ba690
#          define PNG_DLL
Packit 0ba690
#        endif
Packit 0ba690
#      endif
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* This protects us against compilers that run on a windowing system
Packit 0ba690
 * and thus don't have or would rather us not use the stdio types:
Packit 0ba690
 * stdin, stdout, and stderr.  The only one currently used is stderr
Packit 0ba690
 * in png_error() and png_warning().  #defining PNG_NO_CONSOLE_IO will
Packit 0ba690
 * prevent these from being compiled and used. #defining PNG_NO_STDIO
Packit 0ba690
 * will also prevent these, plus will prevent the entire set of stdio
Packit 0ba690
 * macros and functions (FILE *, printf, etc.) from being compiled and used,
Packit 0ba690
 * unless (PNG_DEBUG > 0) has been #defined.
Packit 0ba690
 *
Packit 0ba690
 * #define PNG_NO_CONSOLE_IO
Packit 0ba690
 * #define PNG_NO_STDIO
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED)
Packit 0ba690
#  define PNG_STDIO_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef _WIN32_WCE
Packit 0ba690
#  include <windows.h>
Packit 0ba690
   /* Console I/O functions are not supported on WindowsCE */
Packit 0ba690
#  define PNG_NO_CONSOLE_IO
Packit 0ba690
   /* abort() may not be supported on some/all Windows CE platforms */
Packit 0ba690
#  define PNG_ABORT() exit(-1)
Packit 0ba690
#  ifdef PNG_DEBUG
Packit 0ba690
#    undef PNG_DEBUG
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_BUILD_DLL
Packit 0ba690
#  ifndef PNG_CONSOLE_IO_SUPPORTED
Packit 0ba690
#    ifndef PNG_NO_CONSOLE_IO
Packit 0ba690
#      define PNG_NO_CONSOLE_IO
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#  ifdef PNG_NO_STDIO
Packit 0ba690
#    ifndef PNG_NO_CONSOLE_IO
Packit 0ba690
#      define PNG_NO_CONSOLE_IO
Packit 0ba690
#    endif
Packit 0ba690
#    ifdef PNG_DEBUG
Packit 0ba690
#      if (PNG_DEBUG > 0)
Packit 0ba690
#        include <stdio.h>
Packit 0ba690
#      endif
Packit 0ba690
#    endif
Packit 0ba690
#  else
Packit 0ba690
#    ifndef _WIN32_WCE
Packit 0ba690
/* "stdio.h" functions are not supported on WindowsCE */
Packit 0ba690
#      include <stdio.h>
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
Packit 0ba690
#if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED)
Packit 0ba690
#  define PNG_CONSOLE_IO_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* This macro protects us against machines that don't have function
Packit 0ba690
 * prototypes (ie K&R style headers).  If your compiler does not handle
Packit 0ba690
 * function prototypes, define this macro and use the included ansi2knr.
Packit 0ba690
 * I've always been able to use _NO_PROTO as the indicator, but you may
Packit 0ba690
 * need to drag the empty declaration out in front of here, or change the
Packit 0ba690
 * ifdef to suit your own needs.
Packit 0ba690
 */
Packit 0ba690
#ifndef PNGARG
Packit 0ba690
Packit 0ba690
#ifdef OF /* zlib prototype munger */
Packit 0ba690
#  define PNGARG(arglist) OF(arglist)
Packit 0ba690
#else
Packit 0ba690
Packit 0ba690
#ifdef _NO_PROTO
Packit 0ba690
#  define PNGARG(arglist) ()
Packit 0ba690
#  ifndef PNG_TYPECAST_NULL
Packit 0ba690
#     define PNG_TYPECAST_NULL
Packit 0ba690
#  endif
Packit 0ba690
#else
Packit 0ba690
#  define PNGARG(arglist) arglist
Packit 0ba690
#endif /* _NO_PROTO */
Packit 0ba690
Packit 0ba690
Packit 0ba690
#endif /* OF */
Packit 0ba690
Packit 0ba690
#endif /* PNGARG */
Packit 0ba690
Packit 0ba690
/* Try to determine if we are compiling on a Mac.  Note that testing for
Packit 0ba690
 * just __MWERKS__ is not good enough, because the Codewarrior is now used
Packit 0ba690
 * on non-Mac platforms.
Packit 0ba690
 */
Packit 0ba690
#ifndef MACOS
Packit 0ba690
#  if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
Packit 0ba690
      defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
Packit 0ba690
#    define MACOS
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* enough people need this for various reasons to include it here */
Packit 0ba690
#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
Packit 0ba690
#  include <sys/types.h>
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
Packit 0ba690
#  define PNG_SETJMP_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_SETJMP_SUPPORTED
Packit 0ba690
/* This is an attempt to force a single setjmp behaviour on Linux.  If
Packit 0ba690
 * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
Packit 0ba690
 *
Packit 0ba690
 * You can bypass this test if you know that your application uses exactly
Packit 0ba690
 * the same setjmp.h that was included when libpng was built.  Only define
Packit 0ba690
 * PNG_SKIP_SETJMP_CHECK while building your application, prior to the
Packit 0ba690
 * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK
Packit 0ba690
 * while building a separate libpng library for general use.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#  ifndef PNG_SKIP_SETJMP_CHECK
Packit 0ba690
#    ifdef __linux__
Packit 0ba690
#      ifdef _BSD_SOURCE
Packit 0ba690
#        define PNG_SAVE_BSD_SOURCE
Packit 0ba690
#        undef _BSD_SOURCE
Packit 0ba690
#      endif
Packit 0ba690
#      ifdef _SETJMP_H
Packit 0ba690
       /* If you encounter a compiler error here, see the explanation
Packit 0ba690
        * near the end of INSTALL.
Packit 0ba690
        */
Packit 0ba690
           __pngconf.h__ in libpng already includes setjmp.h;
Packit 0ba690
           __dont__ include it again.;
Packit 0ba690
#      endif
Packit 0ba690
#    endif /* __linux__ */
Packit 0ba690
#  endif /* PNG_SKIP_SETJMP_CHECK */
Packit 0ba690
Packit 0ba690
   /* include setjmp.h for error handling */
Packit 0ba690
#  include <setjmp.h>
Packit 0ba690
Packit 0ba690
#  ifdef __linux__
Packit 0ba690
#    ifdef PNG_SAVE_BSD_SOURCE
Packit 0ba690
#      ifndef _BSD_SOURCE
Packit 0ba690
#        define _BSD_SOURCE
Packit 0ba690
#      endif
Packit 0ba690
#      undef PNG_SAVE_BSD_SOURCE
Packit 0ba690
#    endif
Packit 0ba690
#  endif /* __linux__ */
Packit 0ba690
#endif /* PNG_SETJMP_SUPPORTED */
Packit 0ba690
Packit 0ba690
#ifdef BSD
Packit 0ba690
#  include <strings.h>
Packit 0ba690
#else
Packit 0ba690
#  include <string.h>
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Other defines for things like memory and the like can go here.  */
Packit 0ba690
#ifdef PNG_INTERNAL
Packit 0ba690
Packit 0ba690
#include <stdlib.h>
Packit 0ba690
Packit 0ba690
/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
Packit 0ba690
 * aren't usually used outside the library (as far as I know), so it is
Packit 0ba690
 * debatable if they should be exported at all.  In the future, when it is
Packit 0ba690
 * possible to have run-time registry of chunk-handling functions, some of
Packit 0ba690
 * these will be made available again.
Packit 0ba690
#define PNG_EXTERN extern
Packit 0ba690
 */
Packit 0ba690
#define PNG_EXTERN
Packit 0ba690
Packit 0ba690
/* Other defines specific to compilers can go here.  Try to keep
Packit 0ba690
 * them inside an appropriate ifdef/endif pair for portability.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#ifdef PNG_FLOATING_POINT_SUPPORTED
Packit 0ba690
#  ifdef MACOS
Packit 0ba690
     /* We need to check that <math.h> hasn't already been included earlier
Packit 0ba690
      * as it seems it doesn't agree with <fp.h>, yet we should really use
Packit 0ba690
      * <fp.h> if possible.
Packit 0ba690
      */
Packit 0ba690
#    if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
Packit 0ba690
#      include <fp.h>
Packit 0ba690
#    endif
Packit 0ba690
#  else
Packit 0ba690
#    include <math.h>
Packit 0ba690
#  endif
Packit 0ba690
#  if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
Packit 0ba690
     /* Amiga SAS/C: We must include builtin FPU functions when compiling using
Packit 0ba690
      * MATH=68881
Packit 0ba690
      */
Packit 0ba690
#    include <m68881.h>
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Codewarrior on NT has linking problems without this. */
Packit 0ba690
#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
Packit 0ba690
#  define PNG_ALWAYS_EXTERN
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* This provides the non-ANSI (far) memory allocation routines. */
Packit 0ba690
#if defined(__TURBOC__) && defined(__MSDOS__)
Packit 0ba690
#  include <mem.h>
Packit 0ba690
#  include <alloc.h>
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* I have no idea why is this necessary... */
Packit 0ba690
#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
Packit 0ba690
    defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
Packit 0ba690
#  include <malloc.h>
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* This controls how fine the dithering gets.  As this allocates
Packit 0ba690
 * a largish chunk of memory (32K), those who are not as concerned
Packit 0ba690
 * with dithering quality can decrease some or all of these.
Packit 0ba690
 */
Packit 0ba690
#ifndef PNG_DITHER_RED_BITS
Packit 0ba690
#  define PNG_DITHER_RED_BITS 5
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_DITHER_GREEN_BITS
Packit 0ba690
#  define PNG_DITHER_GREEN_BITS 5
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_DITHER_BLUE_BITS
Packit 0ba690
#  define PNG_DITHER_BLUE_BITS 5
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* This controls how fine the gamma correction becomes when you
Packit 0ba690
 * are only interested in 8 bits anyway.  Increasing this value
Packit 0ba690
 * results in more memory being used, and more pow() functions
Packit 0ba690
 * being called to fill in the gamma tables.  Don't set this value
Packit 0ba690
 * less then 8, and even that may not work (I haven't tested it).
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#ifndef PNG_MAX_GAMMA_8
Packit 0ba690
#  define PNG_MAX_GAMMA_8 11
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* This controls how much a difference in gamma we can tolerate before
Packit 0ba690
 * we actually start doing gamma conversion.
Packit 0ba690
 */
Packit 0ba690
#ifndef PNG_GAMMA_THRESHOLD
Packit 0ba690
#  define PNG_GAMMA_THRESHOLD 0.05
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#endif /* PNG_INTERNAL */
Packit 0ba690
Packit 0ba690
/* The following uses const char * instead of char * for error
Packit 0ba690
 * and warning message functions, so some compilers won't complain.
Packit 0ba690
 * If you do not want to use const, define PNG_NO_CONST here.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_CONST
Packit 0ba690
#  define PNG_CONST const
Packit 0ba690
#else
Packit 0ba690
#  define PNG_CONST
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* The following defines give you the ability to remove code from the
Packit 0ba690
 * library that you will not be using.  I wish I could figure out how to
Packit 0ba690
 * automate this, but I can't do that without making it seriously hard
Packit 0ba690
 * on the users.  So if you are not using an ability, change the #define
Packit 0ba690
 * to and #undef, and that part of the library will not be compiled.  If
Packit 0ba690
 * your linker can't find a function, you may want to make sure the
Packit 0ba690
 * ability is defined here.  Some of these depend upon some others being
Packit 0ba690
 * defined.  I haven't figured out all the interactions here, so you may
Packit 0ba690
 * have to experiment awhile to get everything to compile.  If you are
Packit 0ba690
 * creating or using a shared library, you probably shouldn't touch this,
Packit 0ba690
 * as it will affect the size of the structures, and this will cause bad
Packit 0ba690
 * things to happen if the library and/or application ever change.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
/* Any features you will not be using can be undef'ed here */
Packit 0ba690
Packit 0ba690
/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
Packit 0ba690
 * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
Packit 0ba690
 * on the compile line, then pick and choose which ones to define without
Packit 0ba690
 * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
Packit 0ba690
 * if you only want to have a png-compliant reader/writer but don't need
Packit 0ba690
 * any of the extra transformations.  This saves about 80 kbytes in a
Packit 0ba690
 * typical installation of the library. (PNG_NO_* form added in version
Packit 0ba690
 * 1.0.1c, for consistency)
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
/* The size of the png_text structure changed in libpng-1.0.6 when
Packit 0ba690
 * iTXt support was added.  iTXt support was turned off by default through
Packit 0ba690
 * libpng-1.2.x, to support old apps that malloc the png_text structure
Packit 0ba690
 * instead of calling png_set_text() and letting libpng malloc it.  It
Packit 0ba690
 * will be turned on by default in libpng-1.4.0.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
Packit 0ba690
#  ifndef PNG_NO_iTXt_SUPPORTED
Packit 0ba690
#    define PNG_NO_iTXt_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_iTXt
Packit 0ba690
#    define PNG_NO_READ_iTXt
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_iTXt
Packit 0ba690
#    define PNG_NO_WRITE_iTXt
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if !defined(PNG_NO_iTXt_SUPPORTED)
Packit 0ba690
#  if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
Packit 0ba690
#    define PNG_READ_iTXt
Packit 0ba690
#  endif
Packit 0ba690
#  if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
Packit 0ba690
#    define PNG_WRITE_iTXt
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* The following support, added after version 1.0.0, can be turned off here en
Packit 0ba690
 * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
Packit 0ba690
 * with old applications that require the length of png_struct and png_info
Packit 0ba690
 * to remain unchanged.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#ifdef PNG_LEGACY_SUPPORTED
Packit 0ba690
#  define PNG_NO_FREE_ME
Packit 0ba690
#  define PNG_NO_READ_UNKNOWN_CHUNKS
Packit 0ba690
#  define PNG_NO_WRITE_UNKNOWN_CHUNKS
Packit 0ba690
#  define PNG_NO_HANDLE_AS_UNKNOWN
Packit 0ba690
#  define PNG_NO_READ_USER_CHUNKS
Packit 0ba690
#  define PNG_NO_READ_iCCP
Packit 0ba690
#  define PNG_NO_WRITE_iCCP
Packit 0ba690
#  define PNG_NO_READ_iTXt
Packit 0ba690
#  define PNG_NO_WRITE_iTXt
Packit 0ba690
#  define PNG_NO_READ_sCAL
Packit 0ba690
#  define PNG_NO_WRITE_sCAL
Packit 0ba690
#  define PNG_NO_READ_sPLT
Packit 0ba690
#  define PNG_NO_WRITE_sPLT
Packit 0ba690
#  define PNG_NO_INFO_IMAGE
Packit 0ba690
#  define PNG_NO_READ_RGB_TO_GRAY
Packit 0ba690
#  define PNG_NO_READ_USER_TRANSFORM
Packit 0ba690
#  define PNG_NO_WRITE_USER_TRANSFORM
Packit 0ba690
#  define PNG_NO_USER_MEM
Packit 0ba690
#  define PNG_NO_READ_EMPTY_PLTE
Packit 0ba690
#  define PNG_NO_MNG_FEATURES
Packit 0ba690
#  define PNG_NO_FIXED_POINT_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Ignore attempt to turn off both floating and fixed point support */
Packit 0ba690
#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
Packit 0ba690
    !defined(PNG_NO_FIXED_POINT_SUPPORTED)
Packit 0ba690
#  define PNG_FIXED_POINT_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_FREE_ME
Packit 0ba690
#  define PNG_FREE_ME_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_READ_SUPPORTED
Packit 0ba690
Packit 0ba690
#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
Packit 0ba690
      !defined(PNG_NO_READ_TRANSFORMS)
Packit 0ba690
#  define PNG_READ_TRANSFORMS_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
Packit 0ba690
#  ifndef PNG_NO_READ_EXPAND
Packit 0ba690
#    define PNG_READ_EXPAND_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_SHIFT
Packit 0ba690
#    define PNG_READ_SHIFT_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_PACK
Packit 0ba690
#    define PNG_READ_PACK_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_BGR
Packit 0ba690
#    define PNG_READ_BGR_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_SWAP
Packit 0ba690
#    define PNG_READ_SWAP_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_PACKSWAP
Packit 0ba690
#    define PNG_READ_PACKSWAP_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_INVERT
Packit 0ba690
#    define PNG_READ_INVERT_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_DITHER
Packit 0ba690
#    define PNG_READ_DITHER_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_BACKGROUND
Packit 0ba690
#    define PNG_READ_BACKGROUND_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_16_TO_8
Packit 0ba690
#    define PNG_READ_16_TO_8_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_FILLER
Packit 0ba690
#    define PNG_READ_FILLER_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_GAMMA
Packit 0ba690
#    define PNG_READ_GAMMA_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_GRAY_TO_RGB
Packit 0ba690
#    define PNG_READ_GRAY_TO_RGB_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_SWAP_ALPHA
Packit 0ba690
#    define PNG_READ_SWAP_ALPHA_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_INVERT_ALPHA
Packit 0ba690
#    define PNG_READ_INVERT_ALPHA_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_STRIP_ALPHA
Packit 0ba690
#    define PNG_READ_STRIP_ALPHA_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_USER_TRANSFORM
Packit 0ba690
#    define PNG_READ_USER_TRANSFORM_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_READ_RGB_TO_GRAY
Packit 0ba690
#    define PNG_READ_RGB_TO_GRAY_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
Packit 0ba690
Packit 0ba690
/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */
Packit 0ba690
#if !defined(PNG_NO_PROGRESSIVE_READ) && \
Packit 0ba690
 !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED)  /* if you don't do progressive */
Packit 0ba690
#  define PNG_PROGRESSIVE_READ_SUPPORTED     /* reading.  This is not talking */
Packit 0ba690
#endif                               /* about interlacing capability!  You'll */
Packit 0ba690
            /* still have interlacing unless you change the following define: */
Packit 0ba690
#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
Packit 0ba690
Packit 0ba690
/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */
Packit 0ba690
#if !defined(PNG_NO_SEQUENTIAL_READ) && \
Packit 0ba690
    !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \
Packit 0ba690
    !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED)
Packit 0ba690
#  define PNG_SEQUENTIAL_READ_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_READ_COMPOSITE_NODIV
Packit 0ba690
#  ifndef PNG_NO_READ_COMPOSITED_NODIV  /* libpng-1.0.x misspelling */
Packit 0ba690
#    define PNG_READ_COMPOSITE_NODIV_SUPPORTED  /* well tested on Intel, SGI */
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
Packit 0ba690
/* Deprecated, will be removed from version 2.0.0.
Packit 0ba690
   Use PNG_MNG_FEATURES_SUPPORTED instead. */
Packit 0ba690
#ifndef PNG_NO_READ_EMPTY_PLTE
Packit 0ba690
#  define PNG_READ_EMPTY_PLTE_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#endif /* PNG_READ_SUPPORTED */
Packit 0ba690
Packit 0ba690
#ifdef PNG_WRITE_SUPPORTED
Packit 0ba690
Packit 0ba690
# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
Packit 0ba690
    !defined(PNG_NO_WRITE_TRANSFORMS)
Packit 0ba690
#  define PNG_WRITE_TRANSFORMS_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
Packit 0ba690
#  ifndef PNG_NO_WRITE_SHIFT
Packit 0ba690
#    define PNG_WRITE_SHIFT_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_PACK
Packit 0ba690
#    define PNG_WRITE_PACK_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_BGR
Packit 0ba690
#    define PNG_WRITE_BGR_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_SWAP
Packit 0ba690
#    define PNG_WRITE_SWAP_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_PACKSWAP
Packit 0ba690
#    define PNG_WRITE_PACKSWAP_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_INVERT
Packit 0ba690
#    define PNG_WRITE_INVERT_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_FILLER
Packit 0ba690
#    define PNG_WRITE_FILLER_SUPPORTED   /* same as WRITE_STRIP_ALPHA */
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_SWAP_ALPHA
Packit 0ba690
#    define PNG_WRITE_SWAP_ALPHA_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#ifndef PNG_1_0_X
Packit 0ba690
#  ifndef PNG_NO_WRITE_INVERT_ALPHA
Packit 0ba690
#    define PNG_WRITE_INVERT_ALPHA_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#  ifndef PNG_NO_WRITE_USER_TRANSFORM
Packit 0ba690
#    define PNG_WRITE_USER_TRANSFORM_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
Packit 0ba690
Packit 0ba690
#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
Packit 0ba690
    !defined(PNG_WRITE_INTERLACING_SUPPORTED)
Packit 0ba690
#define PNG_WRITE_INTERLACING_SUPPORTED  /* not required for PNG-compliant
Packit 0ba690
                                            encoders, but can cause trouble
Packit 0ba690
                                            if left undefined */
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
Packit 0ba690
    !defined(PNG_WRITE_WEIGHTED_FILTER) && \
Packit 0ba690
     defined(PNG_FLOATING_POINT_SUPPORTED)
Packit 0ba690
#  define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_WRITE_FLUSH
Packit 0ba690
#  define PNG_WRITE_FLUSH_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
Packit 0ba690
/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
Packit 0ba690
#ifndef PNG_NO_WRITE_EMPTY_PLTE
Packit 0ba690
#  define PNG_WRITE_EMPTY_PLTE_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#endif /* PNG_WRITE_SUPPORTED */
Packit 0ba690
Packit 0ba690
#ifndef PNG_1_0_X
Packit 0ba690
#  ifndef PNG_NO_ERROR_NUMBERS
Packit 0ba690
#    define PNG_ERROR_NUMBERS_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif /* PNG_1_0_X */
Packit 0ba690
Packit 0ba690
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
Packit 0ba690
    defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
Packit 0ba690
#  ifndef PNG_NO_USER_TRANSFORM_PTR
Packit 0ba690
#    define PNG_USER_TRANSFORM_PTR_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_STDIO
Packit 0ba690
#  define PNG_TIME_RFC1123_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* This adds extra functions in pngget.c for accessing data from the
Packit 0ba690
 * info pointer (added in version 0.99)
Packit 0ba690
 * png_get_image_width()
Packit 0ba690
 * png_get_image_height()
Packit 0ba690
 * png_get_bit_depth()
Packit 0ba690
 * png_get_color_type()
Packit 0ba690
 * png_get_compression_type()
Packit 0ba690
 * png_get_filter_type()
Packit 0ba690
 * png_get_interlace_type()
Packit 0ba690
 * png_get_pixel_aspect_ratio()
Packit 0ba690
 * png_get_pixels_per_meter()
Packit 0ba690
 * png_get_x_offset_pixels()
Packit 0ba690
 * png_get_y_offset_pixels()
Packit 0ba690
 * png_get_x_offset_microns()
Packit 0ba690
 * png_get_y_offset_microns()
Packit 0ba690
 */
Packit 0ba690
#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
Packit 0ba690
#  define PNG_EASY_ACCESS_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
Packit 0ba690
 * and removed from version 1.2.20.  The following will be removed
Packit 0ba690
 * from libpng-1.4.0
Packit 0ba690
*/
Packit 0ba690
Packit 0ba690
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)
Packit 0ba690
#  ifndef PNG_OPTIMIZED_CODE_SUPPORTED
Packit 0ba690
#    define PNG_OPTIMIZED_CODE_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
Packit 0ba690
#  ifndef PNG_ASSEMBLER_CODE_SUPPORTED
Packit 0ba690
#    define PNG_ASSEMBLER_CODE_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
Packit 0ba690
#  if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)
Packit 0ba690
     /* work around 64-bit gcc compiler bugs in gcc-3.x */
Packit 0ba690
#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
Packit 0ba690
#      define PNG_NO_MMX_CODE
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
Packit 0ba690
#  ifdef __APPLE__
Packit 0ba690
#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
Packit 0ba690
#      define PNG_NO_MMX_CODE
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
Packit 0ba690
#  if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))
Packit 0ba690
#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
Packit 0ba690
#      define PNG_NO_MMX_CODE
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
Packit 0ba690
#  if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
Packit 0ba690
#    define PNG_MMX_CODE_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
Packit 0ba690
#endif
Packit 0ba690
/* end of obsolete code to be removed from libpng-1.4.0 */
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.2.0 */
Packit 0ba690
#ifndef PNG_1_0_X
Packit 0ba690
#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
Packit 0ba690
#  define PNG_USER_MEM_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#endif /* PNG_1_0_X */
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.2.6 */
Packit 0ba690
#ifndef PNG_1_0_X
Packit 0ba690
#  ifndef PNG_SET_USER_LIMITS_SUPPORTED
Packit 0ba690
#    ifndef PNG_NO_SET_USER_LIMITS
Packit 0ba690
#      define PNG_SET_USER_LIMITS_SUPPORTED
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
#endif /* PNG_1_0_X */
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.0.53 and 1.2.43 */
Packit 0ba690
#ifndef PNG_USER_LIMITS_SUPPORTED
Packit 0ba690
#  ifndef PNG_NO_USER_LIMITS
Packit 0ba690
#    define PNG_USER_LIMITS_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.0.16 and 1.2.6.  To accept all valid PNGS no matter
Packit 0ba690
 * how large, set these limits to 0x7fffffffL
Packit 0ba690
 */
Packit 0ba690
#ifndef PNG_USER_WIDTH_MAX
Packit 0ba690
#  define PNG_USER_WIDTH_MAX 1000000L
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_USER_HEIGHT_MAX
Packit 0ba690
#  define PNG_USER_HEIGHT_MAX 1000000L
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.2.43.  To accept all valid PNGs no matter
Packit 0ba690
 * how large, set these two limits to 0.
Packit 0ba690
 */
Packit 0ba690
#ifndef PNG_USER_CHUNK_CACHE_MAX
Packit 0ba690
#  define PNG_USER_CHUNK_CACHE_MAX 32765
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.2.43 */
Packit 0ba690
#ifndef PNG_USER_CHUNK_MALLOC_MAX
Packit 0ba690
#  define PNG_USER_CHUNK_MALLOC_MAX 8000000
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_LITERAL_SHARP
Packit 0ba690
#  define PNG_LITERAL_SHARP 0x23
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET
Packit 0ba690
#  define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET
Packit 0ba690
#  define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.2.34 */
Packit 0ba690
#ifndef PNG_STRING_NEWLINE
Packit 0ba690
#define PNG_STRING_NEWLINE "\n"
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* These are currently experimental features, define them if you want */
Packit 0ba690
Packit 0ba690
/* very little testing */
Packit 0ba690
/*
Packit 0ba690
#ifdef PNG_READ_SUPPORTED
Packit 0ba690
#  ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
Packit 0ba690
#    define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
*/
Packit 0ba690
Packit 0ba690
/* This is only for PowerPC big-endian and 680x0 systems */
Packit 0ba690
/* some testing */
Packit 0ba690
/*
Packit 0ba690
#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
Packit 0ba690
#  define PNG_READ_BIG_ENDIAN_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
*/
Packit 0ba690
Packit 0ba690
/* Buggy compilers (e.g., gcc 2.7.2.2) need this */
Packit 0ba690
/*
Packit 0ba690
#define PNG_NO_POINTER_INDEXING
Packit 0ba690
*/
Packit 0ba690
Packit 0ba690
#if !defined(PNG_NO_POINTER_INDEXING) && \
Packit 0ba690
    !defined(PNG_POINTER_INDEXING_SUPPORTED)
Packit 0ba690
#  define PNG_POINTER_INDEXING_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* These functions are turned off by default, as they will be phased out. */
Packit 0ba690
/*
Packit 0ba690
#define  PNG_USELESS_TESTS_SUPPORTED
Packit 0ba690
#define  PNG_CORRECT_PALETTE_SUPPORTED
Packit 0ba690
*/
Packit 0ba690
Packit 0ba690
/* Any chunks you are not interested in, you can undef here.  The
Packit 0ba690
 * ones that allocate memory may be expecially important (hIST,
Packit 0ba690
 * tEXt, zTXt, tRNS, pCAL).  Others will just save time and make png_info
Packit 0ba690
 * a bit smaller.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#if defined(PNG_READ_SUPPORTED) && \
Packit 0ba690
    !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
Packit 0ba690
    !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
Packit 0ba690
#  define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if defined(PNG_WRITE_SUPPORTED) && \
Packit 0ba690
    !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
Packit 0ba690
    !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
Packit 0ba690
#  define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
Packit 0ba690
Packit 0ba690
#ifdef PNG_NO_READ_TEXT
Packit 0ba690
#  define PNG_NO_READ_iTXt
Packit 0ba690
#  define PNG_NO_READ_tEXt
Packit 0ba690
#  define PNG_NO_READ_zTXt
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_bKGD
Packit 0ba690
#  define PNG_READ_bKGD_SUPPORTED
Packit 0ba690
#  define PNG_bKGD_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_cHRM
Packit 0ba690
#  define PNG_READ_cHRM_SUPPORTED
Packit 0ba690
#  define PNG_cHRM_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_gAMA
Packit 0ba690
#  define PNG_READ_gAMA_SUPPORTED
Packit 0ba690
#  define PNG_gAMA_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_hIST
Packit 0ba690
#  define PNG_READ_hIST_SUPPORTED
Packit 0ba690
#  define PNG_hIST_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_iCCP
Packit 0ba690
#  define PNG_READ_iCCP_SUPPORTED
Packit 0ba690
#  define PNG_iCCP_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_iTXt
Packit 0ba690
#  ifndef PNG_READ_iTXt_SUPPORTED
Packit 0ba690
#    define PNG_READ_iTXt_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_iTXt_SUPPORTED
Packit 0ba690
#    define PNG_iTXt_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_oFFs
Packit 0ba690
#  define PNG_READ_oFFs_SUPPORTED
Packit 0ba690
#  define PNG_oFFs_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_pCAL
Packit 0ba690
#  define PNG_READ_pCAL_SUPPORTED
Packit 0ba690
#  define PNG_pCAL_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_sCAL
Packit 0ba690
#  define PNG_READ_sCAL_SUPPORTED
Packit 0ba690
#  define PNG_sCAL_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_pHYs
Packit 0ba690
#  define PNG_READ_pHYs_SUPPORTED
Packit 0ba690
#  define PNG_pHYs_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_sBIT
Packit 0ba690
#  define PNG_READ_sBIT_SUPPORTED
Packit 0ba690
#  define PNG_sBIT_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_sPLT
Packit 0ba690
#  define PNG_READ_sPLT_SUPPORTED
Packit 0ba690
#  define PNG_sPLT_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_sRGB
Packit 0ba690
#  define PNG_READ_sRGB_SUPPORTED
Packit 0ba690
#  define PNG_sRGB_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_tEXt
Packit 0ba690
#  define PNG_READ_tEXt_SUPPORTED
Packit 0ba690
#  define PNG_tEXt_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_tIME
Packit 0ba690
#  define PNG_READ_tIME_SUPPORTED
Packit 0ba690
#  define PNG_tIME_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_tRNS
Packit 0ba690
#  define PNG_READ_tRNS_SUPPORTED
Packit 0ba690
#  define PNG_tRNS_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_zTXt
Packit 0ba690
#  define PNG_READ_zTXt_SUPPORTED
Packit 0ba690
#  define PNG_zTXt_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_READ_OPT_PLTE
Packit 0ba690
#  define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
Packit 0ba690
#endif                      /* optional PLTE chunk in RGB and RGBA images */
Packit 0ba690
#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
Packit 0ba690
    defined(PNG_READ_zTXt_SUPPORTED)
Packit 0ba690
#  define PNG_READ_TEXT_SUPPORTED
Packit 0ba690
#  define PNG_TEXT_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_READ_UNKNOWN_CHUNKS
Packit 0ba690
#  define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
Packit 0ba690
#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
Packit 0ba690
#    define PNG_UNKNOWN_CHUNKS_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#if !defined(PNG_NO_READ_USER_CHUNKS) && \
Packit 0ba690
     defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
Packit 0ba690
#  define PNG_READ_USER_CHUNKS_SUPPORTED
Packit 0ba690
#  define PNG_USER_CHUNKS_SUPPORTED
Packit 0ba690
#  ifdef PNG_NO_READ_UNKNOWN_CHUNKS
Packit 0ba690
#    undef PNG_NO_READ_UNKNOWN_CHUNKS
Packit 0ba690
#  endif
Packit 0ba690
#  ifdef PNG_NO_HANDLE_AS_UNKNOWN
Packit 0ba690
#    undef PNG_NO_HANDLE_AS_UNKNOWN
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_HANDLE_AS_UNKNOWN
Packit 0ba690
#  ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
Packit 0ba690
#    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_WRITE_SUPPORTED
Packit 0ba690
#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
Packit 0ba690
Packit 0ba690
#ifdef PNG_NO_WRITE_TEXT
Packit 0ba690
#  define PNG_NO_WRITE_iTXt
Packit 0ba690
#  define PNG_NO_WRITE_tEXt
Packit 0ba690
#  define PNG_NO_WRITE_zTXt
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_bKGD
Packit 0ba690
#  define PNG_WRITE_bKGD_SUPPORTED
Packit 0ba690
#  ifndef PNG_bKGD_SUPPORTED
Packit 0ba690
#    define PNG_bKGD_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_cHRM
Packit 0ba690
#  define PNG_WRITE_cHRM_SUPPORTED
Packit 0ba690
#  ifndef PNG_cHRM_SUPPORTED
Packit 0ba690
#    define PNG_cHRM_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_gAMA
Packit 0ba690
#  define PNG_WRITE_gAMA_SUPPORTED
Packit 0ba690
#  ifndef PNG_gAMA_SUPPORTED
Packit 0ba690
#    define PNG_gAMA_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_hIST
Packit 0ba690
#  define PNG_WRITE_hIST_SUPPORTED
Packit 0ba690
#  ifndef PNG_hIST_SUPPORTED
Packit 0ba690
#    define PNG_hIST_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_iCCP
Packit 0ba690
#  define PNG_WRITE_iCCP_SUPPORTED
Packit 0ba690
#  ifndef PNG_iCCP_SUPPORTED
Packit 0ba690
#    define PNG_iCCP_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_iTXt
Packit 0ba690
#  ifndef PNG_WRITE_iTXt_SUPPORTED
Packit 0ba690
#    define PNG_WRITE_iTXt_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#  ifndef PNG_iTXt_SUPPORTED
Packit 0ba690
#    define PNG_iTXt_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_oFFs
Packit 0ba690
#  define PNG_WRITE_oFFs_SUPPORTED
Packit 0ba690
#  ifndef PNG_oFFs_SUPPORTED
Packit 0ba690
#    define PNG_oFFs_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_pCAL
Packit 0ba690
#  define PNG_WRITE_pCAL_SUPPORTED
Packit 0ba690
#  ifndef PNG_pCAL_SUPPORTED
Packit 0ba690
#    define PNG_pCAL_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_sCAL
Packit 0ba690
#  define PNG_WRITE_sCAL_SUPPORTED
Packit 0ba690
#  ifndef PNG_sCAL_SUPPORTED
Packit 0ba690
#    define PNG_sCAL_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_pHYs
Packit 0ba690
#  define PNG_WRITE_pHYs_SUPPORTED
Packit 0ba690
#  ifndef PNG_pHYs_SUPPORTED
Packit 0ba690
#    define PNG_pHYs_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_sBIT
Packit 0ba690
#  define PNG_WRITE_sBIT_SUPPORTED
Packit 0ba690
#  ifndef PNG_sBIT_SUPPORTED
Packit 0ba690
#    define PNG_sBIT_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_sPLT
Packit 0ba690
#  define PNG_WRITE_sPLT_SUPPORTED
Packit 0ba690
#  ifndef PNG_sPLT_SUPPORTED
Packit 0ba690
#    define PNG_sPLT_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_sRGB
Packit 0ba690
#  define PNG_WRITE_sRGB_SUPPORTED
Packit 0ba690
#  ifndef PNG_sRGB_SUPPORTED
Packit 0ba690
#    define PNG_sRGB_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_tEXt
Packit 0ba690
#  define PNG_WRITE_tEXt_SUPPORTED
Packit 0ba690
#  ifndef PNG_tEXt_SUPPORTED
Packit 0ba690
#    define PNG_tEXt_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_tIME
Packit 0ba690
#  define PNG_WRITE_tIME_SUPPORTED
Packit 0ba690
#  ifndef PNG_tIME_SUPPORTED
Packit 0ba690
#    define PNG_tIME_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_tRNS
Packit 0ba690
#  define PNG_WRITE_tRNS_SUPPORTED
Packit 0ba690
#  ifndef PNG_tRNS_SUPPORTED
Packit 0ba690
#    define PNG_tRNS_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NO_WRITE_zTXt
Packit 0ba690
#  define PNG_WRITE_zTXt_SUPPORTED
Packit 0ba690
#  ifndef PNG_zTXt_SUPPORTED
Packit 0ba690
#    define PNG_zTXt_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
Packit 0ba690
    defined(PNG_WRITE_zTXt_SUPPORTED)
Packit 0ba690
#  define PNG_WRITE_TEXT_SUPPORTED
Packit 0ba690
#  ifndef PNG_TEXT_SUPPORTED
Packit 0ba690
#    define PNG_TEXT_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_WRITE_tIME_SUPPORTED
Packit 0ba690
#  ifndef PNG_NO_CONVERT_tIME
Packit 0ba690
#    ifndef _WIN32_WCE
Packit 0ba690
/*   The "tm" structure is not supported on WindowsCE */
Packit 0ba690
#      ifndef PNG_CONVERT_tIME_SUPPORTED
Packit 0ba690
#        define PNG_CONVERT_tIME_SUPPORTED
Packit 0ba690
#      endif
Packit 0ba690
#   endif
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
Packit 0ba690
Packit 0ba690
#if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED)
Packit 0ba690
#  define PNG_WRITE_FILTER_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
Packit 0ba690
#  define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
Packit 0ba690
#  ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
Packit 0ba690
#    define PNG_UNKNOWN_CHUNKS_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_HANDLE_AS_UNKNOWN
Packit 0ba690
#  ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
Packit 0ba690
#    define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
#endif /* PNG_WRITE_SUPPORTED */
Packit 0ba690
Packit 0ba690
/* Turn this off to disable png_read_png() and
Packit 0ba690
 * png_write_png() and leave the row_pointers member
Packit 0ba690
 * out of the info structure.
Packit 0ba690
 */
Packit 0ba690
#ifndef PNG_NO_INFO_IMAGE
Packit 0ba690
#  define PNG_INFO_IMAGE_SUPPORTED
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Need the time information for converting tIME chunks */
Packit 0ba690
#ifdef PNG_CONVERT_tIME_SUPPORTED
Packit 0ba690
     /* "time.h" functions are not supported on WindowsCE */
Packit 0ba690
#    include <time.h>
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Some typedefs to get us started.  These should be safe on most of the
Packit 0ba690
 * common platforms.  The typedefs should be at least as large as the
Packit 0ba690
 * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
Packit 0ba690
 * don't have to be exactly that size.  Some compilers dislike passing
Packit 0ba690
 * unsigned shorts as function parameters, so you may be better off using
Packit 0ba690
 * unsigned int for png_uint_16.  Likewise, for 64-bit systems, you may
Packit 0ba690
 * want to have unsigned int for png_uint_32 instead of unsigned long.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
typedef unsigned long png_uint_32;
Packit 0ba690
typedef long png_int_32;
Packit 0ba690
typedef unsigned short png_uint_16;
Packit 0ba690
typedef short png_int_16;
Packit 0ba690
typedef unsigned char png_byte;
Packit 0ba690
Packit 0ba690
/* This is usually size_t.  It is typedef'ed just in case you need it to
Packit 0ba690
   change (I'm not sure if you will or not, so I thought I'd be safe) */
Packit 0ba690
#ifdef PNG_SIZE_T
Packit 0ba690
   typedef PNG_SIZE_T png_size_t;
Packit 0ba690
#  define png_sizeof(x) png_convert_size(sizeof(x))
Packit 0ba690
#else
Packit 0ba690
   typedef size_t png_size_t;
Packit 0ba690
#  define png_sizeof(x) sizeof(x)
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* The following is needed for medium model support.  It cannot be in the
Packit 0ba690
 * PNG_INTERNAL section.  Needs modification for other compilers besides
Packit 0ba690
 * MSC.  Model independent support declares all arrays and pointers to be
Packit 0ba690
 * large using the far keyword.  The zlib version used must also support
Packit 0ba690
 * model independent data.  As of version zlib 1.0.4, the necessary changes
Packit 0ba690
 * have been made in zlib.  The USE_FAR_KEYWORD define triggers other
Packit 0ba690
 * changes that are needed. (Tim Wegner)
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
/* Separate compiler dependencies (problem here is that zlib.h always
Packit 0ba690
   defines FAR. (SJT) */
Packit 0ba690
#ifdef __BORLANDC__
Packit 0ba690
#  if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
Packit 0ba690
#    define LDATA 1
Packit 0ba690
#  else
Packit 0ba690
#    define LDATA 0
Packit 0ba690
#  endif
Packit 0ba690
   /* GRR:  why is Cygwin in here?  Cygwin is not Borland C... */
Packit 0ba690
#  if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
Packit 0ba690
#    define PNG_MAX_MALLOC_64K
Packit 0ba690
#    if (LDATA != 1)
Packit 0ba690
#      ifndef FAR
Packit 0ba690
#        define FAR __far
Packit 0ba690
#      endif
Packit 0ba690
#      define USE_FAR_KEYWORD
Packit 0ba690
#    endif   /* LDATA != 1 */
Packit 0ba690
     /* Possibly useful for moving data out of default segment.
Packit 0ba690
      * Uncomment it if you want. Could also define FARDATA as
Packit 0ba690
      * const if your compiler supports it. (SJT)
Packit 0ba690
#    define FARDATA FAR
Packit 0ba690
      */
Packit 0ba690
#  endif  /* __WIN32__, __FLAT__, __CYGWIN__ */
Packit 0ba690
#endif   /* __BORLANDC__ */
Packit 0ba690
Packit 0ba690
Packit 0ba690
/* Suggest testing for specific compiler first before testing for
Packit 0ba690
 * FAR.  The Watcom compiler defines both __MEDIUM__ and M_I86MM,
Packit 0ba690
 * making reliance oncertain keywords suspect. (SJT)
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
/* MSC Medium model */
Packit 0ba690
#ifdef FAR
Packit 0ba690
#  ifdef M_I86MM
Packit 0ba690
#    define USE_FAR_KEYWORD
Packit 0ba690
#    define FARDATA FAR
Packit 0ba690
#    include <dos.h>
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* SJT: default case */
Packit 0ba690
#ifndef FAR
Packit 0ba690
#  define FAR
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* At this point FAR is always defined */
Packit 0ba690
#ifndef FARDATA
Packit 0ba690
#  define FARDATA
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Typedef for floating-point numbers that are converted
Packit 0ba690
   to fixed-point with a multiple of 100,000, e.g., int_gamma */
Packit 0ba690
typedef png_int_32 png_fixed_point;
Packit 0ba690
Packit 0ba690
/* Add typedefs for pointers */
Packit 0ba690
typedef void            FAR * png_voidp;
Packit 0ba690
typedef png_byte        FAR * png_bytep;
Packit 0ba690
typedef png_uint_32     FAR * png_uint_32p;
Packit 0ba690
typedef png_int_32      FAR * png_int_32p;
Packit 0ba690
typedef png_uint_16     FAR * png_uint_16p;
Packit 0ba690
typedef png_int_16      FAR * png_int_16p;
Packit 0ba690
typedef PNG_CONST char  FAR * png_const_charp;
Packit 0ba690
typedef char            FAR * png_charp;
Packit 0ba690
typedef png_fixed_point FAR * png_fixed_point_p;
Packit 0ba690
Packit 0ba690
#ifndef PNG_NO_STDIO
Packit 0ba690
#ifdef _WIN32_WCE
Packit 0ba690
typedef HANDLE                png_FILE_p;
Packit 0ba690
#else
Packit 0ba690
typedef FILE                * png_FILE_p;
Packit 0ba690
#endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_FLOATING_POINT_SUPPORTED
Packit 0ba690
typedef double          FAR * png_doublep;
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Pointers to pointers; i.e. arrays */
Packit 0ba690
typedef png_byte        FAR * FAR * png_bytepp;
Packit 0ba690
typedef png_uint_32     FAR * FAR * png_uint_32pp;
Packit 0ba690
typedef png_int_32      FAR * FAR * png_int_32pp;
Packit 0ba690
typedef png_uint_16     FAR * FAR * png_uint_16pp;
Packit 0ba690
typedef png_int_16      FAR * FAR * png_int_16pp;
Packit 0ba690
typedef PNG_CONST char  FAR * FAR * png_const_charpp;
Packit 0ba690
typedef char            FAR * FAR * png_charpp;
Packit 0ba690
typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
Packit 0ba690
#ifdef PNG_FLOATING_POINT_SUPPORTED
Packit 0ba690
typedef double          FAR * FAR * png_doublepp;
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Pointers to pointers to pointers; i.e., pointer to array */
Packit 0ba690
typedef char            FAR * FAR * FAR * png_charppp;
Packit 0ba690
Packit 0ba690
#if defined(PNG_1_0_X) || defined(PNG_1_2_X)
Packit 0ba690
/* SPC -  Is this stuff deprecated? */
Packit 0ba690
/* It'll be removed as of libpng-1.4.0 - GR-P */
Packit 0ba690
/* libpng typedefs for types in zlib. If zlib changes
Packit 0ba690
 * or another compression library is used, then change these.
Packit 0ba690
 * Eliminates need to change all the source files.
Packit 0ba690
 */
Packit 0ba690
typedef charf *         png_zcharp;
Packit 0ba690
typedef charf * FAR *   png_zcharpp;
Packit 0ba690
typedef z_stream FAR *  png_zstreamp;
Packit 0ba690
#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */
Packit 0ba690
Packit 0ba690
/*
Packit 0ba690
 * Define PNG_BUILD_DLL if the module being built is a Windows
Packit 0ba690
 * LIBPNG DLL.
Packit 0ba690
 *
Packit 0ba690
 * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
Packit 0ba690
 * It is equivalent to Microsoft predefined macro _DLL that is
Packit 0ba690
 * automatically defined when you compile using the share
Packit 0ba690
 * version of the CRT (C Run-Time library)
Packit 0ba690
 *
Packit 0ba690
 * The cygwin mods make this behavior a little different:
Packit 0ba690
 * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
Packit 0ba690
 * Define PNG_STATIC if you are building a static library for use with cygwin,
Packit 0ba690
 *   -or- if you are building an application that you want to link to the
Packit 0ba690
 *   static library.
Packit 0ba690
 * PNG_USE_DLL is defined by default (no user action needed) unless one of
Packit 0ba690
 *   the other flags is defined.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
Packit 0ba690
#  define PNG_DLL
Packit 0ba690
#endif
Packit 0ba690
/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
Packit 0ba690
 * When building a static lib, default to no GLOBAL ARRAYS, but allow
Packit 0ba690
 * command-line override
Packit 0ba690
 */
Packit 0ba690
#ifdef __CYGWIN__
Packit 0ba690
#  ifndef PNG_STATIC
Packit 0ba690
#    ifdef PNG_USE_GLOBAL_ARRAYS
Packit 0ba690
#      undef PNG_USE_GLOBAL_ARRAYS
Packit 0ba690
#    endif
Packit 0ba690
#    ifndef PNG_USE_LOCAL_ARRAYS
Packit 0ba690
#      define PNG_USE_LOCAL_ARRAYS
Packit 0ba690
#    endif
Packit 0ba690
#  else
Packit 0ba690
#    if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
Packit 0ba690
#      ifdef PNG_USE_GLOBAL_ARRAYS
Packit 0ba690
#        undef PNG_USE_GLOBAL_ARRAYS
Packit 0ba690
#      endif
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
#  if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
Packit 0ba690
#    define PNG_USE_LOCAL_ARRAYS
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Do not use global arrays (helps with building DLL's)
Packit 0ba690
 * They are no longer used in libpng itself, since version 1.0.5c,
Packit 0ba690
 * but might be required for some pre-1.0.5c applications.
Packit 0ba690
 */
Packit 0ba690
#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
Packit 0ba690
#  if defined(PNG_NO_GLOBAL_ARRAYS) || \
Packit 0ba690
      (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)
Packit 0ba690
#    define PNG_USE_LOCAL_ARRAYS
Packit 0ba690
#  else
Packit 0ba690
#    define PNG_USE_GLOBAL_ARRAYS
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef __CYGWIN__
Packit 0ba690
#  undef PNGAPI
Packit 0ba690
#  define PNGAPI __cdecl
Packit 0ba690
#  undef PNG_IMPEXP
Packit 0ba690
#  define PNG_IMPEXP
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
Packit 0ba690
 * you may get warnings regarding the linkage of png_zalloc and png_zfree.
Packit 0ba690
 * Don't ignore those warnings; you must also reset the default calling
Packit 0ba690
 * convention in your compiler to match your PNGAPI, and you must build
Packit 0ba690
 * zlib and your applications the same way you build libpng.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
Packit 0ba690
#  ifndef PNG_NO_MODULEDEF
Packit 0ba690
#    define PNG_NO_MODULEDEF
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
Packit 0ba690
#  define PNG_IMPEXP
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
Packit 0ba690
    (( defined(_Windows) || defined(_WINDOWS) || \
Packit 0ba690
       defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
Packit 0ba690
Packit 0ba690
#  ifndef PNGAPI
Packit 0ba690
#     if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
Packit 0ba690
#        define PNGAPI __cdecl
Packit 0ba690
#     else
Packit 0ba690
#        define PNGAPI _cdecl
Packit 0ba690
#     endif
Packit 0ba690
#  endif
Packit 0ba690
Packit 0ba690
#  if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
Packit 0ba690
       0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
Packit 0ba690
#     define PNG_IMPEXP
Packit 0ba690
#  endif
Packit 0ba690
Packit 0ba690
#  ifndef PNG_IMPEXP
Packit 0ba690
Packit 0ba690
#     define PNG_EXPORT_TYPE1(type,symbol)  PNG_IMPEXP type PNGAPI symbol
Packit 0ba690
#     define PNG_EXPORT_TYPE2(type,symbol)  type PNG_IMPEXP PNGAPI symbol
Packit 0ba690
Packit 0ba690
      /* Borland/Microsoft */
Packit 0ba690
#     if defined(_MSC_VER) || defined(__BORLANDC__)
Packit 0ba690
#        if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
Packit 0ba690
#           define PNG_EXPORT PNG_EXPORT_TYPE1
Packit 0ba690
#        else
Packit 0ba690
#           define PNG_EXPORT PNG_EXPORT_TYPE2
Packit 0ba690
#           ifdef PNG_BUILD_DLL
Packit 0ba690
#              define PNG_IMPEXP __export
Packit 0ba690
#           else
Packit 0ba690
#              define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
Packit 0ba690
                                                 VC++ */
Packit 0ba690
#           endif                             /* Exists in Borland C++ for
Packit 0ba690
                                                 C++ classes (== huge) */
Packit 0ba690
#        endif
Packit 0ba690
#     endif
Packit 0ba690
Packit 0ba690
#     ifndef PNG_IMPEXP
Packit 0ba690
#        ifdef PNG_BUILD_DLL
Packit 0ba690
#           define PNG_IMPEXP __declspec(dllexport)
Packit 0ba690
#        else
Packit 0ba690
#           define PNG_IMPEXP __declspec(dllimport)
Packit 0ba690
#        endif
Packit 0ba690
#     endif
Packit 0ba690
#  endif  /* PNG_IMPEXP */
Packit 0ba690
#else /* !(DLL || non-cygwin WINDOWS) */
Packit 0ba690
#   if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
Packit 0ba690
#      ifndef PNGAPI
Packit 0ba690
#         define PNGAPI _System
Packit 0ba690
#      endif
Packit 0ba690
#   else
Packit 0ba690
#      if 0 /* ... other platforms, with other meanings */
Packit 0ba690
#      endif
Packit 0ba690
#   endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNGAPI
Packit 0ba690
#  define PNGAPI
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_IMPEXP
Packit 0ba690
#  define PNG_IMPEXP
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_BUILDSYMS
Packit 0ba690
#  ifndef PNG_EXPORT
Packit 0ba690
#    define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
Packit 0ba690
#  endif
Packit 0ba690
#  ifdef PNG_USE_GLOBAL_ARRAYS
Packit 0ba690
#    ifndef PNG_EXPORT_VAR
Packit 0ba690
#      define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
Packit 0ba690
#    endif
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifndef PNG_EXPORT
Packit 0ba690
#  define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_USE_GLOBAL_ARRAYS
Packit 0ba690
#  ifndef PNG_EXPORT_VAR
Packit 0ba690
#    define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_PEDANTIC_WARNINGS
Packit 0ba690
#  ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
Packit 0ba690
#    define PNG_PEDANTIC_WARNINGS_SUPPORTED
Packit 0ba690
#  endif
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
Packit 0ba690
/* Support for compiler specific function attributes.  These are used
Packit 0ba690
 * so that where compiler support is available incorrect use of API
Packit 0ba690
 * functions in png.h will generate compiler warnings.  Added at libpng
Packit 0ba690
 * version 1.2.41.
Packit 0ba690
 */
Packit 0ba690
#  ifdef __GNUC__
Packit 0ba690
#    ifndef PNG_USE_RESULT
Packit 0ba690
#      define PNG_USE_RESULT __attribute__((__warn_unused_result__))
Packit 0ba690
#    endif
Packit 0ba690
#    ifndef PNG_NORETURN
Packit 0ba690
#      define PNG_NORETURN   __attribute__((__noreturn__))
Packit 0ba690
#    endif
Packit 0ba690
#    ifndef PNG_ALLOCATED
Packit 0ba690
#      define PNG_ALLOCATED  __attribute__((__malloc__))
Packit 0ba690
#    endif
Packit 0ba690
Packit 0ba690
    /* This specifically protects structure members that should only be
Packit 0ba690
     * accessed from within the library, therefore should be empty during
Packit 0ba690
     * a library build.
Packit 0ba690
     */
Packit 0ba690
#    ifndef PNG_DEPRECATED
Packit 0ba690
#      define PNG_DEPRECATED __attribute__((__deprecated__))
Packit 0ba690
#    endif
Packit 0ba690
#    ifndef PNG_DEPSTRUCT
Packit 0ba690
#      define PNG_DEPSTRUCT  __attribute__((__deprecated__))
Packit 0ba690
#    endif
Packit 0ba690
#    ifndef PNG_PRIVATE
Packit 0ba690
#      if 0 /* Doesn't work so we use deprecated instead*/
Packit 0ba690
#        define PNG_PRIVATE \
Packit 0ba690
          __attribute__((warning("This function is not exported by libpng.")))
Packit 0ba690
#      else
Packit 0ba690
#        define PNG_PRIVATE \
Packit 0ba690
          __attribute__((__deprecated__))
Packit 0ba690
#      endif
Packit 0ba690
#    endif /* PNG_PRIVATE */
Packit 0ba690
#  endif /* __GNUC__ */
Packit 0ba690
#endif /* PNG_PEDANTIC_WARNINGS */
Packit 0ba690
Packit 0ba690
#ifndef PNG_DEPRECATED
Packit 0ba690
#  define PNG_DEPRECATED  /* Use of this function is deprecated */
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_USE_RESULT
Packit 0ba690
#  define PNG_USE_RESULT  /* The result of this function must be checked */
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_NORETURN
Packit 0ba690
#  define PNG_NORETURN    /* This function does not return */
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_ALLOCATED
Packit 0ba690
#  define PNG_ALLOCATED   /* The result of the function is new memory */
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_DEPSTRUCT
Packit 0ba690
#  define PNG_DEPSTRUCT   /* Access to this struct member is deprecated */
Packit 0ba690
#endif
Packit 0ba690
#ifndef PNG_PRIVATE
Packit 0ba690
#  define PNG_PRIVATE     /* This is a private libpng function */
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* User may want to use these so they are not in PNG_INTERNAL. Any library
Packit 0ba690
 * functions that are passed far data must be model independent.
Packit 0ba690
 */
Packit 0ba690
Packit 0ba690
#ifndef PNG_ABORT
Packit 0ba690
#  define PNG_ABORT() abort()
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef PNG_SETJMP_SUPPORTED
Packit 0ba690
#  define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
Packit 0ba690
#else
Packit 0ba690
#  define png_jmpbuf(png_ptr) \
Packit 0ba690
   (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
#ifdef USE_FAR_KEYWORD  /* memory model independent fns */
Packit 0ba690
/* Use this to make far-to-near assignments */
Packit 0ba690
#  define CHECK   1
Packit 0ba690
#  define NOCHECK 0
Packit 0ba690
#  define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
Packit 0ba690
#  define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
Packit 0ba690
#  define png_snprintf _fsnprintf   /* Added to v 1.2.19 */
Packit 0ba690
#  define png_strlen  _fstrlen
Packit 0ba690
#  define png_memcmp  _fmemcmp    /* SJT: added */
Packit 0ba690
#  define png_memcpy  _fmemcpy
Packit 0ba690
#  define png_memset  _fmemset
Packit 0ba690
#else /* Use the usual functions */
Packit 0ba690
#  define CVT_PTR(ptr)         (ptr)
Packit 0ba690
#  define CVT_PTR_NOCHECK(ptr) (ptr)
Packit 0ba690
#  ifndef PNG_NO_SNPRINTF
Packit 0ba690
#    ifdef _MSC_VER
Packit 0ba690
#      define png_snprintf _snprintf   /* Added to v 1.2.19 */
Packit 0ba690
#      define png_snprintf2 _snprintf
Packit 0ba690
#      define png_snprintf6 _snprintf
Packit 0ba690
#    else
Packit 0ba690
#      define png_snprintf snprintf   /* Added to v 1.2.19 */
Packit 0ba690
#      define png_snprintf2 snprintf
Packit 0ba690
#      define png_snprintf6 snprintf
Packit 0ba690
#    endif
Packit 0ba690
#  else
Packit 0ba690
     /* You don't have or don't want to use snprintf().  Caution: Using
Packit 0ba690
      * sprintf instead of snprintf exposes your application to accidental
Packit 0ba690
      * or malevolent buffer overflows.  If you don't have snprintf()
Packit 0ba690
      * as a general rule you should provide one (you can get one from
Packit 0ba690
      * Portable OpenSSH).
Packit 0ba690
      */
Packit 0ba690
#    define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
Packit 0ba690
#    define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
Packit 0ba690
#    define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
Packit 0ba690
        sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
Packit 0ba690
#  endif
Packit 0ba690
#  define png_strlen  strlen
Packit 0ba690
#  define png_memcmp  memcmp      /* SJT: added */
Packit 0ba690
#  define png_memcpy  memcpy
Packit 0ba690
#  define png_memset  memset
Packit 0ba690
#endif
Packit 0ba690
/* End of memory model independent support */
Packit 0ba690
Packit 0ba690
/* Just a little check that someone hasn't tried to define something
Packit 0ba690
 * contradictory.
Packit 0ba690
 */
Packit 0ba690
#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
Packit 0ba690
#  undef PNG_ZBUF_SIZE
Packit 0ba690
#  define PNG_ZBUF_SIZE 65536L
Packit 0ba690
#endif
Packit 0ba690
Packit 0ba690
/* Added at libpng-1.2.8 */
Packit 0ba690
#endif /* PNG_VERSION_INFO_ONLY */
Packit 0ba690
Packit 0ba690
#endif /* PNGCONF_H */