Branch: Tag:

2000-08-09

2000-08-09 17:53:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed a few warnings.

Rev: src/modules/Image/colors.c:1.34
Rev: src/modules/Image/match.h:1.9
Rev: src/modules/Image/search.c:1.17

1:   /*   **! module Image   **! note - **! $Id: colors.c,v 1.33 2000/08/09 17:39:19 grubba Exp $ + **! $Id: colors.c,v 1.34 2000/08/09 17:42:13 grubba Exp $   **! submodule Color   **!   **! This module keeps names and easy handling
179:      #include "global.h"    - RCSID("$Id: colors.c,v 1.33 2000/08/09 17:39:19 grubba Exp $"); + RCSID("$Id: colors.c,v 1.34 2000/08/09 17:42:13 grubba Exp $");      #include "image_machine.h"   
226:      /* forward */   static void _image_make_rgbl_color(INT32 r,INT32 g,INT32 b); - static void _image_make_rgbf_color(float r,float g,float b); + static void _image_make_rgbf_color(double r, double g, double b);   static void image_make_hsv_color(INT32 args);   static void image_make_cmyk_color(INT32 args);   static void image_make_color(INT32 args);
1431:    RGBL_TO_RGB(cs->rgb,cs->rgbl);   }    - static void _image_make_rgbf_color(float r,float g,float b) + static void _image_make_rgbf_color(double r, double g, double b)   {   #define FOO(X) FLOAT_TO_COLORL((X)<0.0?0.0:(X)>1.0?1.0:(X))    _image_make_rgbl_color(FOO(r),FOO(g),FOO(b));
1506:   #define p (v * (1 - s))   #define q (v * (1 - (s * f)))   #define t (v * (1 - (s * (1 -f)))) -  switch((int)i) +  switch(DOUBLE_TO_INT(i))    {    case 6: /* 360 degrees. Same as 0.. */    case 0: r = v; g = t; b = p; break;
1515:    case 3: r = p; g = q; b = v; break;    case 4: r = t; g = p; b = v; break;    case 5: r = v; g = p; b = q; break; -  default: error("internal error (hue=%d <= hsv[%f,%f,%f])\n",(int)i,h,s,v); +  default: error("internal error (hue=%d <= hsv[%f,%f,%f])\n", +  DOUBLE_TO_INT(i), h, s, v);    }    }   #undef i