chiark / gitweb /
before special kerning thing
[ypp-sc-tools.web-live.git] / pctb / ocr.h
index a688742cc631f0bdb88b66bce1b3e8d360713794..e8b5b1a1207dc3f5ebae2060718d7c0a96cba5b3 100644 (file)
@@ -57,7 +57,8 @@ OcrResultGlyph *ocr(OcrReader *rd, OcrCellType, int w, Pixcol cols[]);
 #define DEBUG_FLAG_LIST                                \
    DF(ocr)                                     \
    DF(rect)                                    \
-   DF(callout)
+   DF(callout)                                 \
+   DF(pages)
 
 enum {
 #define DF(f) dbg__shift_##f,
@@ -81,4 +82,13 @@ void debug_flush(void);
 
 const char *get_vardir(void);
 
+#define DEBUG_DEFINE_DEBUGF(f)                                         \
+  static void vdebugf(const char *fmt, va_list al) {                   \
+    if (DEBUGP(f))                                                     \
+      vfprintf(debug,fmt,al);                                          \
+  }                                                                    \
+  static void debugf(const char *fmt, ...) {                           \
+    va_list al;  va_start(al,fmt);  vdebugf(fmt,al);  va_end(al);      \
+  }
+
 #endif /*OCR_H*/