X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=pctb%2Focr.c;h=f5826dfe84a01e14b8ba1032aba301595eef367c;hp=436aa8dc16078ae830b54de0e1e7468c71bcb4fd;hb=80646aad7ee5fdbb1ce28b3fe40c5776241d540d;hpb=2ca58afcdf02d87e31115110ecd6c83ecc5dabc7 diff --git a/pctb/ocr.c b/pctb/ocr.c index 436aa8d..f5826df 100644 --- a/pctb/ocr.c +++ b/pctb/ocr.c @@ -37,6 +37,8 @@ static FILE *resolver; static pid_t resolver_pid; static int resolver_done; +DEBUG_DEFINE_DEBUGF(ocr) + static void fgetsline(FILE *f, char *lbuf, size_t lbufsz) { char *s= fgets(lbuf,lbufsz,f); eassert(s); @@ -288,14 +290,6 @@ const struct OcrCellTypeInfo ocr_celltype_text= { .midword=1 /* Lower only */ }; -static void vdebugf(const char *fmt, va_list al) { - if (DEBUGP(ocr)) - vfprintf(debug,fmt,al); -} -static void debugf(const char *fmt, ...) { - va_list al; va_start(al,fmt); vdebugf(fmt,al); va_end(al); -} - OcrResultGlyph *ocr(OcrReader *rd, OcrCellType ct, int w, Pixcol cols[]) { int nspaces; unsigned ctxmap;