On 23.06.2010, at 20:43, imacarthur wrote:
> On 23 Jun 2010, at 17:24, Jim Wilson wrote:
>
>> (assuming that a wumpus is a numeric type).
>
> I don't think it is though, is it?
>
>
>> dinfo.quantize_colors = FALSE;
>
> Oh yes. That'll work.

Hmm, I'm not so sure about that. It will probably fix Jim's
case, but I wondered why the cast was in there in the first
place, and I found this (removed irrelevant parts):

$ svn diff -c 1931 Fl_JPEG_Image.cxx
Index: Fl_JPEG_Image.cxx
===================================================================
--- Fl_JPEG_Image.cxx   (Revision 1930)
+++ Fl_JPEG_Image.cxx   (Revision 1931)
@@ -64,7 +64,7 @@
    jpeg_stdio_src(&cinfo, fp);
    jpeg_read_header(&cinfo, 1);

-  cinfo.quantize_colors      = 0;
+  cinfo.quantize_colors      = (boolean)FALSE;
    cinfo.out_color_space      = JCS_RGB;
    cinfo.out_color_components = 3;
    cinfo.output_components    = 3;
[end of diff]

Unfortunately the log ("Unixware fixes.") doesn't say anything useful
regarding this specific change. Note that cinfo has later (in r4040) 
been renamed to dinfo, as it is today.

Given that FALSE is defined in jpeg/jmorecfg.h as:

   #define FALSE  0               /* values of boolean */

the proposed change would effectively revert what was done in
svn release 1931, wouldn't it? So, the question is: why was the
cast added in r 1931?

The (boolean) cast makes the right hand side (FALSE) the same type
as quantize_colors, no matter how FALSE is defined. There may be
different definitions and picky compilers out there that are not
compatible otherwise... :-(

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to