[devel] Made FIXED and FLOATING options consistent in the APIs they enable

and disable.  Corrected scripts/options.awk to handle both command line
options and options specified in the .dfa files.
This commit is contained in:
Glenn Randers-Pehrson
2010-06-25 21:45:31 -05:00
parent a81c59a960
commit a272d8fe3d
11 changed files with 131 additions and 94 deletions

View File

@@ -85,6 +85,36 @@ pre == -1{
}
}
# variable=value
# Sets the given variable to the given value (the syntax is fairly
# free form, except for deb (you are expected to understand how to
# set the debug variable...)
#
# This happens before the check on 'pre' below skips most of the
# rest of the actions, so the variable settings happen during
# preprocessing but are recorded in the END action too. This
# allows them to be set on the command line too.
$0 ~ /^[ ]*everything[ =]*off[ ]*$/{
everything = "off"
next
}
$0 ~ /^[ ]*everything[ =]*on[ ]*$/{
everything = "on"
next
}
$0 ~ /^[ ]*logunsupported[ =]*0[ ]*$/{
logunsupported = 0
next
}
$0 ~ /^[ ]*logunsupported[ =]*1[ ]*$/{
logunsupported = 1
next
}
$1 == "deb" && $2 == "=" && NF == 3{
deb = $3
next
}
# Preprocessing - this just copies the input file with lines
# that need preprocessing (just chunk at present) expanded
# The bare "pre" instead of "pre != 0" crashes under Sunos awk
@@ -153,31 +183,6 @@ $1 == "file" && NF >= 2{
next
}
# variable=value
# Sets the given variable to the given value (the syntax is fairly
# free form, except for deb (you are expected to understand how to
# set the debug variable...)
$0 ~ /^[ ]*everything[ =]*off[ ]*$/{
everything = "off"
next
}
$0 ~ /^[ ]*everything[ =]*on[ ]*$/{
everything = "on"
next
}
$0 ~ /^[ ]*logunsupported[ =]*0[ ]*$/{
logunsupported = 0
next
}
$0 ~ /^[ ]*logunsupported[ =]*1[ ]*$/{
logunsupported = 1
next
}
$1 == "deb" && $2 == "=" && NF == 3{
deb = $3
next
}
# option NAME ( (requires|enables|if) NAME* | on | off | disabled )*
# Declares an option 'NAME' and describes its default setting (disabled)
# and its relationship to other options. The option is disabled
@@ -403,12 +408,12 @@ END{
if (err) exit 1
if (pre) {
# Record the variables
print "deb =", deb
# Record the final value of the variables
print "deb =", deb >out
if (everything != "") {
print "everything =", everything
print "everything =", everything >out
}
print "logunsupported =", logunsupported
print "logunsupported =", logunsupported >out
exit 0
}

View File

@@ -166,7 +166,7 @@ option WRITE_INT_FUNCTIONS disabled
option WRITE enables WRITE_INT_FUNCTIONS
# Generic options - affect both read and write.
option BENIGN_ERRORS disabled
option BENIGN_ERRORS
option MNG_FEATURES
option FLOATING_POINT enables ok_math
option FIXED_POINT enables ok_math
@@ -288,7 +288,7 @@ option READ_COMPOSITE_NODIV requires READ
= NO_READ_COMPOSITE_NODIV PNG_NO_READ_COMPOSITED_NODIV
# Inch conversions: not switched on by default
option INCH_CONVERSIONS requires FLOATING_POINT disabled
option INCH_CONVERSIONS requires FLOATING_POINT
= INCH_CONVERSIONS PNG_INCH_CONVERSIONS
# IN DEVELOPMENT

View File

@@ -1,4 +1,4 @@
/* libpng-1.5.0beta32 STANDARD API DEFINITION */
/* libpng-1.5.0beta33 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
/* last changed in libpng version 1.5.0 - June 26, 2010 */
@@ -36,12 +36,12 @@
#define PNG_ERROR_TEXT_SUPPORTED
#define PNG_READ_SUPPORTED
/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/
/*#undef PNG_BENIGN_ERRORS_SUPPORTED*/
#define PNG_BENIGN_ERRORS_SUPPORTED
#define PNG_SETJMP_SUPPORTED
#define PNG_WRITE_FLUSH_SUPPORTED
#define PNG_MNG_FEATURES_SUPPORTED
#define PNG_FLOATING_POINT_SUPPORTED
/*#undef PNG_INCH_CONVERSIONS_SUPPORTED*/
#define PNG_INCH_CONVERSIONS_SUPPORTED
#define PNG_STDIO_SUPPORTED
#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
#define PNG_USER_MEM_SUPPORTED

View File

@@ -11,7 +11,7 @@ LIBRARY
;OS2 CODE PRELOAD MOVEABLE DISCARDABLE
EXPORTS
;Version 1.5.0beta32
;Version 1.5.0beta33
png_access_version_number @1
png_set_sig_bytes @2
png_sig_cmp @3
@@ -117,6 +117,9 @@ EXPORTS
png_chunk_error @103
png_warning @105
png_chunk_warning @106
png_benign_error @107
png_chunk_benign_error @108
png_set_benign_errors @109
png_get_valid @110
png_get_rowbytes @111
png_get_rows @112
@@ -176,7 +179,9 @@ EXPORTS
png_get_tRNS @166
png_set_tRNS @167
png_get_sCAL @168
png_get_sCAL_s @169
png_set_sCAL @170
png_set_sCAL_s @171
png_set_keep_unknown_chunks @172
png_handle_as_unknown @173
png_set_unknown_chunks @174
@@ -197,6 +202,12 @@ EXPORTS
png_get_chunk_cache_max @190
png_set_chunk_malloc_max @191
png_get_chunk_malloc_max @192
png_get_pixels_per_inch @193
png_get_x_pixels_per_inch @194
png_get_y_pixels_per_inch @195
png_get_x_offset_inches @196
png_get_y_offset_inches @197
png_get_pHYs_dpi @198
png_get_io_state @199
png_get_io_chunk_name @200
png_get_uint_32 @201