X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=blobdiff_plain;f=pctb%2Focr.h;fp=pctb%2Focr.h;h=a688742cc631f0bdb88b66bce1b3e8d360713794;hp=60234a8e91e6028ea8f028a912f0a53d8eafbc7d;hb=2ca58afcdf02d87e31115110ecd6c83ecc5dabc7;hpb=0826bbc65e59d47c270f05af419f24fdfc3c349c diff --git a/pctb/ocr.h b/pctb/ocr.h index 60234a8..a688742 100644 --- a/pctb/ocr.h +++ b/pctb/ocr.h @@ -7,10 +7,6 @@ #define OCR_H -// #define DEBUG_RECTANGLES -// #define DEBUG_OCR - - #define _GNU_SOURCE #include @@ -58,6 +54,26 @@ OcrResultGlyph *ocr(OcrReader *rd, OcrCellType, int w, Pixcol cols[]); /*----- debugging arrangements, rather contingent -----*/ +#define DEBUG_FLAG_LIST \ + DF(ocr) \ + DF(rect) \ + DF(callout) + +enum { +#define DF(f) dbg__shift_##f, + DEBUG_FLAG_LIST +#undef DF +}; +enum { +#define DF(f) dbg_##f = 1 << dbg__shift_##f, + DEBUG_FLAG_LIST +#undef DF +}; + +unsigned debug_flags; + +#define DEBUGP(f) (!!(debug_flags & dbg_##f)) + void debug_flush(void); #define eassert assert