Remove safeboolean use in gd_jpeg.c

This is a backport of
e5502c7a3f/src/gd_jpeg.c.
This commit is contained in:
Nikita Popov 2019-06-11 16:54:45 +02:00
parent 0849a621fd
commit 2290102172

View File

@ -542,19 +542,6 @@ static int CMYKToRGB(int c, int m, int y, int k, int inverted)
*
*/
/* Different versions of libjpeg use either 'jboolean' or 'boolean', and
some platforms define 'boolean', and so forth. Deal with this
madness by typedeffing 'safeboolean' to 'boolean' if HAVE_BOOLEAN
is already set, because this is the test that libjpeg uses.
Otherwise, typedef it to int, because that's what libjpeg does
if HAVE_BOOLEAN is not defined. -TBB */
#ifdef HAVE_BOOLEAN
typedef boolean safeboolean;
#else
typedef int safeboolean;
#endif /* HAVE_BOOLEAN */
/* Expanded data source object for gdIOCtx input */
typedef struct
@ -563,7 +550,7 @@ typedef struct
gdIOCtx *infile; /* source stream */
unsigned char *buffer; /* start of buffer */
safeboolean start_of_file; /* have we gotten any data yet? */
boolean start_of_file; /* have we gotten any data yet? */
} my_source_mgr;
typedef my_source_mgr *my_src_ptr;
@ -622,7 +609,7 @@ void init_source (j_decompress_ptr cinfo)
#define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
safeboolean fill_input_buffer (j_decompress_ptr cinfo)
boolean fill_input_buffer (j_decompress_ptr cinfo)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
/* 2.0.12: signed size. Thanks to Geert Jansen */
@ -813,7 +800,7 @@ void init_destination (j_compress_ptr cinfo)
* write it out when emptying the buffer externally.
*/
safeboolean empty_output_buffer (j_compress_ptr cinfo)
boolean empty_output_buffer (j_compress_ptr cinfo)
{
my_dest_ptr dest = (my_dest_ptr) cinfo->dest;