[libpng16] scripts/pnglibconf.dfa formatting improvements back ported from libpng 1.7.

This commit is contained in:
John Bowler
2013-02-16 00:18:20 -06:00
committed by Glenn Randers-Pehrson
parent b724c812ec
commit 23a101e06d
4 changed files with 128 additions and 75 deletions

View File

@@ -39,6 +39,11 @@ file pnglibconf.h scripts/pnglibconf.dfa PNGLCONF_H
# used as given (e.g. enables GAMMA just expands to that on the
# correspond READ_name and WRITE_name lines.)
#
# "," may be used to separate options on an 'option' line and is ignored; it
# doesn't change the meaning of the line. (NOT setting, where "," becomes
# part of the setting!) A comma at the end of an option line causes a
# continuation (the next line is included in the option too.)
#
# Note that the 'on' and 'off' keywords, while valid on both option
# and chunk, should not be used in this file because they force the
# relevant options on or off.
@@ -390,12 +395,12 @@ option READ_TRANSFORMS requires READ
# If you handle gamma issues outside libpng then you do not need the libpng
# gamma processing; and it is an enormous waste of space. You just need to
# remove the use of libpng APIs that depend on it.
option READ_GAMMA requires READ_TRANSFORMS READ_gAMA
option READ_GAMMA requires READ_TRANSFORMS, READ_gAMA
option READ_ALPHA_MODE requires READ_TRANSFORMS READ_GAMMA
option READ_BACKGROUND requires READ_TRANSFORMS READ_STRIP_ALPHA READ_GAMMA
option READ_ALPHA_MODE requires READ_TRANSFORMS, READ_GAMMA
option READ_BACKGROUND requires READ_TRANSFORMS, READ_STRIP_ALPHA, READ_GAMMA
option READ_BGR requires READ_TRANSFORMS
option READ_EXPAND_16 requires READ_TRANSFORMS READ_16BIT READ_EXPAND
option READ_EXPAND_16 requires READ_TRANSFORMS, READ_16BIT, READ_EXPAND
option READ_EXPAND requires READ_TRANSFORMS
option READ_FILLER requires READ_TRANSFORMS
option READ_GRAY_TO_RGB requires READ_TRANSFORMS
@@ -403,13 +408,13 @@ option READ_INVERT_ALPHA requires READ_TRANSFORMS
option READ_INVERT requires READ_TRANSFORMS
option READ_PACK requires READ_TRANSFORMS
option READ_PACKSWAP requires READ_TRANSFORMS
option READ_RGB_TO_GRAY requires READ_TRANSFORMS READ_GAMMA
option READ_RGB_TO_GRAY requires READ_TRANSFORMS, READ_GAMMA
option READ_SCALE_16_TO_8 requires READ_TRANSFORMS
option READ_SHIFT requires READ_TRANSFORMS
option READ_STRIP_16_TO_8 requires READ_TRANSFORMS
option READ_STRIP_ALPHA requires READ_TRANSFORMS
option READ_SWAP_ALPHA requires READ_TRANSFORMS
option READ_SWAP requires READ_TRANSFORMS READ_16BIT
option READ_SWAP requires READ_TRANSFORMS, READ_16BIT
option READ_USER_TRANSFORM requires READ_TRANSFORMS
option PROGRESSIVE_READ requires READ
@@ -448,7 +453,7 @@ option WRITE_TRANSFORMS requires WRITE
option WRITE_SHIFT requires WRITE_TRANSFORMS
option WRITE_PACK requires WRITE_TRANSFORMS
option WRITE_BGR requires WRITE_TRANSFORMS
option WRITE_SWAP requires WRITE_TRANSFORMS WRITE_16BIT
option WRITE_SWAP requires WRITE_TRANSFORMS, WRITE_16BIT
option WRITE_PACKSWAP requires WRITE_TRANSFORMS
option WRITE_INVERT requires WRITE_TRANSFORMS
option WRITE_FILLER requires WRITE_TRANSFORMS
@@ -470,8 +475,8 @@ option WRITE_FLUSH requires WRITE
# Note: these can be turned off explicitly if not required by the
# apps implementing the user transforms
option USER_TRANSFORM_PTR if READ_USER_TRANSFORM WRITE_USER_TRANSFORM
option USER_TRANSFORM_INFO if READ_USER_TRANSFORM WRITE_USER_TRANSFORM
option USER_TRANSFORM_PTR if READ_USER_TRANSFORM, WRITE_USER_TRANSFORM
option USER_TRANSFORM_INFO if READ_USER_TRANSFORM, WRITE_USER_TRANSFORM
# This enables API to set compression parameters for compressing
# non-IDAT chunks (zTXt, iTXt, iCCP, and unknown chunks). This feature
@@ -664,7 +669,7 @@ chunk bKGD
chunk cHRM enables COLORSPACE
chunk gAMA enables GAMMA
chunk hIST
chunk iCCP enables COLORSPACE GAMMA
chunk iCCP enables COLORSPACE, GAMMA
chunk iTXt
chunk oFFs
chunk pCAL
@@ -672,7 +677,7 @@ chunk pHYs
chunk sBIT
chunk sCAL
chunk sPLT
chunk sRGB enables COLORSPACE GAMMA
chunk sRGB enables COLORSPACE, GAMMA
chunk tEXt requires TEXT
chunk tIME
chunk tRNS
@@ -702,7 +707,7 @@ option WRITE_UNKNOWN_CHUNKS enables STORE_UNKNOWN_CHUNKS
# to png_get_unknown_chunks, the application must call
# png_set_keep_unknown_chunks to cause this to actually happen (see png.h)
option SAVE_UNKNOWN_CHUNKS requires READ requires SET_UNKNOWN_CHUNKS
option SAVE_UNKNOWN_CHUNKS enables READ_UNKNOWN_CHUNKS STORE_UNKNOWN_CHUNKS
option SAVE_UNKNOWN_CHUNKS enables READ_UNKNOWN_CHUNKS, STORE_UNKNOWN_CHUNKS
# The second approach is to use an application provided callback to process the
# chunks, the callback can either handle the chunk entirely itself or request
@@ -710,8 +715,8 @@ option SAVE_UNKNOWN_CHUNKS enables READ_UNKNOWN_CHUNKS STORE_UNKNOWN_CHUNKS
#
# Note that there is no 'WRITE_USER_CHUNKS' so the USER_CHUNKS option is always
# the same as READ_USER_CHUNKS at present
option READ_USER_CHUNKS requires READ requires UNKNOWN_CHUNKS
option READ_USER_CHUNKS enables READ_UNKNOWN_CHUNKS USER_CHUNKS
option READ_USER_CHUNKS requires READ, UNKNOWN_CHUNKS
option READ_USER_CHUNKS enables READ_UNKNOWN_CHUNKS, USER_CHUNKS
# Two further options are provided to allow detailed control of the handling.
# The first enables png_set_keep_unknown_chunks; this allows the default to be
@@ -778,8 +783,8 @@ option INFO_IMAGE
option CHECK_FOR_INVALID_INDEX enables READ_CHECK_FOR_INVALID_INDEX
option CHECK_FOR_INVALID_INDEX enables WRITE_CHECK_FOR_INVALID_INDEX
option READ_CHECK_FOR_INVALID_INDEX requires READ CHECK_FOR_INVALID_INDEX
option WRITE_CHECK_FOR_INVALID_INDEX requires WRITE CHECK_FOR_INVALID_INDEX
option READ_CHECK_FOR_INVALID_INDEX requires READ, CHECK_FOR_INVALID_INDEX
option WRITE_CHECK_FOR_INVALID_INDEX requires WRITE, CHECK_FOR_INVALID_INDEX
# added at libpng-1.5.15
option GET_PALETTE_MAX enables READ_GET_PALETTE_MAX WRITE_GET_PALETTE_MAX
@@ -788,12 +793,11 @@ option WRITE_GET_PALETTE_MAX requires WRITE_CHECK_FOR_INVALID_INDEX disabled
# Simplified API options (added at libpng-1.6.0)
# Read:
option SIMPLIFIED_READ requires SEQUENTIAL_READ READ_TRANSFORMS SETJMP
option SIMPLIFIED_READ requires BENIGN_ERRORS READ_GAMMA
option SIMPLIFIED_READ enables READ_EXPAND READ_16BIT READ_EXPAND_16
option SIMPLIFIED_READ enables READ_SCALE_16_TO_8 READ_RGB_TO_GRAY
option SIMPLIFIED_READ enables READ_ALPHA_MODE READ_BACKGROUND READ_STRIP_ALPHA
option SIMPLIFIED_READ enables READ_FILLER READ_SWAP
option SIMPLIFIED_READ,
requires SEQUENTIAL_READ READ_TRANSFORMS, SETJMP, BENIGN_ERRORS READ_GAMMA,
enables READ_EXPAND, READ_16BIT READ_EXPAND_16, READ_SCALE_16_TO_8,
READ_RGB_TO_GRAY, READ_ALPHA_MODE READ_BACKGROUND READ_STRIP_ALPHA,
READ_FILLER, READ_SWAP
option SIMPLIFIED_READ_AFIRST requires SIMPLIFIED_READ disabled
option READ_SWAP_ALPHA enables SIMPLIFIED_READ_AFIRST
@@ -802,8 +806,9 @@ option SIMPLIFIED_READ_BGR requires SIMPLIFIED_READ disabled
option READ_BGR enables SIMPLIFIED_READ_BGR
# Write:
option SIMPLIFIED_WRITE requires WRITE STDIO SETJMP
option SIMPLIFIED_WRITE enables WRITE_SWAP WRITE_gAMA WRITE_sRGB WRITE_cHRM
option SIMPLIFIED_WRITE,
requires WRITE STDIO, SETJMP,
enables WRITE_SWAP WRITE_gAMA, WRITE_sRGB WRITE_cHRM
option SIMPLIFIED_WRITE_AFIRST requires SIMPLIFIED_WRITE disabled
option WRITE_SWAP_ALPHA enables SIMPLIFIED_WRITE_AFIRST
@@ -812,5 +817,5 @@ option SIMPLIFIED_WRITE_BGR requires SIMPLIFIED_WRITE disabled
option WRITE_BGR enables SIMPLIFIED_WRITE_BGR
# Formats:
option FORMAT_AFIRST if SIMPLIFIED_READ_AFIRST SIMPLIFIED_WRITE_AFIRST
option FORMAT_BGR if SIMPLIFIED_READ_BGR SIMPLIFIED_WRITE_BGR
option FORMAT_AFIRST if SIMPLIFIED_READ_AFIRST, SIMPLIFIED_WRITE_AFIRST
option FORMAT_BGR if SIMPLIFIED_READ_BGR, SIMPLIFIED_WRITE_BGR