Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: src/plugins/platformthemes/platformthemes.pro src/printsupport/kernel/qplatformprintdevice.cpp Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
This commit is contained in:
commit
ccf26f6a88
@ -80,9 +80,6 @@ machine.start();
|
||||
\sa QState, {The Animation Framework}
|
||||
*/
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
/*!
|
||||
Constructs a new state with the given \a parent state.
|
||||
*/
|
||||
@ -155,5 +152,3 @@ bool QAnimationState::event(QEvent *e)
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
@ -61,9 +61,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
class QAbstractAnimation;
|
||||
|
||||
class QAnimationState : public QState
|
||||
@ -89,8 +86,6 @@ private:
|
||||
QAbstractAnimation *m_animation;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QANIMATIONSTATE_H
|
||||
|
@ -28,4 +28,5 @@ qtHaveModule(gui):qtConfig(opengl): \
|
||||
|
||||
contains(DEFINES, QT_NO_CURSOR): SUBDIRS -= mainwindows
|
||||
!qtConfig(draganddrop): SUBDIRS -= draganddrop
|
||||
!qtConfig(animation): SUBDIRS -= animation
|
||||
mac:SUBDIRS += mac
|
||||
|
@ -1,4 +1,4 @@
|
||||
QMAKE_TARGET_COMPANY = The Qt Company Ltd.
|
||||
isEmpty(QMAKE_TARGET_PRODUCT): QMAKE_TARGET_PRODUCT = Qt5
|
||||
isEmpty(QMAKE_TARGET_DESCRIPTION): QMAKE_TARGET_DESCRIPTION = C++ Application Development Framework
|
||||
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2017 The Qt Company Ltd.
|
||||
QMAKE_TARGET_COPYRIGHT = Copyright (C) 2018 The Qt Company Ltd.
|
||||
|
49
src/3rdparty/libpng/ANNOUNCE
vendored
49
src/3rdparty/libpng/ANNOUNCE
vendored
@ -1,35 +1,48 @@
|
||||
Libpng 1.6.34 - September 29, 2017
|
||||
Libpng 1.6.35 - July 15, 2018
|
||||
|
||||
This is a public release of libpng, intended for use in production codes.
|
||||
This is a public release of libpng, intended for use in production code.
|
||||
|
||||
Files available for download:
|
||||
|
||||
Source files with LF line endings (for Unix/Linux) and with a
|
||||
"configure" script
|
||||
Source files with LF line endings (for Unix/Linux):
|
||||
|
||||
libpng-1.6.34.tar.xz (LZMA-compressed, recommended)
|
||||
libpng-1.6.34.tar.gz
|
||||
libpng-1.6.35.tar.xz (LZMA-compressed, recommended)
|
||||
libpng-1.6.35.tar.gz
|
||||
|
||||
Source files with CRLF line endings (for Windows), without the
|
||||
"configure" script
|
||||
Source files with CRLF line endings (for Windows):
|
||||
|
||||
lpng1634.7z (LZMA-compressed, recommended)
|
||||
lpng1634.zip
|
||||
lp1635.7z (LZMA-compressed, recommended)
|
||||
lp1635.zip
|
||||
|
||||
Other information:
|
||||
|
||||
libpng-1.6.34-README.txt
|
||||
libpng-1.6.34-LICENSE.txt
|
||||
libpng-1.6.34-*.asc (armored detached GPG signatures)
|
||||
libpng-1.6.35-README.txt
|
||||
libpng-1.6.35-LICENSE.txt
|
||||
|
||||
Changes since the last public release (1.6.33):
|
||||
Removed contrib/pngsuite/i*.png; some of these were incorrect and caused
|
||||
test failures.
|
||||
Changes since the last public release (1.6.34):
|
||||
|
||||
Restored 21 of the contrib/pngsuite/i*.png, which do not cause test
|
||||
failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png.
|
||||
Added calls to png_set_*() transforms commonly used by browsers to
|
||||
the fuzzer.
|
||||
Removed some unnecessary brackets in pngrtran.c
|
||||
Fixed miscellaneous typos (Patch by github user "luzpaz").
|
||||
Change "ASM C" to "C ASM" in CMakeLists.txt
|
||||
Fixed incorrect handling of bKGD chunk in sub-8-bit files (Cosmin)
|
||||
Added hardware optimization directories to zip and 7z distributions.
|
||||
Fixed incorrect bitmask for options.
|
||||
Fixed many spelling typos.
|
||||
Make png_get_iCCP consistent with man page (allow compression-type argument
|
||||
to be NULL, bug report by Lenard Szolnoki).
|
||||
Replaced the remaining uses of png_size_t with size_t (Cosmin)
|
||||
Fixed the calculation of row_factor in png_check_chunk_length
|
||||
(reported by Thuan Pham in SourceForge issue #278)
|
||||
Added missing parentheses to a macro definition
|
||||
(suggested by "irwir" in GitHub issue #216)
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe)
|
||||
or to glennrp at users.sourceforge.net
|
||||
to subscribe).
|
||||
|
||||
Glenn R-P
|
||||
|
58
src/3rdparty/libpng/CHANGES
vendored
58
src/3rdparty/libpng/CHANGES
vendored
@ -1,4 +1,3 @@
|
||||
#if 0
|
||||
CHANGES - changes for libpng
|
||||
|
||||
version 0.1 [March 29, 1995]
|
||||
@ -1454,7 +1453,7 @@ Version 1.2.6beta4 [July 28, 2004]
|
||||
sequential read support.
|
||||
Added some "#if PNG_WRITE_SUPPORTED" blocks.
|
||||
Added #ifdef to remove some redundancy in png_malloc_default().
|
||||
Use png_malloc instead of png_zalloc to allocate the pallete.
|
||||
Use png_malloc instead of png_zalloc to allocate the palette.
|
||||
|
||||
Version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004]
|
||||
Fixed buffer overflow vulnerability (CVE-2004-0597) in png_handle_tRNS().
|
||||
@ -3259,7 +3258,7 @@ Version 1.5.2beta01 [February 13, 2011]
|
||||
Revised PNG_EXPORTA macro to not use an empty parameter, to accommodate the
|
||||
old VisualC++ preprocessor.
|
||||
Turned on interlace handling in png_read_png().
|
||||
Fixed gcc pendantic warnings.
|
||||
Fixed gcc pedantic warnings.
|
||||
Handle longjmp in Cygwin.
|
||||
Fixed png_get_current_row_number() in the interlaced case.
|
||||
Cleaned up ALPHA flags and transformations.
|
||||
@ -3359,7 +3358,7 @@ Version 1.5.3beta05 [May 6, 2011]
|
||||
Pass "" instead of '\0' to png_default_error() in png_err(). This mistake
|
||||
was introduced in libpng-1.2.20beta01. This fixes CVE-2011-2691.
|
||||
Added PNG_WRITE_OPTIMIZE_CMF_SUPPORTED macro to make the zlib "CMF" byte
|
||||
optimization configureable.
|
||||
optimization configurable.
|
||||
IDAT compression failed if preceded by a compressed text chunk (bug
|
||||
introduced in libpng-1.5.3beta01-02). This was because the attempt to
|
||||
reset the zlib stream in png_write_IDAT happened after the first IDAT
|
||||
@ -3643,7 +3642,7 @@ Version 1.5.6beta05 [October 12, 2011]
|
||||
Fixed bug in png_write_chunk_header() debug print, introduced in 1.5.6beta01.
|
||||
|
||||
Version 1.5.6beta06 [October 17, 2011]
|
||||
Removed two redundant tests for unitialized row.
|
||||
Removed two redundant tests for uninitialized row.
|
||||
Fixed a relatively harmless memory overwrite in compressed text writing
|
||||
with a 1 byte zlib buffer.
|
||||
Add ability to call png_read_update_info multiple times to pngvalid.c.
|
||||
@ -3689,7 +3688,7 @@ Version 1.5.7beta01 [November 4, 2011]
|
||||
crash. The pngmem.c implementation of png_malloc() included a cast
|
||||
to png_size_t which would fail on large allocations on 16-bit systems.
|
||||
Fix for the preprocessor of the Intel C compiler. The preprocessor
|
||||
splits adjacent @ signs with a space; this changes the concatentation
|
||||
splits adjacent @ signs with a space; this changes the concatenation
|
||||
token from @-@-@ to PNG_JOIN; that should work with all compiler
|
||||
preprocessors.
|
||||
Paeth filter speed improvements from work by Siarhei Siamashka. This
|
||||
@ -3735,7 +3734,7 @@ Version 1.5.7beta03 [November 17, 2011]
|
||||
gray (on palette) itself.
|
||||
Fixes for C++ compilation using g++ When libpng source is compiled
|
||||
using g++. The compiler imposes C++ rules on the C source; thus it
|
||||
is desireable to make the source work with either C or C++ rules
|
||||
is desirable to make the source work with either C or C++ rules
|
||||
without throwing away useful error information. This change adds
|
||||
png_voidcast to allow C semantic (void*) cases or the corresponding
|
||||
C++ static_cast operation, as appropriate.
|
||||
@ -4061,7 +4060,7 @@ Version 1.6.0beta17 [March 10, 2012]
|
||||
possible to call png_inflate() incrementally. A warning is no longer
|
||||
issued if the language tag or translated keyword in the iTXt chunk
|
||||
has zero length.
|
||||
If benign errors are disabled use maximum window on ancilliary inflate.
|
||||
If benign errors are disabled use maximum window on ancillary inflate.
|
||||
This works round a bug introduced in 1.5.4 where compressed ancillary
|
||||
chunks could end up with a too-small windowBits value in the deflate
|
||||
header.
|
||||
@ -4176,7 +4175,7 @@ Version 1.6.0beta27 [August 11, 2012]
|
||||
declared even though the functions are never actually defined. This
|
||||
change provides a dummy definition so that the declarations work, yet any
|
||||
implementation will fail to compile because of an incomplete type.
|
||||
Re-eliminated the use of strcpy() in pngtest.c. An unncessary use of
|
||||
Re-eliminated the use of strcpy() in pngtest.c. An unnecessary use of
|
||||
strcpy() was accidentally re-introduced in libpng16; this change replaces
|
||||
it with strncpy().
|
||||
Eliminated use of png_sizeof(); use sizeof() instead.
|
||||
@ -4309,7 +4308,7 @@ Version 1.6.0beta31 [November 1, 2012]
|
||||
resulting in VS2010 having to update the files.
|
||||
Removed non-working ICC profile support code that was mostly added to
|
||||
libpng-1.6.0beta29 and beta30. There was too much code for too little
|
||||
gain; implementing full ICC color correction may be desireable but is left
|
||||
gain; implementing full ICC color correction may be desirable but is left
|
||||
up to applications.
|
||||
|
||||
Version 1.6.0beta32 [November 25, 2012]
|
||||
@ -4592,7 +4591,7 @@ Version 1.6.3beta07 [June 8, 2013]
|
||||
the optimizations ('check' vs 'api') are exposed in the public header files
|
||||
except that the new setting PNG_ARM_NEON_OPT documents how libpng makes the
|
||||
decision about whether or not to use the optimizations.
|
||||
Protect symbol prefixing against CC/CPPFLAGS/CFLAGS useage.
|
||||
Protect symbol prefixing against CC/CPPFLAGS/CFLAGS usage.
|
||||
Previous iOS/Xcode fixes for the ARM NEON optimizations moved the test
|
||||
on __ARM_NEON__ from configure time to compile time. This breaks symbol
|
||||
prefixing because the definition of the special png_init_filter_functions
|
||||
@ -5635,7 +5634,7 @@ Version 1.6.24beta02 [June 23, 2016]
|
||||
to All and adds a list of the warnings that need to be turned off. This is
|
||||
semi-documentary; the intent is to tell libpng users which warnings have
|
||||
been examined and judged non-fixable at present. The warning about
|
||||
structure padding is fixable, but it would be a signficant change (moving
|
||||
structure padding is fixable, but it would be a significant change (moving
|
||||
structure members around).
|
||||
|
||||
Version 1.6.24beta03 [July 4, 2016]
|
||||
@ -5781,7 +5780,7 @@ Version 1.6.28rc01 [January 3, 2017]
|
||||
Added option to Cmake build allowing a custom location of zlib to be
|
||||
specified in a scenario where libpng is being built as a subproject
|
||||
alongside zlib by another project (Sam Serrels).
|
||||
Changed png_ptr->options from a png_byte to png_uint_32, to accomodate
|
||||
Changed png_ptr->options from a png_byte to png_uint_32, to accommodate
|
||||
up to 16 options.
|
||||
|
||||
Version 1.6.28rc02 [January 4, 2017]
|
||||
@ -5932,7 +5931,7 @@ Version 1.6.32beta04 [August 2, 2017]
|
||||
Update libpng.3 and libpng-manual.txt about eXIf functions.
|
||||
|
||||
Version 1.6.32beta05 [August 2, 2017]
|
||||
Restored png_get_eXIf() and png_set_eXIf() to maintain API compatability.
|
||||
Restored png_get_eXIf() and png_set_eXIf() to maintain API compatibility.
|
||||
|
||||
Version 1.6.32beta06 [August 2, 2017]
|
||||
Removed png_get_eXIf_1() and png_set_eXIf_1().
|
||||
@ -6038,14 +6037,35 @@ Version 1.6.33 [September 28, 2017]
|
||||
Add end_info structure and png_read_end() to the libpng fuzzer.
|
||||
|
||||
Version 1.6.34 [September 29, 2017]
|
||||
Removed contrib/pngsuite/i*.png; some of these were incorrect and caused
|
||||
test failures.
|
||||
Removed contrib/pngsuite/i*.png; some of them caused test failures.
|
||||
|
||||
Version 1.6.35beta01 [March 6, 2018]
|
||||
Restored 21 of the contrib/pngsuite/i*.png, which do not cause test
|
||||
failures. Placed the remainder in contrib/pngsuite/interlaced/i*.png.
|
||||
Added calls to png_set_*() transforms commonly used by browsers to
|
||||
the fuzzer.
|
||||
Removed some unnecessary brackets in pngrtran.c
|
||||
Fixed miscellaneous typos (Patch by github user "luzpaz").
|
||||
Change "ASM C" to "C ASM" in CMakeLists.txt
|
||||
Fixed incorrect handling of bKGD chunk in sub-8-bit files (Cosmin)
|
||||
Added hardware optimization directories to zip and 7z distributions.
|
||||
Fixed incorrect bitmask for options.
|
||||
Fixed many spelling typos.
|
||||
|
||||
Version 1.6.35beta02 [March 28, 2018]
|
||||
Make png_get_iCCP consistent with man page (allow compression-type argument
|
||||
to be NULL, bug report by Lenard Szolnoki).
|
||||
|
||||
Version 1.6.35 [July 15, 2018]
|
||||
Replaced the remaining uses of png_size_t with size_t (Cosmin)
|
||||
Fixed the calculation of row_factor in png_check_chunk_length
|
||||
(reported by Thuan Pham in SourceForge issue #278)
|
||||
Added missing parentheses to a macro definition
|
||||
(suggested by "irwir" in GitHub issue #216)
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe)
|
||||
or to glennrp at users.sourceforge.net
|
||||
to subscribe).
|
||||
|
||||
Glenn R-P
|
||||
#endif
|
||||
|
2
src/3rdparty/libpng/INSTALL
vendored
2
src/3rdparty/libpng/INSTALL
vendored
@ -284,7 +284,7 @@ those sections that are actually used will be loaded into memory.
|
||||
|
||||
XIV. Enabling or disabling hardware optimizations
|
||||
|
||||
Certain hardware capabilites, such as the Intel SSE instructions,
|
||||
Certain hardware capabilities, such as the Intel SSE instructions,
|
||||
are normally detected at run time. Enable them with configure options
|
||||
such as one of
|
||||
|
||||
|
6
src/3rdparty/libpng/LICENSE
vendored
6
src/3rdparty/libpng/LICENSE
vendored
@ -10,8 +10,8 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are
|
||||
Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
|
||||
libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
|
||||
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
|
||||
derived from libpng-1.0.6, and are distributed according to the same
|
||||
disclaimer and license as libpng-1.0.6 with the following individuals
|
||||
added to the list of Contributing Authors:
|
||||
@ -130,4 +130,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
September 29, 2017
|
||||
July 15, 2018
|
||||
|
4
src/3rdparty/libpng/README
vendored
4
src/3rdparty/libpng/README
vendored
@ -1,4 +1,4 @@
|
||||
README for libpng version 1.6.34 - September 29, 2017 (shared library 16.0)
|
||||
README for libpng version 1.6.35 - July 15, 2018 (shared library 16.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
@ -118,7 +118,7 @@ development group.
|
||||
Send comments/corrections/commendations to png-mng-implement at
|
||||
lists.sourceforge.net (subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
to subscribe) or to glennrp at users.sourceforge.net
|
||||
to subscribe).
|
||||
|
||||
You can't reach Guy, the original libpng author, at the addresses
|
||||
given in previous versions of this document. He and Andreas will
|
||||
|
72
src/3rdparty/libpng/libpng-manual.txt
vendored
72
src/3rdparty/libpng/libpng-manual.txt
vendored
@ -1,9 +1,8 @@
|
||||
libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.6.34 - September 29, 2017
|
||||
libpng version 1.6.35 - July 15, 2018
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2017 Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2018 Glenn Randers-Pehrson
|
||||
|
||||
This document is released under the libpng license.
|
||||
For conditions of distribution and use, see the disclaimer
|
||||
@ -11,7 +10,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.6.34 - September 29, 2017
|
||||
libpng versions 0.97, January 1998, through 1.6.35 - July 15, 2018
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2017 Glenn Randers-Pehrson
|
||||
|
||||
@ -348,18 +347,18 @@ Customizing libpng.
|
||||
FILE *fp = fopen(file_name, "rb");
|
||||
if (!fp)
|
||||
{
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
if (fread(header, 1, number, fp) != number)
|
||||
{
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
is_png = !png_sig_cmp(header, 0, number);
|
||||
if (!is_png)
|
||||
{
|
||||
return (NOT_PNG);
|
||||
return NOT_PNG;
|
||||
}
|
||||
|
||||
Next, png_struct and png_info need to be allocated and initialized. In
|
||||
@ -378,7 +377,7 @@ create the structure, so your application should check for that.
|
||||
user_error_fn, user_warning_fn);
|
||||
|
||||
if (!png_ptr)
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
|
||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||
|
||||
@ -386,7 +385,7 @@ create the structure, so your application should check for that.
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr,
|
||||
(png_infopp)NULL, (png_infopp)NULL);
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
If you want to use your own memory allocation routines,
|
||||
@ -421,7 +420,7 @@ free any memory.
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr,
|
||||
&end_info);
|
||||
fclose(fp);
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
Pass (png_infopp)NULL instead of &end_info if you didn't create
|
||||
@ -503,7 +502,7 @@ input stream. You must supply the function
|
||||
|
||||
png_byte name[5];
|
||||
png_byte *data;
|
||||
png_size_t size;
|
||||
size_t size;
|
||||
|
||||
/* Note that libpng has already taken care of
|
||||
the CRC handling */
|
||||
@ -512,9 +511,9 @@ input stream. You must supply the function
|
||||
unknown chunk structure, process it, and return one
|
||||
of the following: */
|
||||
|
||||
return (-n); /* chunk had an error */
|
||||
return (0); /* did not recognize */
|
||||
return (n); /* success */
|
||||
return -n; /* chunk had an error */
|
||||
return 0; /* did not recognize */
|
||||
return n; /* success */
|
||||
}
|
||||
|
||||
(You can give your function another name that you like instead of
|
||||
@ -1003,7 +1002,7 @@ chunks to be assumed to be encoded using sRGB.
|
||||
png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC);
|
||||
|
||||
In this case the output is assumed to be something like an sRGB conformant
|
||||
display preceeded by a power-law lookup table of power 1.45. This is how
|
||||
display preceded by a power-law lookup table of power 1.45. This is how
|
||||
early Mac systems behaved.
|
||||
|
||||
png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR);
|
||||
@ -1055,7 +1054,7 @@ faster.)
|
||||
|
||||
When the default gamma of PNG files doesn't match the output gamma.
|
||||
If you have PNG files with no gamma information png_set_alpha_mode allows
|
||||
you to provide a default gamma, but it also sets the ouput gamma to the
|
||||
you to provide a default gamma, but it also sets the output gamma to the
|
||||
matching value. If you know your PNG files have a gamma that doesn't
|
||||
match the output you can take advantage of the fact that
|
||||
png_set_alpha_mode always sets the output gamma but only sets the PNG
|
||||
@ -2409,7 +2408,7 @@ separate.
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr,
|
||||
(png_infopp)NULL);
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
png_read_end(png_ptr, end_info);
|
||||
@ -2549,7 +2548,7 @@ png_infop info_ptr;
|
||||
user_error_fn, user_warning_fn);
|
||||
|
||||
if (!png_ptr)
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
|
||||
info_ptr = png_create_info_struct(png_ptr);
|
||||
|
||||
@ -2557,14 +2556,14 @@ png_infop info_ptr;
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr,
|
||||
(png_infopp)NULL, (png_infopp)NULL);
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
if (setjmp(png_jmpbuf(png_ptr)))
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr,
|
||||
(png_infopp)NULL);
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* This one's new. You can provide functions
|
||||
@ -2598,7 +2597,7 @@ png_infop info_ptr;
|
||||
{
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr,
|
||||
(png_infopp)NULL);
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* This one's new also. Simply give it a chunk
|
||||
@ -2742,7 +2741,7 @@ custom writing functions. See the discussion under Customizing libpng.
|
||||
FILE *fp = fopen(file_name, "wb");
|
||||
|
||||
if (!fp)
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
|
||||
Next, png_struct and png_info need to be allocated and initialized.
|
||||
As these can be both relatively large, you may not want to store these
|
||||
@ -2757,14 +2756,14 @@ both "png_ptr"; you can call them anything you like, such as
|
||||
user_error_fn, user_warning_fn);
|
||||
|
||||
if (!png_ptr)
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
|
||||
png_infop info_ptr = png_create_info_struct(png_ptr);
|
||||
if (!info_ptr)
|
||||
{
|
||||
png_destroy_write_struct(&png_ptr,
|
||||
(png_infopp)NULL);
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
If you want to use your own memory allocation routines,
|
||||
@ -2791,7 +2790,7 @@ section below for more information on the libpng error handling.
|
||||
{
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
fclose(fp);
|
||||
return (ERROR);
|
||||
return ERROR;
|
||||
}
|
||||
...
|
||||
return;
|
||||
@ -3779,7 +3778,7 @@ in-memory bitmap formats or to be written from the same formats. If these
|
||||
formats do not accommodate your needs then you can, and should, use the more
|
||||
sophisticated APIs above - these support a wide variety of in-memory formats
|
||||
and a wide variety of sophisticated transformations to those formats as well
|
||||
as a wide variety of APIs to manipulate ancilliary information.
|
||||
as a wide variety of APIs to manipulate ancillary information.
|
||||
|
||||
To read a PNG file using the simplified API:
|
||||
|
||||
@ -4102,7 +4101,7 @@ READ APIs
|
||||
The PNG header is read from the stdio FILE object.
|
||||
|
||||
int png_image_begin_read_from_memory(png_imagep image,
|
||||
png_const_voidp memory, png_size_t size)
|
||||
png_const_voidp memory, size_t size)
|
||||
|
||||
The PNG header is read from the given memory buffer.
|
||||
|
||||
@ -4255,10 +4254,10 @@ png_get_io_ptr(). For example:
|
||||
The replacement I/O functions must have prototypes as follows:
|
||||
|
||||
void user_read_data(png_structp png_ptr,
|
||||
png_bytep data, png_size_t length);
|
||||
png_bytep data, size_t length);
|
||||
|
||||
void user_write_data(png_structp png_ptr,
|
||||
png_bytep data, png_size_t length);
|
||||
png_bytep data, size_t length);
|
||||
|
||||
void user_flush_data(png_structp png_ptr);
|
||||
|
||||
@ -4784,7 +4783,7 @@ behavior in case the application runs out of memory part-way through
|
||||
the process.
|
||||
|
||||
We changed the prototypes of png_get_compression_buffer_size() and
|
||||
png_set_compression_buffer_size() to work with png_size_t instead of
|
||||
png_set_compression_buffer_size() to work with size_t instead of
|
||||
png_uint_32.
|
||||
|
||||
Support for numbered error messages was removed by default, since we
|
||||
@ -5255,9 +5254,8 @@ or you can browse it with a web browser at
|
||||
https://github.com/glennrp/libpng or
|
||||
https://sourceforge.net/p/libpng/code/ci/libpng16/tree/
|
||||
|
||||
Patches can be sent to glennrp at users.sourceforge.net or to
|
||||
png-mng-implement at lists.sourceforge.net or you can upload them to
|
||||
the libpng bug tracker at
|
||||
Patches can be sent to png-mng-implement at lists.sourceforge.net or
|
||||
you can upload them to the libpng bug tracker at
|
||||
|
||||
https://libpng.sourceforge.io/
|
||||
|
||||
@ -5266,9 +5264,9 @@ or as a "pull request" to
|
||||
https://github.com/glennrp/libpng/pulls
|
||||
|
||||
We also accept patches built from the tar or zip distributions, and
|
||||
simple verbal discriptions of bug fixes, reported either to the
|
||||
simple verbal descriptions of bug fixes, reported either to the
|
||||
SourceForge bug tracker, to the png-mng-implement at lists.sf.net
|
||||
mailing list, as github issues, or directly to glennrp.
|
||||
mailing list, as github issues.
|
||||
|
||||
XV. Coding style
|
||||
|
||||
@ -5289,7 +5287,7 @@ braces on separate lines:
|
||||
The braces can be omitted from simple one-line actions:
|
||||
|
||||
if (condition)
|
||||
return (0);
|
||||
return 0;
|
||||
|
||||
We use 3-space indentation, except for continued statements which
|
||||
are usually indented the same as the first line of the statement
|
||||
@ -5414,7 +5412,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
|
||||
an official declaration.
|
||||
|
||||
This is your unofficial assurance that libpng from version 0.71 and
|
||||
upward through 1.6.34 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.6.35 are Y2K compliant. It is my belief that earlier
|
||||
versions were also Y2K compliant.
|
||||
|
||||
Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||
|
40
src/3rdparty/libpng/png.c
vendored
40
src/3rdparty/libpng/png.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* png.c - location for general purpose libpng functions
|
||||
*
|
||||
* Last changed in libpng 1.6.33 [September 28, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -14,7 +14,7 @@
|
||||
#include "pngpriv.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef png_libpng_version_1_6_34 Your_png_h_is_not_version_1_6_34;
|
||||
typedef png_libpng_version_1_6_35 Your_png_h_is_not_version_1_6_35;
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* The version tests may need to be added to, but the problem warning has
|
||||
@ -71,7 +71,7 @@ png_set_sig_bytes(png_structrp png_ptr, int num_bytes)
|
||||
* PNG signature (this is the same behavior as strcmp, memcmp, etc).
|
||||
*/
|
||||
int PNGAPI
|
||||
png_sig_cmp(png_const_bytep sig, png_size_t start, png_size_t num_to_check)
|
||||
png_sig_cmp(png_const_bytep sig, size_t start, size_t num_to_check)
|
||||
{
|
||||
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
|
||||
|
||||
@ -136,7 +136,7 @@ png_reset_crc(png_structrp png_ptr)
|
||||
* trouble of calculating it.
|
||||
*/
|
||||
void /* PRIVATE */
|
||||
png_calculate_crc(png_structrp png_ptr, png_const_bytep ptr, png_size_t length)
|
||||
png_calculate_crc(png_structrp png_ptr, png_const_bytep ptr, size_t length)
|
||||
{
|
||||
int need_crc = 1;
|
||||
|
||||
@ -421,7 +421,7 @@ png_destroy_info_struct(png_const_structrp png_ptr, png_infopp info_ptr_ptr)
|
||||
* those cases where it does anything other than a memset.
|
||||
*/
|
||||
PNG_FUNCTION(void,PNGAPI
|
||||
png_info_init_3,(png_infopp ptr_ptr, png_size_t png_info_struct_size),
|
||||
png_info_init_3,(png_infopp ptr_ptr, size_t png_info_struct_size),
|
||||
PNG_DEPRECATED)
|
||||
{
|
||||
png_inforp info_ptr = *ptr_ptr;
|
||||
@ -816,15 +816,15 @@ png_get_copyright(png_const_structrp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.34 - September 29, 2017" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
|
||||
"libpng version 1.6.35 - July 15, 2018" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
|
||||
PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||
PNG_STRING_NEWLINE;
|
||||
# else
|
||||
return "libpng version 1.6.34 - September 29, 2017\
|
||||
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
|
||||
return "libpng version 1.6.35 - July 15, 2018\
|
||||
Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
# endif
|
||||
@ -942,7 +942,7 @@ png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name)
|
||||
|
||||
/* The code is the fifth byte after each four byte string. Historically this
|
||||
* code was always searched from the end of the list, this is no longer
|
||||
* necessary because the 'set' routine handles duplicate entries correcty.
|
||||
* necessary because the 'set' routine handles duplicate entries correctly.
|
||||
*/
|
||||
do /* num_chunk_list > 0, so at least one */
|
||||
{
|
||||
@ -2067,7 +2067,7 @@ png_icc_check_header(png_const_structrp png_ptr, png_colorspacerp colorspace,
|
||||
*/
|
||||
|
||||
/* Data checks (could be skipped). These checks must be independent of the
|
||||
* version number; however, the version number doesn't accomodate changes in
|
||||
* version number; however, the version number doesn't accommodate changes in
|
||||
* the header fields (just the known tags and the interpretation of the
|
||||
* data.)
|
||||
*/
|
||||
@ -2707,7 +2707,7 @@ png_check_IHDR(png_const_structrp png_ptr,
|
||||
|
||||
#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED)
|
||||
/* ASCII to fp functions */
|
||||
/* Check an ASCII formated floating point value, see the more detailed
|
||||
/* Check an ASCII formatted floating point value, see the more detailed
|
||||
* comments in pngpriv.h
|
||||
*/
|
||||
/* The following is used internally to preserve the sticky flags */
|
||||
@ -2715,11 +2715,11 @@ png_check_IHDR(png_const_structrp png_ptr,
|
||||
#define png_fp_set(state, value) ((state) = (value) | ((state) & PNG_FP_STICKY))
|
||||
|
||||
int /* PRIVATE */
|
||||
png_check_fp_number(png_const_charp string, png_size_t size, int *statep,
|
||||
png_check_fp_number(png_const_charp string, size_t size, int *statep,
|
||||
png_size_tp whereami)
|
||||
{
|
||||
int state = *statep;
|
||||
png_size_t i = *whereami;
|
||||
size_t i = *whereami;
|
||||
|
||||
while (i < size)
|
||||
{
|
||||
@ -2842,10 +2842,10 @@ PNG_FP_End:
|
||||
|
||||
/* The same but for a complete string. */
|
||||
int
|
||||
png_check_fp_string(png_const_charp string, png_size_t size)
|
||||
png_check_fp_string(png_const_charp string, size_t size)
|
||||
{
|
||||
int state=0;
|
||||
png_size_t char_index=0;
|
||||
size_t char_index=0;
|
||||
|
||||
if (png_check_fp_number(string, size, &state, &char_index) != 0 &&
|
||||
(char_index == size || string[char_index] == 0))
|
||||
@ -2906,7 +2906,7 @@ png_pow10(int power)
|
||||
#pragma GCC diagnostic warning "-Wstrict-overflow=2"
|
||||
#endif /* GCC_STRICT_OVERFLOW */
|
||||
void /* PRIVATE */
|
||||
png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
|
||||
png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size,
|
||||
double fp, unsigned int precision)
|
||||
{
|
||||
/* We use standard functions from math.h, but not printf because
|
||||
@ -3237,7 +3237,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
|
||||
*/
|
||||
void /* PRIVATE */
|
||||
png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii,
|
||||
png_size_t size, png_fixed_point fp)
|
||||
size_t size, png_fixed_point fp)
|
||||
{
|
||||
/* Require space for 10 decimal digits, a decimal point, a minus sign and a
|
||||
* trailing \0, 13 characters:
|
||||
@ -4344,7 +4344,7 @@ png_set_option(png_structrp png_ptr, int option, int onoff)
|
||||
png_uint_32 setting = (2U + (onoff != 0)) << option;
|
||||
png_uint_32 current = png_ptr->options;
|
||||
|
||||
png_ptr->options = (png_uint_32)(((current & ~mask) | setting) & 0xff);
|
||||
png_ptr->options = (png_uint_32)((current & ~mask) | setting);
|
||||
|
||||
return (int)(current & mask) >> option;
|
||||
}
|
||||
|
80
src/3rdparty/libpng/png.h
vendored
80
src/3rdparty/libpng/png.h
vendored
@ -1,9 +1,9 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.6.34, September 29, 2017
|
||||
* libpng version 1.6.35, July 15, 2018
|
||||
*
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -12,7 +12,7 @@
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.6.34, September 29, 2017:
|
||||
* libpng versions 0.97, January 1998, through 1.6.35, July 15, 2018:
|
||||
* Glenn Randers-Pehrson.
|
||||
* See also "Contributing Authors", below.
|
||||
*/
|
||||
@ -25,8 +25,8 @@
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
*
|
||||
* libpng versions 1.0.7, July 1, 2000 through 1.6.34, September 29, 2017 are
|
||||
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
|
||||
* libpng versions 1.0.7, July 1, 2000 through 1.6.35, July 15, 2018 are
|
||||
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
|
||||
* derived from libpng-1.0.6, and are distributed according to the same
|
||||
* disclaimer and license as libpng-1.0.6 with the following individuals
|
||||
* added to the list of Contributing Authors:
|
||||
@ -213,7 +213,7 @@
|
||||
* ...
|
||||
* 1.5.30 15 10527 15.so.15.30[.0]
|
||||
* ...
|
||||
* 1.6.34 16 10633 16.so.16.34[.0]
|
||||
* 1.6.35 16 10635 16.so.16.35[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@ -241,13 +241,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* September 29, 2017
|
||||
* July 15, 2018
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
*
|
||||
* This is your unofficial assurance that libpng from version 0.71 and
|
||||
* upward through 1.6.34 are Y2K compliant. It is my belief that
|
||||
* upward through 1.6.35 are Y2K compliant. It is my belief that
|
||||
* earlier versions were also Y2K compliant.
|
||||
*
|
||||
* Libpng only has two year fields. One is a 2-byte unsigned integer
|
||||
@ -309,8 +309,8 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.34"
|
||||
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.34 - September 29, 2017\n"
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.35"
|
||||
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.35 - July 15, 2018\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 16
|
||||
#define PNG_LIBPNG_VER_DLLNUM 16
|
||||
@ -318,13 +318,13 @@
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 6
|
||||
#define PNG_LIBPNG_VER_RELEASE 34
|
||||
#define PNG_LIBPNG_VER_RELEASE 35
|
||||
|
||||
/* This should match the numeric part of the final component of
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
||||
*/
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
#define PNG_LIBPNG_VER_BUILD 02
|
||||
|
||||
/* Release Status */
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
@ -341,7 +341,7 @@
|
||||
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
|
||||
PNG_LIBPNG_BUILD_PRIVATE */
|
||||
|
||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
|
||||
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
|
||||
|
||||
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
|
||||
* We must not include leading zeros.
|
||||
@ -349,7 +349,7 @@
|
||||
* version 1.0.0 was mis-numbered 100 instead of 10000). From
|
||||
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
|
||||
*/
|
||||
#define PNG_LIBPNG_VER 10634 /* 1.6.34 */
|
||||
#define PNG_LIBPNG_VER 10635 /* 1.6.35 */
|
||||
|
||||
/* Library configuration: these options cannot be changed after
|
||||
* the library has been built.
|
||||
@ -459,7 +459,7 @@ extern "C" {
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef char* png_libpng_version_1_6_34;
|
||||
typedef char* png_libpng_version_1_6_35;
|
||||
|
||||
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
||||
*
|
||||
@ -600,8 +600,8 @@ typedef struct png_text_struct
|
||||
png_charp key; /* keyword, 1-79 character description of "text" */
|
||||
png_charp text; /* comment, may be an empty string (ie "")
|
||||
or a NULL pointer */
|
||||
png_size_t text_length; /* length of the text string */
|
||||
png_size_t itxt_length; /* length of the itxt string */
|
||||
size_t text_length; /* length of the text string */
|
||||
size_t itxt_length; /* length of the itxt string */
|
||||
png_charp lang; /* language code, 0-79 characters
|
||||
or a NULL pointer */
|
||||
png_charp lang_key; /* keyword translated UTF-8 string, 0 or more
|
||||
@ -654,7 +654,7 @@ typedef struct png_unknown_chunk_t
|
||||
{
|
||||
png_byte name[5]; /* Textual chunk name with '\0' terminator */
|
||||
png_byte *data; /* Data, should not be modified on read! */
|
||||
png_size_t size;
|
||||
size_t size;
|
||||
|
||||
/* On write 'location' must be set using the flag values listed below.
|
||||
* Notice that on read it is set by libpng however the values stored have
|
||||
@ -679,7 +679,7 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
|
||||
/* Maximum positive integer used in PNG is (2^31)-1 */
|
||||
#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL)
|
||||
#define PNG_UINT_32_MAX ((png_uint_32)(-1))
|
||||
#define PNG_SIZE_MAX ((png_size_t)(-1))
|
||||
#define PNG_SIZE_MAX ((size_t)(-1))
|
||||
|
||||
/* These are constants for fixed point values encoded in the
|
||||
* PNG specification manner (x100000)
|
||||
@ -785,7 +785,7 @@ typedef png_unknown_chunk * * png_unknown_chunkpp;
|
||||
typedef struct png_row_info_struct
|
||||
{
|
||||
png_uint_32 width; /* width of row */
|
||||
png_size_t rowbytes; /* number of bytes in row */
|
||||
size_t rowbytes; /* number of bytes in row */
|
||||
png_byte color_type; /* color type of row */
|
||||
png_byte bit_depth; /* bit depth of row */
|
||||
png_byte channels; /* number of channels (1, 2, 3, or 4) */
|
||||
@ -804,7 +804,7 @@ typedef png_row_info * * png_row_infopp;
|
||||
* expected to return the read data in the buffer.
|
||||
*/
|
||||
typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp));
|
||||
typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t));
|
||||
typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, size_t));
|
||||
typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp));
|
||||
typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32,
|
||||
int));
|
||||
@ -941,8 +941,8 @@ PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes));
|
||||
* signature, and non-zero otherwise. Having num_to_check == 0 or
|
||||
* start > 7 will always fail (ie return non-zero).
|
||||
*/
|
||||
PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start,
|
||||
png_size_t num_to_check));
|
||||
PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start,
|
||||
size_t num_to_check));
|
||||
|
||||
/* Simple signature checking function. This is the same as calling
|
||||
* png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
|
||||
@ -961,11 +961,11 @@ PNG_EXPORTA(5, png_structp, png_create_write_struct,
|
||||
png_error_ptr warn_fn),
|
||||
PNG_ALLOCATED);
|
||||
|
||||
PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size,
|
||||
PNG_EXPORT(6, size_t, png_get_compression_buffer_size,
|
||||
(png_const_structrp png_ptr));
|
||||
|
||||
PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr,
|
||||
png_size_t size));
|
||||
size_t size));
|
||||
|
||||
/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
|
||||
* match up.
|
||||
@ -1018,7 +1018,7 @@ PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr));
|
||||
|
||||
/* Write a PNG chunk - size, type, (optional) data, CRC. */
|
||||
PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep
|
||||
chunk_name, png_const_bytep data, png_size_t length));
|
||||
chunk_name, png_const_bytep data, size_t length));
|
||||
|
||||
/* Write the start of a PNG chunk - length and chunk name. */
|
||||
PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr,
|
||||
@ -1026,7 +1026,7 @@ PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr,
|
||||
|
||||
/* Write the data of a PNG chunk started with png_write_chunk_start(). */
|
||||
PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr,
|
||||
png_const_bytep data, png_size_t length));
|
||||
png_const_bytep data, size_t length));
|
||||
|
||||
/* Finish a chunk started with png_write_chunk_start() (includes CRC). */
|
||||
PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr));
|
||||
@ -1040,7 +1040,7 @@ PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr),
|
||||
* the API will be removed in the future.
|
||||
*/
|
||||
PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr,
|
||||
png_size_t png_info_struct_size), PNG_DEPRECATED);
|
||||
size_t png_info_struct_size), PNG_DEPRECATED);
|
||||
|
||||
/* Writes all the PNG information before the image. */
|
||||
PNG_EXPORT(20, void, png_write_info_before_PLTE,
|
||||
@ -1137,7 +1137,7 @@ PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
|
||||
* corresponding composited pixel, and the color channels are unassociated
|
||||
* (not premultiplied). The gamma encoded color channels must be scaled
|
||||
* according to the contribution and to do this it is necessary to undo
|
||||
* the encoding, scale the color values, perform the composition and reencode
|
||||
* the encoding, scale the color values, perform the composition and re-encode
|
||||
* the values. This is the 'PNG' mode.
|
||||
*
|
||||
* The alternative is to 'associate' the alpha with the color information by
|
||||
@ -1193,7 +1193,7 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
|
||||
*
|
||||
* png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC);
|
||||
* In this case the output is assumed to be something like an sRGB conformant
|
||||
* display preceeded by a power-law lookup table of power 1.45. This is how
|
||||
* display preceded by a power-law lookup table of power 1.45. This is how
|
||||
* early Mac systems behaved.
|
||||
*
|
||||
* png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR);
|
||||
@ -1240,7 +1240,7 @@ PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr,
|
||||
*
|
||||
* When the default gamma of PNG files doesn't match the output gamma.
|
||||
* If you have PNG files with no gamma information png_set_alpha_mode allows
|
||||
* you to provide a default gamma, but it also sets the ouput gamma to the
|
||||
* you to provide a default gamma, but it also sets the output gamma to the
|
||||
* matching value. If you know your PNG files have a gamma that doesn't
|
||||
* match the output you can take advantage of the fact that
|
||||
* png_set_alpha_mode always sets the output gamma but only sets the PNG
|
||||
@ -1691,7 +1691,7 @@ PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp));
|
||||
* chunk will cause an error at this point unless it is to be saved.
|
||||
* positive: The chunk was handled, libpng will ignore/discard it.
|
||||
*
|
||||
* See "INTERACTION WTIH USER CHUNK CALLBACKS" below for important notes about
|
||||
* See "INTERACTION WITH USER CHUNK CALLBACKS" below for important notes about
|
||||
* how this behavior will change in libpng 1.7
|
||||
*/
|
||||
PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr,
|
||||
@ -1716,7 +1716,7 @@ PNG_EXPORT(91, png_voidp, png_get_progressive_ptr,
|
||||
|
||||
/* Function to be called when data becomes available */
|
||||
PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr,
|
||||
png_inforp info_ptr, png_bytep buffer, png_size_t buffer_size));
|
||||
png_inforp info_ptr, png_bytep buffer, size_t buffer_size));
|
||||
|
||||
/* A function which may be called *only* within png_process_data to stop the
|
||||
* processing of any more data. The function returns the number of bytes
|
||||
@ -1725,7 +1725,7 @@ PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr,
|
||||
* 'save' is set to true the routine will first save all the pending data and
|
||||
* will always return 0.
|
||||
*/
|
||||
PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structrp, int save));
|
||||
PNG_EXPORT(219, size_t, png_process_data_pause, (png_structrp, int save));
|
||||
|
||||
/* A function which may be called *only* outside (after) a call to
|
||||
* png_process_data. It returns the number of bytes of data to skip in the
|
||||
@ -1870,7 +1870,7 @@ PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr,
|
||||
png_const_inforp info_ptr, png_uint_32 flag));
|
||||
|
||||
/* Returns number of bytes needed to hold a transformed row. */
|
||||
PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structrp png_ptr,
|
||||
PNG_EXPORT(111, size_t, png_get_rowbytes, (png_const_structrp png_ptr,
|
||||
png_const_inforp info_ptr));
|
||||
|
||||
#ifdef PNG_INFO_IMAGE_SUPPORTED
|
||||
@ -2239,7 +2239,7 @@ PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
|
||||
* to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks
|
||||
* it simply resets the behavior to the libpng default.
|
||||
*
|
||||
* INTERACTION WTIH USER CHUNK CALLBACKS:
|
||||
* INTERACTION WITH USER CHUNK CALLBACKS:
|
||||
* The per-chunk handling is always used when there is a png_user_chunk_ptr
|
||||
* callback and the callback returns 0; the chunk is then always stored *unless*
|
||||
* it is critical and the per-chunk setting is other than ALWAYS. Notice that
|
||||
@ -2658,7 +2658,7 @@ PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr,
|
||||
* The simplified API hides the details of both libpng and the PNG file format
|
||||
* itself. It allows PNG files to be read into a very limited number of
|
||||
* in-memory bitmap formats or to be written from the same formats. If these
|
||||
* formats do not accomodate your needs then you can, and should, use the more
|
||||
* formats do not accommodate your needs then you can, and should, use the more
|
||||
* sophisticated APIs above - these support a wide variety of in-memory formats
|
||||
* and a wide variety of sophisticated transformations to those formats as well
|
||||
* as a wide variety of APIs to manipulate ancillary information.
|
||||
@ -3020,7 +3020,7 @@ PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image,
|
||||
#endif /* STDIO */
|
||||
|
||||
PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image,
|
||||
png_const_voidp memory, png_size_t size));
|
||||
png_const_voidp memory, size_t size));
|
||||
/* The PNG header is read from the given memory buffer. */
|
||||
|
||||
PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image,
|
||||
@ -3133,7 +3133,7 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
|
||||
* than or equal to the original value.
|
||||
*
|
||||
* If the function returns false and *memory_bytes was not changed an error
|
||||
* occured during write. If *memory_bytes was changed, or is not 0 if
|
||||
* occurred during write. If *memory_bytes was changed, or is not 0 if
|
||||
* 'memory' was NULL, the write would have succeeded but for the memory
|
||||
* buffer being too small. *memory_bytes contains the required number of
|
||||
* bytes and will be bigger that the original value.
|
||||
@ -3217,7 +3217,7 @@ PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory,
|
||||
* option and 'onoff' is 0 (off) or non-0 (on). The value returned is given
|
||||
* by the PNG_OPTION_ defines below.
|
||||
*
|
||||
* HARDWARE: normally hardware capabilites, such as the Intel SSE instructions,
|
||||
* HARDWARE: normally hardware capabilities, such as the Intel SSE instructions,
|
||||
* are detected at run time, however sometimes it may be impossible
|
||||
* to do this in user mode, in which case it is necessary to discover
|
||||
* the capabilities in an OS specific way. Such capabilities are
|
||||
|
29
src/3rdparty/libpng/pngconf.h
vendored
29
src/3rdparty/libpng/pngconf.h
vendored
@ -1,9 +1,9 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.6.34, September 29, 2017
|
||||
* libpng version 1.6.35, July 15, 2018
|
||||
*
|
||||
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
|
||||
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -127,7 +127,7 @@
|
||||
*
|
||||
* These cases only differ if the operating system does not use the C
|
||||
* calling convention, at present this just means the above cases
|
||||
* (x86 DOS/Windows sytems) and, even then, this does not apply to
|
||||
* (x86 DOS/Windows systems) and, even then, this does not apply to
|
||||
* Cygwin running on those systems.
|
||||
*
|
||||
* Note that the value must be defined in pnglibconf.h so that what
|
||||
@ -515,8 +515,10 @@
|
||||
# error "libpng requires an unsigned 32-bit (or more) type"
|
||||
#endif
|
||||
|
||||
/* Prior to 1.6.0 it was possible to disable the use of size_t, 1.6.0, however,
|
||||
* requires an ISOC90 compiler and relies on consistent behavior of sizeof.
|
||||
/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t.
|
||||
* From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant
|
||||
* behavior of sizeof and ptrdiff_t are required.
|
||||
* The legacy typedefs are provided here for backwards compatibility.
|
||||
*/
|
||||
typedef size_t png_size_t;
|
||||
typedef ptrdiff_t png_ptrdiff_t;
|
||||
@ -537,13 +539,12 @@ typedef ptrdiff_t png_ptrdiff_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* png_alloc_size_t is guaranteed to be no smaller than png_size_t, and no
|
||||
* smaller than png_uint_32. Casts from png_size_t or png_uint_32 to
|
||||
* png_alloc_size_t are not necessary; in fact, it is recommended not to use
|
||||
* them at all so that the compiler can complain when something turns out to be
|
||||
* problematic.
|
||||
/* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller
|
||||
* than png_uint_32. Casts from size_t or png_uint_32 to png_alloc_size_t are
|
||||
* not necessary; in fact, it is recommended not to use them at all, so that
|
||||
* the compiler can complain when something turns out to be problematic.
|
||||
*
|
||||
* Casts in the other direction (from png_alloc_size_t to png_size_t or
|
||||
* Casts in the other direction (from png_alloc_size_t to size_t or
|
||||
* png_uint_32) should be explicitly applied; however, we do not expect to
|
||||
* encounter practical situations that require such conversions.
|
||||
*
|
||||
@ -553,7 +554,7 @@ typedef ptrdiff_t png_ptrdiff_t;
|
||||
#ifdef PNG_SMALL_SIZE_T
|
||||
typedef png_uint_32 png_alloc_size_t;
|
||||
#else
|
||||
typedef png_size_t png_alloc_size_t;
|
||||
typedef size_t png_alloc_size_t;
|
||||
#endif
|
||||
|
||||
/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler
|
||||
@ -589,8 +590,8 @@ typedef char * png_charp;
|
||||
typedef const char * png_const_charp;
|
||||
typedef png_fixed_point * png_fixed_point_p;
|
||||
typedef const png_fixed_point * png_const_fixed_point_p;
|
||||
typedef png_size_t * png_size_tp;
|
||||
typedef const png_size_t * png_const_size_tp;
|
||||
typedef size_t * png_size_tp;
|
||||
typedef const size_t * png_const_size_tp;
|
||||
|
||||
#ifdef PNG_STDIO_SUPPORTED
|
||||
typedef FILE * png_FILE_p;
|
||||
|
17
src/3rdparty/libpng/pngget.c
vendored
17
src/3rdparty/libpng/pngget.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngget.c - retrieval of values from info struct
|
||||
*
|
||||
* Last changed in libpng 1.6.32 [August 24, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -26,7 +26,7 @@ png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr,
|
||||
return(0);
|
||||
}
|
||||
|
||||
png_size_t PNGAPI
|
||||
size_t PNGAPI
|
||||
png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
{
|
||||
if (png_ptr != NULL && info_ptr != NULL)
|
||||
@ -367,7 +367,7 @@ png_get_y_pixels_per_inch(png_const_structrp png_ptr, png_const_inforp info_ptr)
|
||||
static png_fixed_point
|
||||
png_fixed_inches_from_microns(png_const_structrp png_ptr, png_int_32 microns)
|
||||
{
|
||||
/* Convert from metres * 1,000,000 to inches * 100,000, meters to
|
||||
/* Convert from meters * 1,000,000 to inches * 100,000, meters to
|
||||
* inches is simply *(100/2.54), so we want *(10/2.54) == 500/127.
|
||||
* Notice that this can overflow - a warning is output and 0 is
|
||||
* returned.
|
||||
@ -741,8 +741,7 @@ png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
|
||||
if (png_ptr != NULL && info_ptr != NULL &&
|
||||
(info_ptr->valid & PNG_INFO_iCCP) != 0 &&
|
||||
name != NULL && compression_type != NULL && profile != NULL &&
|
||||
proflen != NULL)
|
||||
name != NULL && profile != NULL && proflen != NULL)
|
||||
{
|
||||
*name = info_ptr->iccp_name;
|
||||
*profile = info_ptr->iccp_profile;
|
||||
@ -750,11 +749,13 @@ png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
/* This is somewhat irrelevant since the profile data returned has
|
||||
* actually been uncompressed.
|
||||
*/
|
||||
*compression_type = PNG_COMPRESSION_TYPE_BASE;
|
||||
if (compression_type != NULL)
|
||||
*compression_type = PNG_COMPRESSION_TYPE_BASE;
|
||||
return (PNG_INFO_iCCP);
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1164,7 +1165,7 @@ png_get_user_chunk_ptr(png_const_structrp png_ptr)
|
||||
}
|
||||
#endif
|
||||
|
||||
png_size_t PNGAPI
|
||||
size_t PNGAPI
|
||||
png_get_compression_buffer_size(png_const_structrp png_ptr)
|
||||
{
|
||||
if (png_ptr == NULL)
|
||||
|
14
src/3rdparty/libpng/pnginfo.h
vendored
14
src/3rdparty/libpng/pnginfo.h
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pnginfo.h - header file for PNG reference library
|
||||
*
|
||||
* Last changed in libpng 1.6.1 [March 28, 2013]
|
||||
* Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2013,2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -55,10 +55,10 @@
|
||||
struct png_info_def
|
||||
{
|
||||
/* The following are necessary for every PNG file */
|
||||
png_uint_32 width; /* width of image in pixels (from IHDR) */
|
||||
png_uint_32 height; /* height of image in pixels (from IHDR) */
|
||||
png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
|
||||
png_size_t rowbytes; /* bytes needed to hold an untransformed row */
|
||||
png_uint_32 width; /* width of image in pixels (from IHDR) */
|
||||
png_uint_32 height; /* height of image in pixels (from IHDR) */
|
||||
png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
|
||||
size_t rowbytes; /* bytes needed to hold an untransformed row */
|
||||
png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */
|
||||
png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
|
||||
png_uint_16 num_trans; /* number of transparent palette color (tRNS) */
|
||||
@ -247,7 +247,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
|
||||
/* The sCAL chunk describes the actual physical dimensions of the
|
||||
* subject matter of the graphic. The chunk contains a unit specification
|
||||
* a byte value, and two ASCII strings representing floating-point
|
||||
* values. The values are width and height corresponsing to one pixel
|
||||
* values. The values are width and height corresponding to one pixel
|
||||
* in the image. Data values are valid if (valid & PNG_INFO_sCAL) is
|
||||
* non-zero.
|
||||
*/
|
||||
|
6
src/3rdparty/libpng/pnglibconf.h
vendored
6
src/3rdparty/libpng/pnglibconf.h
vendored
@ -1,10 +1,10 @@
|
||||
/* libpng 1.6.34 STANDARD API DEFINITION */
|
||||
/* libpng 1.6.35 STANDARD API DEFINITION */
|
||||
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* Libpng version 1.6.34 - September 29, 2017 */
|
||||
/* Libpng version 1.6.35 - July 15, 2018 */
|
||||
|
||||
/* Copyright (c) 1998-2017 Glenn Randers-Pehrson */
|
||||
/* Copyright (c) 1998-2018 Glenn Randers-Pehrson */
|
||||
|
||||
/* This code is released under the libpng license. */
|
||||
/* For conditions of distribution and use, see the disclaimer */
|
||||
|
38
src/3rdparty/libpng/pngpread.c
vendored
38
src/3rdparty/libpng/pngpread.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* Last changed in libpng 1.6.32 [August 24, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -34,7 +34,7 @@ if (png_ptr->buffer_size < N) \
|
||||
|
||||
void PNGAPI
|
||||
png_process_data(png_structrp png_ptr, png_inforp info_ptr,
|
||||
png_bytep buffer, png_size_t buffer_size)
|
||||
png_bytep buffer, size_t buffer_size)
|
||||
{
|
||||
if (png_ptr == NULL || info_ptr == NULL)
|
||||
return;
|
||||
@ -47,7 +47,7 @@ png_process_data(png_structrp png_ptr, png_inforp info_ptr,
|
||||
}
|
||||
}
|
||||
|
||||
png_size_t PNGAPI
|
||||
size_t PNGAPI
|
||||
png_process_data_pause(png_structrp png_ptr, int save)
|
||||
{
|
||||
if (png_ptr != NULL)
|
||||
@ -60,7 +60,7 @@ png_process_data_pause(png_structrp png_ptr, int save)
|
||||
else
|
||||
{
|
||||
/* This includes any pending saved bytes: */
|
||||
png_size_t remaining = png_ptr->buffer_size;
|
||||
size_t remaining = png_ptr->buffer_size;
|
||||
png_ptr->buffer_size = 0;
|
||||
|
||||
/* So subtract the saved buffer size, unless all the data
|
||||
@ -133,8 +133,8 @@ png_process_some_data(png_structrp png_ptr, png_inforp info_ptr)
|
||||
void /* PRIVATE */
|
||||
png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
|
||||
{
|
||||
png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
|
||||
num_to_check = 8 - num_checked;
|
||||
size_t num_checked = png_ptr->sig_bytes; /* SAFE, does not exceed 8 */
|
||||
size_t num_to_check = 8 - num_checked;
|
||||
|
||||
if (png_ptr->buffer_size < num_to_check)
|
||||
{
|
||||
@ -418,7 +418,7 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr)
|
||||
}
|
||||
|
||||
void PNGCBAPI
|
||||
png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
||||
png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, size_t length)
|
||||
{
|
||||
png_bytep ptr;
|
||||
|
||||
@ -428,7 +428,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
||||
ptr = buffer;
|
||||
if (png_ptr->save_buffer_size != 0)
|
||||
{
|
||||
png_size_t save_size;
|
||||
size_t save_size;
|
||||
|
||||
if (length < png_ptr->save_buffer_size)
|
||||
save_size = length;
|
||||
@ -445,7 +445,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
|
||||
}
|
||||
if (length != 0 && png_ptr->current_buffer_size != 0)
|
||||
{
|
||||
png_size_t save_size;
|
||||
size_t save_size;
|
||||
|
||||
if (length < png_ptr->current_buffer_size)
|
||||
save_size = length;
|
||||
@ -467,7 +467,7 @@ png_push_save_buffer(png_structrp png_ptr)
|
||||
{
|
||||
if (png_ptr->save_buffer_ptr != png_ptr->save_buffer)
|
||||
{
|
||||
png_size_t i, istop;
|
||||
size_t i, istop;
|
||||
png_bytep sp;
|
||||
png_bytep dp;
|
||||
|
||||
@ -482,7 +482,7 @@ png_push_save_buffer(png_structrp png_ptr)
|
||||
if (png_ptr->save_buffer_size + png_ptr->current_buffer_size >
|
||||
png_ptr->save_buffer_max)
|
||||
{
|
||||
png_size_t new_max;
|
||||
size_t new_max;
|
||||
png_bytep old_buffer;
|
||||
|
||||
if (png_ptr->save_buffer_size > PNG_SIZE_MAX -
|
||||
@ -494,7 +494,7 @@ png_push_save_buffer(png_structrp png_ptr)
|
||||
new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
|
||||
old_buffer = png_ptr->save_buffer;
|
||||
png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr,
|
||||
(png_size_t)new_max);
|
||||
(size_t)new_max);
|
||||
|
||||
if (png_ptr->save_buffer == NULL)
|
||||
{
|
||||
@ -522,7 +522,7 @@ png_push_save_buffer(png_structrp png_ptr)
|
||||
|
||||
void /* PRIVATE */
|
||||
png_push_restore_buffer(png_structrp png_ptr, png_bytep buffer,
|
||||
png_size_t buffer_length)
|
||||
size_t buffer_length)
|
||||
{
|
||||
png_ptr->current_buffer = buffer;
|
||||
png_ptr->current_buffer_size = buffer_length;
|
||||
@ -562,7 +562,7 @@ png_push_read_IDAT(png_structrp png_ptr)
|
||||
|
||||
if (png_ptr->idat_size != 0 && png_ptr->save_buffer_size != 0)
|
||||
{
|
||||
png_size_t save_size = png_ptr->save_buffer_size;
|
||||
size_t save_size = png_ptr->save_buffer_size;
|
||||
png_uint_32 idat_size = png_ptr->idat_size;
|
||||
|
||||
/* We want the smaller of 'idat_size' and 'current_buffer_size', but they
|
||||
@ -572,7 +572,7 @@ png_push_read_IDAT(png_structrp png_ptr)
|
||||
* will break on either 16-bit or 64-bit platforms.
|
||||
*/
|
||||
if (idat_size < save_size)
|
||||
save_size = (png_size_t)idat_size;
|
||||
save_size = (size_t)idat_size;
|
||||
|
||||
else
|
||||
idat_size = (png_uint_32)save_size;
|
||||
@ -589,7 +589,7 @@ png_push_read_IDAT(png_structrp png_ptr)
|
||||
|
||||
if (png_ptr->idat_size != 0 && png_ptr->current_buffer_size != 0)
|
||||
{
|
||||
png_size_t save_size = png_ptr->current_buffer_size;
|
||||
size_t save_size = png_ptr->current_buffer_size;
|
||||
png_uint_32 idat_size = png_ptr->idat_size;
|
||||
|
||||
/* We want the smaller of 'idat_size' and 'current_buffer_size', but they
|
||||
@ -598,7 +598,7 @@ png_push_read_IDAT(png_structrp png_ptr)
|
||||
* larger - this cannot overflow.
|
||||
*/
|
||||
if (idat_size < save_size)
|
||||
save_size = (png_size_t)idat_size;
|
||||
save_size = (size_t)idat_size;
|
||||
|
||||
else
|
||||
idat_size = (png_uint_32)save_size;
|
||||
@ -625,7 +625,7 @@ png_push_read_IDAT(png_structrp png_ptr)
|
||||
|
||||
void /* PRIVATE */
|
||||
png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer,
|
||||
png_size_t buffer_length)
|
||||
size_t buffer_length)
|
||||
{
|
||||
/* The caller checks for a non-zero buffer length. */
|
||||
if (!(buffer_length > 0) || buffer == NULL)
|
||||
|
44
src/3rdparty/libpng/pngpriv.h
vendored
44
src/3rdparty/libpng/pngpriv.h
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngpriv.h - private declarations for use inside libpng
|
||||
*
|
||||
* Last changed in libpng 1.6.32 [August 24, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -216,7 +216,11 @@
|
||||
defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \
|
||||
(defined(_M_IX86_FP) && _M_IX86_FP >= 2)
|
||||
# define PNG_INTEL_SSE_OPT 1
|
||||
# else
|
||||
# define PNG_INTEL_SSE_OPT 0
|
||||
# endif
|
||||
# else
|
||||
# define PNG_INTEL_SSE_OPT 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@ -240,6 +244,8 @@
|
||||
# if PNG_INTEL_SSE_IMPLEMENTATION > 0
|
||||
# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2
|
||||
# endif
|
||||
#else
|
||||
# define PNG_INTEL_SSE_IMPLEMENTATION 0
|
||||
#endif
|
||||
|
||||
#if PNG_MIPS_MSA_OPT > 0
|
||||
@ -742,8 +748,8 @@
|
||||
/* Added to libpng-1.2.6 JB */
|
||||
#define PNG_ROWBYTES(pixel_bits, width) \
|
||||
((pixel_bits) >= 8 ? \
|
||||
((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
|
||||
(( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
|
||||
((size_t)(width) * (((size_t)(pixel_bits)) >> 3)) : \
|
||||
(( ((size_t)(width) * ((size_t)(pixel_bits))) + 7) >> 3) )
|
||||
|
||||
/* This returns the number of trailing bits in the last byte of a row, 0 if the
|
||||
* last byte is completely full of pixels. It is, in principle, (pixel_bits x
|
||||
@ -931,7 +937,7 @@
|
||||
* PNG files the -I directives must match.
|
||||
*
|
||||
* The most likely explanation is that you passed a -I in CFLAGS. This will
|
||||
* not work; all the preprocessor directories and in particular all the -I
|
||||
* not work; all the preprocessor directives and in particular all the -I
|
||||
* directives must be in CPPFLAGS.
|
||||
*/
|
||||
#endif
|
||||
@ -1060,15 +1066,15 @@ PNG_INTERNAL_FUNCTION(void,png_zfree,(voidpf png_ptr, voidpf ptr),PNG_EMPTY);
|
||||
*/
|
||||
|
||||
PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_read_data,(png_structp png_ptr,
|
||||
png_bytep data, png_size_t length),PNG_EMPTY);
|
||||
png_bytep data, size_t length),PNG_EMPTY);
|
||||
|
||||
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
|
||||
PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_push_fill_buffer,(png_structp png_ptr,
|
||||
png_bytep buffer, png_size_t length),PNG_EMPTY);
|
||||
png_bytep buffer, size_t length),PNG_EMPTY);
|
||||
#endif
|
||||
|
||||
PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_write_data,(png_structp png_ptr,
|
||||
png_bytep data, png_size_t length),PNG_EMPTY);
|
||||
png_bytep data, size_t length),PNG_EMPTY);
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
# ifdef PNG_STDIO_SUPPORTED
|
||||
@ -1082,7 +1088,7 @@ PNG_INTERNAL_FUNCTION(void,png_reset_crc,(png_structrp png_ptr),PNG_EMPTY);
|
||||
|
||||
/* Write the "data" buffer to whatever output you are using */
|
||||
PNG_INTERNAL_FUNCTION(void,png_write_data,(png_structrp png_ptr,
|
||||
png_const_bytep data, png_size_t length),PNG_EMPTY);
|
||||
png_const_bytep data, size_t length),PNG_EMPTY);
|
||||
|
||||
/* Read and check the PNG file signature */
|
||||
PNG_INTERNAL_FUNCTION(void,png_read_sig,(png_structrp png_ptr,
|
||||
@ -1094,7 +1100,7 @@ PNG_INTERNAL_FUNCTION(png_uint_32,png_read_chunk_header,(png_structrp png_ptr),
|
||||
|
||||
/* Read data from whatever input you are using into the "data" buffer */
|
||||
PNG_INTERNAL_FUNCTION(void,png_read_data,(png_structrp png_ptr, png_bytep data,
|
||||
png_size_t length),PNG_EMPTY);
|
||||
size_t length),PNG_EMPTY);
|
||||
|
||||
/* Read bytes into buf, and update png_ptr->crc */
|
||||
PNG_INTERNAL_FUNCTION(void,png_crc_read,(png_structrp png_ptr, png_bytep buf,
|
||||
@ -1112,7 +1118,7 @@ PNG_INTERNAL_FUNCTION(int,png_crc_error,(png_structrp png_ptr),PNG_EMPTY);
|
||||
* since this is the maximum buffer size we can specify.
|
||||
*/
|
||||
PNG_INTERNAL_FUNCTION(void,png_calculate_crc,(png_structrp png_ptr,
|
||||
png_const_bytep ptr, png_size_t length),PNG_EMPTY);
|
||||
png_const_bytep ptr, size_t length),PNG_EMPTY);
|
||||
|
||||
#ifdef PNG_WRITE_FLUSH_SUPPORTED
|
||||
PNG_INTERNAL_FUNCTION(void,png_flush,(png_structrp png_ptr),PNG_EMPTY);
|
||||
@ -1195,7 +1201,7 @@ PNG_INTERNAL_FUNCTION(void,png_write_hIST,(png_structrp png_ptr,
|
||||
/* Chunks that have keywords */
|
||||
#ifdef PNG_WRITE_tEXt_SUPPORTED
|
||||
PNG_INTERNAL_FUNCTION(void,png_write_tEXt,(png_structrp png_ptr,
|
||||
png_const_charp key, png_const_charp text, png_size_t text_len),PNG_EMPTY);
|
||||
png_const_charp key, png_const_charp text, size_t text_len),PNG_EMPTY);
|
||||
#endif
|
||||
|
||||
#ifdef PNG_WRITE_zTXt_SUPPORTED
|
||||
@ -1588,10 +1594,10 @@ PNG_INTERNAL_FUNCTION(void,png_push_check_crc,(png_structrp png_ptr),PNG_EMPTY);
|
||||
PNG_INTERNAL_FUNCTION(void,png_push_save_buffer,(png_structrp png_ptr),
|
||||
PNG_EMPTY);
|
||||
PNG_INTERNAL_FUNCTION(void,png_push_restore_buffer,(png_structrp png_ptr,
|
||||
png_bytep buffer, png_size_t buffer_length),PNG_EMPTY);
|
||||
png_bytep buffer, size_t buffer_length),PNG_EMPTY);
|
||||
PNG_INTERNAL_FUNCTION(void,png_push_read_IDAT,(png_structrp png_ptr),PNG_EMPTY);
|
||||
PNG_INTERNAL_FUNCTION(void,png_process_IDAT_data,(png_structrp png_ptr,
|
||||
png_bytep buffer, png_size_t buffer_length),PNG_EMPTY);
|
||||
png_bytep buffer, size_t buffer_length),PNG_EMPTY);
|
||||
PNG_INTERNAL_FUNCTION(void,png_push_process_row,(png_structrp png_ptr),
|
||||
PNG_EMPTY);
|
||||
PNG_INTERNAL_FUNCTION(void,png_push_handle_unknown,(png_structrp png_ptr,
|
||||
@ -1861,13 +1867,13 @@ PNG_INTERNAL_FUNCTION(void,png_chunk_report,(png_const_structrp png_ptr,
|
||||
|
||||
#ifdef PNG_FLOATING_POINT_SUPPORTED
|
||||
PNG_INTERNAL_FUNCTION(void,png_ascii_from_fp,(png_const_structrp png_ptr,
|
||||
png_charp ascii, png_size_t size, double fp, unsigned int precision),
|
||||
png_charp ascii, size_t size, double fp, unsigned int precision),
|
||||
PNG_EMPTY);
|
||||
#endif /* FLOATING_POINT */
|
||||
|
||||
#ifdef PNG_FIXED_POINT_SUPPORTED
|
||||
PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr,
|
||||
png_charp ascii, png_size_t size, png_fixed_point fp),PNG_EMPTY);
|
||||
png_charp ascii, size_t size, png_fixed_point fp),PNG_EMPTY);
|
||||
#endif /* FIXED_POINT */
|
||||
#endif /* sCAL */
|
||||
|
||||
@ -1960,7 +1966,7 @@ PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr,
|
||||
* the problem character.) This has not been tested within libpng.
|
||||
*/
|
||||
PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string,
|
||||
png_size_t size, int *statep, png_size_tp whereami),PNG_EMPTY);
|
||||
size_t size, int *statep, png_size_tp whereami),PNG_EMPTY);
|
||||
|
||||
/* This is the same but it checks a complete string and returns true
|
||||
* only if it just contains a floating point number. As of 1.5.4 this
|
||||
@ -1969,7 +1975,7 @@ PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string,
|
||||
* for negative or zero values using the sticky flag.
|
||||
*/
|
||||
PNG_INTERNAL_FUNCTION(int,png_check_fp_string,(png_const_charp string,
|
||||
png_size_t size),PNG_EMPTY);
|
||||
size_t size),PNG_EMPTY);
|
||||
#endif /* pCAL || sCAL */
|
||||
|
||||
#if defined(PNG_GAMMA_SUPPORTED) ||\
|
||||
@ -2044,7 +2050,7 @@ typedef struct png_control
|
||||
png_voidp error_buf; /* Always a jmp_buf at present. */
|
||||
|
||||
png_const_bytep memory; /* Memory buffer. */
|
||||
png_size_t size; /* Size of the memory buffer. */
|
||||
size_t size; /* Size of the memory buffer. */
|
||||
|
||||
unsigned int for_write :1; /* Otherwise it is a read structure */
|
||||
unsigned int owned_file :1; /* We own the file in io_ptr */
|
||||
|
12
src/3rdparty/libpng/pngread.c
vendored
12
src/3rdparty/libpng/pngread.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngread.c - read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.6.33 [September 28, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -1532,7 +1532,7 @@ png_image_begin_read_from_file(png_imagep image, const char *file_name)
|
||||
#endif /* STDIO */
|
||||
|
||||
static void PNGCBAPI
|
||||
png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need)
|
||||
png_image_memory_read(png_structp png_ptr, png_bytep out, size_t need)
|
||||
{
|
||||
if (png_ptr != NULL)
|
||||
{
|
||||
@ -1543,7 +1543,7 @@ png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need)
|
||||
if (cp != NULL)
|
||||
{
|
||||
png_const_bytep memory = cp->memory;
|
||||
png_size_t size = cp->size;
|
||||
size_t size = cp->size;
|
||||
|
||||
if (memory != NULL && size >= need)
|
||||
{
|
||||
@ -1562,7 +1562,7 @@ png_image_memory_read(png_structp png_ptr, png_bytep out, png_size_t need)
|
||||
}
|
||||
|
||||
int PNGAPI png_image_begin_read_from_memory(png_imagep image,
|
||||
png_const_voidp memory, png_size_t size)
|
||||
png_const_voidp memory, size_t size)
|
||||
{
|
||||
if (image != NULL && image->version == PNG_IMAGE_VERSION)
|
||||
{
|
||||
@ -4150,7 +4150,7 @@ png_image_finish_read(png_imagep image, png_const_colorp background,
|
||||
*
|
||||
* NOTE: this will be changed in 1.7 because PNG_IMAGE_BUFFER_SIZE
|
||||
* will be changed to use png_alloc_size_t; bigger images can be
|
||||
* accomodated on 64-bit systems.
|
||||
* accommodated on 64-bit systems.
|
||||
*/
|
||||
if (image->height <=
|
||||
0xffffffffU/PNG_IMAGE_PIXEL_COMPONENT_SIZE(image->format)/check)
|
||||
|
12
src/3rdparty/libpng/pngrio.c
vendored
12
src/3rdparty/libpng/pngrio.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngrio.c - functions for data input
|
||||
*
|
||||
* Last changed in libpng 1.6.24 [August 4, 2016]
|
||||
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -29,7 +29,7 @@
|
||||
* to read more than 64K on a 16-bit machine.
|
||||
*/
|
||||
void /* PRIVATE */
|
||||
png_read_data(png_structrp png_ptr, png_bytep data, png_size_t length)
|
||||
png_read_data(png_structrp png_ptr, png_bytep data, size_t length)
|
||||
{
|
||||
png_debug1(4, "reading %d bytes", (int)length);
|
||||
|
||||
@ -47,14 +47,14 @@ png_read_data(png_structrp png_ptr, png_bytep data, png_size_t length)
|
||||
* than changing the library.
|
||||
*/
|
||||
void PNGCBAPI
|
||||
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
png_default_read_data(png_structp png_ptr, png_bytep data, size_t length)
|
||||
{
|
||||
png_size_t check;
|
||||
size_t check;
|
||||
|
||||
if (png_ptr == NULL)
|
||||
return;
|
||||
|
||||
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
|
||||
/* fread() returns 0 on error, so it is OK to store this in a size_t
|
||||
* instead of an int, which is what fread() actually returns.
|
||||
*/
|
||||
check = fread(data, 1, length, png_voidcast(png_FILE_p, png_ptr->io_ptr));
|
||||
|
1846
src/3rdparty/libpng/pngrtran.c
vendored
1846
src/3rdparty/libpng/pngrtran.c
vendored
File diff suppressed because it is too large
Load Diff
71
src/3rdparty/libpng/pngrutil.c
vendored
71
src/3rdparty/libpng/pngrutil.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngrutil.c - utilities to read a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.6.33 [September 28, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -102,7 +102,7 @@ png_get_int_32)(png_const_bytep buf)
|
||||
png_uint_16 (PNGAPI
|
||||
png_get_uint_16)(png_const_bytep buf)
|
||||
{
|
||||
/* ANSI-C requires an int value to accomodate at least 16 bits so this
|
||||
/* ANSI-C requires an int value to accommodate at least 16 bits so this
|
||||
* works and allows the compiler not to worry about possible narrowing
|
||||
* on 32-bit systems. (Pre-ANSI systems did not make integers smaller
|
||||
* than 16 bits either.)
|
||||
@ -120,7 +120,7 @@ png_get_uint_16)(png_const_bytep buf)
|
||||
void /* PRIVATE */
|
||||
png_read_sig(png_structrp png_ptr, png_inforp info_ptr)
|
||||
{
|
||||
png_size_t num_checked, num_to_check;
|
||||
size_t num_checked, num_to_check;
|
||||
|
||||
/* Exit if the user application does not expect a signature. */
|
||||
if (png_ptr->sig_bytes >= 8)
|
||||
@ -1648,7 +1648,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||
int entry_size, i;
|
||||
png_uint_32 skip = 0;
|
||||
png_uint_32 dl;
|
||||
png_size_t max_dl;
|
||||
size_t max_dl;
|
||||
|
||||
png_debug(1, "in png_handle_sPLT");
|
||||
|
||||
@ -1997,6 +1997,15 @@ png_handle_bKGD(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||
|
||||
else if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0) /* GRAY */
|
||||
{
|
||||
if (png_ptr->bit_depth <= 8)
|
||||
{
|
||||
if (buf[0] != 0 || buf[1] >= (unsigned int)(1 << png_ptr->bit_depth))
|
||||
{
|
||||
png_chunk_benign_error(png_ptr, "invalid gray level");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
background.index = 0;
|
||||
background.red =
|
||||
background.green =
|
||||
@ -2006,6 +2015,15 @@ png_handle_bKGD(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||
|
||||
else
|
||||
{
|
||||
if (png_ptr->bit_depth <= 8)
|
||||
{
|
||||
if (buf[0] != 0 || buf[2] != 0 || buf[4] != 0)
|
||||
{
|
||||
png_chunk_benign_error(png_ptr, "invalid color");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
background.index = 0;
|
||||
background.red = png_get_uint_16(buf);
|
||||
background.green = png_get_uint_16(buf + 2);
|
||||
@ -2359,7 +2377,7 @@ void /* PRIVATE */
|
||||
png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||
{
|
||||
png_bytep buffer;
|
||||
png_size_t i;
|
||||
size_t i;
|
||||
int state;
|
||||
|
||||
png_debug(1, "in png_handle_sCAL");
|
||||
@ -2429,7 +2447,7 @@ png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||
|
||||
else
|
||||
{
|
||||
png_size_t heighti = i;
|
||||
size_t heighti = i;
|
||||
|
||||
state = 0;
|
||||
if (png_check_fp_number((png_const_charp)buffer, length,
|
||||
@ -2867,7 +2885,7 @@ png_cache_unknown_chunk(png_structrp png_ptr, png_uint_32 length)
|
||||
{
|
||||
PNG_CSTRING_FROM_CHUNK(png_ptr->unknown_chunk.name, png_ptr->chunk_name);
|
||||
/* The following is safe because of the PNG_SIZE_MAX init above */
|
||||
png_ptr->unknown_chunk.size = (png_size_t)length/*SAFE*/;
|
||||
png_ptr->unknown_chunk.size = (size_t)length/*SAFE*/;
|
||||
/* 'mode' is a flag array, only the bottom four bits matter here */
|
||||
png_ptr->unknown_chunk.location = (png_byte)png_ptr->mode/*SAFE*/;
|
||||
|
||||
@ -3149,10 +3167,13 @@ png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length)
|
||||
{
|
||||
png_alloc_size_t idat_limit = PNG_UINT_31_MAX;
|
||||
size_t row_factor =
|
||||
(png_ptr->width * png_ptr->channels * (png_ptr->bit_depth > 8? 2: 1)
|
||||
+ 1 + (png_ptr->interlaced? 6: 0));
|
||||
(size_t)png_ptr->width
|
||||
* (size_t)png_ptr->channels
|
||||
* (png_ptr->bit_depth > 8? 2: 1)
|
||||
+ 1
|
||||
+ (png_ptr->interlaced? 6: 0);
|
||||
if (png_ptr->height > PNG_UINT_32_MAX/row_factor)
|
||||
idat_limit=PNG_UINT_31_MAX;
|
||||
idat_limit = PNG_UINT_31_MAX;
|
||||
else
|
||||
idat_limit = png_ptr->height * row_factor;
|
||||
row_factor = row_factor > 32566? 32566 : row_factor;
|
||||
@ -3679,8 +3700,8 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 3);
|
||||
png_bytep dp = row + (png_size_t)((final_width - 1) >> 3);
|
||||
png_bytep sp = row + (size_t)((row_info->width - 1) >> 3);
|
||||
png_bytep dp = row + (size_t)((final_width - 1) >> 3);
|
||||
unsigned int sshift, dshift;
|
||||
unsigned int s_start, s_end;
|
||||
int s_inc;
|
||||
@ -3806,8 +3827,8 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
||||
|
||||
case 4:
|
||||
{
|
||||
png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1);
|
||||
png_bytep dp = row + (png_size_t)((final_width - 1) >> 1);
|
||||
png_bytep sp = row + (size_t)((row_info->width - 1) >> 1);
|
||||
png_bytep dp = row + (size_t)((final_width - 1) >> 1);
|
||||
unsigned int sshift, dshift;
|
||||
unsigned int s_start, s_end;
|
||||
int s_inc;
|
||||
@ -3869,12 +3890,12 @@ png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
|
||||
|
||||
default:
|
||||
{
|
||||
png_size_t pixel_bytes = (row_info->pixel_depth >> 3);
|
||||
size_t pixel_bytes = (row_info->pixel_depth >> 3);
|
||||
|
||||
png_bytep sp = row + (png_size_t)(row_info->width - 1)
|
||||
png_bytep sp = row + (size_t)(row_info->width - 1)
|
||||
* pixel_bytes;
|
||||
|
||||
png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes;
|
||||
png_bytep dp = row + (size_t)(final_width - 1) * pixel_bytes;
|
||||
|
||||
int jstop = (int)png_pass_inc[pass];
|
||||
png_uint_32 i;
|
||||
@ -3911,8 +3932,8 @@ static void
|
||||
png_read_filter_row_sub(png_row_infop row_info, png_bytep row,
|
||||
png_const_bytep prev_row)
|
||||
{
|
||||
png_size_t i;
|
||||
png_size_t istop = row_info->rowbytes;
|
||||
size_t i;
|
||||
size_t istop = row_info->rowbytes;
|
||||
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
||||
png_bytep rp = row + bpp;
|
||||
|
||||
@ -3929,8 +3950,8 @@ static void
|
||||
png_read_filter_row_up(png_row_infop row_info, png_bytep row,
|
||||
png_const_bytep prev_row)
|
||||
{
|
||||
png_size_t i;
|
||||
png_size_t istop = row_info->rowbytes;
|
||||
size_t i;
|
||||
size_t istop = row_info->rowbytes;
|
||||
png_bytep rp = row;
|
||||
png_const_bytep pp = prev_row;
|
||||
|
||||
@ -3945,11 +3966,11 @@ static void
|
||||
png_read_filter_row_avg(png_row_infop row_info, png_bytep row,
|
||||
png_const_bytep prev_row)
|
||||
{
|
||||
png_size_t i;
|
||||
size_t i;
|
||||
png_bytep rp = row;
|
||||
png_const_bytep pp = prev_row;
|
||||
unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
|
||||
png_size_t istop = row_info->rowbytes - bpp;
|
||||
size_t istop = row_info->rowbytes - bpp;
|
||||
|
||||
for (i = 0; i < bpp; i++)
|
||||
{
|
||||
@ -4385,7 +4406,7 @@ png_read_start_row(png_structrp png_ptr)
|
||||
static PNG_CONST png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2};
|
||||
|
||||
unsigned int max_pixel_depth;
|
||||
png_size_t row_bytes;
|
||||
size_t row_bytes;
|
||||
|
||||
png_debug(1, "in png_read_start_row");
|
||||
|
||||
|
18
src/3rdparty/libpng/pngset.c
vendored
18
src/3rdparty/libpng/pngset.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngset.c - storage of image information into info struct
|
||||
*
|
||||
* Last changed in libpng 1.6.32 [August 24, 2017]
|
||||
* Copyright (c) 1998-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -313,7 +313,7 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type,
|
||||
int nparams, png_const_charp units, png_charpp params)
|
||||
{
|
||||
png_size_t length;
|
||||
size_t length;
|
||||
int i;
|
||||
|
||||
png_debug1(1, "in %s storage function", "pCAL");
|
||||
@ -390,7 +390,7 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
memcpy(info_ptr->pcal_units, units, length);
|
||||
|
||||
info_ptr->pcal_params = png_voidcast(png_charpp, png_malloc_warn(png_ptr,
|
||||
(png_size_t)(((unsigned int)nparams + 1) * (sizeof (png_charp)))));
|
||||
(size_t)(((unsigned int)nparams + 1) * (sizeof (png_charp)))));
|
||||
|
||||
if (info_ptr->pcal_params == NULL)
|
||||
{
|
||||
@ -430,7 +430,7 @@ void PNGAPI
|
||||
png_set_sCAL_s(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
int unit, png_const_charp swidth, png_const_charp sheight)
|
||||
{
|
||||
png_size_t lengthw = 0, lengthh = 0;
|
||||
size_t lengthw = 0, lengthh = 0;
|
||||
|
||||
png_debug1(1, "in %s storage function", "sCAL");
|
||||
|
||||
@ -691,7 +691,7 @@ png_set_iCCP(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
{
|
||||
png_charp new_iccp_name;
|
||||
png_bytep new_iccp_profile;
|
||||
png_size_t length;
|
||||
size_t length;
|
||||
|
||||
png_debug1(1, "in %s storage function", "iCCP");
|
||||
|
||||
@ -1018,7 +1018,7 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
|
||||
/* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */
|
||||
info_ptr->trans_alpha = png_voidcast(png_bytep,
|
||||
png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH));
|
||||
memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans);
|
||||
memcpy(info_ptr->trans_alpha, trans_alpha, (size_t)num_trans);
|
||||
}
|
||||
png_ptr->trans_alpha = info_ptr->trans_alpha;
|
||||
}
|
||||
@ -1098,7 +1098,7 @@ png_set_sPLT(png_const_structrp png_ptr,
|
||||
|
||||
do
|
||||
{
|
||||
png_size_t length;
|
||||
size_t length;
|
||||
|
||||
/* Skip invalid input entries */
|
||||
if (entries->name == NULL || entries->entries == NULL)
|
||||
@ -1563,7 +1563,7 @@ png_set_rows(png_const_structrp png_ptr, png_inforp info_ptr,
|
||||
#endif
|
||||
|
||||
void PNGAPI
|
||||
png_set_compression_buffer_size(png_structrp png_ptr, png_size_t size)
|
||||
png_set_compression_buffer_size(png_structrp png_ptr, size_t size)
|
||||
{
|
||||
if (png_ptr == NULL)
|
||||
return;
|
||||
|
22
src/3rdparty/libpng/pngstruct.h
vendored
22
src/3rdparty/libpng/pngstruct.h
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngstruct.h - header file for PNG reference library
|
||||
*
|
||||
* Last changed in libpng 1.6.32 [August 24, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -47,7 +47,7 @@
|
||||
/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib
|
||||
* can handle at once. This type need be no larger than 16 bits (so maximum of
|
||||
* 65535), this define allows us to discover how big it is, but limited by the
|
||||
* maximuum for png_size_t. The value can be overriden in a library build
|
||||
* maximum for size_t. The value can be overridden in a library build
|
||||
* (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably
|
||||
* lower value (e.g. 255 works). A lower value may help memory usage (slightly)
|
||||
* and may even improve performance on some systems (and degrade it on others.)
|
||||
@ -214,7 +214,7 @@ struct png_struct_def
|
||||
png_uint_32 height; /* height of image in pixels */
|
||||
png_uint_32 num_rows; /* number of rows in current pass */
|
||||
png_uint_32 usr_width; /* width of row at start of write */
|
||||
png_size_t rowbytes; /* size of row in bytes */
|
||||
size_t rowbytes; /* size of row in bytes */
|
||||
png_uint_32 iwidth; /* width of current interlaced row in pixels */
|
||||
png_uint_32 row_number; /* current row in interlace pass */
|
||||
png_uint_32 chunk_name; /* PNG_CHUNK() id of current chunk */
|
||||
@ -232,7 +232,7 @@ struct png_struct_def
|
||||
png_bytep try_row; /* buffer to save trial row when filtering */
|
||||
png_bytep tst_row; /* buffer to save best trial row when filtering */
|
||||
#endif
|
||||
png_size_t info_rowbytes; /* Added in 1.5.4: cache of updated row bytes */
|
||||
size_t info_rowbytes; /* Added in 1.5.4: cache of updated row bytes */
|
||||
|
||||
png_uint_32 idat_size; /* current IDAT size for read */
|
||||
png_uint_32 crc; /* current chunk CRC value */
|
||||
@ -307,7 +307,7 @@ struct png_struct_def
|
||||
#endif
|
||||
|
||||
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
|
||||
png_color_8 shift; /* shift for significant bit tranformation */
|
||||
png_color_8 shift; /* shift for significant bit transformation */
|
||||
#endif
|
||||
|
||||
#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
|
||||
@ -328,10 +328,10 @@ struct png_struct_def
|
||||
png_bytep current_buffer; /* buffer for recently used data */
|
||||
png_uint_32 push_length; /* size of current input chunk */
|
||||
png_uint_32 skip_length; /* bytes to skip in input data */
|
||||
png_size_t save_buffer_size; /* amount of data now in save_buffer */
|
||||
png_size_t save_buffer_max; /* total size of save_buffer */
|
||||
png_size_t buffer_size; /* total amount of available input data */
|
||||
png_size_t current_buffer_size; /* amount of data now in current_buffer */
|
||||
size_t save_buffer_size; /* amount of data now in save_buffer */
|
||||
size_t save_buffer_max; /* total size of save_buffer */
|
||||
size_t buffer_size; /* total amount of available input data */
|
||||
size_t current_buffer_size; /* amount of data now in current_buffer */
|
||||
int process_mode; /* what push library is currently doing */
|
||||
int cur_palette; /* current push library palette index */
|
||||
|
||||
@ -451,7 +451,7 @@ struct png_struct_def
|
||||
#endif
|
||||
|
||||
/* New member added in libpng-1.2.26 */
|
||||
png_size_t old_big_row_buf_size;
|
||||
size_t old_big_row_buf_size;
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
/* New member added in libpng-1.2.30 */
|
||||
|
18
src/3rdparty/libpng/pngtrans.c
vendored
18
src/3rdparty/libpng/pngtrans.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
|
||||
*
|
||||
* Last changed in libpng 1.6.33 [September 28, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -269,8 +269,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
|
||||
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
|
||||
{
|
||||
png_bytep rp = row;
|
||||
png_size_t i;
|
||||
png_size_t istop = row_info->rowbytes;
|
||||
size_t i;
|
||||
size_t istop = row_info->rowbytes;
|
||||
|
||||
for (i = 0; i < istop; i++)
|
||||
{
|
||||
@ -283,8 +283,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
|
||||
row_info->bit_depth == 8)
|
||||
{
|
||||
png_bytep rp = row;
|
||||
png_size_t i;
|
||||
png_size_t istop = row_info->rowbytes;
|
||||
size_t i;
|
||||
size_t istop = row_info->rowbytes;
|
||||
|
||||
for (i = 0; i < istop; i += 2)
|
||||
{
|
||||
@ -298,8 +298,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
|
||||
row_info->bit_depth == 16)
|
||||
{
|
||||
png_bytep rp = row;
|
||||
png_size_t i;
|
||||
png_size_t istop = row_info->rowbytes;
|
||||
size_t i;
|
||||
size_t istop = row_info->rowbytes;
|
||||
|
||||
for (i = 0; i < istop; i += 4)
|
||||
{
|
||||
@ -609,7 +609,7 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
|
||||
return; /* The filler channel has gone already */
|
||||
|
||||
/* Fix the rowbytes value. */
|
||||
row_info->rowbytes = (png_size_t)(dp-row);
|
||||
row_info->rowbytes = (size_t)(dp-row);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
10
src/3rdparty/libpng/pngwio.c
vendored
10
src/3rdparty/libpng/pngwio.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngwio.c - functions for data output
|
||||
*
|
||||
* Last changed in libpng 1.6.24 [August 4, 2016]
|
||||
* Copyright (c) 1998-2002,2004,2006-2014,2016 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2014,2016,2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
void /* PRIVATE */
|
||||
png_write_data(png_structrp png_ptr, png_const_bytep data, png_size_t length)
|
||||
png_write_data(png_structrp png_ptr, png_const_bytep data, size_t length)
|
||||
{
|
||||
/* NOTE: write_data_fn must not change the buffer! */
|
||||
if (png_ptr->write_data_fn != NULL )
|
||||
@ -48,9 +48,9 @@ png_write_data(png_structrp png_ptr, png_const_bytep data, png_size_t length)
|
||||
* than changing the library.
|
||||
*/
|
||||
void PNGCBAPI
|
||||
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
|
||||
png_default_write_data(png_structp png_ptr, png_bytep data, size_t length)
|
||||
{
|
||||
png_size_t check;
|
||||
size_t check;
|
||||
|
||||
if (png_ptr == NULL)
|
||||
return;
|
||||
|
9
src/3rdparty/libpng/pngwrite.c
vendored
9
src/3rdparty/libpng/pngwrite.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngwrite.c - general routines to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.6.32 [August 24, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -1636,7 +1636,7 @@ png_write_image_16bit(png_voidp argument)
|
||||
* calculation can be done to 15 bits of accuracy; however, the output needs to
|
||||
* be scaled in the range 0..255*65535, so include that scaling here.
|
||||
*/
|
||||
# define UNP_RECIPROCAL(alpha) ((((0xffff*0xff)<<7)+(alpha>>1))/alpha)
|
||||
# define UNP_RECIPROCAL(alpha) ((((0xffff*0xff)<<7)+((alpha)>>1))/(alpha))
|
||||
|
||||
static png_byte
|
||||
png_unpremultiply(png_uint_32 component, png_uint_32 alpha,
|
||||
@ -2162,8 +2162,7 @@ png_image_write_main(png_voidp argument)
|
||||
|
||||
|
||||
static void (PNGCBAPI
|
||||
image_memory_write)(png_structp png_ptr, png_bytep/*const*/ data,
|
||||
png_size_t size)
|
||||
image_memory_write)(png_structp png_ptr, png_bytep/*const*/ data, size_t size)
|
||||
{
|
||||
png_image_write_control *display = png_voidcast(png_image_write_control*,
|
||||
png_ptr->io_ptr/*backdoor: png_get_io_ptr(png_ptr)*/);
|
||||
|
10
src/3rdparty/libpng/pngwtran.c
vendored
10
src/3rdparty/libpng/pngwtran.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngwtran.c - transforms the data in a row for PNG writers
|
||||
*
|
||||
* Last changed in libpng 1.6.26 [October 20, 2016]
|
||||
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -212,9 +212,9 @@ png_do_shift(png_row_infop row_info, png_bytep row,
|
||||
if (row_info->bit_depth < 8)
|
||||
{
|
||||
png_bytep bp = row;
|
||||
png_size_t i;
|
||||
size_t i;
|
||||
unsigned int mask;
|
||||
png_size_t row_bytes = row_info->rowbytes;
|
||||
size_t row_bytes = row_info->rowbytes;
|
||||
|
||||
if (bit_depth->gray == 1 && row_info->bit_depth == 2)
|
||||
mask = 0x55;
|
||||
@ -514,7 +514,7 @@ png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info)
|
||||
(png_ptr, /* png_ptr */
|
||||
row_info, /* row_info: */
|
||||
/* png_uint_32 width; width of row */
|
||||
/* png_size_t rowbytes; number of bytes in row */
|
||||
/* size_t rowbytes; number of bytes in row */
|
||||
/* png_byte color_type; color type of pixels */
|
||||
/* png_byte bit_depth; bit depth of samples */
|
||||
/* png_byte channels; number of channels (1-4) */
|
||||
|
161
src/3rdparty/libpng/pngwutil.c
vendored
161
src/3rdparty/libpng/pngwutil.c
vendored
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngwutil.c - utilities to write a PNG file
|
||||
*
|
||||
* Last changed in libpng 1.6.32 [August 24, 2017]
|
||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.35 [July 15, 2018]
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
*
|
||||
@ -59,7 +59,7 @@ png_write_sig(png_structrp png_ptr)
|
||||
|
||||
/* Write the rest of the 8 byte signature */
|
||||
png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes],
|
||||
(png_size_t)(8 - png_ptr->sig_bytes));
|
||||
(size_t)(8 - png_ptr->sig_bytes));
|
||||
|
||||
if (png_ptr->sig_bytes < 3)
|
||||
png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
|
||||
@ -124,8 +124,7 @@ png_write_chunk_start(png_structrp png_ptr, png_const_bytep chunk_string,
|
||||
* given to png_write_chunk_header().
|
||||
*/
|
||||
void PNGAPI
|
||||
png_write_chunk_data(png_structrp png_ptr, png_const_bytep data,
|
||||
png_size_t length)
|
||||
png_write_chunk_data(png_structrp png_ptr, png_const_bytep data, size_t length)
|
||||
{
|
||||
/* Write the data, and run the CRC over it */
|
||||
if (png_ptr == NULL)
|
||||
@ -160,7 +159,7 @@ png_write_chunk_end(png_structrp png_ptr)
|
||||
/* Write the crc in a single operation */
|
||||
png_save_uint_32(buf, png_ptr->crc);
|
||||
|
||||
png_write_data(png_ptr, buf, (png_size_t)4);
|
||||
png_write_data(png_ptr, buf, 4);
|
||||
}
|
||||
|
||||
/* Write a PNG chunk all at once. The type is an array of ASCII characters
|
||||
@ -174,7 +173,7 @@ png_write_chunk_end(png_structrp png_ptr)
|
||||
*/
|
||||
static void
|
||||
png_write_complete_chunk(png_structrp png_ptr, png_uint_32 chunk_name,
|
||||
png_const_bytep data, png_size_t length)
|
||||
png_const_bytep data, size_t length)
|
||||
{
|
||||
if (png_ptr == NULL)
|
||||
return;
|
||||
@ -191,7 +190,7 @@ png_write_complete_chunk(png_structrp png_ptr, png_uint_32 chunk_name,
|
||||
/* This is the API that calls the internal function above. */
|
||||
void PNGAPI
|
||||
png_write_chunk(png_structrp png_ptr, png_const_bytep chunk_string,
|
||||
png_const_bytep data, png_size_t length)
|
||||
png_const_bytep data, size_t length)
|
||||
{
|
||||
png_write_complete_chunk(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), data,
|
||||
length);
|
||||
@ -820,7 +819,7 @@ png_write_IHDR(png_structrp png_ptr, png_uint_32 width, png_uint_32 height,
|
||||
buf[12] = (png_byte)interlace_type;
|
||||
|
||||
/* Write the chunk */
|
||||
png_write_complete_chunk(png_ptr, png_IHDR, buf, (png_size_t)13);
|
||||
png_write_complete_chunk(png_ptr, png_IHDR, buf, 13);
|
||||
|
||||
if ((png_ptr->do_filter) == PNG_NO_FILTERS)
|
||||
{
|
||||
@ -889,7 +888,7 @@ png_write_PLTE(png_structrp png_ptr, png_const_colorp palette,
|
||||
buf[0] = pal_ptr->red;
|
||||
buf[1] = pal_ptr->green;
|
||||
buf[2] = pal_ptr->blue;
|
||||
png_write_chunk_data(png_ptr, buf, (png_size_t)3);
|
||||
png_write_chunk_data(png_ptr, buf, 3);
|
||||
}
|
||||
|
||||
#else
|
||||
@ -903,7 +902,7 @@ png_write_PLTE(png_structrp png_ptr, png_const_colorp palette,
|
||||
buf[0] = pal_ptr[i].red;
|
||||
buf[1] = pal_ptr[i].green;
|
||||
buf[2] = pal_ptr[i].blue;
|
||||
png_write_chunk_data(png_ptr, buf, (png_size_t)3);
|
||||
png_write_chunk_data(png_ptr, buf, 3);
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -1075,7 +1074,7 @@ png_write_IEND(png_structrp png_ptr)
|
||||
{
|
||||
png_debug(1, "in png_write_IEND");
|
||||
|
||||
png_write_complete_chunk(png_ptr, png_IEND, NULL, (png_size_t)0);
|
||||
png_write_complete_chunk(png_ptr, png_IEND, NULL, 0);
|
||||
png_ptr->mode |= PNG_HAVE_IEND;
|
||||
}
|
||||
|
||||
@ -1090,7 +1089,7 @@ png_write_gAMA_fixed(png_structrp png_ptr, png_fixed_point file_gamma)
|
||||
|
||||
/* file_gamma is saved in 1/100,000ths */
|
||||
png_save_uint_32(buf, (png_uint_32)file_gamma);
|
||||
png_write_complete_chunk(png_ptr, png_gAMA, buf, (png_size_t)4);
|
||||
png_write_complete_chunk(png_ptr, png_gAMA, buf, 4);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1108,7 +1107,7 @@ png_write_sRGB(png_structrp png_ptr, int srgb_intent)
|
||||
"Invalid sRGB rendering intent specified");
|
||||
|
||||
buf[0]=(png_byte)srgb_intent;
|
||||
png_write_complete_chunk(png_ptr, png_sRGB, buf, (png_size_t)1);
|
||||
png_write_complete_chunk(png_ptr, png_sRGB, buf, 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1182,8 +1181,8 @@ png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp spalette)
|
||||
png_uint_32 name_len;
|
||||
png_byte new_name[80];
|
||||
png_byte entrybuf[10];
|
||||
png_size_t entry_size = (spalette->depth == 8 ? 6 : 10);
|
||||
png_size_t palette_size = entry_size * (png_size_t)spalette->nentries;
|
||||
size_t entry_size = (spalette->depth == 8 ? 6 : 10);
|
||||
size_t palette_size = entry_size * (size_t)spalette->nentries;
|
||||
png_sPLT_entryp ep;
|
||||
#ifndef PNG_POINTER_INDEXING_SUPPORTED
|
||||
int i;
|
||||
@ -1200,10 +1199,9 @@ png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp spalette)
|
||||
png_write_chunk_header(png_ptr, png_sPLT,
|
||||
(png_uint_32)(name_len + 2 + palette_size));
|
||||
|
||||
png_write_chunk_data(png_ptr, (png_bytep)new_name,
|
||||
(png_size_t)(name_len + 1));
|
||||
png_write_chunk_data(png_ptr, (png_bytep)new_name, (size_t)(name_len + 1));
|
||||
|
||||
png_write_chunk_data(png_ptr, &spalette->depth, (png_size_t)1);
|
||||
png_write_chunk_data(png_ptr, &spalette->depth, 1);
|
||||
|
||||
/* Loop through each palette entry, writing appropriately */
|
||||
#ifdef PNG_POINTER_INDEXING_SUPPORTED
|
||||
@ -1265,7 +1263,7 @@ void /* PRIVATE */
|
||||
png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type)
|
||||
{
|
||||
png_byte buf[4];
|
||||
png_size_t size;
|
||||
size_t size;
|
||||
|
||||
png_debug(1, "in png_write_sBIT");
|
||||
|
||||
@ -1365,7 +1363,7 @@ png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha,
|
||||
|
||||
/* Write the chunk out as it is */
|
||||
png_write_complete_chunk(png_ptr, png_tRNS, trans_alpha,
|
||||
(png_size_t)num_trans);
|
||||
(size_t)num_trans);
|
||||
}
|
||||
|
||||
else if (color_type == PNG_COLOR_TYPE_GRAY)
|
||||
@ -1380,7 +1378,7 @@ png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha,
|
||||
}
|
||||
|
||||
png_save_uint_16(buf, tran->gray);
|
||||
png_write_complete_chunk(png_ptr, png_tRNS, buf, (png_size_t)2);
|
||||
png_write_complete_chunk(png_ptr, png_tRNS, buf, 2);
|
||||
}
|
||||
|
||||
else if (color_type == PNG_COLOR_TYPE_RGB)
|
||||
@ -1400,7 +1398,7 @@ png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha,
|
||||
return;
|
||||
}
|
||||
|
||||
png_write_complete_chunk(png_ptr, png_tRNS, buf, (png_size_t)6);
|
||||
png_write_complete_chunk(png_ptr, png_tRNS, buf, 6);
|
||||
}
|
||||
|
||||
else
|
||||
@ -1433,7 +1431,7 @@ png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type)
|
||||
}
|
||||
|
||||
buf[0] = back->index;
|
||||
png_write_complete_chunk(png_ptr, png_bKGD, buf, (png_size_t)1);
|
||||
png_write_complete_chunk(png_ptr, png_bKGD, buf, 1);
|
||||
}
|
||||
|
||||
else if ((color_type & PNG_COLOR_MASK_COLOR) != 0)
|
||||
@ -1454,7 +1452,7 @@ png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type)
|
||||
return;
|
||||
}
|
||||
|
||||
png_write_complete_chunk(png_ptr, png_bKGD, buf, (png_size_t)6);
|
||||
png_write_complete_chunk(png_ptr, png_bKGD, buf, 6);
|
||||
}
|
||||
|
||||
else
|
||||
@ -1468,7 +1466,7 @@ png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type)
|
||||
}
|
||||
|
||||
png_save_uint_16(buf, back->gray);
|
||||
png_write_complete_chunk(png_ptr, png_bKGD, buf, (png_size_t)2);
|
||||
png_write_complete_chunk(png_ptr, png_bKGD, buf, 2);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1488,7 +1486,7 @@ png_write_eXIf(png_structrp png_ptr, png_bytep exif, int num_exif)
|
||||
for (i = 0; i < num_exif; i++)
|
||||
{
|
||||
buf[0] = exif[i];
|
||||
png_write_chunk_data(png_ptr, buf, (png_size_t)1);
|
||||
png_write_chunk_data(png_ptr, buf, 1);
|
||||
}
|
||||
|
||||
png_write_chunk_end(png_ptr);
|
||||
@ -1519,7 +1517,7 @@ png_write_hIST(png_structrp png_ptr, png_const_uint_16p hist, int num_hist)
|
||||
for (i = 0; i < num_hist; i++)
|
||||
{
|
||||
png_save_uint_16(buf, hist[i]);
|
||||
png_write_chunk_data(png_ptr, buf, (png_size_t)2);
|
||||
png_write_chunk_data(png_ptr, buf, 2);
|
||||
}
|
||||
|
||||
png_write_chunk_end(png_ptr);
|
||||
@ -1530,7 +1528,7 @@ png_write_hIST(png_structrp png_ptr, png_const_uint_16p hist, int num_hist)
|
||||
/* Write a tEXt chunk */
|
||||
void /* PRIVATE */
|
||||
png_write_tEXt(png_structrp png_ptr, png_const_charp key, png_const_charp text,
|
||||
png_size_t text_len)
|
||||
size_t text_len)
|
||||
{
|
||||
png_uint_32 key_len;
|
||||
png_byte new_key[80];
|
||||
@ -1627,7 +1625,7 @@ png_write_iTXt(png_structrp png_ptr, int compression, png_const_charp key,
|
||||
png_const_charp lang, png_const_charp lang_key, png_const_charp text)
|
||||
{
|
||||
png_uint_32 key_len, prefix_len;
|
||||
png_size_t lang_len, lang_key_len;
|
||||
size_t lang_len, lang_key_len;
|
||||
png_byte new_key[82];
|
||||
compression_state comp;
|
||||
|
||||
@ -1737,7 +1735,7 @@ png_write_oFFs(png_structrp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
|
||||
png_save_int_32(buf + 4, y_offset);
|
||||
buf[8] = (png_byte)unit_type;
|
||||
|
||||
png_write_complete_chunk(png_ptr, png_oFFs, buf, (png_size_t)9);
|
||||
png_write_complete_chunk(png_ptr, png_oFFs, buf, 9);
|
||||
}
|
||||
#endif
|
||||
#ifdef PNG_WRITE_pCAL_SUPPORTED
|
||||
@ -1748,7 +1746,7 @@ png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0,
|
||||
png_charpp params)
|
||||
{
|
||||
png_uint_32 purpose_len;
|
||||
png_size_t units_len, total_len;
|
||||
size_t units_len, total_len;
|
||||
png_size_tp params_len;
|
||||
png_byte buf[10];
|
||||
png_byte new_purpose[80];
|
||||
@ -1772,7 +1770,7 @@ png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0,
|
||||
total_len = purpose_len + units_len + 10;
|
||||
|
||||
params_len = (png_size_tp)png_malloc(png_ptr,
|
||||
(png_alloc_size_t)((png_alloc_size_t)nparams * (sizeof (png_size_t))));
|
||||
(png_alloc_size_t)((png_alloc_size_t)nparams * (sizeof (size_t))));
|
||||
|
||||
/* Find the length of each parameter, making sure we don't count the
|
||||
* null terminator for the last parameter.
|
||||
@ -1792,8 +1790,8 @@ png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0,
|
||||
png_save_int_32(buf + 4, X1);
|
||||
buf[8] = (png_byte)type;
|
||||
buf[9] = (png_byte)nparams;
|
||||
png_write_chunk_data(png_ptr, buf, (png_size_t)10);
|
||||
png_write_chunk_data(png_ptr, (png_const_bytep)units, (png_size_t)units_len);
|
||||
png_write_chunk_data(png_ptr, buf, 10);
|
||||
png_write_chunk_data(png_ptr, (png_const_bytep)units, (size_t)units_len);
|
||||
|
||||
for (i = 0; i < nparams; i++)
|
||||
{
|
||||
@ -1812,7 +1810,7 @@ png_write_sCAL_s(png_structrp png_ptr, int unit, png_const_charp width,
|
||||
png_const_charp height)
|
||||
{
|
||||
png_byte buf[64];
|
||||
png_size_t wlen, hlen, total_len;
|
||||
size_t wlen, hlen, total_len;
|
||||
|
||||
png_debug(1, "in png_write_sCAL_s");
|
||||
|
||||
@ -1853,7 +1851,7 @@ png_write_pHYs(png_structrp png_ptr, png_uint_32 x_pixels_per_unit,
|
||||
png_save_uint_32(buf + 4, y_pixels_per_unit);
|
||||
buf[8] = (png_byte)unit_type;
|
||||
|
||||
png_write_complete_chunk(png_ptr, png_pHYs, buf, (png_size_t)9);
|
||||
png_write_complete_chunk(png_ptr, png_pHYs, buf, 9);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1883,7 +1881,7 @@ png_write_tIME(png_structrp png_ptr, png_const_timep mod_time)
|
||||
buf[5] = mod_time->minute;
|
||||
buf[6] = mod_time->second;
|
||||
|
||||
png_write_complete_chunk(png_ptr, png_tIME, buf, (png_size_t)7);
|
||||
png_write_complete_chunk(png_ptr, png_tIME, buf, 7);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2073,8 +2071,8 @@ png_write_finish_row(png_structrp png_ptr)
|
||||
{
|
||||
if (png_ptr->prev_row != NULL)
|
||||
memset(png_ptr->prev_row, 0,
|
||||
(png_size_t)(PNG_ROWBYTES(png_ptr->usr_channels*
|
||||
png_ptr->usr_bit_depth, png_ptr->width)) + 1);
|
||||
PNG_ROWBYTES(png_ptr->usr_channels *
|
||||
png_ptr->usr_bit_depth, png_ptr->width) + 1);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -2130,7 +2128,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
for (i = png_pass_start[pass]; i < row_width;
|
||||
i += png_pass_inc[pass])
|
||||
{
|
||||
sp = row + (png_size_t)(i >> 3);
|
||||
sp = row + (size_t)(i >> 3);
|
||||
value = (int)(*sp >> (7 - (int)(i & 0x07))) & 0x01;
|
||||
d |= (value << shift);
|
||||
|
||||
@ -2168,7 +2166,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
for (i = png_pass_start[pass]; i < row_width;
|
||||
i += png_pass_inc[pass])
|
||||
{
|
||||
sp = row + (png_size_t)(i >> 2);
|
||||
sp = row + (size_t)(i >> 2);
|
||||
value = (*sp >> ((3 - (int)(i & 0x03)) << 1)) & 0x03;
|
||||
d |= (value << shift);
|
||||
|
||||
@ -2204,7 +2202,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
for (i = png_pass_start[pass]; i < row_width;
|
||||
i += png_pass_inc[pass])
|
||||
{
|
||||
sp = row + (png_size_t)(i >> 1);
|
||||
sp = row + (size_t)(i >> 1);
|
||||
value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f;
|
||||
d |= (value << shift);
|
||||
|
||||
@ -2230,7 +2228,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
png_bytep dp;
|
||||
png_uint_32 i;
|
||||
png_uint_32 row_width = row_info->width;
|
||||
png_size_t pixel_bytes;
|
||||
size_t pixel_bytes;
|
||||
|
||||
/* Start at the beginning */
|
||||
dp = row;
|
||||
@ -2243,7 +2241,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
i += png_pass_inc[pass])
|
||||
{
|
||||
/* Find out where the original pixel is */
|
||||
sp = row + (png_size_t)i * pixel_bytes;
|
||||
sp = row + (size_t)i * pixel_bytes;
|
||||
|
||||
/* Move the pixel */
|
||||
if (dp != sp)
|
||||
@ -2274,16 +2272,16 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
|
||||
*/
|
||||
static void /* PRIVATE */
|
||||
png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
|
||||
png_size_t row_bytes);
|
||||
size_t row_bytes);
|
||||
|
||||
#ifdef PNG_WRITE_FILTER_SUPPORTED
|
||||
static png_size_t /* PRIVATE */
|
||||
static size_t /* PRIVATE */
|
||||
png_setup_sub_row(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
const png_size_t row_bytes, const png_size_t lmins)
|
||||
size_t row_bytes, size_t lmins)
|
||||
{
|
||||
png_bytep rp, dp, lp;
|
||||
png_size_t i;
|
||||
png_size_t sum = 0;
|
||||
size_t i;
|
||||
size_t sum = 0;
|
||||
unsigned int v;
|
||||
|
||||
png_ptr->try_row[0] = PNG_FILTER_VALUE_SUB;
|
||||
@ -2318,10 +2316,10 @@ png_setup_sub_row(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
|
||||
static void /* PRIVATE */
|
||||
png_setup_sub_row_only(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
const png_size_t row_bytes)
|
||||
size_t row_bytes)
|
||||
{
|
||||
png_bytep rp, dp, lp;
|
||||
png_size_t i;
|
||||
size_t i;
|
||||
|
||||
png_ptr->try_row[0] = PNG_FILTER_VALUE_SUB;
|
||||
|
||||
@ -2338,13 +2336,12 @@ png_setup_sub_row_only(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
}
|
||||
}
|
||||
|
||||
static png_size_t /* PRIVATE */
|
||||
png_setup_up_row(png_structrp png_ptr, const png_size_t row_bytes,
|
||||
const png_size_t lmins)
|
||||
static size_t /* PRIVATE */
|
||||
png_setup_up_row(png_structrp png_ptr, size_t row_bytes, size_t lmins)
|
||||
{
|
||||
png_bytep rp, dp, pp;
|
||||
png_size_t i;
|
||||
png_size_t sum = 0;
|
||||
size_t i;
|
||||
size_t sum = 0;
|
||||
unsigned int v;
|
||||
|
||||
png_ptr->try_row[0] = PNG_FILTER_VALUE_UP;
|
||||
@ -2367,10 +2364,10 @@ png_setup_up_row(png_structrp png_ptr, const png_size_t row_bytes,
|
||||
return (sum);
|
||||
}
|
||||
static void /* PRIVATE */
|
||||
png_setup_up_row_only(png_structrp png_ptr, const png_size_t row_bytes)
|
||||
png_setup_up_row_only(png_structrp png_ptr, size_t row_bytes)
|
||||
{
|
||||
png_bytep rp, dp, pp;
|
||||
png_size_t i;
|
||||
size_t i;
|
||||
|
||||
png_ptr->try_row[0] = PNG_FILTER_VALUE_UP;
|
||||
|
||||
@ -2382,13 +2379,13 @@ png_setup_up_row_only(png_structrp png_ptr, const png_size_t row_bytes)
|
||||
}
|
||||
}
|
||||
|
||||
static png_size_t /* PRIVATE */
|
||||
static size_t /* PRIVATE */
|
||||
png_setup_avg_row(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
const png_size_t row_bytes, const png_size_t lmins)
|
||||
size_t row_bytes, size_t lmins)
|
||||
{
|
||||
png_bytep rp, dp, pp, lp;
|
||||
png_uint_32 i;
|
||||
png_size_t sum = 0;
|
||||
size_t sum = 0;
|
||||
unsigned int v;
|
||||
|
||||
png_ptr->try_row[0] = PNG_FILTER_VALUE_AVG;
|
||||
@ -2424,7 +2421,7 @@ png_setup_avg_row(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
}
|
||||
static void /* PRIVATE */
|
||||
png_setup_avg_row_only(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
const png_size_t row_bytes)
|
||||
size_t row_bytes)
|
||||
{
|
||||
png_bytep rp, dp, pp, lp;
|
||||
png_uint_32 i;
|
||||
@ -2444,13 +2441,13 @@ png_setup_avg_row_only(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
}
|
||||
}
|
||||
|
||||
static png_size_t /* PRIVATE */
|
||||
static size_t /* PRIVATE */
|
||||
png_setup_paeth_row(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
const png_size_t row_bytes, const png_size_t lmins)
|
||||
size_t row_bytes, size_t lmins)
|
||||
{
|
||||
png_bytep rp, dp, pp, cp, lp;
|
||||
png_size_t i;
|
||||
png_size_t sum = 0;
|
||||
size_t i;
|
||||
size_t sum = 0;
|
||||
unsigned int v;
|
||||
|
||||
png_ptr->try_row[0] = PNG_FILTER_VALUE_PAETH;
|
||||
@ -2507,10 +2504,10 @@ png_setup_paeth_row(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
}
|
||||
static void /* PRIVATE */
|
||||
png_setup_paeth_row_only(png_structrp png_ptr, const png_uint_32 bpp,
|
||||
const png_size_t row_bytes)
|
||||
size_t row_bytes)
|
||||
{
|
||||
png_bytep rp, dp, pp, cp, lp;
|
||||
png_size_t i;
|
||||
size_t i;
|
||||
|
||||
png_ptr->try_row[0] = PNG_FILTER_VALUE_PAETH;
|
||||
|
||||
@ -2559,8 +2556,8 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
png_bytep row_buf;
|
||||
png_bytep best_row;
|
||||
png_uint_32 bpp;
|
||||
png_size_t mins;
|
||||
png_size_t row_bytes = row_info->rowbytes;
|
||||
size_t mins;
|
||||
size_t row_bytes = row_info->rowbytes;
|
||||
|
||||
png_debug(1, "in png_write_find_filter");
|
||||
|
||||
@ -2615,8 +2612,8 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
* 'none' filter.
|
||||
*/
|
||||
png_bytep rp;
|
||||
png_size_t sum = 0;
|
||||
png_size_t i;
|
||||
size_t sum = 0;
|
||||
size_t i;
|
||||
unsigned int v;
|
||||
|
||||
{
|
||||
@ -2644,8 +2641,8 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
|
||||
else if ((filter_to_do & PNG_FILTER_SUB) != 0)
|
||||
{
|
||||
png_size_t sum;
|
||||
png_size_t lmins = mins;
|
||||
size_t sum;
|
||||
size_t lmins = mins;
|
||||
|
||||
sum = png_setup_sub_row(png_ptr, bpp, row_bytes, lmins);
|
||||
|
||||
@ -2670,8 +2667,8 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
|
||||
else if ((filter_to_do & PNG_FILTER_UP) != 0)
|
||||
{
|
||||
png_size_t sum;
|
||||
png_size_t lmins = mins;
|
||||
size_t sum;
|
||||
size_t lmins = mins;
|
||||
|
||||
sum = png_setup_up_row(png_ptr, row_bytes, lmins);
|
||||
|
||||
@ -2696,8 +2693,8 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
|
||||
else if ((filter_to_do & PNG_FILTER_AVG) != 0)
|
||||
{
|
||||
png_size_t sum;
|
||||
png_size_t lmins = mins;
|
||||
size_t sum;
|
||||
size_t lmins = mins;
|
||||
|
||||
sum= png_setup_avg_row(png_ptr, bpp, row_bytes, lmins);
|
||||
|
||||
@ -2722,8 +2719,8 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
|
||||
else if ((filter_to_do & PNG_FILTER_PAETH) != 0)
|
||||
{
|
||||
png_size_t sum;
|
||||
png_size_t lmins = mins;
|
||||
size_t sum;
|
||||
size_t lmins = mins;
|
||||
|
||||
sum = png_setup_paeth_row(png_ptr, bpp, row_bytes, lmins);
|
||||
|
||||
@ -2748,7 +2745,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
|
||||
/* Do the actual writing of a previously filtered row. */
|
||||
static void
|
||||
png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row,
|
||||
png_size_t full_row_length/*includes filter byte*/)
|
||||
size_t full_row_length/*includes filter byte*/)
|
||||
{
|
||||
png_debug(1, "in png_write_filtered_row");
|
||||
|
||||
|
4
src/3rdparty/libpng/qt_attribution.json
vendored
4
src/3rdparty/libpng/qt_attribution.json
vendored
@ -6,11 +6,11 @@
|
||||
|
||||
"Description": "libpng is the official PNG reference library.",
|
||||
"Homepage": "http://www.libpng.org/pub/png/libpng.html",
|
||||
"Version": "1.6.34",
|
||||
"Version": "1.6.35",
|
||||
"License": "libpng License",
|
||||
"LicenseId": "Libpng",
|
||||
"LicenseFile": "LICENSE",
|
||||
"Copyright": "Copyright (c) 1998-2017 Glenn Randers-Pehrson
|
||||
"Copyright": "Copyright (c) 1998-2018 Glenn Randers-Pehrson
|
||||
Copyright (c) 2000-2017 Simon-Pierre Cadieux
|
||||
Copyright (c) 2000-2017 Eric S. Raymond
|
||||
Copyright (c) 2000-2017 Mans Rullgard
|
||||
|
8
src/3rdparty/libpng/qtpatches.diff
vendored
8
src/3rdparty/libpng/qtpatches.diff
vendored
@ -1,5 +1,5 @@
|
||||
diff --git a/src/3rdparty/libpng/pngpriv.h b/src/3rdparty/libpng/pngpriv.h
|
||||
index c466d4b..f7a4547 100644
|
||||
index 3581f67919..e43862a886 100644
|
||||
--- a/src/3rdparty/libpng/pngpriv.h
|
||||
+++ b/src/3rdparty/libpng/pngpriv.h
|
||||
@@ -23,6 +23,12 @@
|
||||
@ -15,7 +15,7 @@ index c466d4b..f7a4547 100644
|
||||
/* Feature Test Macros. The following are defined here to ensure that correctly
|
||||
* implemented libraries reveal the APIs libpng needs to build and hide those
|
||||
* that are not needed and potentially damaging to the compilation.
|
||||
@@ -219,6 +225,11 @@
|
||||
@@ -305,6 +311,11 @@
|
||||
# endif
|
||||
#endif /* Setting PNG_BUILD_DLL if required */
|
||||
|
||||
@ -27,7 +27,7 @@ index c466d4b..f7a4547 100644
|
||||
/* See pngconf.h for more details: the builder of the library may set this on
|
||||
* the command line to the right thing for the specific compilation system or it
|
||||
* may be automagically set above (at present we know of no system where it does
|
||||
@@ -447,6 +458,9 @@
|
||||
@@ -543,6 +554,9 @@
|
||||
#if defined(WIN32) || defined(_Windows) || defined(_WINDOWS) || \
|
||||
defined(_WIN32) || defined(__WIN32__)
|
||||
# include <windows.h> /* defines _WINDOWS_ macro */
|
||||
@ -37,7 +37,7 @@ index c466d4b..f7a4547 100644
|
||||
#endif
|
||||
#endif /* PNG_VERSION_INFO_ONLY */
|
||||
|
||||
@@ -457,7 +471,7 @@
|
||||
@@ -553,7 +567,7 @@
|
||||
|
||||
/* Memory model/platform independent fns */
|
||||
#ifndef PNG_ABORT
|
||||
|
@ -153,8 +153,6 @@
|
||||
#include <QtCore/qcoreevent.h>
|
||||
#include <QtCore/qpointer.h>
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
#define DEFAULT_TIMER_INTERVAL 16
|
||||
#define PAUSE_TIMER_COARSE_THRESHOLD 2000
|
||||
|
||||
@ -1477,5 +1475,3 @@ QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qabstractanimation.cpp"
|
||||
#include "moc_qabstractanimation_p.cpp"
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
@ -42,11 +42,10 @@
|
||||
|
||||
#include <QtCore/qobject.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
class QAnimationGroup;
|
||||
class QSequentialAnimationGroup;
|
||||
class QAnimationDriver;
|
||||
@ -169,11 +168,6 @@ private:
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QABSTRACTANIMATION_H
|
||||
|
@ -58,7 +58,7 @@
|
||||
#include <private/qobject_p.h>
|
||||
#include <qabstractanimation.h>
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -296,6 +296,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
#endif //QABSTRACTANIMATION_P_H
|
||||
|
@ -86,8 +86,6 @@
|
||||
#include <QtCore/qcoreevent.h>
|
||||
#include "qanimationgroup_p.h"
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -300,5 +298,3 @@ void QAnimationGroupPrivate::animationRemoved(int index, QAbstractAnimation *)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qanimationgroup.cpp"
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
@ -42,11 +42,10 @@
|
||||
|
||||
#include <QtCore/qabstractanimation.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
class QAnimationGroupPrivate;
|
||||
class Q_CORE_EXPORT QAnimationGroup : public QAbstractAnimation
|
||||
{
|
||||
@ -74,8 +73,6 @@ private:
|
||||
Q_DECLARE_PRIVATE(QAnimationGroup)
|
||||
};
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QANIMATIONGROUP_H
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
#include "private/qabstractanimation_p.h"
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -89,6 +89,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
#endif //QANIMATIONGROUP_P_H
|
||||
|
@ -66,8 +66,6 @@
|
||||
#include "qparallelanimationgroup_p.h"
|
||||
//#define QANIMATION_DEBUG
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
typedef QList<QAbstractAnimation *>::ConstIterator AnimationListConstIt;
|
||||
@ -333,5 +331,3 @@ bool QParallelAnimationGroup::event(QEvent *event)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qparallelanimationgroup.cpp"
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
@ -42,11 +42,10 @@
|
||||
|
||||
#include <QtCore/qanimationgroup.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
class QParallelAnimationGroupPrivate;
|
||||
class Q_CORE_EXPORT QParallelAnimationGroup : public QAnimationGroup
|
||||
{
|
||||
@ -72,8 +71,6 @@ private:
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_uncontrolledAnimationFinished())
|
||||
};
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QPARALLELANIMATIONGROUP
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include "private/qanimationgroup_p.h"
|
||||
#include <QtCore/qhash.h>
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -86,6 +86,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
#endif //QPARALLELANIMATIONGROUP_P_H
|
||||
|
@ -64,9 +64,6 @@
|
||||
#include "qpauseanimation.h"
|
||||
#include "qabstractanimation_p.h"
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QPauseAnimationPrivate : public QAbstractAnimationPrivate
|
||||
@ -150,5 +147,3 @@ void QPauseAnimation::updateCurrentTime(int)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qpauseanimation.cpp"
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
@ -42,11 +42,10 @@
|
||||
|
||||
#include <QtCore/qanimationgroup.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
class QPauseAnimationPrivate;
|
||||
|
||||
class Q_CORE_EXPORT QPauseAnimation : public QAbstractAnimation
|
||||
@ -70,8 +69,6 @@ private:
|
||||
Q_DECLARE_PRIVATE(QPauseAnimation)
|
||||
};
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QPAUSEANIMATION_H
|
||||
|
@ -86,8 +86,6 @@
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
void QPropertyAnimationPrivate::updateMetaProperty()
|
||||
@ -308,5 +306,3 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
|
||||
#include "moc_qpropertyanimation.cpp"
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
@ -42,11 +42,10 @@
|
||||
|
||||
#include <QtCore/qvariantanimation.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
class QPropertyAnimationPrivate;
|
||||
class Q_CORE_EXPORT QPropertyAnimation : public QVariantAnimation
|
||||
{
|
||||
@ -75,8 +74,6 @@ private:
|
||||
Q_DECLARE_PRIVATE(QPropertyAnimation)
|
||||
};
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QPROPERTYANIMATION_H
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#include "private/qvariantanimation_p.h"
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -83,6 +83,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
#endif //QPROPERTYANIMATION_P_H
|
||||
|
@ -76,8 +76,6 @@
|
||||
|
||||
#include <QtCore/qdebug.h>
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
typedef QList<QAbstractAnimation *>::ConstIterator AnimationListConstIt;
|
||||
@ -575,5 +573,3 @@ void QSequentialAnimationGroupPrivate::animationRemoved(int index, QAbstractAnim
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qsequentialanimationgroup.cpp"
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
@ -42,11 +42,10 @@
|
||||
|
||||
#include <QtCore/qanimationgroup.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
class QPauseAnimation;
|
||||
class QSequentialAnimationGroupPrivate;
|
||||
|
||||
@ -82,8 +81,6 @@ private:
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_uncontrolledAnimationFinished())
|
||||
};
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QSEQUENTIALANIMATIONGROUP_H
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include "qsequentialanimationgroup.h"
|
||||
#include "private/qanimationgroup_p.h"
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -107,6 +107,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
#endif //QSEQUENTIALANIMATIONGROUP_P_H
|
||||
|
@ -46,8 +46,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
@ -690,5 +688,3 @@ void QVariantAnimation::updateCurrentTime(int)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qvariantanimation.cpp"
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
@ -46,11 +46,10 @@
|
||||
#include <QtCore/qvariant.h>
|
||||
#include <QtCore/qpair.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
class QVariantAnimationPrivate;
|
||||
class Q_CORE_EXPORT QVariantAnimation : public QAbstractAnimation
|
||||
{
|
||||
@ -116,8 +115,6 @@ void qRegisterAnimationInterpolator(QVariant (*func)(const T &from, const T &to,
|
||||
QVariantAnimation::registerInterpolator(reinterpret_cast<QVariantAnimation::Interpolator>(reinterpret_cast<void(*)()>(func)), qMetaTypeId<T>());
|
||||
}
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QVARIANTANIMATION_H
|
||||
|
@ -60,7 +60,7 @@
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
QT_REQUIRE_CONFIG(animation);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -129,6 +129,4 @@ template<typename T > inline QVariant _q_interpolateVariant(const T &from, const
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
||||
#endif //QVARIANTANIMATION_P_H
|
||||
|
@ -1,44 +1,52 @@
|
||||
# Qt core library codecs module
|
||||
|
||||
HEADERS += \
|
||||
codecs/qisciicodec_p.h \
|
||||
codecs/qlatincodec_p.h \
|
||||
codecs/qsimplecodec_p.h \
|
||||
codecs/qtextcodec_p.h \
|
||||
codecs/qtextcodec.h \
|
||||
codecs/qtsciicodec_p.h \
|
||||
codecs/qutfcodec_p.h
|
||||
|
||||
SOURCES += \
|
||||
codecs/qisciicodec.cpp \
|
||||
codecs/qlatincodec.cpp \
|
||||
codecs/qsimplecodec.cpp \
|
||||
codecs/qtextcodec.cpp \
|
||||
codecs/qtsciicodec.cpp \
|
||||
codecs/qutfcodec.cpp
|
||||
|
||||
qtConfig(codecs) {
|
||||
HEADERS += \
|
||||
codecs/qisciicodec_p.h \
|
||||
codecs/qtsciicodec_p.h
|
||||
|
||||
SOURCES += \
|
||||
codecs/qisciicodec.cpp \
|
||||
codecs/qtsciicodec.cpp
|
||||
}
|
||||
|
||||
qtConfig(icu) {
|
||||
HEADERS += \
|
||||
codecs/qicucodec_p.h
|
||||
SOURCES += \
|
||||
codecs/qicucodec.cpp
|
||||
} else {
|
||||
HEADERS += \
|
||||
codecs/qgb18030codec_p.h \
|
||||
codecs/qeucjpcodec_p.h \
|
||||
codecs/qjiscodec_p.h \
|
||||
codecs/qsjiscodec_p.h \
|
||||
codecs/qeuckrcodec_p.h \
|
||||
codecs/qbig5codec_p.h
|
||||
qtConfig(big_codecs) {
|
||||
HEADERS += \
|
||||
codecs/qgb18030codec_p.h \
|
||||
codecs/qeucjpcodec_p.h \
|
||||
codecs/qjiscodec_p.h \
|
||||
codecs/qsjiscodec_p.h \
|
||||
codecs/qeuckrcodec_p.h \
|
||||
codecs/qbig5codec_p.h
|
||||
|
||||
SOURCES += \
|
||||
codecs/qgb18030codec.cpp \
|
||||
codecs/qjpunicode.cpp \
|
||||
codecs/qeucjpcodec.cpp \
|
||||
codecs/qjiscodec.cpp \
|
||||
codecs/qsjiscodec.cpp \
|
||||
codecs/qeuckrcodec.cpp \
|
||||
codecs/qbig5codec.cpp
|
||||
SOURCES += \
|
||||
codecs/qgb18030codec.cpp \
|
||||
codecs/qjpunicode.cpp \
|
||||
codecs/qeucjpcodec.cpp \
|
||||
codecs/qjiscodec.cpp \
|
||||
codecs/qsjiscodec.cpp \
|
||||
codecs/qeuckrcodec.cpp \
|
||||
codecs/qbig5codec.cpp
|
||||
}
|
||||
|
||||
qtConfig(iconv) {
|
||||
HEADERS += codecs/qiconvcodec_p.h
|
||||
|
@ -41,7 +41,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
static int qt_Big5hkscsToUnicode(const uchar *s, uint *pwc);
|
||||
static int qt_UnicodeToBig5hkscs(uint wc, uchar *r);
|
||||
|
||||
@ -12661,6 +12660,5 @@ int qt_UnicodeToBig5hkscs (uint wc, uchar *r)
|
||||
|
||||
|
||||
/* ====================================================================== */
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -59,9 +59,9 @@
|
||||
#include <QtCore/qtextcodec.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(big_codecs);
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QBig5Codec : public QTextCodec {
|
||||
public:
|
||||
@ -91,8 +91,6 @@ public:
|
||||
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const;
|
||||
};
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QBIG5CODEC_P_H
|
||||
|
@ -76,8 +76,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
|
||||
static const uchar Ss2 = 0x8e; // Single Shift 2
|
||||
static const uchar Ss3 = 0x8f; // Single Shift 3
|
||||
|
||||
@ -255,6 +253,5 @@ QByteArray QEucJpCodec::_name()
|
||||
{
|
||||
return "EUC-JP";
|
||||
}
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -84,9 +84,9 @@
|
||||
#include <QtCore/qtextcodec.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(big_codecs);
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEucJpCodec : public QTextCodec {
|
||||
public:
|
||||
@ -108,8 +108,6 @@ protected:
|
||||
const QJpUnicodeConv *conv;
|
||||
};
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QEUCJPCODEC_P_H
|
||||
|
@ -72,7 +72,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
unsigned int qt_Ksc5601ToUnicode(unsigned int code);
|
||||
|
||||
unsigned int qt_UnicodeToKsc5601(unsigned int unicode);
|
||||
@ -3523,6 +3522,4 @@ QString QCP949Codec::convertToUnicode(const char* chars, int len, ConverterState
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -80,9 +80,9 @@
|
||||
#include <QtCore/qtextcodec.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(big_codecs);
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QEucKrCodec : public QTextCodec {
|
||||
public:
|
||||
@ -112,8 +112,6 @@ public:
|
||||
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
|
||||
};
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QEUCKRCODEC_P_H
|
||||
|
@ -45,8 +45,6 @@
|
||||
|
||||
#include "qgb18030codec_p.h"
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#define InRange(c, lower, upper) (((c) >= (lower)) && ((c) <= (upper)))
|
||||
@ -9116,5 +9114,3 @@ int qt_UnicodeToGbk(uint uni, uchar *gbchar) {
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
@ -57,9 +57,9 @@
|
||||
#include <QtCore/qtextcodec.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(big_codecs);
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGb18030Codec : public QTextCodec {
|
||||
public:
|
||||
@ -108,8 +108,6 @@ public:
|
||||
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
|
||||
};
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QGB18030CODEC_P_H
|
||||
|
@ -373,7 +373,7 @@ static QTextCodec *loadQtCodec(const char *name)
|
||||
return new QUtf32LECodec;
|
||||
if (!strcmp(name, "ISO-8859-16") || !strcmp(name, "latin10") || !strcmp(name, "iso-ir-226"))
|
||||
return new QSimpleTextCodec(13 /* == 8859-16*/);
|
||||
#ifndef QT_NO_CODECS
|
||||
#if QT_CONFIG(codecs)
|
||||
if (!strcmp(name, "TSCII"))
|
||||
return new QTsciiCodec;
|
||||
if (!qstrnicmp(name, "iscii", 5))
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include "qtextcodec_p.h"
|
||||
#include "qlist.h"
|
||||
|
||||
#ifndef QT_NO_CODECS
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
@ -291,5 +289,3 @@ QString QIsciiCodec::convertToUnicode(const char* chars, int len, ConverterState
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_CODECS
|
||||
|
@ -54,9 +54,9 @@
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "QtCore/qtextcodec.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(codecs);
|
||||
|
||||
#ifndef QT_NO_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QIsciiCodec : public QTextCodec {
|
||||
public:
|
||||
@ -75,8 +75,6 @@ private:
|
||||
int idx;
|
||||
};
|
||||
|
||||
#endif // QT_NO_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QISCIICODEC_P_H
|
||||
|
@ -52,7 +52,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
enum {
|
||||
Esc = 0x1b,
|
||||
So = 0x0e, // Shift Out
|
||||
@ -369,6 +368,4 @@ QList<QByteArray> QJisCodec::_aliases()
|
||||
return list;
|
||||
}
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -84,9 +84,9 @@
|
||||
#include <QtCore/qtextcodec.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(big_codecs);
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QJisCodec : public QTextCodec {
|
||||
public:
|
||||
@ -108,8 +108,6 @@ protected:
|
||||
const QJpUnicodeConv *conv;
|
||||
};
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QJISCODEC_P_H
|
||||
|
@ -50,8 +50,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
|
||||
#define USE_JISX0212
|
||||
|
||||
#define Q_STRICT
|
||||
@ -10734,6 +10732,4 @@ uint QJpUnicodeConv::unicodeToCp932(uint h, uint l) const
|
||||
\internal
|
||||
*/
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -82,9 +82,9 @@
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(big_codecs);
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QJpUnicodeConv {
|
||||
public:
|
||||
@ -180,8 +180,6 @@ private:
|
||||
int rule;
|
||||
};
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QJPUNICODE_P_H
|
||||
|
@ -52,7 +52,6 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
enum {
|
||||
Esc = 0x1b
|
||||
};
|
||||
@ -223,6 +222,5 @@ QList<QByteArray> QSjisCodec::_aliases()
|
||||
<< "MS_Kanji";
|
||||
return list;
|
||||
}
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -84,9 +84,9 @@
|
||||
#include <QtCore/qtextcodec.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(big_codecs);
|
||||
|
||||
#ifndef QT_NO_BIG_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QSjisCodec : public QTextCodec {
|
||||
public:
|
||||
@ -108,8 +108,6 @@ protected:
|
||||
const QJpUnicodeConv *conv;
|
||||
};
|
||||
|
||||
#endif // QT_NO_BIG_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QSJISCODEC_P_H
|
||||
|
@ -58,8 +58,10 @@
|
||||
#include "qlatincodec_p.h"
|
||||
|
||||
#if !defined(QT_BOOTSTRAPPED)
|
||||
#if QT_CONFIG(codecs)
|
||||
# include "qtsciicodec_p.h"
|
||||
# include "qisciicodec_p.h"
|
||||
#endif
|
||||
#if QT_CONFIG(icu)
|
||||
#include "qicucodec_p.h"
|
||||
#else
|
||||
@ -70,7 +72,7 @@
|
||||
# include "qwindowscodec_p.h"
|
||||
#endif
|
||||
# include "qsimplecodec_p.h"
|
||||
#if !defined(QT_NO_BIG_CODECS)
|
||||
#if QT_CONFIG(big_codecs)
|
||||
# ifndef Q_OS_INTEGRITY
|
||||
# include "qgb18030codec_p.h"
|
||||
# include "qeucjpcodec_p.h"
|
||||
@ -79,7 +81,7 @@
|
||||
# include "qeuckrcodec_p.h"
|
||||
# include "qbig5codec_p.h"
|
||||
# endif // !Q_OS_INTEGRITY
|
||||
#endif // !QT_NO_BIG_CODECS
|
||||
#endif // big_codecs
|
||||
|
||||
#endif // icu
|
||||
#endif // QT_BOOTSTRAPPED
|
||||
@ -269,14 +271,14 @@ static void setup()
|
||||
return;
|
||||
initialized = true;
|
||||
|
||||
#if !defined(QT_NO_CODECS) && !defined(QT_BOOTSTRAPPED)
|
||||
#if QT_CONFIG(codecs) && !defined(QT_BOOTSTRAPPED)
|
||||
(void)new QTsciiCodec;
|
||||
for (int i = 0; i < 9; ++i)
|
||||
(void)new QIsciiCodec(i);
|
||||
for (int i = 0; i < QSimpleTextCodec::numSimpleCodecs; ++i)
|
||||
(void)new QSimpleTextCodec(i);
|
||||
|
||||
# if !defined(QT_NO_BIG_CODECS) && !defined(Q_OS_INTEGRITY)
|
||||
# if QT_CONFIG(big_codecs) && !defined(Q_OS_INTEGRITY)
|
||||
(void)new QGb18030Codec;
|
||||
(void)new QGbkCodec;
|
||||
(void)new QGb2312Codec;
|
||||
@ -287,14 +289,14 @@ static void setup()
|
||||
(void)new QCP949Codec;
|
||||
(void)new QBig5Codec;
|
||||
(void)new QBig5hkscsCodec;
|
||||
# endif // !QT_NO_BIG_CODECS && !Q_OS_INTEGRITY
|
||||
# endif // big_codecs && !Q_OS_INTEGRITY
|
||||
#if QT_CONFIG(iconv)
|
||||
(void) new QIconvCodec;
|
||||
#endif
|
||||
#if defined(Q_OS_WIN32)
|
||||
(void) new QWindowsLocalCodec;
|
||||
#endif // Q_OS_WIN32
|
||||
#endif // !QT_NO_CODECS && !QT_BOOTSTRAPPED
|
||||
#endif // codecs && !QT_BOOTSTRAPPED
|
||||
|
||||
(void)new QUtf16Codec;
|
||||
(void)new QUtf16BECodec;
|
||||
|
@ -44,8 +44,6 @@
|
||||
#include "qtsciicodec_p.h"
|
||||
#include "qlist.h"
|
||||
|
||||
#ifndef QT_NO_CODECS
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static unsigned char qt_UnicodeToTSCII(ushort u1, ushort u2, ushort u3);
|
||||
@ -493,5 +491,3 @@ static unsigned int qt_TSCIIToUnicode(uint code, uint *s)
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_CODECS
|
||||
|
@ -83,9 +83,9 @@
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "QtCore/qtextcodec.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(codecs);
|
||||
|
||||
#ifndef QT_NO_CODECS
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QTsciiCodec : public QTextCodec {
|
||||
public:
|
||||
@ -98,8 +98,6 @@ public:
|
||||
QByteArray convertFromUnicode(const QChar *, int, ConverterState *) const override;
|
||||
};
|
||||
|
||||
#endif // QT_NO_CODECS
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QTSCIICODEC_P_H
|
||||
|
@ -32,7 +32,7 @@ ANDROID_PERMISSIONS = \
|
||||
# OpenBSD 6.0 will include environ in libc.
|
||||
freebsd|openbsd: QMAKE_LFLAGS_NOUNDEF =
|
||||
|
||||
include(animation/animation.pri)
|
||||
qtConfig(animation): include(animation/animation.pri)
|
||||
include(global/global.pri)
|
||||
include(thread/thread.pri)
|
||||
include(tools/tools.pri)
|
||||
|
@ -131,7 +131,6 @@
|
||||
#define QT_NO_TEXTCODEC
|
||||
#define QT_FEATURE_textcodec -1
|
||||
#else
|
||||
#define QT_NO_CODECS
|
||||
#define QT_FEATURE_codecs -1
|
||||
#define QT_FEATURE_commandlineparser 1
|
||||
#define QT_FEATURE_textcodec 1
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -40,8 +40,6 @@
|
||||
|
||||
#include <qplatformdefs.h> // always first
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
|
||||
#include "qmimedatabase.h"
|
||||
#include "qmimedatabase_p.h"
|
||||
|
||||
@ -797,5 +795,3 @@ QList<QMimeType> QMimeDatabase::allMimeTypes() const
|
||||
*/
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <QtCore/qmimetype.h>
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include <QtCore/qstringlist.h>
|
||||
|
||||
@ -92,5 +92,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // QMIMEDATABASE_H
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
#include "qmimetype.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include "qmimetype_p.h"
|
||||
#include "qmimeglobpattern_p.h"
|
||||
@ -116,5 +116,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // QMIMEDATABASE_P_H
|
||||
|
@ -39,8 +39,6 @@
|
||||
|
||||
#include "qmimeglobpattern_p.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
|
||||
#include <QRegExp>
|
||||
#include <QStringList>
|
||||
#include <QDebug>
|
||||
@ -239,5 +237,3 @@ void QMimeAllGlobPatterns::clear()
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include <QtCore/qstringlist.h>
|
||||
#include <QtCore/qhash.h>
|
||||
@ -162,5 +162,4 @@ public:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // QMIMEGLOBPATTERN_P_H
|
||||
|
@ -42,8 +42,6 @@
|
||||
|
||||
#include "qmimemagicrule_p.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
|
||||
#include "qmimetypeparser_p.h"
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QDebug>
|
||||
@ -364,5 +362,3 @@ bool QMimeMagicRule::matches(const QByteArray &data) const
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qscopedpointer.h>
|
||||
@ -125,5 +125,4 @@ Q_DECLARE_SHARED(QMimeMagicRule)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // QMIMEMAGICRULE_H
|
||||
|
@ -41,8 +41,6 @@
|
||||
|
||||
#include "qmimemagicrulematcher_p.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
|
||||
#include "qmimetype_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -106,4 +104,3 @@ unsigned QMimeMagicRuleMatcher::priority() const
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QT_NO_MIMETYPE
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
#include "qmimemagicrule_p.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qlist.h>
|
||||
@ -94,5 +94,4 @@ Q_DECLARE_SHARED(QMimeMagicRuleMatcher)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // QMIMEMAGICRULEMATCHER_P_H
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
#include "qmimeprovider_p.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
|
||||
#include "qmimetypeparser_p.h"
|
||||
#include <qstandardpaths.h>
|
||||
#include "qmimemagicrulematcher_p.h"
|
||||
@ -757,5 +755,3 @@ void QMimeXMLProvider::addMagicMatcher(const QMimeMagicRuleMatcher &matcher)
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
#include "qmimedatabase_p.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include "qmimeglobpattern_p.h"
|
||||
#include <QtCore/qdatetime.h>
|
||||
@ -173,5 +173,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // QMIMEPROVIDER_P_H
|
||||
|
@ -40,8 +40,6 @@
|
||||
|
||||
#include "qmimetype.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
|
||||
#include "qmimetype_p.h"
|
||||
#include "qmimedatabase_p.h"
|
||||
#include "qmimeprovider_p.h"
|
||||
@ -526,5 +524,3 @@ QDebug operator<<(QDebug debug, const QMimeType &mime)
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include <QtCore/qobjectdefs.h>
|
||||
#include <QtCore/qshareddata.h>
|
||||
@ -135,5 +135,4 @@ Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QMimeType &mime);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // QMIMETYPE_H
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include <QtCore/private/qglobal_p.h>
|
||||
#include "qmimetype.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qstringlist.h>
|
||||
@ -124,5 +124,4 @@ QT_END_NAMESPACE
|
||||
QT_END_NAMESPACE
|
||||
#endif
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // QMIMETYPE_P_H
|
||||
|
@ -41,8 +41,6 @@
|
||||
|
||||
#include "qmimetypeparser_p.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
|
||||
#include "qmimetype_p.h"
|
||||
#include "qmimemagicrulematcher_p.h"
|
||||
|
||||
@ -341,5 +339,3 @@ bool QMimeTypeParserBase::parse(QIODevice *dev, const QString &fileName, QString
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
#include "qmimedatabase_p.h"
|
||||
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
QT_REQUIRE_CONFIG(mimetype);
|
||||
|
||||
#include "qmimeprovider_p.h"
|
||||
|
||||
@ -129,5 +129,4 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_MIMETYPE
|
||||
#endif // MIMETYPEPARSER_P_H
|
||||
|
@ -334,7 +334,7 @@ QStateMachine *QAbstractTransition::machine() const
|
||||
return d->machine();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
|
||||
/*!
|
||||
Adds the given \a animation to this transition.
|
||||
|
@ -53,7 +53,7 @@ class QAbstractState;
|
||||
class QState;
|
||||
class QStateMachine;
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
class QAbstractAnimation;
|
||||
#endif
|
||||
|
||||
@ -86,7 +86,7 @@ public:
|
||||
|
||||
QStateMachine *machine() const;
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
void addAnimation(QAbstractAnimation *animation);
|
||||
void removeAnimation(QAbstractAnimation *animation);
|
||||
QList<QAbstractAnimation*> animations() const;
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
QVector<QPointer<QAbstractState> > targetStates;
|
||||
QAbstractTransition::TransitionType transitionType;
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
QList<QAbstractAnimation*> animations;
|
||||
#endif
|
||||
};
|
||||
|
@ -59,7 +59,7 @@
|
||||
#include "qeventtransition_p.h"
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
#include "qpropertyanimation.h"
|
||||
#include "qanimationgroup.h"
|
||||
#include <private/qvariantanimation_p.h>
|
||||
@ -167,7 +167,7 @@ QT_BEGIN_NAMESPACE
|
||||
\sa start(), stop(), started(), stopped(), runningChanged()
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
/*!
|
||||
\property QStateMachine::animated
|
||||
|
||||
@ -401,7 +401,7 @@ QStateMachinePrivate::QStateMachinePrivate()
|
||||
error = QStateMachine::NoError;
|
||||
globalRestorePolicy = QState::DontRestoreProperties;
|
||||
signalEventGenerator = 0;
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
animated = true;
|
||||
#endif
|
||||
}
|
||||
@ -700,12 +700,12 @@ void QStateMachinePrivate::microstep(QEvent *event, const QList<QAbstractTransit
|
||||
|
||||
executeTransitionContent(event, enabledTransitions);
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
QList<QAbstractAnimation *> selectedAnimations = selectAnimations(enabledTransitions);
|
||||
#endif
|
||||
|
||||
enterStates(event, exitedStates, enteredStates, statesForDefaultEntry, assignmentsForEnteredStates
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
, selectedAnimations
|
||||
#endif
|
||||
);
|
||||
@ -827,7 +827,7 @@ void QStateMachinePrivate::exitStates(QEvent *event, const QList<QAbstractState*
|
||||
#endif
|
||||
QAbstractStatePrivate::get(s)->callOnExit(event);
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
terminateActiveAnimations(s, assignmentsForEnteredStates);
|
||||
#else
|
||||
Q_UNUSED(assignmentsForEnteredStates);
|
||||
@ -942,7 +942,7 @@ void QStateMachinePrivate::enterStates(QEvent *event, const QList<QAbstractState
|
||||
const QList<QAbstractState*> &statesToEnter_sorted,
|
||||
const QSet<QAbstractState*> &statesForDefaultEntry,
|
||||
QHash<QAbstractState*, QVector<QPropertyAssignment> > &propertyAssignmentsForState
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
, const QList<QAbstractAnimation *> &selectedAnimations
|
||||
#endif
|
||||
)
|
||||
@ -958,7 +958,7 @@ void QStateMachinePrivate::enterStates(QEvent *event, const QList<QAbstractState
|
||||
configuration.insert(s);
|
||||
registerTransitions(s);
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
initializeAnimations(s, selectedAnimations, exitedStates_sorted, propertyAssignmentsForState);
|
||||
#endif
|
||||
|
||||
@ -1002,7 +1002,7 @@ void QStateMachinePrivate::enterStates(QEvent *event, const QList<QAbstractState
|
||||
{
|
||||
QState *ss = toStandardState(s);
|
||||
if (ss
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
&& !animationsForState.contains(s)
|
||||
#endif
|
||||
)
|
||||
@ -1513,7 +1513,7 @@ void QStateMachinePrivate::setError(QStateMachine::Error errorCode, QAbstractSta
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
|
||||
QStateMachinePrivate::InitializeAnimationResult
|
||||
QStateMachinePrivate::initializeAnimation(QAbstractAnimation *abstractAnimation,
|
||||
@ -1710,7 +1710,7 @@ void QStateMachinePrivate::initializeAnimations(QAbstractState *state, const QLi
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !QT_NO_ANIMATION
|
||||
#endif // animation
|
||||
|
||||
QAbstractTransition *QStateMachinePrivate::createInitialTransition() const
|
||||
{
|
||||
@ -1814,7 +1814,7 @@ void QStateMachinePrivate::_q_start()
|
||||
QHash<RestorableId, QVariant> pendingRestorables;
|
||||
QHash<QAbstractState*, QVector<QPropertyAssignment> > assignmentsForEnteredStates =
|
||||
computePropertyAssignments(enteredStates, pendingRestorables);
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
QList<QAbstractAnimation*> selectedAnimations = selectAnimations(transitions);
|
||||
#endif
|
||||
// enterStates() will set stopProcessingReason to Finished if a final
|
||||
@ -1822,7 +1822,7 @@ void QStateMachinePrivate::_q_start()
|
||||
stopProcessingReason = EventQueueEmpty;
|
||||
enterStates(&nullEvent, exitedStates, enteredStates, statesForDefaultEntry,
|
||||
assignmentsForEnteredStates
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
, selectedAnimations
|
||||
#endif
|
||||
);
|
||||
@ -2957,7 +2957,7 @@ void QStateMachine::onExit(QEvent *event)
|
||||
QState::onExit(event);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
|
||||
/*!
|
||||
Returns whether animations are enabled for this state machine.
|
||||
@ -3004,7 +3004,7 @@ void QStateMachine::removeDefaultAnimation(QAbstractAnimation *animation)
|
||||
d->defaultAnimations.removeAll(animation);
|
||||
}
|
||||
|
||||
#endif // QT_NO_ANIMATION
|
||||
#endif // animation
|
||||
|
||||
|
||||
// Begin moc-generated code -- modify carefully (check "HAND EDIT" parts)!
|
||||
|
@ -60,7 +60,7 @@ class Q_CORE_EXPORT QStateMachine : public QState
|
||||
Q_PROPERTY(QString errorString READ errorString)
|
||||
Q_PROPERTY(QState::RestorePolicy globalRestorePolicy READ globalRestorePolicy WRITE setGlobalRestorePolicy)
|
||||
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
Q_PROPERTY(bool animated READ isAnimated WRITE setAnimated)
|
||||
#endif
|
||||
public:
|
||||
@ -122,14 +122,14 @@ public:
|
||||
|
||||
bool isRunning() const;
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
bool isAnimated() const;
|
||||
void setAnimated(bool enabled);
|
||||
|
||||
void addDefaultAnimation(QAbstractAnimation *animation);
|
||||
QList<QAbstractAnimation *> defaultAnimations() const;
|
||||
void removeDefaultAnimation(QAbstractAnimation *animation);
|
||||
#endif // QT_NO_ANIMATION
|
||||
#endif // animation
|
||||
|
||||
QState::RestorePolicy globalRestorePolicy() const;
|
||||
void setGlobalRestorePolicy(QState::RestorePolicy restorePolicy);
|
||||
@ -175,7 +175,7 @@ private:
|
||||
Q_DECLARE_PRIVATE(QStateMachine)
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_start())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_process())
|
||||
#ifndef QT_NO_ANIMATION
|
||||
#if QT_CONFIG(animation)
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_animationFinished())
|
||||
#endif
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_startDelayedEventTimer(int, int))
|
||||
|
@ -297,7 +297,7 @@ public:
|
||||
void initializeAnimations(QAbstractState *state, const QList<QAbstractAnimation*> &selectedAnimations,
|
||||
const QList<QAbstractState *> &exitedStates_sorted,
|
||||
QHash<QAbstractState *, QVector<QPropertyAssignment> > &assignmentsForEnteredStates);
|
||||
#endif // QT_NO_ANIMATION
|
||||
#endif // animation
|
||||
|
||||
QSignalEventGenerator *signalEventGenerator;
|
||||
|
||||
|
@ -38,8 +38,6 @@
|
||||
****************************************************************************/
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#ifndef QT_NO_ANIMATION
|
||||
|
||||
#include <QtCore/qvariantanimation.h>
|
||||
#include <private/qvariantanimation_p.h>
|
||||
#include <QtGui/qcolor.h>
|
||||
@ -90,5 +88,3 @@ static void qUnregisterGuiGetInterpolator()
|
||||
Q_DESTRUCTOR_FUNCTION(qUnregisterGuiGetInterpolator)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ANIMATION
|
||||
|
@ -45,7 +45,7 @@ include(painting/painting.pri)
|
||||
include(util/util.pri)
|
||||
include(math3d/math3d.pri)
|
||||
include(opengl/opengl.pri)
|
||||
include(animation/animation.pri)
|
||||
qtConfig(animation): include(animation/animation.pri)
|
||||
include(itemmodels/itemmodels.pri)
|
||||
include(vulkan/vulkan.pri)
|
||||
|
||||
|
@ -47,8 +47,10 @@
|
||||
#include "private/qiconloader_p.h"
|
||||
#include "qpainter.h"
|
||||
#include "qfileinfo.h"
|
||||
#if QT_CONFIG(mimetype)
|
||||
#include <qmimedatabase.h>
|
||||
#include <qmimetype.h>
|
||||
#endif
|
||||
#include "qpixmapcache.h"
|
||||
#include "qvariant.h"
|
||||
#include "qcache.h"
|
||||
@ -1079,10 +1081,10 @@ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State
|
||||
|
||||
QFileInfo info(fileName);
|
||||
QIconEngine *engine = iconEngineFromSuffix(fileName, info.suffix());
|
||||
#ifndef QT_NO_MIMETYPE
|
||||
#if QT_CONFIG(mimetype)
|
||||
if (!engine)
|
||||
engine = iconEngineFromSuffix(fileName, QMimeDatabase().mimeTypeForFile(info).preferredSuffix());
|
||||
#endif // !QT_NO_MIMETYPE
|
||||
#endif // mimetype
|
||||
d = new QIconPrivate(engine ? engine : new QPixmapIconEngine);
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user