rem: unsigned long r, g, b, dr, dg, db;
add: long r, g, b, dr, dg, db;
context: renderMVGradient(unsigned width, unsigned height, RColor **colors, int count){    int i, j, k;    unsigned long r, g, b, dr, dg, db;    unsigned lineSize = width*3;    RImage *image;    unsigned char *ptr, *tmp;    unsigned height2;    int x;    unsigned char rr, gg, bb;        assert(count > 2);        image = RCreateImage(width, height, False);    if (!image) {	return NULL;    }    ptr = image->data;        if (count > height)	count = height;        if (count > 1)        height2 = height/(count-1);    else        height2 = height;        k = 0;    r = colors[0]->red << 16;    g = colors[0]->green << 16;    b = colors[0]->blue << 16;    for (i=1; i<count; i++) {	dr = ((int)(colors[i]->red   - colors[i-1]->red)  <<16)/(int)height2;	dg = ((int)(colors[i]->green - colors[i-1]->green)<<16)/(int)height2;	db = ((int)(colors[i]->blue  - colors[i-1]->blue) <<16)/(int)height2;	for (j=0; j<height2; j++) {	    rr = r>>16;	    gg = g>>16;	    bb = b>>16;	    for (x=0; x<width/4; x++) {		*ptr++ = rr; *ptr++ = gg; *ptr++ = bb;		*ptr++ = rr; *ptr++ = gg; *ptr++ = bb;		*ptr++ = rr; *ptr++ = gg; *ptr++ = bb;		*ptr++ = rr; *ptr++ = gg; *ptr++ = bb;	    }	    switch (width%4) {	     case 3: *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;	     case 2: *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;	     case 1: *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;	    }	    r += dr;	    g += dg;	    b += db;	    k++;	}	r = colors[i]->red << 16;	g = colors[i]->green << 16;	b = colors[i]->blue << 16;    }    rr = r>>16;    gg = g>>16;    bb = b>>16;    if (k<height) {        tmp = ptr;        for (x=0; x<width/4; x++) {            *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;            *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;            *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;            *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;        }        switch (width%4) {        case 3: *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;        case 2: *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;        case 1: *ptr++ = rr; *ptr++ = gg; *ptr++ = bb;        default: break;        }        for (j=k+1; j<height; j++) {            memcpy(ptr, tmp, lineSize);            ptr += lineSize;        }    }        return image;}