The changes include support for function attributes in VC in addition to
those already present in GCC - necessary because without these some
warnings are unavoidable. Fixes include signed/unsigned fixes in
pngvalid and checks with gcc -Wall -Wextra -Wunused.
VC requires function attributes on function definitions as well as
declarations, PNG_FUNCTION has been added to enable this and the
relevant function definitions changed.
Fixed point APIs are now supported throughout (no missing APIs).
Internal fixed point arithmetic support exists for all internal floating
point operations.
sCAL validates the floating point strings it is passed.
Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2
Two new APIs exist to get the number of passes without turning on the
PNG_INTERLACE transform and to get the number of rows in the current
pass.
A new test program, pngvalid.c, validates the gamma code.
Errors in the 16 bit gamma correction (overflows) have been corrected.
cHRM chunk testing is done consistently (previously the floating point
API bypassed it, because the test really didn't work on FP, now the test
is performed on the actual values to be stored in the PNG file so it
works in the FP case too.)
Most floating point APIs now simply call the fixed point APIs after
converting the values to the fixed point form used in the PNG file.
The standard headers no longer include zlib.h, which is currently only
required for pngstruct.h and can therefore be internal.
(Patches by John Bowler)
This allows the functions
to read and write ints to be disabled independently of PNG_USE_READ_MACROS,
which allows libpng to be built with the functions even though the default
is to use the macros - this allows applications to choose at app build
time whether or not to use macros (previously impossible because the
functions weren't in the default build.)
In all prior versions of libpng most configuration options
controlled by compiler #defines had to be repeated by the
application code that used libpng. This patch changes this
so that compilation options that can only be changed at build
time are frozen in the build. Options that are compiler
dependent (and those that are system dependent) are evaluated
each time - pngconf.h holds these. Options that can be changed
per-file in the application are in png.h. Frozen options are
in the new installed header file pnglconf.h