dbf-halloween2015
diff libs/libpng/pngconf.h @ 1:c3f5c32cb210
barfed all the libraries in the source tree to make porting easier
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 01 Nov 2015 00:36:56 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/libpng/pngconf.h Sun Nov 01 00:36:56 2015 +0200 1.3 @@ -0,0 +1,1481 @@ 1.4 + 1.5 +/* pngconf.h - machine configurable file for libpng 1.6 + * 1.7 + * libpng version 1.2.33 - October 31, 2008 1.8 + * For conditions of distribution and use, see copyright notice in png.h 1.9 + * Copyright (c) 1998-2008 Glenn Randers-Pehrson 1.10 + * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 1.11 + * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) 1.12 + */ 1.13 + 1.14 +/* Any machine specific code is near the front of this file, so if you 1.15 + * are configuring libpng for a machine, you may want to read the section 1.16 + * starting here down to where it starts to typedef png_color, png_text, 1.17 + * and png_info. 1.18 + */ 1.19 + 1.20 +#ifndef PNGCONF_H 1.21 +#define PNGCONF_H 1.22 + 1.23 +#define PNG_1_2_X 1.24 + 1.25 +/* 1.26 + * PNG_USER_CONFIG has to be defined on the compiler command line. This 1.27 + * includes the resource compiler for Windows DLL configurations. 1.28 + */ 1.29 +#ifdef PNG_USER_CONFIG 1.30 +# ifndef PNG_USER_PRIVATEBUILD 1.31 +# define PNG_USER_PRIVATEBUILD 1.32 +# endif 1.33 +#include "pngusr.h" 1.34 +#endif 1.35 + 1.36 +/* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */ 1.37 +#ifdef PNG_CONFIGURE_LIBPNG 1.38 +#ifdef HAVE_CONFIG_H 1.39 +#include "config.h" 1.40 +#endif 1.41 +#endif 1.42 + 1.43 +/* 1.44 + * Added at libpng-1.2.8 1.45 + * 1.46 + * If you create a private DLL you need to define in "pngusr.h" the followings: 1.47 + * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of 1.48 + * the DLL was built> 1.49 + * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons." 1.50 + * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to 1.51 + * distinguish your DLL from those of the official release. These 1.52 + * correspond to the trailing letters that come after the version 1.53 + * number and must match your private DLL name> 1.54 + * e.g. // private DLL "libpng13gx.dll" 1.55 + * #define PNG_USER_DLLFNAME_POSTFIX "gx" 1.56 + * 1.57 + * The following macros are also at your disposal if you want to complete the 1.58 + * DLL VERSIONINFO structure. 1.59 + * - PNG_USER_VERSIONINFO_COMMENTS 1.60 + * - PNG_USER_VERSIONINFO_COMPANYNAME 1.61 + * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS 1.62 + */ 1.63 + 1.64 +#ifdef __STDC__ 1.65 +#ifdef SPECIALBUILD 1.66 +# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\ 1.67 + are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.") 1.68 +#endif 1.69 + 1.70 +#ifdef PRIVATEBUILD 1.71 +# pragma message("PRIVATEBUILD is deprecated.\ 1.72 + Use PNG_USER_PRIVATEBUILD instead.") 1.73 +# define PNG_USER_PRIVATEBUILD PRIVATEBUILD 1.74 +#endif 1.75 +#endif /* __STDC__ */ 1.76 + 1.77 +#ifndef PNG_VERSION_INFO_ONLY 1.78 + 1.79 +/* End of material added to libpng-1.2.8 */ 1.80 + 1.81 +/* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble 1.82 + Restored at libpng-1.2.21 */ 1.83 +#if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \ 1.84 + !defined(PNG_WARN_UNINITIALIZED_ROW) 1.85 +# define PNG_WARN_UNINITIALIZED_ROW 1 1.86 +#endif 1.87 +/* End of material added at libpng-1.2.19/1.2.21 */ 1.88 + 1.89 +/* This is the size of the compression buffer, and thus the size of 1.90 + * an IDAT chunk. Make this whatever size you feel is best for your 1.91 + * machine. One of these will be allocated per png_struct. When this 1.92 + * is full, it writes the data to the disk, and does some other 1.93 + * calculations. Making this an extremely small size will slow 1.94 + * the library down, but you may want to experiment to determine 1.95 + * where it becomes significant, if you are concerned with memory 1.96 + * usage. Note that zlib allocates at least 32Kb also. For readers, 1.97 + * this describes the size of the buffer available to read the data in. 1.98 + * Unless this gets smaller than the size of a row (compressed), 1.99 + * it should not make much difference how big this is. 1.100 + */ 1.101 + 1.102 +#ifndef PNG_ZBUF_SIZE 1.103 +# define PNG_ZBUF_SIZE 8192 1.104 +#endif 1.105 + 1.106 +/* Enable if you want a write-only libpng */ 1.107 + 1.108 +#ifndef PNG_NO_READ_SUPPORTED 1.109 +# define PNG_READ_SUPPORTED 1.110 +#endif 1.111 + 1.112 +/* Enable if you want a read-only libpng */ 1.113 + 1.114 +#ifndef PNG_NO_WRITE_SUPPORTED 1.115 +# define PNG_WRITE_SUPPORTED 1.116 +#endif 1.117 + 1.118 +/* Enabled by default in 1.2.0. You can disable this if you don't need to 1.119 + support PNGs that are embedded in MNG datastreams */ 1.120 +#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES) 1.121 +# ifndef PNG_MNG_FEATURES_SUPPORTED 1.122 +# define PNG_MNG_FEATURES_SUPPORTED 1.123 +# endif 1.124 +#endif 1.125 + 1.126 +#ifndef PNG_NO_FLOATING_POINT_SUPPORTED 1.127 +# ifndef PNG_FLOATING_POINT_SUPPORTED 1.128 +# define PNG_FLOATING_POINT_SUPPORTED 1.129 +# endif 1.130 +#endif 1.131 + 1.132 +/* If you are running on a machine where you cannot allocate more 1.133 + * than 64K of memory at once, uncomment this. While libpng will not 1.134 + * normally need that much memory in a chunk (unless you load up a very 1.135 + * large file), zlib needs to know how big of a chunk it can use, and 1.136 + * libpng thus makes sure to check any memory allocation to verify it 1.137 + * will fit into memory. 1.138 +#define PNG_MAX_MALLOC_64K 1.139 + */ 1.140 +#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) 1.141 +# define PNG_MAX_MALLOC_64K 1.142 +#endif 1.143 + 1.144 +/* Special munging to support doing things the 'cygwin' way: 1.145 + * 'Normal' png-on-win32 defines/defaults: 1.146 + * PNG_BUILD_DLL -- building dll 1.147 + * PNG_USE_DLL -- building an application, linking to dll 1.148 + * (no define) -- building static library, or building an 1.149 + * application and linking to the static lib 1.150 + * 'Cygwin' defines/defaults: 1.151 + * PNG_BUILD_DLL -- (ignored) building the dll 1.152 + * (no define) -- (ignored) building an application, linking to the dll 1.153 + * PNG_STATIC -- (ignored) building the static lib, or building an 1.154 + * application that links to the static lib. 1.155 + * ALL_STATIC -- (ignored) building various static libs, or building an 1.156 + * application that links to the static libs. 1.157 + * Thus, 1.158 + * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and 1.159 + * this bit of #ifdefs will define the 'correct' config variables based on 1.160 + * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but 1.161 + * unnecessary. 1.162 + * 1.163 + * Also, the precedence order is: 1.164 + * ALL_STATIC (since we can't #undef something outside our namespace) 1.165 + * PNG_BUILD_DLL 1.166 + * PNG_STATIC 1.167 + * (nothing) == PNG_USE_DLL 1.168 + * 1.169 + * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent 1.170 + * of auto-import in binutils, we no longer need to worry about 1.171 + * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore, 1.172 + * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes 1.173 + * to __declspec() stuff. However, we DO need to worry about 1.174 + * PNG_BUILD_DLL and PNG_STATIC because those change some defaults 1.175 + * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed. 1.176 + */ 1.177 +#if defined(__CYGWIN__) 1.178 +# if defined(ALL_STATIC) 1.179 +# if defined(PNG_BUILD_DLL) 1.180 +# undef PNG_BUILD_DLL 1.181 +# endif 1.182 +# if defined(PNG_USE_DLL) 1.183 +# undef PNG_USE_DLL 1.184 +# endif 1.185 +# if defined(PNG_DLL) 1.186 +# undef PNG_DLL 1.187 +# endif 1.188 +# if !defined(PNG_STATIC) 1.189 +# define PNG_STATIC 1.190 +# endif 1.191 +# else 1.192 +# if defined (PNG_BUILD_DLL) 1.193 +# if defined(PNG_STATIC) 1.194 +# undef PNG_STATIC 1.195 +# endif 1.196 +# if defined(PNG_USE_DLL) 1.197 +# undef PNG_USE_DLL 1.198 +# endif 1.199 +# if !defined(PNG_DLL) 1.200 +# define PNG_DLL 1.201 +# endif 1.202 +# else 1.203 +# if defined(PNG_STATIC) 1.204 +# if defined(PNG_USE_DLL) 1.205 +# undef PNG_USE_DLL 1.206 +# endif 1.207 +# if defined(PNG_DLL) 1.208 +# undef PNG_DLL 1.209 +# endif 1.210 +# else 1.211 +# if !defined(PNG_USE_DLL) 1.212 +# define PNG_USE_DLL 1.213 +# endif 1.214 +# if !defined(PNG_DLL) 1.215 +# define PNG_DLL 1.216 +# endif 1.217 +# endif 1.218 +# endif 1.219 +# endif 1.220 +#endif 1.221 + 1.222 +/* This protects us against compilers that run on a windowing system 1.223 + * and thus don't have or would rather us not use the stdio types: 1.224 + * stdin, stdout, and stderr. The only one currently used is stderr 1.225 + * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will 1.226 + * prevent these from being compiled and used. #defining PNG_NO_STDIO 1.227 + * will also prevent these, plus will prevent the entire set of stdio 1.228 + * macros and functions (FILE *, printf, etc.) from being compiled and used, 1.229 + * unless (PNG_DEBUG > 0) has been #defined. 1.230 + * 1.231 + * #define PNG_NO_CONSOLE_IO 1.232 + * #define PNG_NO_STDIO 1.233 + */ 1.234 + 1.235 +#if defined(_WIN32_WCE) 1.236 +# include <windows.h> 1.237 + /* Console I/O functions are not supported on WindowsCE */ 1.238 +# define PNG_NO_CONSOLE_IO 1.239 +# ifdef PNG_DEBUG 1.240 +# undef PNG_DEBUG 1.241 +# endif 1.242 +#endif 1.243 + 1.244 +#ifdef PNG_BUILD_DLL 1.245 +# ifndef PNG_CONSOLE_IO_SUPPORTED 1.246 +# ifndef PNG_NO_CONSOLE_IO 1.247 +# define PNG_NO_CONSOLE_IO 1.248 +# endif 1.249 +# endif 1.250 +#endif 1.251 + 1.252 +# ifdef PNG_NO_STDIO 1.253 +# ifndef PNG_NO_CONSOLE_IO 1.254 +# define PNG_NO_CONSOLE_IO 1.255 +# endif 1.256 +# ifdef PNG_DEBUG 1.257 +# if (PNG_DEBUG > 0) 1.258 +# include <stdio.h> 1.259 +# endif 1.260 +# endif 1.261 +# else 1.262 +# if !defined(_WIN32_WCE) 1.263 +/* "stdio.h" functions are not supported on WindowsCE */ 1.264 +# include <stdio.h> 1.265 +# endif 1.266 +# endif 1.267 + 1.268 +/* This macro protects us against machines that don't have function 1.269 + * prototypes (ie K&R style headers). If your compiler does not handle 1.270 + * function prototypes, define this macro and use the included ansi2knr. 1.271 + * I've always been able to use _NO_PROTO as the indicator, but you may 1.272 + * need to drag the empty declaration out in front of here, or change the 1.273 + * ifdef to suit your own needs. 1.274 + */ 1.275 +#ifndef PNGARG 1.276 + 1.277 +#ifdef OF /* zlib prototype munger */ 1.278 +# define PNGARG(arglist) OF(arglist) 1.279 +#else 1.280 + 1.281 +#ifdef _NO_PROTO 1.282 +# define PNGARG(arglist) () 1.283 +# ifndef PNG_TYPECAST_NULL 1.284 +# define PNG_TYPECAST_NULL 1.285 +# endif 1.286 +#else 1.287 +# define PNGARG(arglist) arglist 1.288 +#endif /* _NO_PROTO */ 1.289 + 1.290 + 1.291 +#endif /* OF */ 1.292 + 1.293 +#endif /* PNGARG */ 1.294 + 1.295 +/* Try to determine if we are compiling on a Mac. Note that testing for 1.296 + * just __MWERKS__ is not good enough, because the Codewarrior is now used 1.297 + * on non-Mac platforms. 1.298 + */ 1.299 +#ifndef MACOS 1.300 +# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \ 1.301 + defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC) 1.302 +# define MACOS 1.303 +# endif 1.304 +#endif 1.305 + 1.306 +/* enough people need this for various reasons to include it here */ 1.307 +#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE) 1.308 +# include <sys/types.h> 1.309 +#endif 1.310 + 1.311 +#if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED) 1.312 +# define PNG_SETJMP_SUPPORTED 1.313 +#endif 1.314 + 1.315 +#ifdef PNG_SETJMP_SUPPORTED 1.316 +/* This is an attempt to force a single setjmp behaviour on Linux. If 1.317 + * the X config stuff didn't define _BSD_SOURCE we wouldn't need this. 1.318 + */ 1.319 + 1.320 +# ifdef __linux__ 1.321 +# ifdef _BSD_SOURCE 1.322 +# define PNG_SAVE_BSD_SOURCE 1.323 +# undef _BSD_SOURCE 1.324 +# endif 1.325 +# ifdef _SETJMP_H 1.326 + /* If you encounter a compiler error here, see the explanation 1.327 + * near the end of INSTALL. 1.328 + */ 1.329 + __pngconf.h__ already includes setjmp.h; 1.330 + __dont__ include it again.; 1.331 +# endif 1.332 +# endif /* __linux__ */ 1.333 + 1.334 + /* include setjmp.h for error handling */ 1.335 +# include <setjmp.h> 1.336 + 1.337 +# ifdef __linux__ 1.338 +# ifdef PNG_SAVE_BSD_SOURCE 1.339 +# ifndef _BSD_SOURCE 1.340 +# define _BSD_SOURCE 1.341 +# endif 1.342 +# undef PNG_SAVE_BSD_SOURCE 1.343 +# endif 1.344 +# endif /* __linux__ */ 1.345 +#endif /* PNG_SETJMP_SUPPORTED */ 1.346 + 1.347 +#ifdef BSD 1.348 +# include <strings.h> 1.349 +#else 1.350 +# include <string.h> 1.351 +#endif 1.352 + 1.353 +/* Other defines for things like memory and the like can go here. */ 1.354 +#ifdef PNG_INTERNAL 1.355 + 1.356 +#include <stdlib.h> 1.357 + 1.358 +/* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which 1.359 + * aren't usually used outside the library (as far as I know), so it is 1.360 + * debatable if they should be exported at all. In the future, when it is 1.361 + * possible to have run-time registry of chunk-handling functions, some of 1.362 + * these will be made available again. 1.363 +#define PNG_EXTERN extern 1.364 + */ 1.365 +#define PNG_EXTERN 1.366 + 1.367 +/* Other defines specific to compilers can go here. Try to keep 1.368 + * them inside an appropriate ifdef/endif pair for portability. 1.369 + */ 1.370 + 1.371 +#if defined(PNG_FLOATING_POINT_SUPPORTED) 1.372 +# if defined(MACOS) 1.373 + /* We need to check that <math.h> hasn't already been included earlier 1.374 + * as it seems it doesn't agree with <fp.h>, yet we should really use 1.375 + * <fp.h> if possible. 1.376 + */ 1.377 +# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) 1.378 +# include <fp.h> 1.379 +# endif 1.380 +# else 1.381 +# include <math.h> 1.382 +# endif 1.383 +# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) 1.384 + /* Amiga SAS/C: We must include builtin FPU functions when compiling using 1.385 + * MATH=68881 1.386 + */ 1.387 +# include <m68881.h> 1.388 +# endif 1.389 +#endif 1.390 + 1.391 +/* Codewarrior on NT has linking problems without this. */ 1.392 +#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__) 1.393 +# define PNG_ALWAYS_EXTERN 1.394 +#endif 1.395 + 1.396 +/* This provides the non-ANSI (far) memory allocation routines. */ 1.397 +#if defined(__TURBOC__) && defined(__MSDOS__) 1.398 +# include <mem.h> 1.399 +# include <alloc.h> 1.400 +#endif 1.401 + 1.402 +/* I have no idea why is this necessary... */ 1.403 +#if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \ 1.404 + defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__)) 1.405 +# include <malloc.h> 1.406 +#endif 1.407 + 1.408 +/* This controls how fine the dithering gets. As this allocates 1.409 + * a largish chunk of memory (32K), those who are not as concerned 1.410 + * with dithering quality can decrease some or all of these. 1.411 + */ 1.412 +#ifndef PNG_DITHER_RED_BITS 1.413 +# define PNG_DITHER_RED_BITS 5 1.414 +#endif 1.415 +#ifndef PNG_DITHER_GREEN_BITS 1.416 +# define PNG_DITHER_GREEN_BITS 5 1.417 +#endif 1.418 +#ifndef PNG_DITHER_BLUE_BITS 1.419 +# define PNG_DITHER_BLUE_BITS 5 1.420 +#endif 1.421 + 1.422 +/* This controls how fine the gamma correction becomes when you 1.423 + * are only interested in 8 bits anyway. Increasing this value 1.424 + * results in more memory being used, and more pow() functions 1.425 + * being called to fill in the gamma tables. Don't set this value 1.426 + * less then 8, and even that may not work (I haven't tested it). 1.427 + */ 1.428 + 1.429 +#ifndef PNG_MAX_GAMMA_8 1.430 +# define PNG_MAX_GAMMA_8 11 1.431 +#endif 1.432 + 1.433 +/* This controls how much a difference in gamma we can tolerate before 1.434 + * we actually start doing gamma conversion. 1.435 + */ 1.436 +#ifndef PNG_GAMMA_THRESHOLD 1.437 +# define PNG_GAMMA_THRESHOLD 0.05 1.438 +#endif 1.439 + 1.440 +#endif /* PNG_INTERNAL */ 1.441 + 1.442 +/* The following uses const char * instead of char * for error 1.443 + * and warning message functions, so some compilers won't complain. 1.444 + * If you do not want to use const, define PNG_NO_CONST here. 1.445 + */ 1.446 + 1.447 +#ifndef PNG_NO_CONST 1.448 +# define PNG_CONST const 1.449 +#else 1.450 +# define PNG_CONST 1.451 +#endif 1.452 + 1.453 +/* The following defines give you the ability to remove code from the 1.454 + * library that you will not be using. I wish I could figure out how to 1.455 + * automate this, but I can't do that without making it seriously hard 1.456 + * on the users. So if you are not using an ability, change the #define 1.457 + * to and #undef, and that part of the library will not be compiled. If 1.458 + * your linker can't find a function, you may want to make sure the 1.459 + * ability is defined here. Some of these depend upon some others being 1.460 + * defined. I haven't figured out all the interactions here, so you may 1.461 + * have to experiment awhile to get everything to compile. If you are 1.462 + * creating or using a shared library, you probably shouldn't touch this, 1.463 + * as it will affect the size of the structures, and this will cause bad 1.464 + * things to happen if the library and/or application ever change. 1.465 + */ 1.466 + 1.467 +/* Any features you will not be using can be undef'ed here */ 1.468 + 1.469 +/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user 1.470 + * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS 1.471 + * on the compile line, then pick and choose which ones to define without 1.472 + * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED 1.473 + * if you only want to have a png-compliant reader/writer but don't need 1.474 + * any of the extra transformations. This saves about 80 kbytes in a 1.475 + * typical installation of the library. (PNG_NO_* form added in version 1.476 + * 1.0.1c, for consistency) 1.477 + */ 1.478 + 1.479 +/* The size of the png_text structure changed in libpng-1.0.6 when 1.480 + * iTXt support was added. iTXt support was turned off by default through 1.481 + * libpng-1.2.x, to support old apps that malloc the png_text structure 1.482 + * instead of calling png_set_text() and letting libpng malloc it. It 1.483 + * was turned on by default in libpng-1.3.0. 1.484 + */ 1.485 + 1.486 +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) 1.487 +# ifndef PNG_NO_iTXt_SUPPORTED 1.488 +# define PNG_NO_iTXt_SUPPORTED 1.489 +# endif 1.490 +# ifndef PNG_NO_READ_iTXt 1.491 +# define PNG_NO_READ_iTXt 1.492 +# endif 1.493 +# ifndef PNG_NO_WRITE_iTXt 1.494 +# define PNG_NO_WRITE_iTXt 1.495 +# endif 1.496 +#endif 1.497 + 1.498 +#if !defined(PNG_NO_iTXt_SUPPORTED) 1.499 +# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt) 1.500 +# define PNG_READ_iTXt 1.501 +# endif 1.502 +# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt) 1.503 +# define PNG_WRITE_iTXt 1.504 +# endif 1.505 +#endif 1.506 + 1.507 +/* The following support, added after version 1.0.0, can be turned off here en 1.508 + * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility 1.509 + * with old applications that require the length of png_struct and png_info 1.510 + * to remain unchanged. 1.511 + */ 1.512 + 1.513 +#ifdef PNG_LEGACY_SUPPORTED 1.514 +# define PNG_NO_FREE_ME 1.515 +# define PNG_NO_READ_UNKNOWN_CHUNKS 1.516 +# define PNG_NO_WRITE_UNKNOWN_CHUNKS 1.517 +# define PNG_NO_READ_USER_CHUNKS 1.518 +# define PNG_NO_READ_iCCP 1.519 +# define PNG_NO_WRITE_iCCP 1.520 +# define PNG_NO_READ_iTXt 1.521 +# define PNG_NO_WRITE_iTXt 1.522 +# define PNG_NO_READ_sCAL 1.523 +# define PNG_NO_WRITE_sCAL 1.524 +# define PNG_NO_READ_sPLT 1.525 +# define PNG_NO_WRITE_sPLT 1.526 +# define PNG_NO_INFO_IMAGE 1.527 +# define PNG_NO_READ_RGB_TO_GRAY 1.528 +# define PNG_NO_READ_USER_TRANSFORM 1.529 +# define PNG_NO_WRITE_USER_TRANSFORM 1.530 +# define PNG_NO_USER_MEM 1.531 +# define PNG_NO_READ_EMPTY_PLTE 1.532 +# define PNG_NO_MNG_FEATURES 1.533 +# define PNG_NO_FIXED_POINT_SUPPORTED 1.534 +#endif 1.535 + 1.536 +/* Ignore attempt to turn off both floating and fixed point support */ 1.537 +#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \ 1.538 + !defined(PNG_NO_FIXED_POINT_SUPPORTED) 1.539 +# define PNG_FIXED_POINT_SUPPORTED 1.540 +#endif 1.541 + 1.542 +#ifndef PNG_NO_FREE_ME 1.543 +# define PNG_FREE_ME_SUPPORTED 1.544 +#endif 1.545 + 1.546 +#if defined(PNG_READ_SUPPORTED) 1.547 + 1.548 +#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \ 1.549 + !defined(PNG_NO_READ_TRANSFORMS) 1.550 +# define PNG_READ_TRANSFORMS_SUPPORTED 1.551 +#endif 1.552 + 1.553 +#ifdef PNG_READ_TRANSFORMS_SUPPORTED 1.554 +# ifndef PNG_NO_READ_EXPAND 1.555 +# define PNG_READ_EXPAND_SUPPORTED 1.556 +# endif 1.557 +# ifndef PNG_NO_READ_SHIFT 1.558 +# define PNG_READ_SHIFT_SUPPORTED 1.559 +# endif 1.560 +# ifndef PNG_NO_READ_PACK 1.561 +# define PNG_READ_PACK_SUPPORTED 1.562 +# endif 1.563 +# ifndef PNG_NO_READ_BGR 1.564 +# define PNG_READ_BGR_SUPPORTED 1.565 +# endif 1.566 +# ifndef PNG_NO_READ_SWAP 1.567 +# define PNG_READ_SWAP_SUPPORTED 1.568 +# endif 1.569 +# ifndef PNG_NO_READ_PACKSWAP 1.570 +# define PNG_READ_PACKSWAP_SUPPORTED 1.571 +# endif 1.572 +# ifndef PNG_NO_READ_INVERT 1.573 +# define PNG_READ_INVERT_SUPPORTED 1.574 +# endif 1.575 +# ifndef PNG_NO_READ_DITHER 1.576 +# define PNG_READ_DITHER_SUPPORTED 1.577 +# endif 1.578 +# ifndef PNG_NO_READ_BACKGROUND 1.579 +# define PNG_READ_BACKGROUND_SUPPORTED 1.580 +# endif 1.581 +# ifndef PNG_NO_READ_16_TO_8 1.582 +# define PNG_READ_16_TO_8_SUPPORTED 1.583 +# endif 1.584 +# ifndef PNG_NO_READ_FILLER 1.585 +# define PNG_READ_FILLER_SUPPORTED 1.586 +# endif 1.587 +# ifndef PNG_NO_READ_GAMMA 1.588 +# define PNG_READ_GAMMA_SUPPORTED 1.589 +# endif 1.590 +# ifndef PNG_NO_READ_GRAY_TO_RGB 1.591 +# define PNG_READ_GRAY_TO_RGB_SUPPORTED 1.592 +# endif 1.593 +# ifndef PNG_NO_READ_SWAP_ALPHA 1.594 +# define PNG_READ_SWAP_ALPHA_SUPPORTED 1.595 +# endif 1.596 +# ifndef PNG_NO_READ_INVERT_ALPHA 1.597 +# define PNG_READ_INVERT_ALPHA_SUPPORTED 1.598 +# endif 1.599 +# ifndef PNG_NO_READ_STRIP_ALPHA 1.600 +# define PNG_READ_STRIP_ALPHA_SUPPORTED 1.601 +# endif 1.602 +# ifndef PNG_NO_READ_USER_TRANSFORM 1.603 +# define PNG_READ_USER_TRANSFORM_SUPPORTED 1.604 +# endif 1.605 +# ifndef PNG_NO_READ_RGB_TO_GRAY 1.606 +# define PNG_READ_RGB_TO_GRAY_SUPPORTED 1.607 +# endif 1.608 +#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ 1.609 + 1.610 +#if !defined(PNG_NO_PROGRESSIVE_READ) && \ 1.611 + !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive */ 1.612 +# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ 1.613 +#endif /* about interlacing capability! You'll */ 1.614 + /* still have interlacing unless you change the following line: */ 1.615 + 1.616 +#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */ 1.617 + 1.618 +#ifndef PNG_NO_READ_COMPOSITE_NODIV 1.619 +# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */ 1.620 +# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */ 1.621 +# endif 1.622 +#endif 1.623 + 1.624 +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) 1.625 +/* Deprecated, will be removed from version 2.0.0. 1.626 + Use PNG_MNG_FEATURES_SUPPORTED instead. */ 1.627 +#ifndef PNG_NO_READ_EMPTY_PLTE 1.628 +# define PNG_READ_EMPTY_PLTE_SUPPORTED 1.629 +#endif 1.630 +#endif 1.631 + 1.632 +#endif /* PNG_READ_SUPPORTED */ 1.633 + 1.634 +#if defined(PNG_WRITE_SUPPORTED) 1.635 + 1.636 +# if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \ 1.637 + !defined(PNG_NO_WRITE_TRANSFORMS) 1.638 +# define PNG_WRITE_TRANSFORMS_SUPPORTED 1.639 +#endif 1.640 + 1.641 +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED 1.642 +# ifndef PNG_NO_WRITE_SHIFT 1.643 +# define PNG_WRITE_SHIFT_SUPPORTED 1.644 +# endif 1.645 +# ifndef PNG_NO_WRITE_PACK 1.646 +# define PNG_WRITE_PACK_SUPPORTED 1.647 +# endif 1.648 +# ifndef PNG_NO_WRITE_BGR 1.649 +# define PNG_WRITE_BGR_SUPPORTED 1.650 +# endif 1.651 +# ifndef PNG_NO_WRITE_SWAP 1.652 +# define PNG_WRITE_SWAP_SUPPORTED 1.653 +# endif 1.654 +# ifndef PNG_NO_WRITE_PACKSWAP 1.655 +# define PNG_WRITE_PACKSWAP_SUPPORTED 1.656 +# endif 1.657 +# ifndef PNG_NO_WRITE_INVERT 1.658 +# define PNG_WRITE_INVERT_SUPPORTED 1.659 +# endif 1.660 +# ifndef PNG_NO_WRITE_FILLER 1.661 +# define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */ 1.662 +# endif 1.663 +# ifndef PNG_NO_WRITE_SWAP_ALPHA 1.664 +# define PNG_WRITE_SWAP_ALPHA_SUPPORTED 1.665 +# endif 1.666 +# ifndef PNG_NO_WRITE_INVERT_ALPHA 1.667 +# define PNG_WRITE_INVERT_ALPHA_SUPPORTED 1.668 +# endif 1.669 +# ifndef PNG_NO_WRITE_USER_TRANSFORM 1.670 +# define PNG_WRITE_USER_TRANSFORM_SUPPORTED 1.671 +# endif 1.672 +#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ 1.673 + 1.674 +#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \ 1.675 + !defined(PNG_WRITE_INTERLACING_SUPPORTED) 1.676 +#define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant 1.677 + encoders, but can cause trouble 1.678 + if left undefined */ 1.679 +#endif 1.680 + 1.681 +#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \ 1.682 + !defined(PNG_WRITE_WEIGHTED_FILTER) && \ 1.683 + defined(PNG_FLOATING_POINT_SUPPORTED) 1.684 +# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED 1.685 +#endif 1.686 + 1.687 +#ifndef PNG_NO_WRITE_FLUSH 1.688 +# define PNG_WRITE_FLUSH_SUPPORTED 1.689 +#endif 1.690 + 1.691 +#if defined(PNG_1_0_X) || defined (PNG_1_2_X) 1.692 +/* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */ 1.693 +#ifndef PNG_NO_WRITE_EMPTY_PLTE 1.694 +# define PNG_WRITE_EMPTY_PLTE_SUPPORTED 1.695 +#endif 1.696 +#endif 1.697 + 1.698 +#endif /* PNG_WRITE_SUPPORTED */ 1.699 + 1.700 +#ifndef PNG_1_0_X 1.701 +# ifndef PNG_NO_ERROR_NUMBERS 1.702 +# define PNG_ERROR_NUMBERS_SUPPORTED 1.703 +# endif 1.704 +#endif /* PNG_1_0_X */ 1.705 + 1.706 +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ 1.707 + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) 1.708 +# ifndef PNG_NO_USER_TRANSFORM_PTR 1.709 +# define PNG_USER_TRANSFORM_PTR_SUPPORTED 1.710 +# endif 1.711 +#endif 1.712 + 1.713 +#ifndef PNG_NO_STDIO 1.714 +# define PNG_TIME_RFC1123_SUPPORTED 1.715 +#endif 1.716 + 1.717 +/* This adds extra functions in pngget.c for accessing data from the 1.718 + * info pointer (added in version 0.99) 1.719 + * png_get_image_width() 1.720 + * png_get_image_height() 1.721 + * png_get_bit_depth() 1.722 + * png_get_color_type() 1.723 + * png_get_compression_type() 1.724 + * png_get_filter_type() 1.725 + * png_get_interlace_type() 1.726 + * png_get_pixel_aspect_ratio() 1.727 + * png_get_pixels_per_meter() 1.728 + * png_get_x_offset_pixels() 1.729 + * png_get_y_offset_pixels() 1.730 + * png_get_x_offset_microns() 1.731 + * png_get_y_offset_microns() 1.732 + */ 1.733 +#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED) 1.734 +# define PNG_EASY_ACCESS_SUPPORTED 1.735 +#endif 1.736 + 1.737 +/* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 1.738 + * and removed from version 1.2.20. The following will be removed 1.739 + * from libpng-1.4.0 1.740 +*/ 1.741 + 1.742 +#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE) 1.743 +# ifndef PNG_OPTIMIZED_CODE_SUPPORTED 1.744 +# define PNG_OPTIMIZED_CODE_SUPPORTED 1.745 +# endif 1.746 +#endif 1.747 + 1.748 +#if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE) 1.749 +# ifndef PNG_ASSEMBLER_CODE_SUPPORTED 1.750 +# define PNG_ASSEMBLER_CODE_SUPPORTED 1.751 +# endif 1.752 + 1.753 +# if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4) 1.754 + /* work around 64-bit gcc compiler bugs in gcc-3.x */ 1.755 +# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 1.756 +# define PNG_NO_MMX_CODE 1.757 +# endif 1.758 +# endif 1.759 + 1.760 +# if defined(__APPLE__) 1.761 +# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 1.762 +# define PNG_NO_MMX_CODE 1.763 +# endif 1.764 +# endif 1.765 + 1.766 +# if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh)) 1.767 +# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 1.768 +# define PNG_NO_MMX_CODE 1.769 +# endif 1.770 +# endif 1.771 + 1.772 +# if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 1.773 +# define PNG_MMX_CODE_SUPPORTED 1.774 +# endif 1.775 + 1.776 +#endif 1.777 +/* end of obsolete code to be removed from libpng-1.4.0 */ 1.778 + 1.779 +#if !defined(PNG_1_0_X) 1.780 +#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) 1.781 +# define PNG_USER_MEM_SUPPORTED 1.782 +#endif 1.783 +#endif /* PNG_1_0_X */ 1.784 + 1.785 +/* Added at libpng-1.2.6 */ 1.786 +#if !defined(PNG_1_0_X) 1.787 +#ifndef PNG_SET_USER_LIMITS_SUPPORTED 1.788 +#if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED) 1.789 +# define PNG_SET_USER_LIMITS_SUPPORTED 1.790 +#endif 1.791 +#endif 1.792 +#endif /* PNG_1_0_X */ 1.793 + 1.794 +/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGS no matter 1.795 + * how large, set these limits to 0x7fffffffL 1.796 + */ 1.797 +#ifndef PNG_USER_WIDTH_MAX 1.798 +# define PNG_USER_WIDTH_MAX 1000000L 1.799 +#endif 1.800 +#ifndef PNG_USER_HEIGHT_MAX 1.801 +# define PNG_USER_HEIGHT_MAX 1000000L 1.802 +#endif 1.803 + 1.804 +/* These are currently experimental features, define them if you want */ 1.805 + 1.806 +/* very little testing */ 1.807 +/* 1.808 +#ifdef PNG_READ_SUPPORTED 1.809 +# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED 1.810 +# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED 1.811 +# endif 1.812 +#endif 1.813 +*/ 1.814 + 1.815 +/* This is only for PowerPC big-endian and 680x0 systems */ 1.816 +/* some testing */ 1.817 +/* 1.818 +#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED 1.819 +# define PNG_READ_BIG_ENDIAN_SUPPORTED 1.820 +#endif 1.821 +*/ 1.822 + 1.823 +/* Buggy compilers (e.g., gcc 2.7.2.2) need this */ 1.824 +/* 1.825 +#define PNG_NO_POINTER_INDEXING 1.826 +*/ 1.827 + 1.828 +/* These functions are turned off by default, as they will be phased out. */ 1.829 +/* 1.830 +#define PNG_USELESS_TESTS_SUPPORTED 1.831 +#define PNG_CORRECT_PALETTE_SUPPORTED 1.832 +*/ 1.833 + 1.834 +/* Any chunks you are not interested in, you can undef here. The 1.835 + * ones that allocate memory may be expecially important (hIST, 1.836 + * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info 1.837 + * a bit smaller. 1.838 + */ 1.839 + 1.840 +#if defined(PNG_READ_SUPPORTED) && \ 1.841 + !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ 1.842 + !defined(PNG_NO_READ_ANCILLARY_CHUNKS) 1.843 +# define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED 1.844 +#endif 1.845 + 1.846 +#if defined(PNG_WRITE_SUPPORTED) && \ 1.847 + !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \ 1.848 + !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS) 1.849 +# define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED 1.850 +#endif 1.851 + 1.852 +#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED 1.853 + 1.854 +#ifdef PNG_NO_READ_TEXT 1.855 +# define PNG_NO_READ_iTXt 1.856 +# define PNG_NO_READ_tEXt 1.857 +# define PNG_NO_READ_zTXt 1.858 +#endif 1.859 +#ifndef PNG_NO_READ_bKGD 1.860 +# define PNG_READ_bKGD_SUPPORTED 1.861 +# define PNG_bKGD_SUPPORTED 1.862 +#endif 1.863 +#ifndef PNG_NO_READ_cHRM 1.864 +# define PNG_READ_cHRM_SUPPORTED 1.865 +# define PNG_cHRM_SUPPORTED 1.866 +#endif 1.867 +#ifndef PNG_NO_READ_gAMA 1.868 +# define PNG_READ_gAMA_SUPPORTED 1.869 +# define PNG_gAMA_SUPPORTED 1.870 +#endif 1.871 +#ifndef PNG_NO_READ_hIST 1.872 +# define PNG_READ_hIST_SUPPORTED 1.873 +# define PNG_hIST_SUPPORTED 1.874 +#endif 1.875 +#ifndef PNG_NO_READ_iCCP 1.876 +# define PNG_READ_iCCP_SUPPORTED 1.877 +# define PNG_iCCP_SUPPORTED 1.878 +#endif 1.879 +#ifndef PNG_NO_READ_iTXt 1.880 +# ifndef PNG_READ_iTXt_SUPPORTED 1.881 +# define PNG_READ_iTXt_SUPPORTED 1.882 +# endif 1.883 +# ifndef PNG_iTXt_SUPPORTED 1.884 +# define PNG_iTXt_SUPPORTED 1.885 +# endif 1.886 +#endif 1.887 +#ifndef PNG_NO_READ_oFFs 1.888 +# define PNG_READ_oFFs_SUPPORTED 1.889 +# define PNG_oFFs_SUPPORTED 1.890 +#endif 1.891 +#ifndef PNG_NO_READ_pCAL 1.892 +# define PNG_READ_pCAL_SUPPORTED 1.893 +# define PNG_pCAL_SUPPORTED 1.894 +#endif 1.895 +#ifndef PNG_NO_READ_sCAL 1.896 +# define PNG_READ_sCAL_SUPPORTED 1.897 +# define PNG_sCAL_SUPPORTED 1.898 +#endif 1.899 +#ifndef PNG_NO_READ_pHYs 1.900 +# define PNG_READ_pHYs_SUPPORTED 1.901 +# define PNG_pHYs_SUPPORTED 1.902 +#endif 1.903 +#ifndef PNG_NO_READ_sBIT 1.904 +# define PNG_READ_sBIT_SUPPORTED 1.905 +# define PNG_sBIT_SUPPORTED 1.906 +#endif 1.907 +#ifndef PNG_NO_READ_sPLT 1.908 +# define PNG_READ_sPLT_SUPPORTED 1.909 +# define PNG_sPLT_SUPPORTED 1.910 +#endif 1.911 +#ifndef PNG_NO_READ_sRGB 1.912 +# define PNG_READ_sRGB_SUPPORTED 1.913 +# define PNG_sRGB_SUPPORTED 1.914 +#endif 1.915 +#ifndef PNG_NO_READ_tEXt 1.916 +# define PNG_READ_tEXt_SUPPORTED 1.917 +# define PNG_tEXt_SUPPORTED 1.918 +#endif 1.919 +#ifndef PNG_NO_READ_tIME 1.920 +# define PNG_READ_tIME_SUPPORTED 1.921 +# define PNG_tIME_SUPPORTED 1.922 +#endif 1.923 +#ifndef PNG_NO_READ_tRNS 1.924 +# define PNG_READ_tRNS_SUPPORTED 1.925 +# define PNG_tRNS_SUPPORTED 1.926 +#endif 1.927 +#ifndef PNG_NO_READ_zTXt 1.928 +# define PNG_READ_zTXt_SUPPORTED 1.929 +# define PNG_zTXt_SUPPORTED 1.930 +#endif 1.931 +#ifndef PNG_NO_READ_UNKNOWN_CHUNKS 1.932 +# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED 1.933 +# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED 1.934 +# define PNG_UNKNOWN_CHUNKS_SUPPORTED 1.935 +# endif 1.936 +# ifndef PNG_NO_HANDLE_AS_UNKNOWN 1.937 +# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED 1.938 +# endif 1.939 +#endif 1.940 +#if !defined(PNG_NO_READ_USER_CHUNKS) && \ 1.941 + defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) 1.942 +# define PNG_READ_USER_CHUNKS_SUPPORTED 1.943 +# define PNG_USER_CHUNKS_SUPPORTED 1.944 +# ifdef PNG_NO_READ_UNKNOWN_CHUNKS 1.945 +# undef PNG_NO_READ_UNKNOWN_CHUNKS 1.946 +# endif 1.947 +# ifdef PNG_NO_HANDLE_AS_UNKNOWN 1.948 +# undef PNG_NO_HANDLE_AS_UNKNOWN 1.949 +# endif 1.950 +#endif 1.951 +#ifndef PNG_NO_READ_OPT_PLTE 1.952 +# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */ 1.953 +#endif /* optional PLTE chunk in RGB and RGBA images */ 1.954 +#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \ 1.955 + defined(PNG_READ_zTXt_SUPPORTED) 1.956 +# define PNG_READ_TEXT_SUPPORTED 1.957 +# define PNG_TEXT_SUPPORTED 1.958 +#endif 1.959 + 1.960 +#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ 1.961 + 1.962 +#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED 1.963 + 1.964 +#ifdef PNG_NO_WRITE_TEXT 1.965 +# define PNG_NO_WRITE_iTXt 1.966 +# define PNG_NO_WRITE_tEXt 1.967 +# define PNG_NO_WRITE_zTXt 1.968 +#endif 1.969 +#ifndef PNG_NO_WRITE_bKGD 1.970 +# define PNG_WRITE_bKGD_SUPPORTED 1.971 +# ifndef PNG_bKGD_SUPPORTED 1.972 +# define PNG_bKGD_SUPPORTED 1.973 +# endif 1.974 +#endif 1.975 +#ifndef PNG_NO_WRITE_cHRM 1.976 +# define PNG_WRITE_cHRM_SUPPORTED 1.977 +# ifndef PNG_cHRM_SUPPORTED 1.978 +# define PNG_cHRM_SUPPORTED 1.979 +# endif 1.980 +#endif 1.981 +#ifndef PNG_NO_WRITE_gAMA 1.982 +# define PNG_WRITE_gAMA_SUPPORTED 1.983 +# ifndef PNG_gAMA_SUPPORTED 1.984 +# define PNG_gAMA_SUPPORTED 1.985 +# endif 1.986 +#endif 1.987 +#ifndef PNG_NO_WRITE_hIST 1.988 +# define PNG_WRITE_hIST_SUPPORTED 1.989 +# ifndef PNG_hIST_SUPPORTED 1.990 +# define PNG_hIST_SUPPORTED 1.991 +# endif 1.992 +#endif 1.993 +#ifndef PNG_NO_WRITE_iCCP 1.994 +# define PNG_WRITE_iCCP_SUPPORTED 1.995 +# ifndef PNG_iCCP_SUPPORTED 1.996 +# define PNG_iCCP_SUPPORTED 1.997 +# endif 1.998 +#endif 1.999 +#ifndef PNG_NO_WRITE_iTXt 1.1000 +# ifndef PNG_WRITE_iTXt_SUPPORTED 1.1001 +# define PNG_WRITE_iTXt_SUPPORTED 1.1002 +# endif 1.1003 +# ifndef PNG_iTXt_SUPPORTED 1.1004 +# define PNG_iTXt_SUPPORTED 1.1005 +# endif 1.1006 +#endif 1.1007 +#ifndef PNG_NO_WRITE_oFFs 1.1008 +# define PNG_WRITE_oFFs_SUPPORTED 1.1009 +# ifndef PNG_oFFs_SUPPORTED 1.1010 +# define PNG_oFFs_SUPPORTED 1.1011 +# endif 1.1012 +#endif 1.1013 +#ifndef PNG_NO_WRITE_pCAL 1.1014 +# define PNG_WRITE_pCAL_SUPPORTED 1.1015 +# ifndef PNG_pCAL_SUPPORTED 1.1016 +# define PNG_pCAL_SUPPORTED 1.1017 +# endif 1.1018 +#endif 1.1019 +#ifndef PNG_NO_WRITE_sCAL 1.1020 +# define PNG_WRITE_sCAL_SUPPORTED 1.1021 +# ifndef PNG_sCAL_SUPPORTED 1.1022 +# define PNG_sCAL_SUPPORTED 1.1023 +# endif 1.1024 +#endif 1.1025 +#ifndef PNG_NO_WRITE_pHYs 1.1026 +# define PNG_WRITE_pHYs_SUPPORTED 1.1027 +# ifndef PNG_pHYs_SUPPORTED 1.1028 +# define PNG_pHYs_SUPPORTED 1.1029 +# endif 1.1030 +#endif 1.1031 +#ifndef PNG_NO_WRITE_sBIT 1.1032 +# define PNG_WRITE_sBIT_SUPPORTED 1.1033 +# ifndef PNG_sBIT_SUPPORTED 1.1034 +# define PNG_sBIT_SUPPORTED 1.1035 +# endif 1.1036 +#endif 1.1037 +#ifndef PNG_NO_WRITE_sPLT 1.1038 +# define PNG_WRITE_sPLT_SUPPORTED 1.1039 +# ifndef PNG_sPLT_SUPPORTED 1.1040 +# define PNG_sPLT_SUPPORTED 1.1041 +# endif 1.1042 +#endif 1.1043 +#ifndef PNG_NO_WRITE_sRGB 1.1044 +# define PNG_WRITE_sRGB_SUPPORTED 1.1045 +# ifndef PNG_sRGB_SUPPORTED 1.1046 +# define PNG_sRGB_SUPPORTED 1.1047 +# endif 1.1048 +#endif 1.1049 +#ifndef PNG_NO_WRITE_tEXt 1.1050 +# define PNG_WRITE_tEXt_SUPPORTED 1.1051 +# ifndef PNG_tEXt_SUPPORTED 1.1052 +# define PNG_tEXt_SUPPORTED 1.1053 +# endif 1.1054 +#endif 1.1055 +#ifndef PNG_NO_WRITE_tIME 1.1056 +# define PNG_WRITE_tIME_SUPPORTED 1.1057 +# ifndef PNG_tIME_SUPPORTED 1.1058 +# define PNG_tIME_SUPPORTED 1.1059 +# endif 1.1060 +#endif 1.1061 +#ifndef PNG_NO_WRITE_tRNS 1.1062 +# define PNG_WRITE_tRNS_SUPPORTED 1.1063 +# ifndef PNG_tRNS_SUPPORTED 1.1064 +# define PNG_tRNS_SUPPORTED 1.1065 +# endif 1.1066 +#endif 1.1067 +#ifndef PNG_NO_WRITE_zTXt 1.1068 +# define PNG_WRITE_zTXt_SUPPORTED 1.1069 +# ifndef PNG_zTXt_SUPPORTED 1.1070 +# define PNG_zTXt_SUPPORTED 1.1071 +# endif 1.1072 +#endif 1.1073 +#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS 1.1074 +# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED 1.1075 +# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED 1.1076 +# define PNG_UNKNOWN_CHUNKS_SUPPORTED 1.1077 +# endif 1.1078 +# ifndef PNG_NO_HANDLE_AS_UNKNOWN 1.1079 +# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED 1.1080 +# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED 1.1081 +# endif 1.1082 +# endif 1.1083 +#endif 1.1084 +#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ 1.1085 + defined(PNG_WRITE_zTXt_SUPPORTED) 1.1086 +# define PNG_WRITE_TEXT_SUPPORTED 1.1087 +# ifndef PNG_TEXT_SUPPORTED 1.1088 +# define PNG_TEXT_SUPPORTED 1.1089 +# endif 1.1090 +#endif 1.1091 + 1.1092 +#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ 1.1093 + 1.1094 +/* Turn this off to disable png_read_png() and 1.1095 + * png_write_png() and leave the row_pointers member 1.1096 + * out of the info structure. 1.1097 + */ 1.1098 +#ifndef PNG_NO_INFO_IMAGE 1.1099 +# define PNG_INFO_IMAGE_SUPPORTED 1.1100 +#endif 1.1101 + 1.1102 +/* need the time information for reading tIME chunks */ 1.1103 +#if defined(PNG_tIME_SUPPORTED) 1.1104 +# if !defined(_WIN32_WCE) 1.1105 + /* "time.h" functions are not supported on WindowsCE */ 1.1106 +# include <time.h> 1.1107 +# endif 1.1108 +#endif 1.1109 + 1.1110 +/* Some typedefs to get us started. These should be safe on most of the 1.1111 + * common platforms. The typedefs should be at least as large as the 1.1112 + * numbers suggest (a png_uint_32 must be at least 32 bits long), but they 1.1113 + * don't have to be exactly that size. Some compilers dislike passing 1.1114 + * unsigned shorts as function parameters, so you may be better off using 1.1115 + * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may 1.1116 + * want to have unsigned int for png_uint_32 instead of unsigned long. 1.1117 + */ 1.1118 + 1.1119 +typedef unsigned long png_uint_32; 1.1120 +typedef long png_int_32; 1.1121 +typedef unsigned short png_uint_16; 1.1122 +typedef short png_int_16; 1.1123 +typedef unsigned char png_byte; 1.1124 + 1.1125 +/* This is usually size_t. It is typedef'ed just in case you need it to 1.1126 + change (I'm not sure if you will or not, so I thought I'd be safe) */ 1.1127 +#ifdef PNG_SIZE_T 1.1128 + typedef PNG_SIZE_T png_size_t; 1.1129 +# define png_sizeof(x) png_convert_size(sizeof(x)) 1.1130 +#else 1.1131 + typedef size_t png_size_t; 1.1132 +# define png_sizeof(x) sizeof(x) 1.1133 +#endif 1.1134 + 1.1135 +/* The following is needed for medium model support. It cannot be in the 1.1136 + * PNG_INTERNAL section. Needs modification for other compilers besides 1.1137 + * MSC. Model independent support declares all arrays and pointers to be 1.1138 + * large using the far keyword. The zlib version used must also support 1.1139 + * model independent data. As of version zlib 1.0.4, the necessary changes 1.1140 + * have been made in zlib. The USE_FAR_KEYWORD define triggers other 1.1141 + * changes that are needed. (Tim Wegner) 1.1142 + */ 1.1143 + 1.1144 +/* Separate compiler dependencies (problem here is that zlib.h always 1.1145 + defines FAR. (SJT) */ 1.1146 +#ifdef __BORLANDC__ 1.1147 +# if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__) 1.1148 +# define LDATA 1 1.1149 +# else 1.1150 +# define LDATA 0 1.1151 +# endif 1.1152 + /* GRR: why is Cygwin in here? Cygwin is not Borland C... */ 1.1153 +# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__) 1.1154 +# define PNG_MAX_MALLOC_64K 1.1155 +# if (LDATA != 1) 1.1156 +# ifndef FAR 1.1157 +# define FAR __far 1.1158 +# endif 1.1159 +# define USE_FAR_KEYWORD 1.1160 +# endif /* LDATA != 1 */ 1.1161 + /* Possibly useful for moving data out of default segment. 1.1162 + * Uncomment it if you want. Could also define FARDATA as 1.1163 + * const if your compiler supports it. (SJT) 1.1164 +# define FARDATA FAR 1.1165 + */ 1.1166 +# endif /* __WIN32__, __FLAT__, __CYGWIN__ */ 1.1167 +#endif /* __BORLANDC__ */ 1.1168 + 1.1169 + 1.1170 +/* Suggest testing for specific compiler first before testing for 1.1171 + * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM, 1.1172 + * making reliance oncertain keywords suspect. (SJT) 1.1173 + */ 1.1174 + 1.1175 +/* MSC Medium model */ 1.1176 +#if defined(FAR) 1.1177 +# if defined(M_I86MM) 1.1178 +# define USE_FAR_KEYWORD 1.1179 +# define FARDATA FAR 1.1180 +# include <dos.h> 1.1181 +# endif 1.1182 +#endif 1.1183 + 1.1184 +/* SJT: default case */ 1.1185 +#ifndef FAR 1.1186 +# define FAR 1.1187 +#endif 1.1188 + 1.1189 +/* At this point FAR is always defined */ 1.1190 +#ifndef FARDATA 1.1191 +# define FARDATA 1.1192 +#endif 1.1193 + 1.1194 +/* Typedef for floating-point numbers that are converted 1.1195 + to fixed-point with a multiple of 100,000, e.g., int_gamma */ 1.1196 +typedef png_int_32 png_fixed_point; 1.1197 + 1.1198 +/* Add typedefs for pointers */ 1.1199 +typedef void FAR * png_voidp; 1.1200 +typedef png_byte FAR * png_bytep; 1.1201 +typedef png_uint_32 FAR * png_uint_32p; 1.1202 +typedef png_int_32 FAR * png_int_32p; 1.1203 +typedef png_uint_16 FAR * png_uint_16p; 1.1204 +typedef png_int_16 FAR * png_int_16p; 1.1205 +typedef PNG_CONST char FAR * png_const_charp; 1.1206 +typedef char FAR * png_charp; 1.1207 +typedef png_fixed_point FAR * png_fixed_point_p; 1.1208 + 1.1209 +#ifndef PNG_NO_STDIO 1.1210 +#if defined(_WIN32_WCE) 1.1211 +typedef HANDLE png_FILE_p; 1.1212 +#else 1.1213 +typedef FILE * png_FILE_p; 1.1214 +#endif 1.1215 +#endif 1.1216 + 1.1217 +#ifdef PNG_FLOATING_POINT_SUPPORTED 1.1218 +typedef double FAR * png_doublep; 1.1219 +#endif 1.1220 + 1.1221 +/* Pointers to pointers; i.e. arrays */ 1.1222 +typedef png_byte FAR * FAR * png_bytepp; 1.1223 +typedef png_uint_32 FAR * FAR * png_uint_32pp; 1.1224 +typedef png_int_32 FAR * FAR * png_int_32pp; 1.1225 +typedef png_uint_16 FAR * FAR * png_uint_16pp; 1.1226 +typedef png_int_16 FAR * FAR * png_int_16pp; 1.1227 +typedef PNG_CONST char FAR * FAR * png_const_charpp; 1.1228 +typedef char FAR * FAR * png_charpp; 1.1229 +typedef png_fixed_point FAR * FAR * png_fixed_point_pp; 1.1230 +#ifdef PNG_FLOATING_POINT_SUPPORTED 1.1231 +typedef double FAR * FAR * png_doublepp; 1.1232 +#endif 1.1233 + 1.1234 +/* Pointers to pointers to pointers; i.e., pointer to array */ 1.1235 +typedef char FAR * FAR * FAR * png_charppp; 1.1236 + 1.1237 +#if defined(PNG_1_0_X) || defined(PNG_1_2_X) 1.1238 +/* SPC - Is this stuff deprecated? */ 1.1239 +/* It'll be removed as of libpng-1.3.0 - GR-P */ 1.1240 +/* libpng typedefs for types in zlib. If zlib changes 1.1241 + * or another compression library is used, then change these. 1.1242 + * Eliminates need to change all the source files. 1.1243 + */ 1.1244 +typedef charf * png_zcharp; 1.1245 +typedef charf * FAR * png_zcharpp; 1.1246 +typedef z_stream FAR * png_zstreamp; 1.1247 +#endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */ 1.1248 + 1.1249 +/* 1.1250 + * Define PNG_BUILD_DLL if the module being built is a Windows 1.1251 + * LIBPNG DLL. 1.1252 + * 1.1253 + * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL. 1.1254 + * It is equivalent to Microsoft predefined macro _DLL that is 1.1255 + * automatically defined when you compile using the share 1.1256 + * version of the CRT (C Run-Time library) 1.1257 + * 1.1258 + * The cygwin mods make this behavior a little different: 1.1259 + * Define PNG_BUILD_DLL if you are building a dll for use with cygwin 1.1260 + * Define PNG_STATIC if you are building a static library for use with cygwin, 1.1261 + * -or- if you are building an application that you want to link to the 1.1262 + * static library. 1.1263 + * PNG_USE_DLL is defined by default (no user action needed) unless one of 1.1264 + * the other flags is defined. 1.1265 + */ 1.1266 + 1.1267 +#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL)) 1.1268 +# define PNG_DLL 1.1269 +#endif 1.1270 +/* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib. 1.1271 + * When building a static lib, default to no GLOBAL ARRAYS, but allow 1.1272 + * command-line override 1.1273 + */ 1.1274 +#if defined(__CYGWIN__) 1.1275 +# if !defined(PNG_STATIC) 1.1276 +# if defined(PNG_USE_GLOBAL_ARRAYS) 1.1277 +# undef PNG_USE_GLOBAL_ARRAYS 1.1278 +# endif 1.1279 +# if !defined(PNG_USE_LOCAL_ARRAYS) 1.1280 +# define PNG_USE_LOCAL_ARRAYS 1.1281 +# endif 1.1282 +# else 1.1283 +# if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS) 1.1284 +# if defined(PNG_USE_GLOBAL_ARRAYS) 1.1285 +# undef PNG_USE_GLOBAL_ARRAYS 1.1286 +# endif 1.1287 +# endif 1.1288 +# endif 1.1289 +# if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) 1.1290 +# define PNG_USE_LOCAL_ARRAYS 1.1291 +# endif 1.1292 +#endif 1.1293 + 1.1294 +/* Do not use global arrays (helps with building DLL's) 1.1295 + * They are no longer used in libpng itself, since version 1.0.5c, 1.1296 + * but might be required for some pre-1.0.5c applications. 1.1297 + */ 1.1298 +#if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) 1.1299 +# if defined(PNG_NO_GLOBAL_ARRAYS) || \ 1.1300 + (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER) 1.1301 +# define PNG_USE_LOCAL_ARRAYS 1.1302 +# else 1.1303 +# define PNG_USE_GLOBAL_ARRAYS 1.1304 +# endif 1.1305 +#endif 1.1306 + 1.1307 +#if defined(__CYGWIN__) 1.1308 +# undef PNGAPI 1.1309 +# define PNGAPI __cdecl 1.1310 +# undef PNG_IMPEXP 1.1311 +# define PNG_IMPEXP 1.1312 +#endif 1.1313 + 1.1314 +/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", 1.1315 + * you may get warnings regarding the linkage of png_zalloc and png_zfree. 1.1316 + * Don't ignore those warnings; you must also reset the default calling 1.1317 + * convention in your compiler to match your PNGAPI, and you must build 1.1318 + * zlib and your applications the same way you build libpng. 1.1319 + */ 1.1320 + 1.1321 +#if defined(__MINGW32__) && !defined(PNG_MODULEDEF) 1.1322 +# ifndef PNG_NO_MODULEDEF 1.1323 +# define PNG_NO_MODULEDEF 1.1324 +# endif 1.1325 +#endif 1.1326 + 1.1327 +#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF) 1.1328 +# define PNG_IMPEXP 1.1329 +#endif 1.1330 + 1.1331 +#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \ 1.1332 + (( defined(_Windows) || defined(_WINDOWS) || \ 1.1333 + defined(WIN32) || defined(_WIN32) || defined(__WIN32__) )) 1.1334 + 1.1335 +# ifndef PNGAPI 1.1336 +# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) 1.1337 +# define PNGAPI __cdecl 1.1338 +# else 1.1339 +# define PNGAPI _cdecl 1.1340 +# endif 1.1341 +# endif 1.1342 + 1.1343 +# if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \ 1.1344 + 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */) 1.1345 +# define PNG_IMPEXP 1.1346 +# endif 1.1347 + 1.1348 +# if !defined(PNG_IMPEXP) 1.1349 + 1.1350 +# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol 1.1351 +# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol 1.1352 + 1.1353 + /* Borland/Microsoft */ 1.1354 +# if defined(_MSC_VER) || defined(__BORLANDC__) 1.1355 +# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) 1.1356 +# define PNG_EXPORT PNG_EXPORT_TYPE1 1.1357 +# else 1.1358 +# define PNG_EXPORT PNG_EXPORT_TYPE2 1.1359 +# if defined(PNG_BUILD_DLL) 1.1360 +# define PNG_IMPEXP __export 1.1361 +# else 1.1362 +# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in 1.1363 + VC++ */ 1.1364 +# endif /* Exists in Borland C++ for 1.1365 + C++ classes (== huge) */ 1.1366 +# endif 1.1367 +# endif 1.1368 + 1.1369 +# if !defined(PNG_IMPEXP) 1.1370 +# if defined(PNG_BUILD_DLL) 1.1371 +# define PNG_IMPEXP __declspec(dllexport) 1.1372 +# else 1.1373 +# define PNG_IMPEXP __declspec(dllimport) 1.1374 +# endif 1.1375 +# endif 1.1376 +# endif /* PNG_IMPEXP */ 1.1377 +#else /* !(DLL || non-cygwin WINDOWS) */ 1.1378 +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) 1.1379 +# ifndef PNGAPI 1.1380 +# define PNGAPI _System 1.1381 +# endif 1.1382 +# else 1.1383 +# if 0 /* ... other platforms, with other meanings */ 1.1384 +# endif 1.1385 +# endif 1.1386 +#endif 1.1387 + 1.1388 +#ifndef PNGAPI 1.1389 +# define PNGAPI 1.1390 +#endif 1.1391 +#ifndef PNG_IMPEXP 1.1392 +# define PNG_IMPEXP 1.1393 +#endif 1.1394 + 1.1395 +#ifdef PNG_BUILDSYMS 1.1396 +# ifndef PNG_EXPORT 1.1397 +# define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END 1.1398 +# endif 1.1399 +# ifdef PNG_USE_GLOBAL_ARRAYS 1.1400 +# ifndef PNG_EXPORT_VAR 1.1401 +# define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT 1.1402 +# endif 1.1403 +# endif 1.1404 +#endif 1.1405 + 1.1406 +#ifndef PNG_EXPORT 1.1407 +# define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol 1.1408 +#endif 1.1409 + 1.1410 +#ifdef PNG_USE_GLOBAL_ARRAYS 1.1411 +# ifndef PNG_EXPORT_VAR 1.1412 +# define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type 1.1413 +# endif 1.1414 +#endif 1.1415 + 1.1416 +/* User may want to use these so they are not in PNG_INTERNAL. Any library 1.1417 + * functions that are passed far data must be model independent. 1.1418 + */ 1.1419 + 1.1420 +#ifndef PNG_ABORT 1.1421 +# define PNG_ABORT() abort() 1.1422 +#endif 1.1423 + 1.1424 +#ifdef PNG_SETJMP_SUPPORTED 1.1425 +# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) 1.1426 +#else 1.1427 +# define png_jmpbuf(png_ptr) \ 1.1428 + (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED) 1.1429 +#endif 1.1430 + 1.1431 +#if defined(USE_FAR_KEYWORD) /* memory model independent fns */ 1.1432 +/* use this to make far-to-near assignments */ 1.1433 +# define CHECK 1 1.1434 +# define NOCHECK 0 1.1435 +# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) 1.1436 +# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) 1.1437 +# define png_snprintf _fsnprintf /* Added to v 1.2.19 */ 1.1438 +# define png_strlen _fstrlen 1.1439 +# define png_memcmp _fmemcmp /* SJT: added */ 1.1440 +# define png_memcpy _fmemcpy 1.1441 +# define png_memset _fmemset 1.1442 +#else /* use the usual functions */ 1.1443 +# define CVT_PTR(ptr) (ptr) 1.1444 +# define CVT_PTR_NOCHECK(ptr) (ptr) 1.1445 +# ifndef PNG_NO_SNPRINTF 1.1446 +# ifdef _MSC_VER 1.1447 +# define png_snprintf _snprintf /* Added to v 1.2.19 */ 1.1448 +# define png_snprintf2 _snprintf 1.1449 +# define png_snprintf6 _snprintf 1.1450 +# else 1.1451 +# define png_snprintf snprintf /* Added to v 1.2.19 */ 1.1452 +# define png_snprintf2 snprintf 1.1453 +# define png_snprintf6 snprintf 1.1454 +# endif 1.1455 +# else 1.1456 + /* You don't have or don't want to use snprintf(). Caution: Using 1.1457 + * sprintf instead of snprintf exposes your application to accidental 1.1458 + * or malevolent buffer overflows. If you don't have snprintf() 1.1459 + * as a general rule you should provide one (you can get one from 1.1460 + * Portable OpenSSH). */ 1.1461 +# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) 1.1462 +# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2) 1.1463 +# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ 1.1464 + sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) 1.1465 +# endif 1.1466 +# define png_strlen strlen 1.1467 +# define png_memcmp memcmp /* SJT: added */ 1.1468 +# define png_memcpy memcpy 1.1469 +# define png_memset memset 1.1470 +#endif 1.1471 +/* End of memory model independent support */ 1.1472 + 1.1473 +/* Just a little check that someone hasn't tried to define something 1.1474 + * contradictory. 1.1475 + */ 1.1476 +#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) 1.1477 +# undef PNG_ZBUF_SIZE 1.1478 +# define PNG_ZBUF_SIZE 65536L 1.1479 +#endif 1.1480 + 1.1481 +/* Added at libpng-1.2.8 */ 1.1482 +#endif /* PNG_VERSION_INFO_ONLY */ 1.1483 + 1.1484 +#endif /* PNGCONF_H */