[master] Revise pngconf.h (iTXt handling)
and avoid reference to time.h "tm" structure in png.h and pngwrite.c
This commit is contained in:
parent
3de7bde0e1
commit
4c49647788
6
png.h
6
png.h
@ -1646,18 +1646,18 @@ extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
|
||||
PNGARG((png_structp png_ptr, png_timep ptime));
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WCE
|
||||
/* "time.h" functions are not supported on WindowsCE */
|
||||
#ifdef PNG_WRITE_tIME_SUPPORTED
|
||||
/* Convert from a struct tm to png_time */
|
||||
# ifndef _WIN32_WCE
|
||||
/* "tm" structure is not supported on WindowsCE */
|
||||
extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
|
||||
struct tm FAR * ttime));
|
||||
|
||||
/* Convert from time_t to png_time. Uses gmtime() */
|
||||
extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
|
||||
time_t ttime));
|
||||
#endif /* PNG_WRITE_tIME_SUPPORTED */
|
||||
# endif /* _WIN32_WCE */
|
||||
#endif /* PNG_WRITE_tIME_SUPPORTED */
|
||||
|
||||
#ifdef PNG_READ_EXPAND_SUPPORTED
|
||||
/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
|
||||
|
35
pngconf.h
35
pngconf.h
@ -523,41 +523,20 @@
|
||||
* iTXt support was added. iTXt support was turned off by default through
|
||||
* libpng-1.2.x, to support old apps that malloc the png_text structure
|
||||
* instead of calling png_set_text() and letting libpng malloc it. It
|
||||
* will be turned on by default in libpng-1.4.0.
|
||||
* was turned on by default in libpng-1.2.41.
|
||||
*/
|
||||
|
||||
/* If you have previously been defining PNG_iTXt_SUPPORTED, please
|
||||
* continue to do so in libpng-1.2.41 and later, until you switch to
|
||||
* libpng-1.4.0, even though it is not necessary now to gain iTXt support.
|
||||
* Your PNG_iTXt_SUPPORTED definition will be interpreted in png_set_text()
|
||||
* as a signal that you have defined it in your builds of previous libpng
|
||||
* versions that did not support iTXt by default.
|
||||
*/
|
||||
#if !defined(PNG_iTXt_SUPPORTED) && !defined(PNG_READ_iTXt_SUPPORTED) && \
|
||||
!defined(PNG_WRITE_iTXt_SUPPORTED)
|
||||
# define PNG_iTXt_NOT_PREVIOUSLY_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if defined(PNG_1_0_X) || defined (PNG_1_2_X)
|
||||
#if 0
|
||||
#ifndef PNG_NO_iTXt
|
||||
# ifndef PNG_iTXt_SUPPORTED
|
||||
# ifndef PNG_NO_iTXt_SUPPORTED
|
||||
# define PNG_NO_iTXt_SUPPORTED
|
||||
# define PNG_iTXt_SUPPORTED
|
||||
# endif
|
||||
# ifndef PNG_NO_READ_iTXt
|
||||
# define PNG_NO_READ_iTXt
|
||||
# endif
|
||||
# ifndef PNG_NO_WRITE_iTXt
|
||||
# define PNG_NO_WRITE_iTXt
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PNG_NO_iTXt_SUPPORTED
|
||||
# if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
|
||||
# define PNG_READ_iTXt
|
||||
# define PNG_READ_iTXt_SUPPORTED
|
||||
# endif
|
||||
# if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
|
||||
# define PNG_WRITE_iTXt
|
||||
# define PNG_WRITE_iTXt_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -425,7 +425,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
||||
|
||||
#ifdef PNG_WRITE_tIME_SUPPORTED
|
||||
#ifndef _WIN32_WCE
|
||||
/* "time.h" functions are not supported on WindowsCE */
|
||||
/* "tm" structure is not supported on WindowsCE */
|
||||
void PNGAPI
|
||||
png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime)
|
||||
{
|
||||
@ -452,7 +452,6 @@ png_convert_from_time_t(png_timep ptime, time_t ttime)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Initialize png_ptr structure, and allocate any memory needed */
|
||||
png_structp PNGAPI
|
||||
png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr,
|
||||
|
Reference in New Issue
Block a user