Branch: Tag:

2000-08-11

2000-08-11 19:25:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed a few warnings.
Fixed a minor bug.

Rev: src/modules/Image/colors.c:1.37

1:   /*   **! module Image   **! note - **! $Id: colors.c,v 1.36 2000/08/11 08:42:19 mirar Exp $ + **! $Id: colors.c,v 1.37 2000/08/11 19:25:53 grubba Exp $   **! submodule Color   **!   **! This module keeps names and easy handling
179:      #include "global.h"    - RCSID("$Id: colors.c,v 1.36 2000/08/11 08:42:19 mirar Exp $"); + RCSID("$Id: colors.c,v 1.37 2000/08/11 19:25:53 grubba Exp $");      #include "image_machine.h"   
593:    }    else if (i!=sizeof(COLORTYPE)*2)    { -  int sh; +  ptrdiff_t sh;    if (i>8) i=8;       sh=4*(sizeof(COLORTYPE)*2-i);
1087:    FLOAT_TYPE x=0.0;    get_all_args("Image.Color.Color->`*",args,"%f",&x);    pop_n_elems(args); -  _image_make_rgb_color((int)(THIS->rgb.r*x), -  (int)(THIS->rgb.g*x), -  (int)(THIS->rgb.b*x)); +  _image_make_rgb_color(DOUBLE_TO_INT(THIS->rgb.r*x), +  DOUBLE_TO_INT(THIS->rgb.g*x), +  DOUBLE_TO_INT(THIS->rgb.b*x));   }      int image_color_svalue(struct svalue *v,rgb_group *rgb)
1195:    {    /* #rgb, #rrggbb, #rrrgggbbb, etc */    -  size_t i = sp[-1].u.string->len-1, j, k, rgb[3]; +  size_t i = sp[-1].u.string->len-1, j, k; +  unsigned INT32 rgb[3];    unsigned char *src=(unsigned char *)sp[-1].u.string->str+1;    if (!(i%3))    {