X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?a=blobdiff_plain;f=pctb%2Focr.c;h=436aa8dc16078ae830b54de0e1e7468c71bcb4fd;hb=2ca58afcdf02d87e31115110ecd6c83ecc5dabc7;hp=7eb871a68844acc1d802747e67346aed760b3729;hpb=0826bbc65e59d47c270f05af419f24fdfc3c349c;p=ypp-sc-tools.web-live.git diff --git a/pctb/ocr.c b/pctb/ocr.c index 7eb871a..436aa8d 100644 --- a/pctb/ocr.c +++ b/pctb/ocr.c @@ -24,7 +24,7 @@ static const char *context_names[]= { #define NCONTEXTS (sizeof(context_names)/sizeof(context_names[0])) -#define SPACE_SPACES 3 +#define SPACE_SPACES 4 struct OcrReader { int h; @@ -185,7 +185,9 @@ static void callout_unknown(OcrReader *rd, int w, Pixcol cols[], * so we aren't in any danger of overwriting some other fd 4: */ r= dup2(donepipe[1],4); eassert(r==4); execlp("./show-thing.tcl", "./show-thing.tcl", - "--automatic","1",(char*)0); + DEBUGP(callout) ? "--debug" : "--noop-arg", + "--automatic-1", + (char*)0); eassert(!"execlp failed"); } r= close(jobpipe[0]); eassert(!r); @@ -287,9 +289,8 @@ const struct OcrCellTypeInfo ocr_celltype_text= { }; static void vdebugf(const char *fmt, va_list al) { -#ifdef DEBUG_OCR - vfprintf(debug,fmt,al); -#endif + 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);