chiark / gitweb /
much fixes for new arrangements
[ypp-sc-tools.web-live.git] / pctb / structure.h
index 10de443ed6e55169520bea1d7e4e57fd3610bb05..b246c87ba2acf20579998ea13532116fbc644bc7 100644 (file)
@@ -14,16 +14,6 @@ extern const CanonColourInfo canoncolourinfos[];
 
 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                               \
@@ -48,7 +38,12 @@ CanonImage *alloc_canon_image(int w, int h);
            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)