summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenton Woods <denton.woods@gmail.com>2017-01-07 10:49:53 -0600
committerDenton Woods <denton.woods@gmail.com>2017-01-07 10:49:53 -0600
commit4a2d7822f12c82e6c32b9b51d52c4bdc13ca9375 (patch)
tree4b769a9c80c490524bc66fa0cb0e69085bde78e2
parent41fcabbee7be1a7763ecf48c87e0e803f42b41bf (diff)
downloaddevil-4a2d7822f12c82e6c32b9b51d52c4bdc13ca9375.tar.gz
- Fixing boolean compilation errors under Linux / MacOS, issue #48 at https://github.com/DentonW/DevIL/issues/48
-rw-r--r--DevIL/src-IL/src/il_jpeg.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/DevIL/src-IL/src/il_jpeg.cpp b/DevIL/src-IL/src/il_jpeg.cpp
index 57c2bade..4cc16485 100644
--- a/DevIL/src-IL/src/il_jpeg.cpp
+++ b/DevIL/src-IL/src/il_jpeg.cpp
@@ -223,7 +223,7 @@ METHODDEF(void)
init_source (j_decompress_ptr cinfo)
{
iread_ptr src = (iread_ptr) cinfo->src;
- src->start_of_file = TRUE;
+ src->start_of_file = (boolean)IL_TRUE;
}
@@ -253,7 +253,7 @@ fill_input_buffer (j_decompress_ptr cinfo)
src->pub.next_input_byte = src->buffer;
src->pub.bytes_in_buffer = nbytes;
- src->start_of_file = IL_FALSE;
+ src->start_of_file = (boolean)IL_FALSE;
return (boolean)IL_TRUE;
}
@@ -334,13 +334,13 @@ ILboolean iLoadJpegInternal()
if ((result = setjmp(JpegJumpBuffer) == 0) != IL_FALSE) {
jpeg_create_decompress(&JpegInfo);
- JpegInfo.do_block_smoothing = IL_TRUE;
- JpegInfo.do_fancy_upsampling = IL_TRUE;
+ JpegInfo.do_block_smoothing = (boolean)IL_TRUE;
+ JpegInfo.do_fancy_upsampling = (boolean)IL_TRUE;
//jpeg_stdio_src(&JpegInfo, iGetFile());
devil_jpeg_read_init(&JpegInfo);
- jpeg_read_header(&JpegInfo, IL_TRUE);
+ jpeg_read_header(&JpegInfo, (boolean)IL_TRUE);
result = ilLoadFromJpegStruct(&JpegInfo);
@@ -391,7 +391,7 @@ empty_output_buffer (j_compress_ptr cinfo)
iwrite(dest->buffer, 1, OUTPUT_BUF_SIZE);
dest->pub.next_output_byte = dest->buffer;
dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
- return IL_TRUE;
+ return (boolean)IL_TRUE;
}
METHODDEF(void)
@@ -550,16 +550,16 @@ ILboolean iSaveJpegInternal()
} //EXIF not present in libjpeg...
#else*/
Type = Type;
- JpegInfo.write_JFIF_header = TRUE;
+ JpegInfo.write_JFIF_header = (boolean)TRUE;
//#endif//IL_USE_JPEGLIB_UNMODIFIED
// Set the quality output
- jpeg_set_quality(&JpegInfo, iGetInt(IL_JPG_QUALITY), IL_TRUE);
+ jpeg_set_quality(&JpegInfo, iGetInt(IL_JPG_QUALITY), (boolean)IL_TRUE);
// Sets progressive saving here
if (ilGetBoolean(IL_JPG_PROGRESSIVE))
jpeg_simple_progression(&JpegInfo);
- jpeg_start_compress(&JpegInfo, IL_TRUE);
+ jpeg_start_compress(&JpegInfo, (boolean)IL_TRUE);
//row_stride = image_width * 3; // JSAMPLEs per row in image_buffer
@@ -970,7 +970,7 @@ ILboolean ilSaveFromJpegStruct(void *_JpegInfo)
JpegInfo->image_height = TempImage->Height;
JpegInfo->input_components = TempImage->Bpp; // # of color components per pixel
- jpeg_start_compress(JpegInfo, IL_TRUE);
+ jpeg_start_compress(JpegInfo, (boolean)IL_TRUE);
//row_stride = image_width * 3; // JSAMPLEs per row in image_buffer