/src/compiler/android/jni/ftk/pngconf.h

http://ftk.googlecode.com/ · C Header · 1669 lines · 1093 code · 178 blank · 398 comment · 125 complexity · 0faf1ae5185a0de69c9cefa622b5df06 MD5 · raw file

  1. /* pngconf.h - machine configurable file for libpng
  2. *
  3. * libpng version 1.2.44 - June 26, 2010
  4. * Copyright (c) 1998-2010 Glenn Randers-Pehrson
  5. * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
  6. * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
  7. *
  8. * This code is released under the libpng license.
  9. * For conditions of distribution and use, see the disclaimer
  10. * and license in png.h
  11. */
  12. /* Any machine specific code is near the front of this file, so if you
  13. * are configuring libpng for a machine, you may want to read the section
  14. * starting here down to where it starts to typedef png_color, png_text,
  15. * and png_info.
  16. */
  17. #ifndef PNGCONF_H
  18. #define PNGCONF_H
  19. #define PNG_1_2_X
  20. #ifndef PNG_NO_INDEX_SUPPORTED
  21. # define PNG_INDEX_SUPPORTED
  22. #endif
  23. /*
  24. * PNG_USER_CONFIG has to be defined on the compiler command line. This
  25. * includes the resource compiler for Windows DLL configurations.
  26. */
  27. #ifdef PNG_USER_CONFIG
  28. # ifndef PNG_USER_PRIVATEBUILD
  29. # define PNG_USER_PRIVATEBUILD
  30. # endif
  31. #include "pngusr.h"
  32. #endif
  33. /* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
  34. #ifdef PNG_CONFIGURE_LIBPNG
  35. #ifdef HAVE_CONFIG_H
  36. #include "config.h"
  37. #endif
  38. #endif
  39. /*
  40. * Added at libpng-1.2.8
  41. *
  42. * If you create a private DLL you need to define in "pngusr.h" the followings:
  43. * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
  44. * the DLL was built>
  45. * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
  46. * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to
  47. * distinguish your DLL from those of the official release. These
  48. * correspond to the trailing letters that come after the version
  49. * number and must match your private DLL name>
  50. * e.g. // private DLL "libpng13gx.dll"
  51. * #define PNG_USER_DLLFNAME_POSTFIX "gx"
  52. *
  53. * The following macros are also at your disposal if you want to complete the
  54. * DLL VERSIONINFO structure.
  55. * - PNG_USER_VERSIONINFO_COMMENTS
  56. * - PNG_USER_VERSIONINFO_COMPANYNAME
  57. * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
  58. */
  59. #ifdef __STDC__
  60. #ifdef SPECIALBUILD
  61. # pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
  62. are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
  63. #endif
  64. #ifdef PRIVATEBUILD
  65. # pragma message("PRIVATEBUILD is deprecated.\
  66. Use PNG_USER_PRIVATEBUILD instead.")
  67. # define PNG_USER_PRIVATEBUILD PRIVATEBUILD
  68. #endif
  69. #endif /* __STDC__ */
  70. #ifndef PNG_VERSION_INFO_ONLY
  71. /* End of material added to libpng-1.2.8 */
  72. /* Added at libpng-1.2.19, removed at libpng-1.2.20 because it caused trouble
  73. Restored at libpng-1.2.21 */
  74. #if !defined(PNG_NO_WARN_UNINITIALIZED_ROW) && \
  75. !defined(PNG_WARN_UNINITIALIZED_ROW)
  76. # define PNG_WARN_UNINITIALIZED_ROW 1
  77. #endif
  78. /* End of material added at libpng-1.2.19/1.2.21 */
  79. /* This is the size of the compression buffer, and thus the size of
  80. * an IDAT chunk. Make this whatever size you feel is best for your
  81. * machine. One of these will be allocated per png_struct. When this
  82. * is full, it writes the data to the disk, and does some other
  83. * calculations. Making this an extremely small size will slow
  84. * the library down, but you may want to experiment to determine
  85. * where it becomes significant, if you are concerned with memory
  86. * usage. Note that zlib allocates at least 32Kb also. For readers,
  87. * this describes the size of the buffer available to read the data in.
  88. * Unless this gets smaller than the size of a row (compressed),
  89. * it should not make much difference how big this is.
  90. */
  91. #ifndef PNG_ZBUF_SIZE
  92. # define PNG_ZBUF_SIZE 8192
  93. #endif
  94. /* Enable if you want a write-only libpng */
  95. #ifndef PNG_NO_READ_SUPPORTED
  96. # define PNG_READ_SUPPORTED
  97. #endif
  98. /* Enable if you want a read-only libpng */
  99. #ifndef PNG_NO_WRITE_SUPPORTED
  100. # define PNG_WRITE_SUPPORTED
  101. #endif
  102. /* Enabled in 1.2.41. */
  103. #ifdef PNG_ALLOW_BENIGN_ERRORS
  104. # define png_benign_error png_warning
  105. # define png_chunk_benign_error png_chunk_warning
  106. #else
  107. # ifndef PNG_BENIGN_ERRORS_SUPPORTED
  108. # define png_benign_error png_error
  109. # define png_chunk_benign_error png_chunk_error
  110. # endif
  111. #endif
  112. /* Added in libpng-1.2.41 */
  113. #if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED)
  114. # define PNG_WARNINGS_SUPPORTED
  115. #endif
  116. #if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED)
  117. # define PNG_ERROR_TEXT_SUPPORTED
  118. #endif
  119. #if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED)
  120. # define PNG_CHECK_cHRM_SUPPORTED
  121. #endif
  122. /* Enabled by default in 1.2.0. You can disable this if you don't need to
  123. * support PNGs that are embedded in MNG datastreams
  124. */
  125. #if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
  126. # ifndef PNG_MNG_FEATURES_SUPPORTED
  127. # define PNG_MNG_FEATURES_SUPPORTED
  128. # endif
  129. #endif
  130. #ifndef PNG_NO_FLOATING_POINT_SUPPORTED
  131. # ifndef PNG_FLOATING_POINT_SUPPORTED
  132. # define PNG_FLOATING_POINT_SUPPORTED
  133. # endif
  134. #endif
  135. /* If you are running on a machine where you cannot allocate more
  136. * than 64K of memory at once, uncomment this. While libpng will not
  137. * normally need that much memory in a chunk (unless you load up a very
  138. * large file), zlib needs to know how big of a chunk it can use, and
  139. * libpng thus makes sure to check any memory allocation to verify it
  140. * will fit into memory.
  141. #define PNG_MAX_MALLOC_64K
  142. */
  143. #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
  144. # define PNG_MAX_MALLOC_64K
  145. #endif
  146. /* Special munging to support doing things the 'cygwin' way:
  147. * 'Normal' png-on-win32 defines/defaults:
  148. * PNG_BUILD_DLL -- building dll
  149. * PNG_USE_DLL -- building an application, linking to dll
  150. * (no define) -- building static library, or building an
  151. * application and linking to the static lib
  152. * 'Cygwin' defines/defaults:
  153. * PNG_BUILD_DLL -- (ignored) building the dll
  154. * (no define) -- (ignored) building an application, linking to the dll
  155. * PNG_STATIC -- (ignored) building the static lib, or building an
  156. * application that links to the static lib.
  157. * ALL_STATIC -- (ignored) building various static libs, or building an
  158. * application that links to the static libs.
  159. * Thus,
  160. * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
  161. * this bit of #ifdefs will define the 'correct' config variables based on
  162. * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
  163. * unnecessary.
  164. *
  165. * Also, the precedence order is:
  166. * ALL_STATIC (since we can't #undef something outside our namespace)
  167. * PNG_BUILD_DLL
  168. * PNG_STATIC
  169. * (nothing) == PNG_USE_DLL
  170. *
  171. * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
  172. * of auto-import in binutils, we no longer need to worry about
  173. * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
  174. * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
  175. * to __declspec() stuff. However, we DO need to worry about
  176. * PNG_BUILD_DLL and PNG_STATIC because those change some defaults
  177. * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
  178. */
  179. #ifdef __CYGWIN__
  180. # ifdef ALL_STATIC
  181. # ifdef PNG_BUILD_DLL
  182. # undef PNG_BUILD_DLL
  183. # endif
  184. # ifdef PNG_USE_DLL
  185. # undef PNG_USE_DLL
  186. # endif
  187. # ifdef PNG_DLL
  188. # undef PNG_DLL
  189. # endif
  190. # ifndef PNG_STATIC
  191. # define PNG_STATIC
  192. # endif
  193. # else
  194. # ifdef PNG_BUILD_DLL
  195. # ifdef PNG_STATIC
  196. # undef PNG_STATIC
  197. # endif
  198. # ifdef PNG_USE_DLL
  199. # undef PNG_USE_DLL
  200. # endif
  201. # ifndef PNG_DLL
  202. # define PNG_DLL
  203. # endif
  204. # else
  205. # ifdef PNG_STATIC
  206. # ifdef PNG_USE_DLL
  207. # undef PNG_USE_DLL
  208. # endif
  209. # ifdef PNG_DLL
  210. # undef PNG_DLL
  211. # endif
  212. # else
  213. # ifndef PNG_USE_DLL
  214. # define PNG_USE_DLL
  215. # endif
  216. # ifndef PNG_DLL
  217. # define PNG_DLL
  218. # endif
  219. # endif
  220. # endif
  221. # endif
  222. #endif
  223. /* This protects us against compilers that run on a windowing system
  224. * and thus don't have or would rather us not use the stdio types:
  225. * stdin, stdout, and stderr. The only one currently used is stderr
  226. * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will
  227. * prevent these from being compiled and used. #defining PNG_NO_STDIO
  228. * will also prevent these, plus will prevent the entire set of stdio
  229. * macros and functions (FILE *, printf, etc.) from being compiled and used,
  230. * unless (PNG_DEBUG > 0) has been #defined.
  231. *
  232. * #define PNG_NO_CONSOLE_IO
  233. * #define PNG_NO_STDIO
  234. */
  235. #if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED)
  236. # define PNG_STDIO_SUPPORTED
  237. #endif
  238. #ifdef _WIN32_WCE
  239. # include <windows.h>
  240. /* Console I/O functions are not supported on WindowsCE */
  241. # define PNG_NO_CONSOLE_IO
  242. /* abort() may not be supported on some/all Windows CE platforms */
  243. # define PNG_ABORT() exit(-1)
  244. # ifdef PNG_DEBUG
  245. # undef PNG_DEBUG
  246. # endif
  247. #endif
  248. #ifdef PNG_BUILD_DLL
  249. # ifndef PNG_CONSOLE_IO_SUPPORTED
  250. # ifndef PNG_NO_CONSOLE_IO
  251. # define PNG_NO_CONSOLE_IO
  252. # endif
  253. # endif
  254. #endif
  255. # ifdef PNG_NO_STDIO
  256. # ifndef PNG_NO_CONSOLE_IO
  257. # define PNG_NO_CONSOLE_IO
  258. # endif
  259. # ifdef PNG_DEBUG
  260. # if (PNG_DEBUG > 0)
  261. # include <stdio.h>
  262. # endif
  263. # endif
  264. # else
  265. # ifndef _WIN32_WCE
  266. /* "stdio.h" functions are not supported on WindowsCE */
  267. # include <stdio.h>
  268. # endif
  269. # endif
  270. #if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED)
  271. # define PNG_CONSOLE_IO_SUPPORTED
  272. #endif
  273. /* This macro protects us against machines that don't have function
  274. * prototypes (ie K&R style headers). If your compiler does not handle
  275. * function prototypes, define this macro and use the included ansi2knr.
  276. * I've always been able to use _NO_PROTO as the indicator, but you may
  277. * need to drag the empty declaration out in front of here, or change the
  278. * ifdef to suit your own needs.
  279. */
  280. #ifndef PNGARG
  281. #ifdef OF /* zlib prototype munger */
  282. # define PNGARG(arglist) OF(arglist)
  283. #else
  284. #ifdef _NO_PROTO
  285. # define PNGARG(arglist) ()
  286. # ifndef PNG_TYPECAST_NULL
  287. # define PNG_TYPECAST_NULL
  288. # endif
  289. #else
  290. # define PNGARG(arglist) arglist
  291. #endif /* _NO_PROTO */
  292. #endif /* OF */
  293. #endif /* PNGARG */
  294. /* Try to determine if we are compiling on a Mac. Note that testing for
  295. * just __MWERKS__ is not good enough, because the Codewarrior is now used
  296. * on non-Mac platforms.
  297. */
  298. #ifndef MACOS
  299. # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
  300. defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
  301. # define MACOS
  302. # endif
  303. #endif
  304. /* enough people need this for various reasons to include it here */
  305. #if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
  306. # include <sys/types.h>
  307. #endif
  308. #if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
  309. # define PNG_SETJMP_SUPPORTED
  310. #endif
  311. #ifdef PNG_SETJMP_SUPPORTED
  312. /* This is an attempt to force a single setjmp behaviour on Linux. If
  313. * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
  314. *
  315. * You can bypass this test if you know that your application uses exactly
  316. * the same setjmp.h that was included when libpng was built. Only define
  317. * PNG_SKIP_SETJMP_CHECK while building your application, prior to the
  318. * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK
  319. * while building a separate libpng library for general use.
  320. */
  321. # ifndef PNG_SKIP_SETJMP_CHECK
  322. # ifdef __linux__
  323. # ifdef _BSD_SOURCE
  324. # define PNG_SAVE_BSD_SOURCE
  325. # undef _BSD_SOURCE
  326. # endif
  327. # ifdef _SETJMP_H
  328. /* If you encounter a compiler error here, see the explanation
  329. * near the end of INSTALL.
  330. */
  331. __pngconf.h__ in libpng already includes setjmp.h;
  332. __dont__ include it again.;
  333. # endif
  334. # endif /* __linux__ */
  335. # endif /* PNG_SKIP_SETJMP_CHECK */
  336. /* include setjmp.h for error handling */
  337. # include <setjmp.h>
  338. # ifdef __linux__
  339. # ifdef PNG_SAVE_BSD_SOURCE
  340. # ifndef _BSD_SOURCE
  341. # define _BSD_SOURCE
  342. # endif
  343. # undef PNG_SAVE_BSD_SOURCE
  344. # endif
  345. # endif /* __linux__ */
  346. #endif /* PNG_SETJMP_SUPPORTED */
  347. #ifdef BSD
  348. # include <strings.h>
  349. #else
  350. # include <string.h>
  351. #endif
  352. /* Other defines for things like memory and the like can go here. */
  353. #ifdef PNG_INTERNAL
  354. #include <stdlib.h>
  355. /* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
  356. * aren't usually used outside the library (as far as I know), so it is
  357. * debatable if they should be exported at all. In the future, when it is
  358. * possible to have run-time registry of chunk-handling functions, some of
  359. * these will be made available again.
  360. #define PNG_EXTERN extern
  361. */
  362. #define PNG_EXTERN
  363. /* Other defines specific to compilers can go here. Try to keep
  364. * them inside an appropriate ifdef/endif pair for portability.
  365. */
  366. #ifdef PNG_FLOATING_POINT_SUPPORTED
  367. # ifdef MACOS
  368. /* We need to check that <math.h> hasn't already been included earlier
  369. * as it seems it doesn't agree with <fp.h>, yet we should really use
  370. * <fp.h> if possible.
  371. */
  372. # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
  373. # include <fp.h>
  374. # endif
  375. # else
  376. # include <math.h>
  377. # endif
  378. # if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
  379. /* Amiga SAS/C: We must include builtin FPU functions when compiling using
  380. * MATH=68881
  381. */
  382. # include <m68881.h>
  383. # endif
  384. #endif
  385. /* Codewarrior on NT has linking problems without this. */
  386. #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
  387. # define PNG_ALWAYS_EXTERN
  388. #endif
  389. /* This provides the non-ANSI (far) memory allocation routines. */
  390. #if defined(__TURBOC__) && defined(__MSDOS__)
  391. # include <mem.h>
  392. # include <alloc.h>
  393. #endif
  394. /* I have no idea why is this necessary... */
  395. #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
  396. defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
  397. # include <malloc.h>
  398. #endif
  399. /* This controls how fine the dithering gets. As this allocates
  400. * a largish chunk of memory (32K), those who are not as concerned
  401. * with dithering quality can decrease some or all of these.
  402. */
  403. #ifndef PNG_DITHER_RED_BITS
  404. # define PNG_DITHER_RED_BITS 5
  405. #endif
  406. #ifndef PNG_DITHER_GREEN_BITS
  407. # define PNG_DITHER_GREEN_BITS 5
  408. #endif
  409. #ifndef PNG_DITHER_BLUE_BITS
  410. # define PNG_DITHER_BLUE_BITS 5
  411. #endif
  412. /* This controls how fine the gamma correction becomes when you
  413. * are only interested in 8 bits anyway. Increasing this value
  414. * results in more memory being used, and more pow() functions
  415. * being called to fill in the gamma tables. Don't set this value
  416. * less then 8, and even that may not work (I haven't tested it).
  417. */
  418. #ifndef PNG_MAX_GAMMA_8
  419. # define PNG_MAX_GAMMA_8 11
  420. #endif
  421. /* This controls how much a difference in gamma we can tolerate before
  422. * we actually start doing gamma conversion.
  423. */
  424. #ifndef PNG_GAMMA_THRESHOLD
  425. # define PNG_GAMMA_THRESHOLD 0.05
  426. #endif
  427. #endif /* PNG_INTERNAL */
  428. /* The following uses const char * instead of char * for error
  429. * and warning message functions, so some compilers won't complain.
  430. * If you do not want to use const, define PNG_NO_CONST here.
  431. */
  432. #ifndef PNG_NO_CONST
  433. # define PNG_CONST const
  434. #else
  435. # define PNG_CONST
  436. #endif
  437. /* The following defines give you the ability to remove code from the
  438. * library that you will not be using. I wish I could figure out how to
  439. * automate this, but I can't do that without making it seriously hard
  440. * on the users. So if you are not using an ability, change the #define
  441. * to and #undef, and that part of the library will not be compiled. If
  442. * your linker can't find a function, you may want to make sure the
  443. * ability is defined here. Some of these depend upon some others being
  444. * defined. I haven't figured out all the interactions here, so you may
  445. * have to experiment awhile to get everything to compile. If you are
  446. * creating or using a shared library, you probably shouldn't touch this,
  447. * as it will affect the size of the structures, and this will cause bad
  448. * things to happen if the library and/or application ever change.
  449. */
  450. /* Any features you will not be using can be undef'ed here */
  451. /* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
  452. * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
  453. * on the compile line, then pick and choose which ones to define without
  454. * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
  455. * if you only want to have a png-compliant reader/writer but don't need
  456. * any of the extra transformations. This saves about 80 kbytes in a
  457. * typical installation of the library. (PNG_NO_* form added in version
  458. * 1.0.1c, for consistency)
  459. */
  460. /* The size of the png_text structure changed in libpng-1.0.6 when
  461. * iTXt support was added. iTXt support was turned off by default through
  462. * libpng-1.2.x, to support old apps that malloc the png_text structure
  463. * instead of calling png_set_text() and letting libpng malloc it. It
  464. * will be turned on by default in libpng-1.4.0.
  465. */
  466. #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
  467. # ifndef PNG_NO_iTXt_SUPPORTED
  468. # define PNG_NO_iTXt_SUPPORTED
  469. # endif
  470. # ifndef PNG_NO_READ_iTXt
  471. # define PNG_NO_READ_iTXt
  472. # endif
  473. # ifndef PNG_NO_WRITE_iTXt
  474. # define PNG_NO_WRITE_iTXt
  475. # endif
  476. #endif
  477. #if !defined(PNG_NO_iTXt_SUPPORTED)
  478. # if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
  479. # define PNG_READ_iTXt
  480. # endif
  481. # if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
  482. # define PNG_WRITE_iTXt
  483. # endif
  484. #endif
  485. /* The following support, added after version 1.0.0, can be turned off here en
  486. * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
  487. * with old applications that require the length of png_struct and png_info
  488. * to remain unchanged.
  489. */
  490. #ifdef PNG_LEGACY_SUPPORTED
  491. # define PNG_NO_FREE_ME
  492. # define PNG_NO_READ_UNKNOWN_CHUNKS
  493. # define PNG_NO_WRITE_UNKNOWN_CHUNKS
  494. # define PNG_NO_HANDLE_AS_UNKNOWN
  495. # define PNG_NO_READ_USER_CHUNKS
  496. # define PNG_NO_READ_iCCP
  497. # define PNG_NO_WRITE_iCCP
  498. # define PNG_NO_READ_iTXt
  499. # define PNG_NO_WRITE_iTXt
  500. # define PNG_NO_READ_sCAL
  501. # define PNG_NO_WRITE_sCAL
  502. # define PNG_NO_READ_sPLT
  503. # define PNG_NO_WRITE_sPLT
  504. # define PNG_NO_INFO_IMAGE
  505. # define PNG_NO_READ_RGB_TO_GRAY
  506. # define PNG_NO_READ_USER_TRANSFORM
  507. # define PNG_NO_WRITE_USER_TRANSFORM
  508. # define PNG_NO_USER_MEM
  509. # define PNG_NO_READ_EMPTY_PLTE
  510. # define PNG_NO_MNG_FEATURES
  511. # define PNG_NO_FIXED_POINT_SUPPORTED
  512. #endif
  513. /* Ignore attempt to turn off both floating and fixed point support */
  514. #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
  515. !defined(PNG_NO_FIXED_POINT_SUPPORTED)
  516. # define PNG_FIXED_POINT_SUPPORTED
  517. #endif
  518. #ifndef PNG_NO_FREE_ME
  519. # define PNG_FREE_ME_SUPPORTED
  520. #endif
  521. #ifdef PNG_READ_SUPPORTED
  522. #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
  523. !defined(PNG_NO_READ_TRANSFORMS)
  524. # define PNG_READ_TRANSFORMS_SUPPORTED
  525. #endif
  526. #ifdef PNG_READ_TRANSFORMS_SUPPORTED
  527. # ifndef PNG_NO_READ_EXPAND
  528. # define PNG_READ_EXPAND_SUPPORTED
  529. # endif
  530. # ifndef PNG_NO_READ_SHIFT
  531. # define PNG_READ_SHIFT_SUPPORTED
  532. # endif
  533. # ifndef PNG_NO_READ_PACK
  534. # define PNG_READ_PACK_SUPPORTED
  535. # endif
  536. # ifndef PNG_NO_READ_BGR
  537. # define PNG_READ_BGR_SUPPORTED
  538. # endif
  539. # ifndef PNG_NO_READ_SWAP
  540. # define PNG_READ_SWAP_SUPPORTED
  541. # endif
  542. # ifndef PNG_NO_READ_PACKSWAP
  543. # define PNG_READ_PACKSWAP_SUPPORTED
  544. # endif
  545. # ifndef PNG_NO_READ_INVERT
  546. # define PNG_READ_INVERT_SUPPORTED
  547. # endif
  548. # ifndef PNG_NO_READ_DITHER
  549. # define PNG_READ_DITHER_SUPPORTED
  550. # endif
  551. # ifndef PNG_NO_READ_BACKGROUND
  552. # define PNG_READ_BACKGROUND_SUPPORTED
  553. # endif
  554. # ifndef PNG_NO_READ_16_TO_8
  555. # define PNG_READ_16_TO_8_SUPPORTED
  556. # endif
  557. # ifndef PNG_NO_READ_FILLER
  558. # define PNG_READ_FILLER_SUPPORTED
  559. # endif
  560. # ifndef PNG_NO_READ_GAMMA
  561. # define PNG_READ_GAMMA_SUPPORTED
  562. # endif
  563. # ifndef PNG_NO_READ_GRAY_TO_RGB
  564. # define PNG_READ_GRAY_TO_RGB_SUPPORTED
  565. # endif
  566. # ifndef PNG_NO_READ_SWAP_ALPHA
  567. # define PNG_READ_SWAP_ALPHA_SUPPORTED
  568. # endif
  569. # ifndef PNG_NO_READ_INVERT_ALPHA
  570. # define PNG_READ_INVERT_ALPHA_SUPPORTED
  571. # endif
  572. # ifndef PNG_NO_READ_STRIP_ALPHA
  573. # define PNG_READ_STRIP_ALPHA_SUPPORTED
  574. # endif
  575. # ifndef PNG_NO_READ_USER_TRANSFORM
  576. # define PNG_READ_USER_TRANSFORM_SUPPORTED
  577. # endif
  578. # ifndef PNG_NO_READ_RGB_TO_GRAY
  579. # define PNG_READ_RGB_TO_GRAY_SUPPORTED
  580. # endif
  581. #endif /* PNG_READ_TRANSFORMS_SUPPORTED */
  582. /* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */
  583. #if !defined(PNG_NO_PROGRESSIVE_READ) && \
  584. !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
  585. # define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
  586. #endif /* about interlacing capability! You'll */
  587. /* still have interlacing unless you change the following define: */
  588. #define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
  589. /* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */
  590. #if !defined(PNG_NO_SEQUENTIAL_READ) && \
  591. !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \
  592. !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED)
  593. # define PNG_SEQUENTIAL_READ_SUPPORTED
  594. #endif
  595. #define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */
  596. #ifndef PNG_NO_READ_COMPOSITE_NODIV
  597. # ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
  598. # define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
  599. # endif
  600. #endif
  601. #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
  602. /* Deprecated, will be removed from version 2.0.0.
  603. Use PNG_MNG_FEATURES_SUPPORTED instead. */
  604. #ifndef PNG_NO_READ_EMPTY_PLTE
  605. # define PNG_READ_EMPTY_PLTE_SUPPORTED
  606. #endif
  607. #endif
  608. #endif /* PNG_READ_SUPPORTED */
  609. #ifdef PNG_WRITE_SUPPORTED
  610. # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
  611. !defined(PNG_NO_WRITE_TRANSFORMS)
  612. # define PNG_WRITE_TRANSFORMS_SUPPORTED
  613. #endif
  614. #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
  615. # ifndef PNG_NO_WRITE_SHIFT
  616. # define PNG_WRITE_SHIFT_SUPPORTED
  617. # endif
  618. # ifndef PNG_NO_WRITE_PACK
  619. # define PNG_WRITE_PACK_SUPPORTED
  620. # endif
  621. # ifndef PNG_NO_WRITE_BGR
  622. # define PNG_WRITE_BGR_SUPPORTED
  623. # endif
  624. # ifndef PNG_NO_WRITE_SWAP
  625. # define PNG_WRITE_SWAP_SUPPORTED
  626. # endif
  627. # ifndef PNG_NO_WRITE_PACKSWAP
  628. # define PNG_WRITE_PACKSWAP_SUPPORTED
  629. # endif
  630. # ifndef PNG_NO_WRITE_INVERT
  631. # define PNG_WRITE_INVERT_SUPPORTED
  632. # endif
  633. # ifndef PNG_NO_WRITE_FILLER
  634. # define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */
  635. # endif
  636. # ifndef PNG_NO_WRITE_SWAP_ALPHA
  637. # define PNG_WRITE_SWAP_ALPHA_SUPPORTED
  638. # endif
  639. #ifndef PNG_1_0_X
  640. # ifndef PNG_NO_WRITE_INVERT_ALPHA
  641. # define PNG_WRITE_INVERT_ALPHA_SUPPORTED
  642. # endif
  643. #endif
  644. # ifndef PNG_NO_WRITE_USER_TRANSFORM
  645. # define PNG_WRITE_USER_TRANSFORM_SUPPORTED
  646. # endif
  647. #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
  648. #if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
  649. !defined(PNG_WRITE_INTERLACING_SUPPORTED)
  650. #define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
  651. encoders, but can cause trouble
  652. if left undefined */
  653. #endif
  654. #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
  655. !defined(PNG_WRITE_WEIGHTED_FILTER) && \
  656. defined(PNG_FLOATING_POINT_SUPPORTED)
  657. # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
  658. #endif
  659. #ifndef PNG_NO_WRITE_FLUSH
  660. # define PNG_WRITE_FLUSH_SUPPORTED
  661. #endif
  662. #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
  663. /* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
  664. #ifndef PNG_NO_WRITE_EMPTY_PLTE
  665. # define PNG_WRITE_EMPTY_PLTE_SUPPORTED
  666. #endif
  667. #endif
  668. #endif /* PNG_WRITE_SUPPORTED */
  669. #ifndef PNG_1_0_X
  670. # ifndef PNG_NO_ERROR_NUMBERS
  671. # define PNG_ERROR_NUMBERS_SUPPORTED
  672. # endif
  673. #endif /* PNG_1_0_X */
  674. #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
  675. defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
  676. # ifndef PNG_NO_USER_TRANSFORM_PTR
  677. # define PNG_USER_TRANSFORM_PTR_SUPPORTED
  678. # endif
  679. #endif
  680. #ifndef PNG_NO_STDIO
  681. # define PNG_TIME_RFC1123_SUPPORTED
  682. #endif
  683. /* This adds extra functions in pngget.c for accessing data from the
  684. * info pointer (added in version 0.99)
  685. * png_get_image_width()
  686. * png_get_image_height()
  687. * png_get_bit_depth()
  688. * png_get_color_type()
  689. * png_get_compression_type()
  690. * png_get_filter_type()
  691. * png_get_interlace_type()
  692. * png_get_pixel_aspect_ratio()
  693. * png_get_pixels_per_meter()
  694. * png_get_x_offset_pixels()
  695. * png_get_y_offset_pixels()
  696. * png_get_x_offset_microns()
  697. * png_get_y_offset_microns()
  698. */
  699. #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
  700. # define PNG_EASY_ACCESS_SUPPORTED
  701. #endif
  702. /* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
  703. * and removed from version 1.2.20. The following will be removed
  704. * from libpng-1.4.0
  705. */
  706. #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)
  707. # ifndef PNG_OPTIMIZED_CODE_SUPPORTED
  708. # define PNG_OPTIMIZED_CODE_SUPPORTED
  709. # endif
  710. #endif
  711. #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
  712. # ifndef PNG_ASSEMBLER_CODE_SUPPORTED
  713. # define PNG_ASSEMBLER_CODE_SUPPORTED
  714. # endif
  715. # if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)
  716. /* work around 64-bit gcc compiler bugs in gcc-3.x */
  717. # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
  718. # define PNG_NO_MMX_CODE
  719. # endif
  720. # endif
  721. # ifdef __APPLE__
  722. # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
  723. # define PNG_NO_MMX_CODE
  724. # endif
  725. # endif
  726. # if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))
  727. # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
  728. # define PNG_NO_MMX_CODE
  729. # endif
  730. # endif
  731. # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
  732. # define PNG_MMX_CODE_SUPPORTED
  733. # endif
  734. #endif
  735. /* end of obsolete code to be removed from libpng-1.4.0 */
  736. /* Added at libpng-1.2.0 */
  737. #ifndef PNG_1_0_X
  738. #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
  739. # define PNG_USER_MEM_SUPPORTED
  740. #endif
  741. #endif /* PNG_1_0_X */
  742. /* Added at libpng-1.2.6 */
  743. #ifndef PNG_1_0_X
  744. # ifndef PNG_SET_USER_LIMITS_SUPPORTED
  745. # ifndef PNG_NO_SET_USER_LIMITS
  746. # define PNG_SET_USER_LIMITS_SUPPORTED
  747. # endif
  748. # endif
  749. #endif /* PNG_1_0_X */
  750. /* Added at libpng-1.0.53 and 1.2.43 */
  751. #ifndef PNG_USER_LIMITS_SUPPORTED
  752. # ifndef PNG_NO_USER_LIMITS
  753. # define PNG_USER_LIMITS_SUPPORTED
  754. # endif
  755. #endif
  756. /* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGS no matter
  757. * how large, set these limits to 0x7fffffffL
  758. */
  759. #ifndef PNG_USER_WIDTH_MAX
  760. # define PNG_USER_WIDTH_MAX 1000000L
  761. #endif
  762. #ifndef PNG_USER_HEIGHT_MAX
  763. # define PNG_USER_HEIGHT_MAX 1000000L
  764. #endif
  765. /* Added at libpng-1.2.43. To accept all valid PNGs no matter
  766. * how large, set these two limits to 0.
  767. */
  768. #ifndef PNG_USER_CHUNK_CACHE_MAX
  769. # define PNG_USER_CHUNK_CACHE_MAX 0
  770. #endif
  771. /* Added at libpng-1.2.43 */
  772. #ifndef PNG_USER_CHUNK_MALLOC_MAX
  773. # define PNG_USER_CHUNK_MALLOC_MAX 0
  774. #endif
  775. #ifndef PNG_LITERAL_SHARP
  776. # define PNG_LITERAL_SHARP 0x23
  777. #endif
  778. #ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET
  779. # define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b
  780. #endif
  781. #ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET
  782. # define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d
  783. #endif
  784. /* Added at libpng-1.2.34 */
  785. #ifndef PNG_STRING_NEWLINE
  786. #define PNG_STRING_NEWLINE "\n"
  787. #endif
  788. /* These are currently experimental features, define them if you want */
  789. /* very little testing */
  790. /*
  791. #ifdef PNG_READ_SUPPORTED
  792. # ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
  793. # define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
  794. # endif
  795. #endif
  796. */
  797. /* This is only for PowerPC big-endian and 680x0 systems */
  798. /* some testing */
  799. /*
  800. #ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
  801. # define PNG_READ_BIG_ENDIAN_SUPPORTED
  802. #endif
  803. */
  804. /* Buggy compilers (e.g., gcc 2.7.2.2) need this */
  805. /*
  806. #define PNG_NO_POINTER_INDEXING
  807. */
  808. #if !defined(PNG_NO_POINTER_INDEXING) && \
  809. !defined(PNG_POINTER_INDEXING_SUPPORTED)
  810. # define PNG_POINTER_INDEXING_SUPPORTED
  811. #endif
  812. /* These functions are turned off by default, as they will be phased out. */
  813. /*
  814. #define PNG_USELESS_TESTS_SUPPORTED
  815. #define PNG_CORRECT_PALETTE_SUPPORTED
  816. */
  817. /* Any chunks you are not interested in, you can undef here. The
  818. * ones that allocate memory may be expecially important (hIST,
  819. * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info
  820. * a bit smaller.
  821. */
  822. #if defined(PNG_READ_SUPPORTED) && \
  823. !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
  824. !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
  825. # define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
  826. #endif
  827. #if defined(PNG_WRITE_SUPPORTED) && \
  828. !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
  829. !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
  830. # define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
  831. #endif
  832. #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
  833. #ifdef PNG_NO_READ_TEXT
  834. # define PNG_NO_READ_iTXt
  835. # define PNG_NO_READ_tEXt
  836. # define PNG_NO_READ_zTXt
  837. #endif
  838. #ifndef PNG_NO_READ_bKGD
  839. # define PNG_READ_bKGD_SUPPORTED
  840. # define PNG_bKGD_SUPPORTED
  841. #endif
  842. #ifndef PNG_NO_READ_cHRM
  843. # define PNG_READ_cHRM_SUPPORTED
  844. # define PNG_cHRM_SUPPORTED
  845. #endif
  846. #ifndef PNG_NO_READ_gAMA
  847. # define PNG_READ_gAMA_SUPPORTED
  848. # define PNG_gAMA_SUPPORTED
  849. #endif
  850. #ifndef PNG_NO_READ_hIST
  851. # define PNG_READ_hIST_SUPPORTED
  852. # define PNG_hIST_SUPPORTED
  853. #endif
  854. #ifndef PNG_NO_READ_iCCP
  855. # define PNG_READ_iCCP_SUPPORTED
  856. # define PNG_iCCP_SUPPORTED
  857. #endif
  858. #ifndef PNG_NO_READ_iTXt
  859. # ifndef PNG_READ_iTXt_SUPPORTED
  860. # define PNG_READ_iTXt_SUPPORTED
  861. # endif
  862. # ifndef PNG_iTXt_SUPPORTED
  863. # define PNG_iTXt_SUPPORTED
  864. # endif
  865. #endif
  866. #ifndef PNG_NO_READ_oFFs
  867. # define PNG_READ_oFFs_SUPPORTED
  868. # define PNG_oFFs_SUPPORTED
  869. #endif
  870. #ifndef PNG_NO_READ_pCAL
  871. # define PNG_READ_pCAL_SUPPORTED
  872. # define PNG_pCAL_SUPPORTED
  873. #endif
  874. #ifndef PNG_NO_READ_sCAL
  875. # define PNG_READ_sCAL_SUPPORTED
  876. # define PNG_sCAL_SUPPORTED
  877. #endif
  878. #ifndef PNG_NO_READ_pHYs
  879. # define PNG_READ_pHYs_SUPPORTED
  880. # define PNG_pHYs_SUPPORTED
  881. #endif
  882. #ifndef PNG_NO_READ_sBIT
  883. # define PNG_READ_sBIT_SUPPORTED
  884. # define PNG_sBIT_SUPPORTED
  885. #endif
  886. #ifndef PNG_NO_READ_sPLT
  887. # define PNG_READ_sPLT_SUPPORTED
  888. # define PNG_sPLT_SUPPORTED
  889. #endif
  890. #ifndef PNG_NO_READ_sRGB
  891. # define PNG_READ_sRGB_SUPPORTED
  892. # define PNG_sRGB_SUPPORTED
  893. #endif
  894. #ifndef PNG_NO_READ_tEXt
  895. # define PNG_READ_tEXt_SUPPORTED
  896. # define PNG_tEXt_SUPPORTED
  897. #endif
  898. #ifndef PNG_NO_READ_tIME
  899. # define PNG_READ_tIME_SUPPORTED
  900. # define PNG_tIME_SUPPORTED
  901. #endif
  902. #ifndef PNG_NO_READ_tRNS
  903. # define PNG_READ_tRNS_SUPPORTED
  904. # define PNG_tRNS_SUPPORTED
  905. #endif
  906. #ifndef PNG_NO_READ_zTXt
  907. # define PNG_READ_zTXt_SUPPORTED
  908. # define PNG_zTXt_SUPPORTED
  909. #endif
  910. #ifndef PNG_NO_READ_OPT_PLTE
  911. # define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
  912. #endif /* optional PLTE chunk in RGB and RGBA images */
  913. #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
  914. defined(PNG_READ_zTXt_SUPPORTED)
  915. # define PNG_READ_TEXT_SUPPORTED
  916. # define PNG_TEXT_SUPPORTED
  917. #endif
  918. #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
  919. #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
  920. # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
  921. # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
  922. # define PNG_UNKNOWN_CHUNKS_SUPPORTED
  923. # endif
  924. #endif
  925. #if !defined(PNG_NO_READ_USER_CHUNKS) && \
  926. defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
  927. # define PNG_READ_USER_CHUNKS_SUPPORTED
  928. # define PNG_USER_CHUNKS_SUPPORTED
  929. # ifdef PNG_NO_READ_UNKNOWN_CHUNKS
  930. # undef PNG_NO_READ_UNKNOWN_CHUNKS
  931. # endif
  932. # ifdef PNG_NO_HANDLE_AS_UNKNOWN
  933. # undef PNG_NO_HANDLE_AS_UNKNOWN
  934. # endif
  935. #endif
  936. #ifndef PNG_NO_HANDLE_AS_UNKNOWN
  937. # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
  938. # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
  939. # endif
  940. #endif
  941. #ifdef PNG_WRITE_SUPPORTED
  942. #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
  943. #ifdef PNG_NO_WRITE_TEXT
  944. # define PNG_NO_WRITE_iTXt
  945. # define PNG_NO_WRITE_tEXt
  946. # define PNG_NO_WRITE_zTXt
  947. #endif
  948. #ifndef PNG_NO_WRITE_bKGD
  949. # define PNG_WRITE_bKGD_SUPPORTED
  950. # ifndef PNG_bKGD_SUPPORTED
  951. # define PNG_bKGD_SUPPORTED
  952. # endif
  953. #endif
  954. #ifndef PNG_NO_WRITE_cHRM
  955. # define PNG_WRITE_cHRM_SUPPORTED
  956. # ifndef PNG_cHRM_SUPPORTED
  957. # define PNG_cHRM_SUPPORTED
  958. # endif
  959. #endif
  960. #ifndef PNG_NO_WRITE_gAMA
  961. # define PNG_WRITE_gAMA_SUPPORTED
  962. # ifndef PNG_gAMA_SUPPORTED
  963. # define PNG_gAMA_SUPPORTED
  964. # endif
  965. #endif
  966. #ifndef PNG_NO_WRITE_hIST
  967. # define PNG_WRITE_hIST_SUPPORTED
  968. # ifndef PNG_hIST_SUPPORTED
  969. # define PNG_hIST_SUPPORTED
  970. # endif
  971. #endif
  972. #ifndef PNG_NO_WRITE_iCCP
  973. # define PNG_WRITE_iCCP_SUPPORTED
  974. # ifndef PNG_iCCP_SUPPORTED
  975. # define PNG_iCCP_SUPPORTED
  976. # endif
  977. #endif
  978. #ifndef PNG_NO_WRITE_iTXt
  979. # ifndef PNG_WRITE_iTXt_SUPPORTED
  980. # define PNG_WRITE_iTXt_SUPPORTED
  981. # endif
  982. # ifndef PNG_iTXt_SUPPORTED
  983. # define PNG_iTXt_SUPPORTED
  984. # endif
  985. #endif
  986. #ifndef PNG_NO_WRITE_oFFs
  987. # define PNG_WRITE_oFFs_SUPPORTED
  988. # ifndef PNG_oFFs_SUPPORTED
  989. # define PNG_oFFs_SUPPORTED
  990. # endif
  991. #endif
  992. #ifndef PNG_NO_WRITE_pCAL
  993. # define PNG_WRITE_pCAL_SUPPORTED
  994. # ifndef PNG_pCAL_SUPPORTED
  995. # define PNG_pCAL_SUPPORTED
  996. # endif
  997. #endif
  998. #ifndef PNG_NO_WRITE_sCAL
  999. # define PNG_WRITE_sCAL_SUPPORTED
  1000. # ifndef PNG_sCAL_SUPPORTED
  1001. # define PNG_sCAL_SUPPORTED
  1002. # endif
  1003. #endif
  1004. #ifndef PNG_NO_WRITE_pHYs
  1005. # define PNG_WRITE_pHYs_SUPPORTED
  1006. # ifndef PNG_pHYs_SUPPORTED
  1007. # define PNG_pHYs_SUPPORTED
  1008. # endif
  1009. #endif
  1010. #ifndef PNG_NO_WRITE_sBIT
  1011. # define PNG_WRITE_sBIT_SUPPORTED
  1012. # ifndef PNG_sBIT_SUPPORTED
  1013. # define PNG_sBIT_SUPPORTED
  1014. # endif
  1015. #endif
  1016. #ifndef PNG_NO_WRITE_sPLT
  1017. # define PNG_WRITE_sPLT_SUPPORTED
  1018. # ifndef PNG_sPLT_SUPPORTED
  1019. # define PNG_sPLT_SUPPORTED
  1020. # endif
  1021. #endif
  1022. #ifndef PNG_NO_WRITE_sRGB
  1023. # define PNG_WRITE_sRGB_SUPPORTED
  1024. # ifndef PNG_sRGB_SUPPORTED
  1025. # define PNG_sRGB_SUPPORTED
  1026. # endif
  1027. #endif
  1028. #ifndef PNG_NO_WRITE_tEXt
  1029. # define PNG_WRITE_tEXt_SUPPORTED
  1030. # ifndef PNG_tEXt_SUPPORTED
  1031. # define PNG_tEXt_SUPPORTED
  1032. # endif
  1033. #endif
  1034. #ifndef PNG_NO_WRITE_tIME
  1035. # define PNG_WRITE_tIME_SUPPORTED
  1036. # ifndef PNG_tIME_SUPPORTED
  1037. # define PNG_tIME_SUPPORTED
  1038. # endif
  1039. #endif
  1040. #ifndef PNG_NO_WRITE_tRNS
  1041. # define PNG_WRITE_tRNS_SUPPORTED
  1042. # ifndef PNG_tRNS_SUPPORTED
  1043. # define PNG_tRNS_SUPPORTED
  1044. # endif
  1045. #endif
  1046. #ifndef PNG_NO_WRITE_zTXt
  1047. # define PNG_WRITE_zTXt_SUPPORTED
  1048. # ifndef PNG_zTXt_SUPPORTED
  1049. # define PNG_zTXt_SUPPORTED
  1050. # endif
  1051. #endif
  1052. #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
  1053. defined(PNG_WRITE_zTXt_SUPPORTED)
  1054. # define PNG_WRITE_TEXT_SUPPORTED
  1055. # ifndef PNG_TEXT_SUPPORTED
  1056. # define PNG_TEXT_SUPPORTED
  1057. # endif
  1058. #endif
  1059. #ifdef PNG_WRITE_tIME_SUPPORTED
  1060. # ifndef PNG_NO_CONVERT_tIME
  1061. # ifndef _WIN32_WCE
  1062. /* The "tm" structure is not supported on WindowsCE */
  1063. # ifndef PNG_CONVERT_tIME_SUPPORTED
  1064. # define PNG_CONVERT_tIME_SUPPORTED
  1065. # endif
  1066. # endif
  1067. # endif
  1068. #endif
  1069. #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
  1070. #if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED)
  1071. # define PNG_WRITE_FILTER_SUPPORTED
  1072. #endif
  1073. #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
  1074. # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
  1075. # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
  1076. # define PNG_UNKNOWN_CHUNKS_SUPPORTED
  1077. # endif
  1078. #endif
  1079. #ifndef PNG_NO_HANDLE_AS_UNKNOWN
  1080. # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
  1081. # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
  1082. # endif
  1083. #endif
  1084. #endif /* PNG_WRITE_SUPPORTED */
  1085. /* Turn this off to disable png_read_png() and
  1086. * png_write_png() and leave the row_pointers member
  1087. * out of the info structure.
  1088. */
  1089. #ifndef PNG_NO_INFO_IMAGE
  1090. # define PNG_INFO_IMAGE_SUPPORTED
  1091. #endif
  1092. /* Need the time information for converting tIME chunks */
  1093. #ifdef PNG_CONVERT_tIME_SUPPORTED
  1094. /* "time.h" functions are not supported on WindowsCE */
  1095. # include <time.h>
  1096. #endif
  1097. /* Some typedefs to get us started. These should be safe on most of the
  1098. * common platforms. The typedefs should be at least as large as the
  1099. * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
  1100. * don't have to be exactly that size. Some compilers dislike passing
  1101. * unsigned shorts as function parameters, so you may be better off using
  1102. * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may
  1103. * want to have unsigned int for png_uint_32 instead of unsigned long.
  1104. */
  1105. typedef unsigned long png_uint_32;
  1106. typedef long png_int_32;
  1107. typedef unsigned short png_uint_16;
  1108. typedef short png_int_16;
  1109. typedef unsigned char png_byte;
  1110. /* This is usually size_t. It is typedef'ed just in case you need it to
  1111. change (I'm not sure if you will or not, so I thought I'd be safe) */
  1112. #ifdef PNG_SIZE_T
  1113. typedef PNG_SIZE_T png_size_t;
  1114. # define png_sizeof(x) png_convert_size(sizeof(x))
  1115. #else
  1116. typedef size_t png_size_t;
  1117. # define png_sizeof(x) sizeof(x)
  1118. #endif
  1119. /* The following is needed for medium model support. It cannot be in the
  1120. * PNG_INTERNAL section. Needs modification for other compilers besides
  1121. * MSC. Model independent support declares all arrays and pointers to be
  1122. * large using the far keyword. The zlib version used must also support
  1123. * model independent data. As of version zlib 1.0.4, the necessary changes
  1124. * have been made in zlib. The USE_FAR_KEYWORD define triggers other
  1125. * changes that are needed. (Tim Wegner)
  1126. */
  1127. /* Separate compiler dependencies (problem here is that zlib.h always
  1128. defines FAR. (SJT) */
  1129. #ifdef __BORLANDC__
  1130. # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
  1131. # define LDATA 1
  1132. # else
  1133. # define LDATA 0
  1134. # endif
  1135. /* GRR: why is Cygwin in here? Cygwin is not Borland C... */
  1136. # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
  1137. # define PNG_MAX_MALLOC_64K
  1138. # if (LDATA != 1)
  1139. # ifndef FAR
  1140. # define FAR __far
  1141. # endif
  1142. # define USE_FAR_KEYWORD
  1143. # endif /* LDATA != 1 */
  1144. /* Possibly useful for moving data out of default segment.
  1145. * Uncomment it if you want. Could also define FARDATA as
  1146. * const if your compiler supports it. (SJT)
  1147. # define FARDATA FAR
  1148. */
  1149. # endif /* __WIN32__, __FLAT__, __CYGWIN__ */
  1150. #endif /* __BORLANDC__ */
  1151. /* Suggest testing for specific compiler first before testing for
  1152. * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM,
  1153. * making reliance oncertain keywords suspect. (SJT)
  1154. */
  1155. /* MSC Medium model */
  1156. #ifdef FAR
  1157. # ifdef M_I86MM
  1158. # define USE_FAR_KEYWORD
  1159. # define FARDATA FAR
  1160. # include <dos.h>
  1161. # endif
  1162. #endif
  1163. /* SJT: default case */
  1164. #ifndef FAR
  1165. # define FAR
  1166. #endif
  1167. /* At this point FAR is always defined */
  1168. #ifndef FARDATA
  1169. # define FARDATA
  1170. #endif
  1171. /* Typedef for floating-point numbers that are converted
  1172. to fixed-point with a multiple of 100,000, e.g., int_gamma */
  1173. typedef png_int_32 png_fixed_point;
  1174. /* Add typedefs for pointers */
  1175. typedef void FAR * png_voidp;
  1176. typedef png_byte FAR * png_bytep;
  1177. typedef png_uint_32 FAR * png_uint_32p;
  1178. typedef png_int_32 FAR * png_int_32p;
  1179. typedef png_uint_16 FAR * png_uint_16p;
  1180. typedef png_int_16 FAR * png_int_16p;
  1181. typedef PNG_CONST char FAR * png_const_charp;
  1182. typedef char FAR * png_charp;
  1183. typedef png_fixed_point FAR * png_fixed_point_p;
  1184. #ifndef PNG_NO_STDIO
  1185. #ifdef _WIN32_WCE
  1186. typedef HANDLE png_FILE_p;
  1187. #else
  1188. typedef FILE * png_FILE_p;
  1189. #endif
  1190. #endif
  1191. #ifdef PNG_FLOATING_POINT_SUPPORTED
  1192. typedef double FAR * png_doublep;
  1193. #endif
  1194. /* Pointers to pointers; i.e. arrays */
  1195. typedef png_byte FAR * FAR * png_bytepp;
  1196. typedef png_uint_32 FAR * FAR * png_uint_32pp;
  1197. typedef png_int_32 FAR * FAR * png_int_32pp;
  1198. typedef png_uint_16 FAR * FAR * png_uint_16pp;
  1199. typedef png_int_16 FAR * FAR * png_int_16pp;
  1200. typedef PNG_CONST char FAR * FAR * png_const_charpp;
  1201. typedef char FAR * FAR * png_charpp;
  1202. typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
  1203. #ifdef PNG_FLOATING_POINT_SUPPORTED
  1204. typedef double FAR * FAR * png_doublepp;
  1205. #endif
  1206. /* Pointers to pointers to pointers; i.e., pointer to array */
  1207. typedef char FAR * FAR * FAR * png_charppp;
  1208. #if defined(PNG_1_0_X) || defined(PNG_1_2_X)
  1209. /* SPC - Is this stuff deprecated? */
  1210. /* It'll be removed as of libpng-1.4.0 - GR-P */
  1211. /* libpng typedefs for types in zlib. If zlib changes
  1212. * or another compression library is used, then change these.
  1213. * Eliminates need to change all the source files.
  1214. */
  1215. typedef charf * png_zcharp;
  1216. typedef charf * FAR * png_zcharpp;
  1217. typedef z_stream FAR * png_zstreamp;
  1218. #endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */
  1219. /*
  1220. * Define PNG_BUILD_DLL if the module being built is a Windows
  1221. * LIBPNG DLL.
  1222. *
  1223. * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
  1224. * It is equivalent to Microsoft predefined macro _DLL that is
  1225. * automatically defined when you compile using the share
  1226. * version of the CRT (C Run-Time library)
  1227. *
  1228. * The cygwin mods make this behavior a little different:
  1229. * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
  1230. * Define PNG_STATIC if you are building a static library for use with cygwin,
  1231. * -or- if you are building an application that you want to link to the
  1232. * static library.
  1233. * PNG_USE_DLL is defined by default (no user action needed) unless one of
  1234. * the other flags is defined.
  1235. */
  1236. #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
  1237. # define PNG_DLL
  1238. #endif
  1239. /* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
  1240. * When building a static lib, default to no GLOBAL ARRAYS, but allow
  1241. * command-line override
  1242. */
  1243. #ifdef __CYGWIN__
  1244. # ifndef PNG_STATIC
  1245. # ifdef PNG_USE_GLOBAL_ARRAYS
  1246. # undef PNG_USE_GLOBAL_ARRAYS
  1247. # endif
  1248. # ifndef PNG_USE_LOCAL_ARRAYS
  1249. # define PNG_USE_LOCAL_ARRAYS
  1250. # endif
  1251. # else
  1252. # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
  1253. # ifdef PNG_USE_GLOBAL_ARRAYS
  1254. # undef PNG_USE_GLOBAL_ARRAYS
  1255. # endif
  1256. # endif
  1257. # endif
  1258. # if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
  1259. # define PNG_USE_LOCAL_ARRAYS
  1260. # endif
  1261. #endif
  1262. /* Do not use global arrays (helps with building DLL's)
  1263. * They are no longer used in libpng itself, since version 1.0.5c,
  1264. * but might be required for some pre-1.0.5c applications.
  1265. */
  1266. #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
  1267. # if defined(PNG_NO_GLOBAL_ARRAYS) || \
  1268. (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)
  1269. # define PNG_USE_LOCAL_ARRAYS
  1270. # else
  1271. # define PNG_USE_GLOBAL_ARRAYS
  1272. # endif
  1273. #endif
  1274. #ifdef __CYGWIN__
  1275. # undef PNGAPI
  1276. # define PNGAPI __cdecl
  1277. # undef PNG_IMPEXP
  1278. # define PNG_IMPEXP
  1279. #endif
  1280. /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
  1281. * you may get warnings regarding the linkage of png_zalloc and png_zfree.
  1282. * Don't ignore those warnings; you must also reset the default calling
  1283. * convention in your compiler to match your PNGAPI, and you must build
  1284. * zlib and your applications the same way you build libpng.
  1285. */
  1286. #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
  1287. # ifndef PNG_NO_MODULEDEF
  1288. # define PNG_NO_MODULEDEF
  1289. # endif
  1290. #endif
  1291. #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
  1292. # define PNG_IMPEXP
  1293. #endif
  1294. #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
  1295. (( defined(_Windows) || defined(_WINDOWS) || \
  1296. defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
  1297. # ifndef PNGAPI
  1298. # if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
  1299. # define PNGAPI __cdecl
  1300. # else
  1301. # define PNGAPI _cdecl
  1302. # endif
  1303. # endif
  1304. # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
  1305. 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
  1306. # define PNG_IMPEXP
  1307. # endif
  1308. # ifndef PNG_IMPEXP
  1309. # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
  1310. # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
  1311. /* Borland/Microsoft */
  1312. # if defined(_MSC_VER) || defined(__BORLANDC__)
  1313. # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
  1314. # define PNG_EXPORT PNG_EXPORT_TYPE1
  1315. # else
  1316. # define PNG_EXPORT PNG_EXPORT_TYPE2
  1317. # ifdef PNG_BUILD_DLL
  1318. # define PNG_IMPEXP __export
  1319. # else
  1320. # define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
  1321. VC++ */
  1322. # endif /* Exists in Borland C++ for
  1323. C++ classes (== huge) */
  1324. # endif
  1325. # endif
  1326. # ifndef PNG_IMPEXP
  1327. # ifdef PNG_BUILD_DLL
  1328. # define PNG_IMPEXP __declspec(dllexport)
  1329. # else
  1330. # define PNG_IMPEXP __declspec(dllimport)
  1331. # endif
  1332. # endif
  1333. # endif /* PNG_IMPEXP */
  1334. #else /* !(DLL || non-cygwin WINDOWS) */
  1335. # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
  1336. # ifndef PNGAPI
  1337. # define PNGAPI _System
  1338. # endif
  1339. # else
  1340. # if 0 /* ... other platforms, with other meanings */
  1341. # endif
  1342. # endif
  1343. #endif
  1344. #ifndef PNGAPI
  1345. # define PNGAPI
  1346. #endif
  1347. #ifndef PNG_IMPEXP
  1348. # define PNG_IMPEXP
  1349. #endif
  1350. #ifdef PNG_BUILDSYMS
  1351. # ifndef PNG_EXPORT
  1352. # define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
  1353. # endif
  1354. # ifdef PNG_USE_GLOBAL_ARRAYS
  1355. # ifndef PNG_EXPORT_VAR
  1356. # define PNG_EXPORT_VAR(type) PNG_DATA_EXPORT
  1357. # endif
  1358. # endif
  1359. #endif
  1360. #ifndef PNG_EXPORT
  1361. # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
  1362. #endif
  1363. #ifdef PNG_USE_GLOBAL_ARRAYS
  1364. # ifndef PNG_EXPORT_VAR
  1365. # define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
  1366. # endif
  1367. #endif
  1368. #ifdef PNG_PEDANTIC_WARNINGS
  1369. # ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
  1370. # define PNG_PEDANTIC_WARNINGS_SUPPORTED
  1371. # endif
  1372. #endif
  1373. #ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
  1374. /* Support for compiler specific function attributes. These are used
  1375. * so that where compiler support is available incorrect use of API
  1376. * functions in png.h will generate compiler warnings. Added at libpng
  1377. * version 1.2.41.
  1378. */
  1379. # ifdef __GNUC__
  1380. # ifndef PNG_USE_RESULT
  1381. # define PNG_USE_RESULT __attribute__((__warn_unused_result__))
  1382. # endif
  1383. # ifndef PNG_NORETURN
  1384. # define PNG_NORETURN __attribute__((__noreturn__))
  1385. # endif
  1386. # ifndef PNG_ALLOCATED
  1387. # define PNG_ALLOCATED __attribute__((__malloc__))
  1388. # endif
  1389. /* This specifically protects structure members that should only be
  1390. * accessed from within the library, therefore should be empty during
  1391. * a library build.
  1392. */
  1393. # ifndef PNG_DEPRECATED
  1394. # define PNG_DEPRECATED __attribute__((__deprecated__))
  1395. # endif
  1396. # ifndef PNG_DEPSTRUCT
  1397. # define PNG_DEPSTRUCT __attribute__((__deprecated__))
  1398. # endif
  1399. # ifndef PNG_PRIVATE
  1400. # if 0 /* Doesn't work so we use deprecated instead*/
  1401. # define PNG_PRIVATE \
  1402. __attribute__((warning("This function is not exported by libpng.")))
  1403. # else
  1404. # define PNG_PRIVATE \
  1405. __attribute__((__deprecated__))
  1406. # endif
  1407. # endif /* PNG_PRIVATE */
  1408. # endif /* __GNUC__ */
  1409. #endif /* PNG_PEDANTIC_WARNINGS */
  1410. #ifndef PNG_DEPRECATED
  1411. # define PNG_DEPRECATED /* Use of this function is deprecated */
  1412. #endif
  1413. #ifndef PNG_USE_RESULT
  1414. # define PNG_USE_RESULT /* The result of this function must be checked */
  1415. #endif
  1416. #ifndef PNG_NORETURN
  1417. # define PNG_NORETURN /* This function does not return */
  1418. #endif
  1419. #ifndef PNG_ALLOCATED
  1420. # define PNG_ALLOCATED /* The result of the function is new memory */
  1421. #endif
  1422. #ifndef PNG_DEPSTRUCT
  1423. # define PNG_DEPSTRUCT /* Access to this struct member is deprecated */
  1424. #endif
  1425. #ifndef PNG_PRIVATE
  1426. # define PNG_PRIVATE /* This is a private libpng function */
  1427. #endif
  1428. /* User may want to use these so they are not in PNG_INTERNAL. Any library
  1429. * functions that are passed far data must be model independent.
  1430. */
  1431. #ifndef PNG_ABORT
  1432. # define PNG_ABORT() abort()
  1433. #endif
  1434. #ifdef PNG_SETJMP_SUPPORTED
  1435. # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
  1436. #else
  1437. # define png_jmpbuf(png_ptr) \
  1438. (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
  1439. #endif
  1440. #ifdef USE_FAR_KEYWORD /* memory model independent fns */
  1441. /* Use this to make far-to-near assignments */
  1442. # define CHECK 1
  1443. # define NOCHECK 0
  1444. # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
  1445. # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
  1446. # define png_snprintf _fsnprintf /* Added to v 1.2.19 */
  1447. # define png_strlen _fstrlen
  1448. # define png_memcmp _fmemcmp /* SJT: added */
  1449. # define png_memcpy _fmemcpy
  1450. # define png_memset _fmemset
  1451. #else /* Use the usual functions */
  1452. # define CVT_PTR(ptr) (ptr)
  1453. # define CVT_PTR_NOCHECK(ptr) (ptr)
  1454. # ifndef PNG_NO_SNPRINTF
  1455. # ifdef _MSC_VER
  1456. # define png_snprintf _snprintf /* Added to v 1.2.19 */
  1457. # define png_snprintf2 _snprintf
  1458. # define png_snprintf6 _snprintf
  1459. # else
  1460. # define png_snprintf snprintf /* Added to v 1.2.19 */
  1461. # define png_snprintf2 snprintf
  1462. # define png_snprintf6 snprintf
  1463. # endif
  1464. # else
  1465. /* You don't have or don't want to use snprintf(). Caution: Using
  1466. * sprintf instead of snprintf exposes your application to accidental
  1467. * or malevolent buffer overflows. If you don't have snprintf()
  1468. * as a general rule you should provide one (you can get one from
  1469. * Portable OpenSSH).
  1470. */
  1471. # define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
  1472. # define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
  1473. # define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
  1474. sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
  1475. # endif
  1476. # define png_strlen strlen
  1477. # define png_memcmp memcmp /* SJT: added */
  1478. # define png_memcpy memcpy
  1479. # define png_memset memset
  1480. #endif
  1481. /* End of memory model independent support */
  1482. /* Just a little check that someone hasn't tried to define something
  1483. * contradictory.
  1484. */
  1485. #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
  1486. # undef PNG_ZBUF_SIZE
  1487. # define PNG_ZBUF_SIZE 65536L
  1488. #endif
  1489. /* Added at libpng-1.2.8 */
  1490. #endif /* PNG_VERSION_INFO_ONLY */
  1491. #endif /* PNGCONF_H */