On 06/23/2010 04:10 AM, MacArthur, Ian (SELEX GALILEO, UK) wrote:

> Albreccht offers: 
>
>(b) patch the FLTK code - add "typedef char[int] boolean;" just before
>or after "#include <jpeglib.h>" in src/Fl_JPEG_Image.cxx. That's just
> the minimal patch you can do to make it work with your MinGW cross
> environment. 
>
> Ian counters:
> 
> My version of this "fix" would be:
>     : 
> #define boolean jpeg_boolean

My preferred fix would be to drop "(boolean)" all together unless someone
knows of a compiler too stupid to perform implicit conversions from the
Holy constant value, "0", to an int, unsigned int, char, unsigned char, boolean,
jpeg_boolean or even wumpus (assuming that a wumpus is a numeric type).

To me, it seems unlikely libjpeg or its successors will ever

        #define FALSE 500

(which might foul up conversion to an 8-bit type).  And,

 dinfo.quantize_colors  = FALSE;

has less visual clutter than:

  dinfo.quantize_colors  = (boolean)FALSE; // or the C++ equivalent
  dinfo.quantize_colors  = boolean(FALSE);

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

Reply via email to