Subject: | the png code directly accesses structure members it shouldn't |
Access to these members has been deprecated in recent libpng, and the
functions used to access the structure members have been long enough
that portability isn't an issue.
Warnings:
impng.c:44: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'i_writepng_wiol':
impng.c:113: warning: 'jmpbuf' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1096)
impng.c:119: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'i_readpng_wiol':
impng.c:207: warning: 'jmpbuf' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1096)
impng.c:214: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'wiol_read_data':
impng.c:36: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'wiol_write_data':
impng.c:44: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'i_writepng_wiol':
impng.c:113: warning: 'jmpbuf' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1096)
impng.c:119: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'i_readpng_wiol':
impng.c:207: warning: 'jmpbuf' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1096)
impng.c:214: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'wiol_read_data':
impng.c:36: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'wiol_write_data':
impng.c:44: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'i_writepng_wiol':
impng.c:113: warning: 'jmpbuf' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1096)
impng.c:119: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
impng.c: In function 'i_readpng_wiol':
impng.c:207: warning: 'jmpbuf' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1096)
impng.c:214: warning: 'io_ptr' is deprecated (declared at
/Users/tony/local/png143/include/png.h:1110)
Functions that should be used:
PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,
png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr
output_flush_fn));
/* Replace the default data input function with a user supplied one. */
PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr,
png_voidp io_ptr, png_rw_ptr read_data_fn));
/* Return the user pointer associated with the I/O functions */
PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr));