X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=pctb%2Fstructure.h;h=73f65718354a19e88dcdde11c307010d90f709f5;hp=84fdcae2e2a1fb75c004634301b008e4c859cba4;hb=059fab3ad374847da031d23d7e25ee25e888bce0;hpb=817c4b56d7b72dbb9dcce70d0e22f57d8f687ba0 diff --git a/pctb/structure.h b/pctb/structure.h index 84fdcae..73f6571 100644 --- a/pctb/structure.h +++ b/pctb/structure.h @@ -50,7 +50,7 @@ static inline char canon_lookup_colour(unsigned char r, return blues->blue2[b]; } -#define CANONICALISE_IMAGE(im,w,h, COMPUTE_RGB) do{ \ +#define CANONICALISE_IMAGE(im,w,h,rgb_save, COMPUTE_RGB) do{ \ /* compute_rgb should be a number of statements, or \ * a block, which assigns to \ * Rgb rgb; \ @@ -61,15 +61,14 @@ static inline char canon_lookup_colour(unsigned char r, * each pixel in reading order. \ */ \ (im)= alloc_canon_image((w), (h)); \ - RgbImage *rgb_save; \ - (im)->rgb= rgb_save= alloc_rgb_image((w), (h)); \ + (rgb_save)= alloc_rgb_image((w), (h)); \ \ int x,y; \ for (y=0; y<(h); y++) { \ for (x=0; x<(w); x++) { \ unsigned char r,g,b; \ COMPUTE_RGB; \ - CANONIMG_ALSO_STORERGB(rgb_save); \ + CANONIMG_ALSO_STORERGB((rgb_save)); \ (im)->d[y*(w) + x]= canon_lookup_colour(r,g,b); \ } \ if (DEBUGP(rect)) { \