CanonImage *alloc_canon_image(int w, int h);
-#ifdef DEBUG_RECTANGLES
-# define CANIMG_DEBUG_RECTANGLE_1LINE(im,w,h) \
- fprintf(debug, "%4d ",y); \
- int r= fwrite(im->d + y*w, 1,w, debug); \
- eassert(r==w); \
- fputc('\n',debug);
-#else
-# define CANIMG_DEBUG_RECTANGLE_1LINE(im,y,h) /* nothing */
-#endif
-
#define CANONICALISE_IMAGE(im,w,h, COMPUTE_RGB) do{ \
/* compute_rgb should be a number of statements, or \
* a block, which assigns to \
break; \
} \
} \
- CANIMG_DEBUG_RECTANGLE_1LINE((im),(w),(h)) \
+ if (DEBUGP(rect)) { \
+ fprintf(debug, "%4d ",y); \
+ int r= fwrite(im->d + y*w, 1,w, debug); \
+ eassert(r==w); \
+ fputc('\n',debug); \
+ } \
} \
debug_flush(); \
}while(0)